Plw the following usf code,what is the real problem?
Plw the following usf code,what is the real problem?
(OP)
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
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





RE: Plw the following usf code,what is the real problem?
RE: Plw the following usf code,what is the real problem?
You defined AREA variable as parameter it means the variable never change value and always will be 0.0.
CODE
CODE
Bartosz
VIM filetype plugin for Abaqus
https://github.com/gradzikb/vim-abaqus
RE: Plw the following usf code,what is the real problem?
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?
RE: Plw the following usf code,what is the real problem?
Thank you for suggestion.
I have corrected it, and error 2 disappeared.