Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

DFLUX SUBROUTINE

Status
Not open for further replies.

anoop_1989

Mechanical
Joined
Feb 11, 2019
Messages
59
Location
IN
Dear all
I have written a user subroutine in Fortran for Double Ellipsoidal heat input.The purpose is to to do welding analysis in Abaqus for a 3D rectangular plate.But after running the code it is showing Problem during compilation.Any please pointout what is the error in the code.

SUBROUTINE DFLUX(FLUX,SOL,KSTEP,KINC,TIME,NOEL,NPT,COORDS,
1 JLTYP,TEMP,PRESS,SNAME)
INCLUDE 'ABA_PARAM.INC'

DIMENSION FLUX(2),TIME(2),COORDS(3)
CHARACTER*80 SNAME
a=0.003
b=0.003
cf=0.001
c=0.003
pi=3.1415
eff=0.8
V=24
v=0.00166
I=100
x0=0
y0=0
z0=0
d=v*TIME(2)
t=TIME(2)
x1=COORDS(1)-x0
y1=COORDS(2)-y0
z1=COORDS(3)-(z0+d)

Q=((eff*V*I)/(v*.001))
A=-3*x1**2/a**2
B=-3*y1**2/b**2
C=-3*z1**2/c**2
D=6*Q*cf*1.732/(a*b*c*pi*sqrt(pi))
IF(KSTEP.EQ.1) then

H=D*EXP(A+B+C)

FLUX(1)=H
else
FLUX(1)=0
end if
return
end
 
I'm not a Fortran expert, but isn't there an END IF missing?

Are variables in Fortran case sensitive?
 
Thank you Mustaine3

It was missing.I have corrected the code with END IF.Also change to capital letters.It is running successfully now.But after running the code I am not getting any change in temperature.Only it is showing the ambient temperature of 25 degree.Also it seems like it is not reading any heat input
 
Just for the record: Problems in compilation are usually written in the .log-file.

On topic: You could add something like "write(6,*) FLUX(1)" to your subroutine. By doing that, the value of FLUX(1) for each increment will be written into the .dat-file. If the values there are zero, you know that something is wrong with your subroutine.

However, I suggest to test any subroutine with a very simple model, so you can get an idea on how (or if) it behaves.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top