×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Code Problem with UMAT

Code Problem with UMAT

Code Problem with UMAT

(OP)
Hi:

I am trying to model residual stress as a result of temperature change using linear isotropic hardening equation.

1. I used USDFLD to calculate young's modulus (as FIELD(1)), poisson ratio (as FIELD(2)) as a function of temperature
2. I calculated the corresponding yield stress (FIELD(3)) as a function of temperature too in USDLFD, and stored as statev.

3. I used UEXPAN to calculate thermal strain (EXPAN(1) which I stored as a STATEV variable, Dthermal strain =coeff of expan*DTEMP and stored as another statev.

4. I got a UMAT code for isotropic hardening plasticity,

  I calculated: FIELD(1)=EYoung(T), FIELD(2)=ENU(T)

      EBULK3=FIELD(1)/(ONE-TWO*FIELD(2))
      EG2=FIELD(1)/(ONE+FIELD(2))
      
      EG=EG2/TWO
      EG3=THREE*EG
      ELAM=(EBULK3-EG2)/THREE

C     ELASTIC STIFFNESS
C
      
C
      DO  K1=1,NDI
        DO  K2=1,NDI
           DDSDDE(K2,K1)=ELAM
           
      END Do
        DDSDDE(K1,K1)=EG2+ELAM
        
      End Do
 
      DO  K1=NDI+1,NTENS
        DDSDDE(K1,K1)=EG
        
        End Do
  
C
 
     
      
C    RECOVER ELASTIC AND PLASTIC STRAINS
C
      DO  K1=1,NTENS
         STATEV(K1)=E(K1)
         STATEV(K1+NTENS)=PE(K1)
 80   END Do
C  Also recover equivalent plastic strain

      Call ROTSIG(STATEV(1),DROT,E,2,NDI,NSHR)
      Call ROTSIG(STATEV(NTENS+1),DROT,PE,2,NDI,NSHR)
      
      PEEQ=STATEV(1+2*NTENS)

C    CALCULATE Predictor STRESS FROM ELASTIC STRAINS AND THERMAL STRAIN
C
      DO  K1=1,NTENS
        DO  K2=1,NTENS
           STRESS(K2)=STRESS(K2)+DDSDDE(K2,K1)*(DSTRAN(K1)-STATEV(2))
            STATEV(1)=STATEV(1)+STATEV(2)
            E(K1)=STRAN(K1)+DSTRAN(K1)-STATEV(1)
     1                          
C    IF NO YIELD STRESS IS GIVEN, MATERIAL IS TAKEN TO BE ELASTIC
C
      End Do
      End DO
C
C       MISES STRESS
C
        SMISES=(STRESS(1)-STRESS(2))*(STRESS(1)-STRESS(2)) +
     1          (STRESS(2)-STRESS(3))*(STRESS(2)-STRESS(3)) +
     1          (STRESS(3)-STRESS(1))*(STRESS(3)-STRESS(1))
        DO  K1=NDI+1,NTENS
              SMISES=SMISES+SIX*STRESS(K1)**2
 90     END Do
        SMISES=SQRT(SMISES/TWO)
        STATEV(3)=SMISES
C
C       HARDENING CURVE, GET YIELD STRESS
C
       
        
C
C       DETERMINE IF ACTIVELY YIELDING
C
        IF (STATEV(3).GT.(1.0+TOLER)*STATEV(5)) THEN
C
C         FLOW DIRECTION
C      Actively Yielding
C Seperate the hydrostatci from the deviatoric stress

C
          SHYDRO=(STRESS(1)+STRESS(2)+STRESS(3))/THREE
          
          DO  K1=1,NDI
             FLOW(K1)=(STRESS(K1)-SHYDRO)/STATEV(3)
               End Do
                  DO  K1=NDI+1,NTENS
                   FLOW(K1)=STRESS(K1)/STATEV(3)
                    END Do
        
        END IF
C       SOLVE FOR EQUIV STRESS, PEEQ from NEWTON ITERATION
          HARD=0.0
          
          DPEEQ=0.0
          DO  KEWTON=1,NEWTON
             RHS=STATEV(3)-EG3*DPEEQ-STATEV(5)
             DPEEQ=DPEEQ+RHS/(EG3+HARD)
             END Do
             
             IF(ABS(RHS).LT.TOLER*STATEV(5)) GOTO 140
 130      CONTINUE
          WRITE(6,2) NEWTON
 2        FORMAT(//,30X,'***WARNING - PLASTICITY ALGORITHM DID NOT ',
     1        'CONVERGE AFTER ',I3,' ITERATIONS')
 140      CONTINUE
          EFFHRD=EG3*HARD/(EG3+HARD)
C
C       CALC STRESS AND UPDATE STRAINS
C
          DO  K1=1,NDI
             STRESS(K1)=FLOW(K1)*STATEV(5)+SHYDRO
             PE(K1)=PE(K1)+THREE*FLOW(K1)*DPEEQ/TWO
             E(K1)=E(K1)-THREE*FLOW(K1)*DPEEQ/TWO
      END DO
          DO K1=NDI+1,NTENS
             STRESS(K1)=FLOW(K1)*STATEV(5)
             PE(K1)=PE(K1)+THREE*FLOW(K1)*DPEEQ
             E(K1)=E(K1)-THREE*FLOW(K1)*DPEEQ
       END DO
         
          PEEQ=PEEQ+DPEEQ
          SPD=DPEEQ*(STATEV(5)+STATEV(5))/TWO
C
C       JACOBIAN
C
          EFFG=EG*STATEV(5)/STATEV(3)
          EFFG2=TWO*EFFG
          EFFG3=THREE*EFFG2/TWO
          EFFLAM=(EBULK3-EFFG2)/THREE

          DO  K1=1,NDI
             DO  K2=1,NDI
                DDSDDE(K2,K1)=EFFLAM
        CONTINUE
             DDSDDE(K1,K1)=EFFG2+EFFLAM
       END Do
         END Do
          DO  K1=NDI+1,NTENS
             DDSDDE(K1,K1)=EFFG
      END DO
          DO  K1=1,NTENS
             DO  K2=1,NTENS
                DDSDDE(K2,K1)=DDSDDE(K2,K1)+FLOW(K2)*FLOW(K1)
     1                                       *(EFFHRD-EFFG3)
        
        End Do
          END DO
        
      
      
C
C STORE STRAINS IN STATE VARIABLE ARRAY
C
      DO  K1=1,NTENS
        STATEV(K1)=E(K1)
        STATEV(K1+NTENS)=PE(K1)
 
      STATEV(1+2*NTENS)=PEEQ
      END Do
      
      RETURN
      END


Questions: 1. error LNK2005: _UMAT already defined in uexpanSS316LonSS316L2.obj
fatal error LNK1169: one or more multiply defined symbols found; unable to fix the error.

2. Is my logic correct (i.e. to substract thermal strain from elastic strain and calculate stress, if stress exceed yield stress then store values as plastic strain).

3. I would like to incorporate volumetric strains also in my model to study phase transformations, can anyone give me suggestions?.

Thanks,

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources