I am starting to learn how to write UMATs in Abaqus, so I took the most simple example, which is linear elasticity (Hooke's law), and implemented it. I tested it on a 3D-rectangular body with a fixed bottom and a displacement boundary on top (tension).
When I use the following code...
SUBROUTINE UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,
1 RPL,DDSDDT,DRPLDE,DRPLDT,
2 STRAN,DSTRAN,TIME,DTIME,TEMP,DTEMP,PREDEF,DPRED,CMNAME,
3 NDI,NSHR,NTENS,NSTATV,PROPS,NPROPS,COORDS,DROT,PNEWDT,
4 CELENT,DFGRD0,DFGRD1,NOEL,NPT,LAYER,KSPT,KSTEP,KINC)
!
INCLUDE 'ABA_PARAM.INC'
!
CHARACTER*80 CMNAME
DIMENSION STRESS(NTENS),STATEV(NSTATV),
1 DDSDDE(NTENS,NTENS),DDSDDT(NTENS),DRPLDE(NTENS),
2 STRAN(NTENS),DSTRAN(NTENS),TIME(2),PREDEF(1),DPRED(1),
3 PROPS(NPROPS),COORDS(3),DROT(3,3),DFGRD0(3,3),DFGRD1(3,3)
! elastic UMAT
PARAMETER (ONE=1.0D0, TWO=2.0D0)
E = PROPS(1)
NU = PROPS(2)
ALAMBDA = E/(ONE+NU)/(ONE-TWO*NU)
BLAMBDA = ONE-NU
CLAMBDA = (ONE-TWO*NU)/TWO
DO I=1,NTENS
DO J=1,NTENS
DDSDDE(I,J)=0.0D0
ENDDO
ENDDO
DDSDDE(1,1)=(ALAMBDA*BLAMBDA)
DDSDDE(2,2)=(ALAMBDA*BLAMBDA)
DDSDDE(3,3)=(ALAMBDA*BLAMBDA)
DDSDDE(4,4)=(ALAMBDA*CLAMBDA)
DDSDDE(5,5)=(ALAMBDA*CLAMBDA)
DDSDDE(6,6)=(ALAMBDA*CLAMBDA)
DDSDDE(1,2)=(ALAMBDA*NU)
DDSDDE(1,3)=(ALAMBDA*NU)
DDSDDE(2,3)=(ALAMBDA*NU)
DDSDDE(2,1)=(ALAMBDA*NU)
DDSDDE(3,1)=(ALAMBDA*NU)
DDSDDE(3,2)=(ALAMBDA*NU)
DO I=1,NTENS
DO J=1,NTENS
STRESS(I)=STRESS(I)+DDSDDE(I,J)*DSTRAN(J)
ENDDO
ENDDO
RETURN
END
... the output is wrong. When I change the variable name "NU" to e.g. "ANU", the code all of a sudden gives the right solution, which is equivalent to the Abaqus Elastic Material result. This is confusing me a lot.
Does "NU" happen to be some kind of protected keyword, or am I missing some sort of declaration?