Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Plw the following usf code,what is the real problem? 1

Status
Not open for further replies.

Cathy039

Civil/Environmental
Sep 15, 2017
14
SUBROUTINE DLOAD(F,KSTEP,KINC,TIME,NOEL,NPT,LAYER,KSPT,COORDS,JLTYP,SNAME)
INCLUDE 'ABA_PARAM.INC'
DIMENSION TIME(2), COORDS (3)
CHARACTER*80 SNAME
PARAMETER(RADIUS=0.15D0,AREA=0.D0)
PI=2.*ASIN(1.D0)
THETA=ACOS(COORDS(3)/RADIUS)/180
IF(COORDS(3).GE.0) THEN
AREA1=THETA*PI*RADIUS**2-COORDS(3)*SQRT(RADIUS**2-COORDS(3)**2)
ELSE
AREA1=THETA*PI*RADIUS**2+COORDS(3)*SQRT(RADIUS**2-COORDS(3)**2)
END IF
AREA=AREA+AREA1
F=DENSITY*GRAVIATION*AREA*PI*RADIUS/32
RETURN
END
I run it in Visual Studio 2013. The error messages are below:
Error 3 Compilation Aborted (code 1) C:\Users\YC\Documents\Visual Studio 2013\Projects\Console1\Console1\921.f90 1
Error 2 error #6414: This PARAMETER constant name is invalid in this context. [AREA] C:\Users\YC\Documents\Visual Studio 2013\Projects\Console1\Console1\921.f90 26
Error 1 error #5102: Cannot open include file 'ABA_PARAM.INC' C:\Users\YC\Documents\Visual Studio 2013\Projects\Console1\Console1\921.f90 15



 
Replies continue below

Recommended for you

I'm not a Fortran-expert, but where is DENSITY and GRAVITY defined before you use it to define F?
 
Hi

You defined AREA variable as parameter it means the variable never change value and always will be 0.0.
Code:
PARAMETER(RADIUS=0.15D0,AREA=0.D0)
but next you try to change AREA value
Code:
AREA=AREA+AREA1

Bartosz



VIM filetype plugin for Abaqus
 
Hi,Mustaine3.
Thank you for your reply.
I have defined DENSITY and GRAVITY in input file, so you means I didn't call these parameters from the inp file, then how to call the parameters?
 
Hi,Bartosz.
Thank you for suggestion.
I have corrected it, and error 2 disappeared.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor