C Authors : Jean-Baptiste LEBLOND and Leo MORIN C Contact (J.B. Leblond): jbl@lmm.jussieu.fr C C Copyright 2015 Sorbonne Universites, Universite Pierre et Marie Curie C (Paris 6), Institut Jean Le Rond d'Alembert, Tour 55-65, 4 place Jussieu, C 75252 Paris Cedex 05, France C C This program is free software: you can redistribute it and/or modify C it under the terms of the GNU Lesser General Public License as C published by the Free Software Foundation, either version 3 of the C License, or (at your option) any later version. C C This program is distributed in the hope that it will be useful, C but WITHOUT ANY WARRANTY; without even the implied warranty of C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the C GNU Lesser General Public License for more details. C C You should have received a copy of the GNU Lesser General Public License C along with this program. If not, see . C C C C C C SUBROUTINE UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,RPL, . DDSDDT,DRPLDE,DRPLDT,STRAN,DSTRAN,TIME,DTIME, . TEMP,DTEMP,PREDEF,DPRED,CMNAME, . NDI,NSHR,NTENS,NSTATV,PROPS,NPROPS, . COORDS,DROT,PNEWDT,CELENT,DFGRD0,DFGRD1, . NOEL,NPT,LAYER,KSPT,KSTEP,KINC) C C----------------------------------------------------------------------- C C Purpose : Projection of the elastic predictor onto Madou-Leblond's C yield surface - interface with subroutine PROJML C C----------------------------------------------------------------------- C C Arguments (I=Input, O=Output): C C I/O REAL STRESS Input : stress tensor at time T C Output: stress tensor at time T+DT C (Voigt's notations) C I/O REAL STATEV Input : Vector of internal variables at C time T C Output: Vector of internal variables at C time T+DT C O REAL DDSDDE Tangent matrix (Voigt's notations) C I/O REAL SSE Unused C I/O REAL SPD Unused C I/O REAL SCD Unused C O REAL RPL Unused C O REAL DDSDDT Unused C O REAL DRPLDE Unused C O REAL DRPLDT Unused C I REAL STRAN Unused C I REAL DSTRAN Increment of strain between times T C and T+DT (Voigt's notations) C I REAL TIME Unused C I REAL DTIME Unused C I REAL TEMP Unused C I REAL DTEMP Unused C I REAL PREDEF Unused C I REAL DPRED Unused C I CHARACTER CMNAME Name of material (MADLEB) C I INTEGER NDI Number of diagonal stress or strain C components (3) C I INTEGER NSHR Number of off-diagonal stress or strain C components (3) C I INTEGER NTENS Total number of stress or strain components (6) C I INTEGER NSTATV Number of internal variables (9) C I REAL PROPS Vector containing material constants [elastic C constants, data pertaining to voids, C (equivalent strain)-(equivalent stress) curve C in discrete form] C I INTEGER NPROPS Number of material constants [(2 + 16 C + 2*(nb. of points on the stress-strain curve)] C I REAL COORDS Unused C I REAL DROT Rotation of the material basis between times C T and T+DT C I REAL CELENT Unused C I REAL DFGRD0 Unused C I REAL DFGRD1 Unused C I INTEGER NOEL Element number C I INTEGER NPT Integration point number C I INTEGER LAYER Unused C I INTEGER KSPR Unused C I INTEGER KSTEP Unused C I INTEGER KINC Unused C C ---------------------------------------------------------------------- C INCLUDE 'ABA_PARAM.inc' C C Arguments DIMENSION STRESS(NTENS),STATEV(NSTATV), . DDSDDE(NTENS,NTENS),DDSDDT(NTENS),DRPLDE(NTENS), . STRAN(NTENS),DSTRAN(NTENS),TIME(2),PREDEF(1),DPRED(1), . PROPS(NPROPS),COORDS(3),DROT(3,3), . DFGRD0(3,3),DFGRD1(3,3) CHARACTER*80 CMNAME C C Local variables C Arguments of subroutine STDB_ABQERR DIMENSION REALV(1),INTV(4) CHARACTER*8 CHARV(1) C Other variables REAL*8 ELDAT(2),PLDAT(201),VOIDAT(16),SIG0(6),INTPAR0(8), . GRTRSF(3,3),LAMBDA,MU,SIG1(6),TRDDEF,INTPAR1(8),QFG1G, . TGTMAT(6,6) INTEGER NPLINFO,NPTCRV,I,ICONV,ITGTMT,J,ERRINFO(3) C INCLUDE 'STRINGS.inc' C C Preliminaries C ************* C C If there is an error the programme is stopped LOP = - 3 C INTV(1) contains the element number and INTV(2) the integration C point number INTV(1) = NOEL INTV(2) = NPT C IF (CMNAME.NE.'MADLEB') . CALL STDB_ABQERR(LOP,STRINGA1,INTV,REALV,CHARV) IF (NDI.NE.3) CALL STDB_ABQERR(LOP,STRINGA2,INTV,REALV,CHARV) IF (NSHR.NE.3) CALL STDB_ABQERR(LOP,STRINGA3,INTV,REALV,CHARV) IF (NTENS.NE.6) CALL STDB_ABQERR(LOP,STRINGA4,INTV,REALV,CHARV) IF (NSTATV.NE.9) CALL STDB_ABQERR(LOP,STRINGA5,INTV,REALV,CHARV) C There must be 2 elastic constants, 16 constants pertaining to C voids and at least 4 plastic constants (2 points on the C stress-strain curve) IF (NPROPS.LT.22) CALL STDB_ABQERR(LOP,STRINGA6,INTV,REALV,CHARV) C C Preparation of inputs of subroutine PROJML C ****************************************** C C Elastic data: Young's modulus, Poisson's ratio C ---------------------------------------------- ELDAT(1) = PROPS(1) ELDAT(2) = PROPS(2) C C Plastic data: stress-strain curve C --------------------------------- C Number of plastic constants NPLINFO = NPROPS - 18 C Number of points on the stress-strain curve NPTCRV = NPLINFO/2 IF (NPTCRV.GT.100) . CALL STDB_ABQERR(LOP,STRINGA7,INTV,REALV,CHARV) PLDAT(1) = DFLOAT(NPTCRV) C Points on the stress-strain curve DO I=1,NPLINFO PLDAT(I+1) = PROPS(I+18) ENDDO C C Data pertaining to voids C ------------------------ DO I=1,16 VOIDAT(I) = PROPS(I+2) ENDDO C C Stress tensor at time T C ----------------------- C Rem. SIG0 as defined below does not really contain the stress C tensor at time T, as required by subroutine PROJML, since C the rotation DROT has been applied to this tensor prior C to the call to subroutine UMAT. This is unimportant since C SIG0 is used in PROJML only to test whether the stress C tensor at time T is zero, which is independent of whether C it has been multiplied by DROT or not. DO I=1,NTENS SIG0(I) = STRESS(I) ENDDO C C Internal parameters at time T C ----------------------------- DO I=1,NSTATV-1 INTPAR0(I) = STATEV(I) ENDDO C C Gradient of transformation between times T and T+DT C --------------------------------------------------- C Rem. The formulae below account for both the deformation and C rotation parts of the transformation gradient, for C consistency with the arguments of subroutine PROJML. C They could however be simplified by omitting the C deformation part since PROJML uses only the C antisymmetric part of the transformation gradient. GRTRSF(1,1) = DSTRAN(1) + DROT(1,1) GRTRSF(2,2) = DSTRAN(2) + DROT(2,2) GRTRSF(3,3) = DSTRAN(3) + DROT(3,3) GRTRSF(1,2) = 0.5D0*DSTRAN(4) + DROT(1,2) GRTRSF(2,1) = 0.5D0*DSTRAN(4) + DROT(2,1) GRTRSF(1,3) = 0.5D0*DSTRAN(5) + DROT(1,3) GRTRSF(3,1) = 0.5D0*DSTRAN(5) + DROT(3,1) GRTRSF(2,3) = 0.5D0*DSTRAN(6) + DROT(2,3) GRTRSF(3,2) = 0.5D0*DSTRAN(6) + DROT(3,2) C C Codes for convergence of the global elastoplastic iterations C and request of the tangent matrix C ------------------------------------------------------------ C These codes being not provided in the arguments of UMAT C are set to unity ICONV = 1 ITGTMT = 1 C C Elastic stress predictor C ------------------------ C The terms pertaining to the objective derivative of the C stress tensor have already been accounted for since the C rotation DROT has been applied to STRESS. LAMBDA = ELDAT(1)*ELDAT(2)/(1.D0+ELDAT(2))/(1.D0-2.D0*ELDAT(2)) MU = 0.5D0*ELDAT(1)/(1.D0+ELDAT(2)) DO I=1,NTENS SIG1(I) = STRESS(I) ENDDO TRDDEF = DSTRAN(1) + DSTRAN(2) + DSTRAN(3) DO I=1,NDI SIG1(I) = SIG1(I) + LAMBDA*TRDDEF + 2.D0*MU*DSTRAN(I) ENDDO DO I=1,NSHR J = I+NDI SIG1(J) = SIG1(J) + MU*DSTRAN(J) ENDDO C C Call to subroutine PROJML (projection onto Madou-Leblond's C yield locus) C ********************************************************** C CALL PROJML(ELDAT,PLDAT,VOIDAT,SIG0,INTPAR0,GRTRSF, . ICONV,ITGTMT,SIG1,INTPAR1,QFG1G,TGTMAT,ERRINFO) C C Error messages C ************** C C INTV(3) contains the number of the current iteration on the C strain hardening parameter and INTV(4) the number of the C current iteration on the plastic multiplier INTV(3) = ERRINFO(2) INTV(4) = ERRINFO(3) C IF (ERRINFO(1).EQ.1) THEN CALL STDB_ABQERR(LOP,STRINGB1,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.2) THEN CALL STDB_ABQERR(LOP,STRINGB2,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.3) THEN CALL STDB_ABQERR(LOP,STRINGB3,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.4) THEN CALL STDB_ABQERR(LOP,STRINGB4,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.5) THEN CALL STDB_ABQERR(LOP,STRINGB5,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.6) THEN CALL STDB_ABQERR(LOP,STRINGB6,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.7) THEN CALL STDB_ABQERR(LOP,STRINGB7,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.8) THEN CALL STDB_ABQERR(LOP,STRINGB8,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.9) THEN CALL STDB_ABQERR(LOP,STRINGB9,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.10) THEN CALL STDB_ABQERR(LOP,STRINGB10,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.11) THEN CALL STDB_ABQERR(LOP,STRINGB11,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.12) THEN CALL STDB_ABQERR(LOP,STRINGB12,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.13) THEN CALL STDB_ABQERR(LOP,STRINGB13,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.14) THEN CALL STDB_ABQERR(LOP,STRINGB14,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.15) THEN CALL STDB_ABQERR(LOP,STRINGB15,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.16) THEN CALL STDB_ABQERR(LOP,STRINGB16,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.17) THEN CALL STDB_ABQERR(LOP,STRINGB17,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.18) THEN CALL STDB_ABQERR(LOP,STRINGB18,INTV,REALV,CHARV) ELSEIF (ERRINFO(1).EQ.19) THEN CALL STDB_ABQERR(LOP,STRINGB19,INTV,REALV,CHARV) ENDIF C C Treatment of outputs of subroutine PROJML C ***************************************** C C Stress tensor at time T+DT C -------------------------- DO I=1,NTENS STRESS(I) = SIG1(I) ENDDO C C Internal parameters at time T+DT C -------------------------------- C STATEV(1:NSTATV-1) contains the true internal variables of the material C STATEV(NSTATV) contains the "damage parameter" QFG1G of the material C which is not a true internal variable but may be used for postprocessing DO I=1,NSTATV-1 STATEV(I) = INTPAR1(I) ENDDO STATEV(NSTATV) = QFG1G C C Tangent matrix C -------------- DO I=1,NTENS DO J=1,NTENS DDSDDE(I,J) = TGTMAT(I,J) ENDDO ENDDO C RETURN END C C C C C C SUBROUTINE CHGBAS(MATG,MATL,MATR,ICODE) C C----------------------------------------------------------------------- C C Purpose : Transformation of an arbitrary (not necessarily symmetric) C 3*3 matrix from the global basis to the local one or vice-versa C C----------------------------------------------------------------------- C C Arguments (I=Input, O=Output): C C I/O REAL*8 MATG 3X3 matrix in the global basis C I/O REAL*8 MATL 3X3 matrix in the local basis C I REAL*8 MATR Transformation matrix (rotation) from the global basis C to the local one (the columns of this matrix provide C the vectors of the local basis, expressed in the global C one) C I INTEGER ICODE Code: C =1 : transformation from the global basis C to the local one C =2 : transformation from the local basis C to the global one C C ---------------------------------------------------------------------- C IMPLICIT NONE C C Arguments REAL*8 MATG(3,3),MATL(3,3),MATR(3,3) INTEGER ICODE C C Local variables REAL*8 A(3,3),B(3,3),ROT(3,3) INTEGER I,J,K,L C DO I=1,3 DO J=1,3 IF (ICODE.EQ.1) THEN A(I,J) = MATG(I,J) ROT(I,J) = MATR(I,J) ELSEIF (ICODE.EQ.2) THEN A(I,J) = MATL(I,J) ROT(I,J) = MATR(J,I) ENDIF B(I,J) = 0.D0 ENDDO ENDDO C DO I=1,3 DO J=1,3 DO K=1,3 DO L=1,3 B(I,J) = B(I,J) + ROT(K,I)*A(K,L)*ROT(L,J) ENDDO ENDDO IF(ICODE.EQ.1) THEN MATL(I,J) = B(I,J) ELSEIF (ICODE.EQ.2) THEN MATG(I,J) = B(I,J) ENDIF ENDDO ENDDO C RETURN END C C C C C C SUBROUTINE CONTML(AMINI,BMINI,CMINI,F,P,IERR) C C----------------------------------------------------------------------- C C Purpose : Account for the possibility of minimum values of the semi-axes C A,B,C of the void in Madou-Leblond's model. These minimum values C may be due to either contact of the void's boundary with an C enclosed inclusion, or autocontact between opposite parts of C the void's boundary (in this case the minimum values must be C slightly positive, zero values are not allowed). C Remark: The modeling of contact is approximate, in that the evolution laws C of the porosity and the shape of the voids account for contact, C but neither the yield criterion nor the plastic flow rule do. C Reference: In construction C C----------------------------------------------------------------------- C C Arguments (I=Input, O=Output): C C I REAL*8 AMINI Minimum value of the major semi-axis of the void C I REAL*8 BMINI Minimum value of the intermediate semi-axis of the C void C I REAL*8 CMINI Minimum value of the minor semi-axis of the void C I/O REAL*8 F Porosity at time T+DT C Input : porosity prior to correction due to minimum C values of the void axes C Output: porosity after correction due to minimum C values of the void axes C I/O REAL*8 P Quadratic form characterizing the orientation and C semi-axes of the void at time T+DT (global basis, C tensorial form) C Input : quadratic form prior to correction due to C minimum values of the void axes C Output: quadratic form after correction due to C minimum values of the void axes C O INTEGER IERR Error code: C =1, error in the diagonalization of P C C----------------------------------------------------------------------- C IMPLICIT NONE C C Arguments REAL*8 AMINI,BMINI,CMINI,F,P(3,3) INTEGER IERR C C Local variables REAL*8 EIGNVL(3),WORK(8),A,B,C,MATR(3,3) INTEGER LWORK,INFO,I,J C C Initialization of error code C **************************** C IERR = 0 C C Diagonalization of the quadratic form P C *************************************** C Input : P(3,3) symmetric matrix to be diagonalized C Output: EIGNVL(3) eigenvalues in ascending order C P(3,3) matrix whose columns contain the corresponding C orthonormal eigenvectors LWORK = 8 CALL DSYEV('V','L',3,P,3,EIGNVL,WORK,LWORK,INFO) IF ( (EIGNVL(1).LE.0.D0) .OR. (EIGNVL(2).LE.0.D0) . .OR. (EIGNVL(3).LE.0.D0) .OR. (INFO.NE.0) ) THEN IERR = 1 RETURN ENDIF C C Semi-axes of the void at time T+DT A = 1.D0/SQRT(EIGNVL(1)) B = 1.D0/SQRT(EIGNVL(2)) C = 1.D0/SQRT(EIGNVL(3)) C C Tests and possibly corrections on the semi-axes and the porosity C at time T+DT C **************************************************************** C IF (A.LT.AMINI) THEN F = F*AMINI/A A = AMINI ENDIF C IF (B.LT.BMINI) THEN F = F*BMINI/B B = BMINI ENDIF C IF (C.LT.CMINI) THEN F = F*CMINI/C C = CMINI ENDIF C C Corrected quadratic form P at time T+DT C *************************************** C CALL TRNSFR(P,MATR,9) DO I=1,3 DO J=1,3 P(I,J) = MATR(I,1)*MATR(J,1)/A**2 . + MATR(I,2)*MATR(J,2)/B**2 . + MATR(I,3)*MATR(J,3)/C**2 ENDDO ENDDO C RETURN END C C C C C C SUBROUTINE CRITML(F,A,B,C, . K,Q,G,KAPPA,HX,HY,HZ, . IA,IB,IC,IAA,IBB,ICC,IAB,IAC,IBC, . IERR) C C----------------------------------------------------------------------- C C Purpose : Calculate the coefficients of Madou and Leblond's C criterion for plastic porous materials containing arbitrary C ellipsoidal voids C Reference: K. Madou, J.B. Leblond, A Gurson-type criterion for porous C ductile solids containing arbitrary ellipsoidal voids - C II: Determination of yield criterion parameters, C Journal of the Mechanics and Physics of Solids, vol. 60, C pp. 1037-1058 (2012) [especially Section 7, pp. 1051-1052, C Appendix B, pp. 1056-1057, and Appendix C, p. 1057] C C----------------------------------------------------------------------- C C Arguments (I=Input, O=Output): C C I REAL*8 F Porosity C I REAL*8 A Major semi-axis of the void C I REAL*8 B Intermediate semi-axis of the void C I REAL*8 C Minor semi-axis of the void C C O REAL*8 K Parameter related to the void shape: C =0, spherical or prolate spheroidal void C =1, oblate spheroidal void C 0 Global basis, tensorial form CALL VGTTNS(SIG1,SIG1GT,1) C Global basis, tensorial form -> Local basis, tensorial form CALL CHGBAS(SIG1GT,SIG1LT,ROT,1) C Local basis, tensorial form -> Local basis, Voigt's form CALL VGTTNS(SIG1LV,SIG1LT,2) C SIG1LV must be saved because it will be used later - the elastic stress C predictor is in SIG1LVS from now on CALL TRNSFR(SIG1LV,SIG1LVS,6) C C Matrix form of the quadratic form Q (first term of the criterion) C of the components of the stress tensor - local basis C ***************************************************************** C QLT(1,1) = Q(1) QLT(1,2) = Q(2) QLT(1,3) = Q(3) QLT(2,1) = QLT(1,2) QLT(2,2) = Q(4) QLT(2,3) = Q(5) QLT(3,1) = QLT(1,3) QLT(3,2) = QLT(2,3) QLT(3,3) = Q(6) QLT44 = Q(7) QLT55 = Q(8) QLT66 = Q(9) C C Current yield stress for the strain hardening parameter at time T C ***************************************************************** C CALL YLDSTR(STRAIN,STRESS,NCRV,EPSB0,SIGB,IERR) IF (IERR.NE.0) THEN ERRINFO(1) = IERR+9 ERRINFO(2) = 0 RETURN ENDIF C C Yield criterion C *************** C QFG = QTV*(F0+G) COEFA1 = 2.D0*(1.D0+G)*QFG COEFA2 = (1.D0+G)**2 + QFG**2 SIGH = HX*SIG1LV(1)+HY*SIG1LV(2)+HZ*SIG1LV(3) QUAD = 0.D0 DO I=1,3 DO J=1,3 QUAD = QUAD + QLT(I,J)*SIG1LV(I)*SIG1LV(J) ENDDO ENDDO QUAD = QUAD + QLT44*SIG1LV(4)**2 + QLT55*SIG1LV(5)**2 . + QLT66*SIG1LV(6)**2 CRIT = QUAD/SIGB**2 + COEFA1*COSH(KAPPA*SIGH/SIGB) - COEFA2 C C Elastic unloading C ***************** C IF (CRIT.LE.0.D0) THEN IF (ICONV.EQ.1) THEN C Convergence of the global elastoplastic iterations achieved - C the internal parameters at time T+DT must be calculated and stored C C Porosity at time T+DT F1 = F0 C C Quadratic form P1 characterizing the shape and orientation of the void C at time T+DT - the void's increment of rotation is (1/2)[GRTRSF-(GRTRSF)^T] DO I=1,3 DO J=1,3 DTRVOIDG(I,J)=(GRTRSF(I,J)-GRTRSF(J,I))/2.D0 ENDDO ENDDO C P1, global basis, tensorial form DO I=1,3 DO J=1,3 P1GT(I,J) = P0GT(I,J) DO M=1,3 P1GT(I,J) = P1GT(I,J) - P0GT(I,M)*DTRVOIDG(M,J) . - DTRVOIDG(M,I)*P0GT(M,J) ENDDO ENDDO ENDDO C Transformation of P1GT into Voigt's form CALL VGTTNS(P1GV,P1GT,2) C C Strain hardening parameter at time T+DT (conventionally negative in the C case of elastic unloading) EPSB1 = - EPSB0 C C Storage of internal parameters at time T+DT INTPAR1(1) = F1 CALL TRNSFR(P1GV,INTPAR1(2),6) INTPAR1(8) = EPSB1 ENDIF RETURN ENDIF C C Iterations on the strain hardening parameter (fixed point method) C ***************************************************************** C C Initialization DEPSB = 0.D0 DDEPSB = 0.D0 NITEPSB = 50 C C Iterations DO ITEPSB=1,NITEPSB C C Current strain hardening parameter EPSB1 = EPSB0 + DEPSB C Current yield stress CALL YLDSTR(STRAIN,STRESS,NCRV,EPSB1,SIGB,IERR) IF (IERR.NE.0) THEN ERRINFO(1) = IERR+9 ERRINFO(2) = ITEPSB RETURN ENDIF SIGB2 = SIGB**2 C C Iterations on the plastic multiplier (Newton method) C ---------------------------------------------------- C C Initialization - the value corresponding to von Mises's criterion is C adopted CALL STRMDE(SIG1,SIG1M,SIG1D,SIG1Q) C The absolute value is a precaution DLAMB = ABS((SIG1Q-SIGB)*SIGB/6.D0/MU) NITLAMB = 50 PRECLAMB = 1.D-9 C C Iterations DO ITLAMB =1,NITLAMB C C Matrix MAT = (Id + 2*DLAMB/SIGB**2*TGTMAT*QLT) (TGTMAT = elastic C stiffness matrix at this stage) - upper left submatrix corresponding to C diagonal components of SIG1 COEFB1 = 2.D0*DLAMB/SIGB2 DO I=1,3 DO J=1,3 MAT(I,J) = COEFB1*(TGTMAT(I,1)*QLT(1,J) . + TGTMAT(I,2)*QLT(2,J) + TGTMAT(I,3)*QLT(3,J)) C Derivative of submatrix with respect to DLAMB DMATDL(I,J) = MAT(I,J)/DLAMB ENDDO MAT(I,I) = MAT(I,I) + 1.D0 ENDDO C Inverse of submatrix CALL INVMAT(MAT,MATINV,IERR) IF (IERR.NE.0) THEN ERRINFO(1) = 12 ERRINFO(2) = ITEPSB ERRINFO(3) = ITLAMB RETURN ENDIF C C Matrix MAT = (Id + 2*DLAMB/SIGB**2*TGTMAT*QLT) - lower right submatrix C corresponding to off-diagonal components of SIG1 C Derivative with respect to DLAMB and inverse MATINV44 = COEFB1*TGTMAT(4,4)*QLT44 DMATDL44 = MATINV44/DLAMB MATINV44 = 1.D0/(1.D0 + MATINV44) MATINV55 = COEFB1*TGTMAT(5,5)*QLT55 DMATDL55 = MATINV55/DLAMB MATINV55 = 1.D0/(1.D0 + MATINV55) MATINV66 = COEFB1*TGTMAT(6,6)*QLT66 DMATDL66 = MATINV66/DLAMB MATINV66 = 1.D0/(1.D0 + MATINV66) C C Iterations on SIGH (Newton method) C .................................. C C Initialization C Trial value SIG1TRL=MAT**(-1)*SIG1LVS of the diagonal part of SIG1LV DO I=1,3 SIG1TRL(I) = MATINV(I,1)*SIG1LVS(1) + MATINV(I,2)*SIG1LVS(2) . + MATINV(I,3)*SIG1LVS(3) ENDDO C The trial value H*SIG1TRL is used for SIGH SIGH = HX*SIG1TRL(1) + HY*SIG1TRL(2) + HZ*SIG1TRL(3) COEFB2 = COEFA1*KAPPA*DLAMB/SIGB DO I=1,3 COEFB3(I) = COEFB2*(TGTMAT(I,1)*HX + TGTMAT(I,2)*HY . + TGTMAT(I,3)*HZ) ENDDO NITSIGH = 50 PRECSIGH = 1.D-9 C C Iterations DO ITSIGH=1,NITSIGH SH = SINH(KAPPA*SIGH/SIGB) CH = SQRT(SH**2 + 1.D0) C C Auxiliary stress tensor C SIG1AUX = SIG1LVS - 2*(1+G)*QTV*(F0+G)*KAPPA*DLAMB/SIGB*SH*TGTMAT*H COEFC = KAPPA/SIGB*CH DO I=1,3 SIG1AUX(I) = SIG1LVS(I) - COEFB3(I)*SH C Derivative of SIG1AUX with respect to SIGH DS1XDSH(I) = - COEFC*COEFB3(I) SIG1AUX(I+3) = SIG1LVS(I+3) ENDDO C C Stress tensor at time T+DT - local basis, Voigt's form DO I=1,3 SIG1LV(I) = MATINV(I,1)*SIG1AUX(1) . + MATINV(I,2)*SIG1AUX(2) . + MATINV(I,3)*SIG1AUX(3) ENDDO SIG1LV(4) = MATINV44*SIG1AUX(4) SIG1LV(5) = MATINV55*SIG1AUX(5) SIG1LV(6) = MATINV66*SIG1AUX(6) C C Derivative of SIG1LV with respect to SIGH DO I=1,3 DS1DSH(I) = MATINV(I,1)*DS1XDSH(1)+MATINV(I,2)*DS1XDSH(2) . +MATINV(I,3)*DS1XDSH(3) ENDDO C C Function G(SIGH) to be equated to zero FUNCG = (SIGH-HX*SIG1LV(1)-HY*SIG1LV(2)-HZ*SIG1LV(3))/SIGB C Derivative of FUNCG with respect to SIGH DFUNCG = (1.D0-HX*DS1DSH(1)-HY*DS1DSH(2)-HZ*DS1DSH(3))/SIGB C C Convergence test on SIGH IF (ABS(FUNCG).LE.PRECSIGH) GOTO 10 C C Update of SIGH (Newton method) SIGH = SIGH - FUNCG/DFUNCG C C End of loop on iterations on SIGH C ................................. ENDDO C C No convergence on SIGH ERRINFO(1) = 13 ERRINFO(2) = ITEPSB ERRINFO(3) = ITLAMB RETURN C C Convergence on SIGH 10 CONTINUE C C Yield criterion - function F(DLAMB) to be equated to zero QUAD = 0.D0 DO I=1,3 DO J=1,3 QUAD = QUAD + QLT(I,J)*SIG1LV(I)*SIG1LV(J) ENDDO ENDDO QUAD = QUAD + QLT44*SIG1LV(4)**2 + QLT55*SIG1LV(5)**2 . + QLT66*SIG1LV(6)**2 FUNCF = QUAD/SIGB2 + COEFA1*CH - COEFA2 C C Convergence test on DLAMB IF (ABS(FUNCF).LE.PRECLAMB) GOTO 30 C C Derivative of FUNCF with respect to DLAMB C Beginning................................ C C Step 1: Derivative of FUNCF with respect to DLAMB at fixed SIGH C Derivative of SIG1AUX with respect to DLAMB DO I=1,3 DS1XDL(I) = - COEFB3(I)*SH/DLAMB ENDDO C C (Derivative of MAT with respect to DLAMB)*SIG1LV DO I=1,3 DMDLS1(I) = DMATDL(I,1)*SIG1LV(1) + DMATDL(I,2)*SIG1LV(2) . + DMATDL(I,3)*SIG1LV(3) ENDDO C C Derivative of SIG1LV with respect to DLAMB DO I=1,3 DS1DL(I) = MATINV(I,1)*(DS1XDL(1) - DMDLS1(1)) . + MATINV(I,2)*(DS1XDL(2) - DMDLS1(2)) . + MATINV(I,3)*(DS1XDL(3) - DMDLS1(3)) ENDDO DS1DL(4) = - MATINV44*DMATDL44*SIG1LV(4) DS1DL(5) = - MATINV55*DMATDL55*SIG1LV(5) DS1DL(6) = - MATINV66*DMATDL66*SIG1LV(6) C C Derivative of FUNCF with respect to DLAMB (at fixed SIGH) DFDL = 0.D0 DO I=1,3 DO J=1,3 DFDL = DFDL + QLT(I,J)*SIG1LV(I)*DS1DL(J) ENDDO ENDDO DFDL = DFDL + QLT44*SIG1LV(4)*DS1DL(4) . + QLT55*SIG1LV(5)*DS1DL(5) + QLT66*SIG1LV(6)*DS1DL(6) DFDL = 2.D0*DFDL/SIGB2 C C Step 2 : Derivative of FUNCF with respect to SIGH at fixed DLAMB DFDSH = COEFA1*KAPPA/SIGB*SH DO I=1,3 DO J=1,3 DFDSH = DFDSH + 2.D0*QLT(I,J)*SIG1LV(I)*DS1DSH(J)/SIGB2 ENDDO ENDDO C C Step 3 : Derivative of FUNCG with respect to DLAMB at fixed SIGH DGDL = - (HX*DS1DL(1)+HY*DS1DL(2)+HZ*DS1DL(3))/SIGB C C Step 4 : Total derivative of FUNCF with respect to DLAMB (with SIGH C depending on DLAMB) DFUNCF = DFDL - DFDSH*DGDL/DFUNCG C C End...................................... C C Update of DLAMB (Newton method) C Beginning...................... C DDLAMB = - FUNCF/DFUNCF C C Relaxation on DLAMB (must remain positive) NITEREL = 10 DO ITEREL=1,NITEREL IF((DLAMB+DDLAMB).GE.0.D0) THEN GOTO 20 ELSE DDLAMB = DDLAMB/2.D0 ENDIF ENDDO C C Unsuccessful relaxation on DLAMB ERRINFO(1) = 14 ERRINFO(2) = ITEPSB ERRINFO(3) = ITLAMB RETURN C C Successful relaxation on DLAMB 20 CONTINUE C C New value of DLAMB DLAMB = DLAMB + DDLAMB C C End...................................... C C End of loop on iterations on the plastic multiplier C --------------------------------------------------- ENDDO C C No convergence on the plastic multiplier ERRINFO(1) = 15 ERRINFO(2) = ITEPSB RETURN C C Convergence on the plastic multiplier 30 CONTINUE C C Update of the strain hardening parameter (fixed point method) C Beginning---------------------------------------------------- C C Increment of plastic strain - local basis, Voigt's form DO I=1,3 DEPLV(I) = 2.D0*(QLT(I,1)*SIG1LV(1) + QLT(I,2)*SIG1LV(2) . + QLT(I,3)*SIG1LV(3))/SIGB2 ENDDO DEPLV(1) = DLAMB*DEPLV(1) + COEFB2*HX*SH DEPLV(2) = DLAMB*DEPLV(2) + COEFB2*HY*SH DEPLV(3) = DLAMB*DEPLV(3) + COEFB2*HZ*SH DEPLV(4) = COEFB1*QLT44*SIG1LV(4) DEPLV(5) = COEFB1*QLT55*SIG1LV(5) DEPLV(6) = COEFB1*QLT66*SIG1LV(6) C C Scalar product of the stress and the increment of plastic strain C (cannot be negative) PSCAL = 0.D0 DO I=1,6 PSCAL = PSCAL + SIG1LV(I)*DEPLV(I) ENDDO C C New value of DEPSB (cannot be negative) DDEPSB1 = DDEPSB DDEPSB = PSCAL/SIGB/(1.D0-F0) - DEPSB C Precaution IF ((DDEPSB1*DDEPSB).LT.0.D0) DDEPSB = DDEPSB/2.D0 DEPSB = DEPSB + DDEPSB C C End---------------------------------------------------------- C C Convergence test on the strain hardening parameter PRECEB1 = 1.D-6 C The values of C1 and C2 are adjusted in such a way that PRECEB2=1.D-5 for C DEPSB=1.D-2 and PRECEB2=1.D-6 for DEPSB=1.D-6 C1 = 10.D0**(-4.5D0) C2 = 0.25D0 PRECEB2 = C1*DEPSB**C2 IF ( (DEPSB.LE.PRECEB1) .OR. (ABS(DDEPSB).LE.PRECEB2) ) GOTO 40 C C End of loop on iterations on the strain hardening parameter C *********************************************************** ENDDO C C No convergence on the strain hardening parameter C ************************************************ ERRINFO(1) = 16 RETURN C C Convergence on the strain hardening parameter C ************************************************ 40 CONTINUE C C Stress tensor at time T+DT in the global basis, Voigt's form C ************************************************************ C Starting point: local basis, Voigt's form C C Local basis, Voigt's form -> Local basis, tensorial form CALL VGTTNS(SIG1LV,SIG1LT,1) C Local basis, tensorial form -> Global basis, tensorial form CALL CHGBAS(SIG1GT,SIG1LT,ROT,2) C Global basis, tensorial form -> Global basis, Voigt's form CALL VGTTNS(SIG1,SIG1GT,2) C C Internal parameters at time T+DT (if convergence of the global C elastoplastic iterations is achieved) C ************************************************************** C IF (ICONV.EQ.1) THEN C C Porosity at time T+DT (growth term only) DF = (1.D0-F0)*(DEPLV(1)+DEPLV(2)+DEPLV(3)) F1 = F0 + DF C C Localization tensors for the void's strain and rotation rates CALL EVOLML(F0,A,B,C,K,SIG1LV, . IA,IB,IC,IAA,IBB,ICC,IAB,IAC,IBC, . L,R,IERR) IF (IERR.NE.0) THEN ERRINFO(1) = IERR+16 RETURN ENDIF C C Increment of deformation of the void - local basis, Voigt's form DO I=1,3 DEVOIDLV(I) = L(I)*DEPLV(1)+L(I+3)*DEPLV(2)+L(I+6)*DEPLV(3) DEVOIDLV(I+3) = L(I+9)*DEPLV(I+3) ENDDO C C Gradient of the increment of displacement in the local basis CALL CHGBAS(GRTRSF,GRTRSFL,ROT,1) C C Increment of rotation of the material -local basis DRMATLXY = (GRTRSFL(1,2)-GRTRSFL(2,1))/2.D0 DRMATLXZ = (GRTRSFL(1,3)-GRTRSFL(3,1))/2.D0 DRMATLYZ = (GRTRSFL(2,3)-GRTRSFL(3,2))/2.D0 C C Increment of rotation of the void - local basis C Remark: this increment of rotation is calculated using the material's C total increment of rotation since its plastic increment of rotation C is unknown DRVOIDLXY = DRMATLXY + R(1)*DEPLV(4) DRVOIDLXZ = DRMATLXZ + R(2)*DEPLV(5) DRVOIDLYZ = DRMATLYZ + R(3)*DEPLV(6) C C Increment of transformation of the void - local basis DO I=1,3 DTRVOIDL(I,I) = DEVOIDLV(I) ENDDO DTRVOIDL(1,2) = DEVOIDLV(4)/2.D0 + DRVOIDLXY DTRVOIDL(2,1) = DEVOIDLV(4)/2.D0 - DRVOIDLXY DTRVOIDL(1,3) = DEVOIDLV(5)/2.D0 + DRVOIDLXZ DTRVOIDL(3,1) = DEVOIDLV(5)/2.D0 - DRVOIDLXZ DTRVOIDL(2,3) = DEVOIDLV(6)/2.D0 + DRVOIDLYZ DTRVOIDL(3,2) = DEVOIDLV(6)/2.D0 - DRVOIDLYZ C C Increment of transformation of the void in the global basis CALL CHGBAS(DTRVOIDG,DTRVOIDL,ROT,2) C C Quadratic form P1 characterizing the orientation and semi-axes of the void C at time T+DT - global basis, tensorial form DO I=1,3 DO J=1,3 P1GT(I,J) = P0GT(I,J) DO M=1,3 P1GT(I,J) = P1GT(I,J) - P0GT(I,M)*DTRVOIDG(M,J) . - DTRVOIDG(M,I)*P0GT(M,J) ENDDO ENDDO ENDDO C C Possible modification of F1 and P1 due to the minimum values of the semi-axes C of the void (the correction of the porosity is done on that part arising C from growth only - nucleation is considered independent of contact) CALL CONTML(AMINI,BMINI,CMINI,F1,P1GT,IERR) IF (IERR.NE.0) THEN ERRINFO(1) = 19 RETURN ENDIF C C Correction of F1 due to nucleation (the newly created voids are assumed C to appear with axes identical in size and orientation to those of C pre-existing voids) IF ( (FMAX.GT.0.D0) .AND. (SN.GT.0.D0) ) THEN PI = 4.D0*ATAN(1.D0) ARG = - 0.5D0*((EPSB1-EN)/SN)**2 DF = FMAX/SN/SQRT(2.D0*PI)*EXP(ARG)*DEPSB F1 = F1 + DF ENDIF C C Transformation of P1GT into Voigt's form CALL VGTTNS(P1GV,P1GT,2) C C Storage of internal parameters at time T+DT INTPAR1(1) = F1 CALL TRNSFR(P1GV,INTPAR1(2),6) INTPAR1(8) = EPSB1 C C End of calculation of internal parameters at time T+DT C ****************************************************** ENDIF C C Tangent matrix C ************** C IF (ITGTMT.EQ.1) THEN C C Write instructions to compute the tangent matrix TGTMAT C In the present stage of the programme TGTMAT remains C identical to the elastic stiffness matrix C ENDIF C C Case of total destruction - all stress components are finally set to zero C ************************************************************************* C C Remark: activate the instructions with "CC" below when the tangent matrix C is programmed CC IF (IRUPT.EQ.1) THEN C The damage parameter is set to unity CC QFG1G = 1.D0 C All components of the stress tensor are set to zero CC DO I=1,6 CC SIG1(I) = 0.D0 CC ENDDO C The evolutions of internal parameters are disregarded CC CALL TRNSFR(INTPAR0,INTPAR1,8) CC ENDIF C RETURN END C C C C C C SUBROUTINE STRMDE(SIG,SIGM,SIGDEV,SIGEQ) C C----------------------------------------------------------------------- C C Purpose : Calculation of the mean part, deviatoric part, and C "von Mises norm" (equivalent stress) of a given stress tensor C C----------------------------------------------------------------------- C C Arguments (I=Input, O=Output): C C I REAL*8 SIG Stress tensor in Voigt's "stress vector" form C O REAL*8 SIGM Mean part (1/3 of the trace) of SIG C O REAL*8 SIGDEV Deviatoric part of SIG C O REAL*8 SIGEQ "Von Mises norm" of SIG (equivalent stress) C C --------------------------------------------------------------------- C IMPLICIT NONE C C Arguments REAL*8 SIG(6),SIGM,SIGDEV(6),SIGEQ C C Local variables INTEGER I C SIGM = (SIG(1)+SIG(2)+SIG(3))/3.D0 C DO I=1,3 SIGDEV(I) = SIG(I) - SIGM SIGDEV(I+3) = SIG(I+3) ENDDO C SIGEQ = SIGDEV(1)**2 + SIGDEV(2)**2 + SIGDEV(3)**2 . + 2.D0*(SIGDEV(4)**2+SIGDEV(5)**2+SIGDEV(6)**2) SIGEQ = SQRT(3.D0/2.D0*SIGEQ) C RETURN END C C C C C C SUBROUTINE TRNSFR(A,B,N) C C----------------------------------------------------------------------- C C Purpose: Transfer of a vector into another one C C----------------------------------------------------------------------- C C Arguments (I=Input, O=Output): C C I REAL*8 A Vector to be transferred C I INTEGER N Dimension of A and B C O REAL*8 B Vector into which A is to be transferred C C----------------------------------------------------------------------- C IMPLICIT NONE C C Arguments REAL*8 A(N),B(N) INTEGER N C C Local variables INTEGER I C DO I=1,N B(I) = A(I) ENDDO C RETURN END C C C C C C SUBROUTINE VGTTNS(AV,AT,ICODE) C C----------------------------------------------------------------------- C C Purpose : Transformation of a 3X3 symmetric matrix stored in Voigt's C "stress vector" form to tensorial form or vice-versa C C----------------------------------------------------------------------- C C Arguments (I=Input, O=Output): C C I/O REAL*8 AV Symmetric matrix in Voigt's "stress vector" form C I/O REAL*8 AT Symmetric matrix in tensorial form C I INTEGER ICODE Code: C = 1 : transformation from Voigt's form to tensorial C form C = 2 : transformation from tensorial form to Voigt's C form C C ---------------------------------------------------------------------- C IMPLICIT NONE C C Arguments REAL*8 AV(6),AT(3,3) INTEGER ICODE C IF (ICODE.EQ.1) THEN AT(1,1) = AV(1) AT(2,2) = AV(2) AT(3,3) = AV(3) AT(1,2) = AV(4) AT(2,1) = AT(1,2) AT(1,3) = AV(5) AT(3,1) = AT(1,3) AT(2,3) = AV(6) AT(3,2) = AT(2,3) ELSEIF (ICODE.EQ.2) THEN AV(1) = AT(1,1) AV(2) = AT(2,2) AV(3) = AT(3,3) AV(4) = AT(1,2) AV(5) = AT(1,3) AV(6) = AT(2,3) ENDIF C RETURN END C C C C C C SUBROUTINE YLDSTR(STRAIN,STRESS,N,EPSB,SIGB,IERR) C C----------------------------------------------------------------------- C C Purpose: Calculation of the current yield stress (isotropic hardening) C by linear interpolation of the known stress-strain curve C in simple tension C C----------------------------------------------------------------------- C C Arguments (I=Input, O=Output): C C I REAL*8 STRAIN Vector of values of the equivalent strain C (material data) C I REAL*8 STRESS Vector of corresponding values of the yield stress C (material data) C I INTEGER N Common dimension of the vectors STRAIN and STRESS C I REAL*8 EPSB Value of EPSILON_BAR C O REAL*8 SIGB Corresponding value of SIGMA_BAR C O INTEGER IERR Error code: C =1 if the first value of the equivalent strain C in the vector STRAIN is nonzero C =2 if the first value of the yield stress in the C vector STRESS is zero C C----------------------------------------------------------------------- C IMPLICIT NONE C C Arguments REAL*8 STRAIN(N),STRESS(N),EPSB,SIGB INTEGER N,IERR C C Local variables REAL*8 COEF INTEGER I C IERR = 0 C IF (STRAIN(1).NE.0.D0) THEN IERR = 1 RETURN ENDIF IF (STRESS(1).EQ.0.D0) THEN IERR = 2 RETURN ENDIF C C The yield stress is considered as constant outside the C interval of definition [STRAIN(1),STRAIN(N)] IF (EPSB.LE.STRAIN(1)) THEN SIGB = STRESS(1) ELSEIF (EPSB.GE.STRAIN(N)) THEN SIGB = STRESS(N) ELSE DO I=1,N-1 IF (EPSB.LT.STRAIN(I+1)) GOTO 10 ENDDO 10 COEF = ( EPSB-STRAIN(I) )/( STRAIN(I+1)-STRAIN(I) ) SIGB = (1.D0-COEF)*STRESS(I) + COEF*STRESS(I+1) ENDIF C RETURN END