Ansys Learning Forum › Forums › Discuss Simulation › General Mechanical › Simulation error › Reply To: Simulation error
November 24, 2023 at 8:30 am
Shivansh Karanwal
Subscriber
APDL Commands:
CMSEL,ALL
*GET,EMAX,ELEM,,NUM,MAX
*GET,EMIN,ELEM,,NUM,MIN
ALLSEL
Q3=9.89921468294e4
rp=0.0025
rs=0.01
Zi=-0.001
VEL=0.00125
TAU=0
PI=ACOS(-1)
rm=(rs+rp)/2
qfswp=(3*Q3*rm)/(2*PI*(rs**3-rp**3))*0.128
time_weld=150
time_inc=1
time_steps=time_weld/time_inc
NROPT, FULL
*DO,i,1,time_steps,1
WTIME=(i*time_inc)
TIME,WTIME
HCENTER=VEL*WTIME
*DO,jj,EMIN,EMAX,1
X=CENTRX(jj)
Y=CENTRY(jj)
Z=CENTRZ(jj)
CSI=Y+(VEL*(TAU-WTIME))
rr=sqrt(X**2+CSI**2)
*IF,Z,LT,Zi,THEN
qfsw=0
*ELSEIF,rr,GT,rs
qfsw=0
*ELSEIF,rr,LT,rp
qfsw=qfswp
*ELSE
qfsw=(3*Q3*rr)/(2*PI*(rs**3-rp**3))
*ENDIF
BFE,jj,HGEN,,qfsw
*ENDDO
SOLVE
*ENDDO
CMSEL,ALL
BFEDELE,ALL,ALL
ALLSEL