×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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



RE: Plw the following usf code,what is the real problem?

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

RE: Plw the following usf code,what is the real problem?

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
https://github.com/gradzikb/vim-abaqus

RE: Plw the following usf code,what is the real problem?

(OP)
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?

RE: Plw the following usf code,what is the real problem?

(OP)
Hi,Bartosz.
Thank you for suggestion.
I have corrected it, and error 2 disappeared.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources