PDA

View Full Version : [Help requested] 3D elasticity UMAT


aquila652
2008-01-03, 12:51
Hi all,
I'm trying to write a small UMAT to simulate a 3D linear elasticity problem, can anyone check the code and tell me what's going wrong with ??? cause when I try to run it with abaqus, the compiler is exiting with errors !!!

SUBROUTINE UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,
1 RPL,DDSDDT,DRPLDE,DRPLDT,
2 STRAN,DSTRAN,TIME,DTIME,TEMP,DTEMP,PREDEF,DPRED,CM NAME,
3 NDI,NSHR,NTENS,NSTATV,PROPS,NPROPS,COORDS,DROT,PNE WDT,
4 CELENT,DFGRD0,DFGRD1,NOEL,NPT,LAYER,KSPT,KSTEP,KIN C)
C
INCLUDE 'ABA_PARAM.INC'
C
CHARACTER*80 CMNAME
C
C
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),DFGR D1(3,3)
C
C
C
DIMENSION DSTRESS(6), DDS(6,6)
C
C
C
C
C
C--------------------------------------------------------------------
C
C SPECIFY MATERIAL PROPERTIES
C
C
E = 210000.0
XNUE = 0.3
C
C
C SET UP ELASTICITY MATRIX
C
EBULK3 = E/(1-2*XNUE)
EG2 = E/(1+XNUE)
G = EG2/2
LAMDA = (EBULK3-EG2)/3
C
C Setting up Elasticity Matrix
Do K1=1,3
Do K2=1,3
DDS(K2,K1)=LAMDA
END DO
DDS(K1,K1) = EG2 + LAMDA
END DO

DO K1=4,6
DDS(K1,K1)=G
END DO

C Determine stress increment
TRVAL = DSTRAN(1)+DSTRAN(2)+DSTRAN(3)

C Direct components of stress
DO K=1,3
DSTRESS(K) = 2*G*DSTRAN(K)+LAMDA*TRVAL
END DO

C Shear Components of stress
DO K=4,6
DSTRESS(K) = G*DSTRAN(K)
END DO

C Update Stress
DO K=1,6
STRESS(K)=STRESS(K)+DSTRESS(K)
END DO

C Determine Jacobian Matrix
DO I=1,6
DO J=1,6
DDSDDE(I,J)=DDS(I,J)
END DO
END DO

RETURN
END

Jorgen
2008-01-03, 16:02
Based on a quick look it appears that your definition:
SUBROUTINE UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,
1 RPL,DDSDDT,DRPLDE,DRPLDT,
2 STRAN,DSTRAN,TIME,DTIME,TEMP,DTEMP,PREDEF,DPRED,CM NAME,
3 NDI,NSHR,NTENS,NSTATV,PROPS,NPROPS,COORDS,DROT,PNE WDT,
4 CELENT,DFGRD0,DFGRD1,NOEL,NPT,LAYER,KSPT,KSTEP,KIN C)
is incorrect. I would remove the space between 'KIN' and 'C'.

- Jorgen

aquila652
2008-01-03, 16:18
Hi and thanks for the quick answer,
Please find attached the subroutine as I tried to write it, and there's no space between KIN and C as it appears above....a bit bizarre.
I'm really stucked with it......
If you have time and patience, can you have a look on it ?
Thanks for all !!!

Jorgen
2008-01-03, 20:48
The first thing I noticed is that you did not declare your variables :eek:

When you write:
LAMDA = (EBULK3-EG2)/3
without declaring LAMBDA, then LAMBDA becomes an integer (since it starts with the letter 'L')!

Isn't that crazy. Fortran70 is such a weird language. You might want to read my note on double precision numbers here (http://polymerfem.com/forums/showthread.php?t=576).

Other people might disagree, but I think it is better to use Fortran90 and not use INCLUDE 'ABA_PARAM.INC'.

- Jorgen

aquila652
2008-01-04, 08:40
Hi,
Yes That's a big mistake !!! sorry I'm really new to Fortran and to UMAT....these are my first steps in, but I'll keep on learning.
Thanks a lot !!!

aquila652
2008-01-12, 00:20
Hi all !!!
I finally succeeded to write it !!! I know that it's not something amazing, but it's just the first step !!!! Tested and works properly !!!
Thanks for all !!!