Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Weld modelig 1

Status
Not open for further replies.

skadi1

Mechanical
Jun 4, 2011
5
0
0
IR
hi
at first excuse me for my poor english
I want to use subroutine to model a simple moving heat source
But there is some problem in this fortran code,
please help me to find out why it's not working and what is my problem

*USER SUBROUTINE
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

REAL t,x,y,z,Q,a,b,c
Real x1,y1,z1,x2,y2,z2
REAL FLUX1,FLUX2

t = time(1)

! coordinate
x = coords(1)
y = coords(2)
z = coords(3)
! welding arc
a = 0.0033
b = 0.0033
c = 0.0033
! speed of welding in y direction is 0.0076
x1 = 0
y1 = 0+0.0076*t
z1 = 0

x2=x-x1
y2=y-y1
z2=z-z1
! Q=n*V*i
Q=9900
! a welding simulation in the midle of a plate 0.03*0.2*0.3
if(jltyp.eq.1) then
if(KSTEP.EQ.3) then
IF(y2.GE.0) then
! Goldak’s volumetric heat source model
FLUX(1)=1.86632*Q/(a*b*c)*exp(-3*(x**2/a**2+y**2/b**2+z**2/c**2))
ELSE
IF(y2.LE.0) then
FLUX(1)=1.86632*Q/(a*b*c)*exp(-3*(x**2/a**2+y**2/b**2+z**2/c**2))
end if
FLUX(1)=0
FLUX(2)=0.0
Else
FLUX1=0
FLUX(1)=FLUX1
FLUX(2)=0
end if
else
FLUX(1)=0
FLUX(2)=0
end if
return
end


 
Replies continue below

Recommended for you

Thanks for the reply
it doesn't run at all
the error in the abaqus was "Problem during compilation"
i think i have problem in fortran code but i don't know where is it
 
The "IF THEN -- ELSE -- END IF" statements are not constructed correctly.

You have four "IF THEN" but only three "END IF"

You also appear to have an "ELSE" followed by another "ELSE"

The continuation "1" in the line "1 JLTYP,TEMP,PRESS,SNAME)" should be in column 6 and not column 7

quality, cost effective FEA solutions
 
juste one question about your subroutine:

=> how abaqus understand that it have to move the source?

x2,y2,z2 are not output of subroutine, so how abaqus understand that it have to move the source along a direction ????
 
yes
this program has so many problems and i am a beginner
i have to used x2,y2,z2 in Goldak's volumetric heat source model
so i have to Rewrite
FLUX(1)=1.86632*Q/(a*b*c)*exp(-3*(X2**2/a**2+Y2**2/b**2+Z2**2/c**2))
THANK YOU
 
Status
Not open for further replies.
Back
Top