Skip to main content

Question about calling ABAQUS subroutine to get strain and stress

Submitted by zengziw on

I am writing a subroutine DFLUX for ABAQUS, the FLUX(1) is dependent on strain and stress. But I don't know how to get the strain and stress. I use SPRINC in the code but it seems to be wrong.

The equation for the problem is 

q=(α^2XΩXε^2XE)/2
E=(σ/ε)*sin(d)
σ is stress and ε is strain

The subroutine is the following,
      SUBROUTINE DFLUX(FLUX,SOL,JSTEP,JINC,TIME,NOEL,NPT,COORDS,JLTYP,
     1                 TEMP,PRESS,SNAME)
C
      INCLUDE 'ABA_PARAM.INC'
C
      PARAMETER(TWO=2.d0)
      DIMENSION COORDS(3),FLUX(2),TIME(2)
      CHARACTER*80 SNAME

      FLUX(1)=0

PI=3.1415926
      ALPHA=0.9
      OMEGA=20000*2*PI
      D=OMEGA*0.0000125

c    Heat generation
      CALL SPRINC(S,PS,2,NDI,NSHR)
c    Get the strain
      EPS=SQRT(2*(PS(1)+PS(2)+PS(3))/3)
      CALL SPRINC(S,PS,1,NDI,NSHR)
c   Get the stress
      S=SQRT((PS(1)-PS(2))**2+(PS(2)-PS(3))**2+(PS(3)-PS(1))**2)/2)
      MODULUS=(S/EPS)*SIN(D)
c    Generate heat
      FLUX(1)=ALPHA**2*OMEGA*EPS**2*MODULUS/TWO     

      RETURN
      END SUBROUTINE DFLUX

Thanks for anyone who is helping!