4.7. Example Problems Using Initial State

4.7.1. Example: Initial Stress (Using .ist File)

The following example initial-stress problem shows how to define an initial-stress file and use the INISTATE,READ command to read the data into your analysis.

The following file contains the initial stresses to be read into Mechanical APDL. Each element has eight integration points in the domain of the element.

/CSYS,0
! ELEM ID   ELEM INTG   LAY/CELL   SECT INTG    SX      SY      SZ      SXY      SYZ      SXZ
     1 ,      1,           1,        1,        100,      0,      0,      0,       0,       0
     1 ,      2,           1,        1,        100,      0,      0,      0,       0,       0
     1 ,      3,           1,        1,        100,      0,      0,      0,       0,       0
     1 ,      4,           1,        1,        100,      0,      0,      0,       0,       0
     1 ,      5,           1,        1,        100,      0,      0,      0,       0,       0
     1 ,      6,           1,        1,        100,      0,      0,      0,       0,       0
     1 ,      7,           1,        1,        100,      0,      0,      0,       0,       0
     1 ,      8,           1,        1,        100,      0,      0,      0,       0,       0

In the following input listing, initial-stress loading data is read in from a file. The data is read in during the first load step, and establishes a preliminary deflection corresponding to a tip loaded cantilever beam with a tip load of 100.

/prep7
/title, Example of Initial stress import into Mechanical APDL
et,1,182     
! Plane stress PLANE182 element
mp,ex,1,1.0e9
mp,nuxy,1,0.3
!	
! Define the nodes
!
n,1
n,2,2.0
n,3,4.0
n,4,6.0
n,5,8.0
n,6,10.0
n,7,,1.0
n,8,2.0,1.0
n,9,4.0,1.0
n,10,6.0,1.0
n,11,8.0,1.0
n,12,10.0,1.0
!
! Define the 5 elements
!
e,1,2,8,7
e,2,3,9,8
e,3,4,10,9
e,4,5,11,10
e,5,6,12,11
! Constrain all degrees of freedom on all nodes at x=0 to be zero
nsel,s,loc,x,
d,all,all    
nall
finish
!
/solu
! Read in the initial stresses from istress.ist file
! as loading in the 1st load step.
! Input stresses correspond to the element integration
! point location.
!
inistate,read,istress,ist

! List the initial stresses
inistate,list
outres,all,all
solve
finish
!
/post1
set,last
prnsol,u
finish

The INISTATE,WRITE command specifies the coordinate system into which the data is to be written.

4.7.2. Example: Convert Initial Stress to Initial Strain (INISTATE Command)

Initial stress generated from a test run is applied as initial stress. In a subsequent run, the initial-stress-to-strain option is enabled (INISTATE,SET,STOE,1). The results are compared to a run with equivalent initial strains.

/com,*****************************************************************************************************
/com,Expected Results:Results of stress conversion model should match with eqv initial strain model
/com,*****************************************************************************************************

/prep7

! Define the material

TB,elas,1
TBDATA,1,1e9,.3

et,1,185
keyopt,1,2,2
keyopt,1,3,0
keyopt,1,6,1

BLOCK,0,1,0,1,0,1
lesize,all,,,1
vmesh,all,all

nsel,s,loc,x,0
nsel,r,loc,y,0
nsel,r,loc,z,0
d,all,all

nsel,s,loc,y,0
d,all,uy

nsel,s,loc,z,0
d,all,uz

nsel,s,loc,x,0
d,all,ux


nsel,s,loc,x,1
SF,all,press,100
allsel,all

nsel,s,loc,y,1
SF,all,press,100
allsel,all 

nsel,s,loc,z,1
SF,all,press,100
allsel,all


cdwrite,all


/solu
inis,write,1,,,,0,S
solve


/post1
set,last,last
/out
/COM,**********************************************************************************
/COM,                         Simple Triaxial Load of Ux=-0.1,Uy=0.2,Uz=-0.3 Disp
/COM,**********************************************************************************
presol,s
presol,epel
prdi
/COM,**********************************************************************************

fini

/clear,nostart


/PREP7 
cdread,db,

nsel,s,loc,x,1
SF,all,press,200
allsel,all

nsel,s,loc,y,1
SF,all,press,200
allsel,all 

nsel,s,loc,z,1
SF,all,press,200
allsel,all

!ddel,all,all
!d,all,all


/solu
inis,read
inis,set,stoe,1
/out
inis,list,all

solve


/post1
set,last,last
rsys,0
/out
/COM,**********************************************************************************
/COM,           Applied a Initial Stress converted to initial strain
/com,         This results should match with eqv initial strain model
/COM,**********************************************************************************
presol,s
presol,epel
prdi
/COM,**********************************************************************************
fini
/com,************************************************************************
/clear,nostart
/com,************************************************************************

/com,************************************************************************
/prep7

cdread,db
nsel,s,loc,x,1
SF,all,press,200
allsel,all

nsel,s,loc,y,1
SF,all,press,200
allsel,all 

nsel,s,loc,z,1
SF,all,press,200
allsel,all

!ddel,all,all
!d,all,all


/solu
allsel,all
inis,set,dtyp,epel
inis,set,csys,0
inis,defi,all,all,all,all,-0.4e-7,-0.4e-7,-0.4e-7
solve

/post1
set,last,last
/out
/COM,**********************************************************************************
/COM,                         Applied a Initial Strain  -Eqv Model
/COM,**********************************************************************************
presol,s
presol,epel
prdi
/COM,**********************************************************************************

fini

4.7.3. Example: Initial Stress (INISTATE Command)

You can apply constant stresses to all selected elements by issuing a INISTATE,DEFI,ALL command. The INISTATE command can also delete stress from individual elements after the stress is applied. The INISTATE,LIST command lists the applied stresses. The following input listing shows how these commands are used.

solution 
! 
! Apply a constant state of the initial stresses. 
! 
inistate,defi,all,,,,1322.34,2022.21,302.43,4040.32,5076.32,6021.456
! 
! Verify the applied stresses then delete those of element #1 
!  
inistate,list 
inistate,dele, 1
! 
! Set the boundary conditions and then solve 
! 
inistate,list
solve
finish

4.7.4. Example: Initial Strain

This example initial strain problem is a simple uniaxial test. A displacement of 0.05 is applied to this single element. An additional 0.05 initial strain is applied. The calculated results include the effects of both initial strain field and the applied displacement.

delta = 0.05
ndiv=1

/prep7
 
! Define the material
mp,ex,1,20E3
mp,nuxy,1,0.3
mp,dens,1,7850 ! kg/m3 
et,1,185
 
block,0,1,0,1,0,1
lesize,all,,,ndiv
vmesh,all,all
finish
 
/solu
nsel,s,loc,x
d,all,ux
nsel,s,loc,y
d,all,uy
nsel,s,loc,z
d,all,uz
 
inistate,set,dtyp,epel
inistate,defi,,,,,0.05,
nsel,s,loc,x,1
d,all,ux,delta
allsel,all
solve

/post1
set,last
presol,s
presol,epto
presol,epel
finish

4.7.5. Example: Initial Plastic Strain

This initial plastic strain example is a simple 3D problem where the cross section has three layers. An initial plastic strain and stress are applied to one of the layers. One end of the block (shaped like a beam) is fixed and the stresses are allowed to redistribute. The following input listing shows how to apply initial plastic strain to one layer within a cross section and check the redistributed stresses.

     
/prep7

et,1,185,,2,1

keyopt,1,8,1               ! store data for all layers (can be excessive)

mp,   ex, 11, 20.0e6       ! psi (lbf/in^2)
mp, prxy, 11, 0.25         ! unitless
mp,   ex, 12, 20.0e6       ! psi (lbf/in^2)
mp, prxy, 12, 0.25         ! unitless
mp,   ex, 13, 20.0e6       ! psi (lbf/in^2)
mp, prxy, 13, 0.25         ! unitless

! PLASTIC (MISO) material model
tb,plas,11,,3,miso
tbpt,,0.0,1e3
tbpt,,0.6,1e3

! PLASTIC (BISO) material model
tb,plas,12,,,biso
tbdata,1,100,100500

! Plastic material model
tb,plas,13,,7,miso
tbpt,,0.0000,30000
tbpt,,4.00e-3,32000
tbpt,,8.10e-3,33800
tbpt,,1.25e-2,35000
tbpt,,2.18e-2,36500
tbpt,,3.10e-2,38000
tbpt,,4.05e-2,39000

sectype,1,shell,,my3ply    ! 3-ply laminate
secdata, 0.30, 11, , 3     ! 1st layer THICK, MAT, ANG, Int. Pts.
secdata, 0.30, 12, , 3     ! 2nd layer THICK, MAT, ANG, Int. Pts.
secdata, 0.30, 13, , 3     ! 3rd layer THICK, MAT, ANG, Int. Pts.

! align esys with the global system

block,0,1,0,0.1,0,0.1
type,1
secnum,1
esize,0.1
vmesh,1
finish

/solu

antype,static
outres,all,all

! Uniaxial State Initial plastic Strain.

inistate,set,mat,13
inistate,set,dtyp,eppl
inistate,defi,all,all,all,all,0.1,,,
inistate,set,dtyp,pleq
inistate,defi,all,all,all,all,0.1,,,
inistate,set,dtyp,stress
inistate,define,all,all,all,all,1000
inistate,set,dtyp,,

inistate,list,all

nsel,s,loc,x,0
d,all,all,0.0              ! Fix one end
nsel,all
solve
save
finish

/post1

set,last
esel,s,elem,,1

/com -----------------------------------------------------------------------------
/com,  Expected result: You should see newly redistributed stresses and strains in
/com,  all layers
/com -----------------------------------------------------------------------------

layer,1
presol,s,comp
presol,eppl,comp

layer,2
presol,s,comp
presol,eppl,comp

layer,3
presol,s,comp
presol,eppl,comp

finish

4.7.6. Example: Initial Creep Strain

This initial creep strain example demonstrates how you can use initial creep strain from one analysis, then continue the problem to perform a second step.

In Analysis 1, creep strains are calculated up to TIME = 100 in the first step, and then the analysis is continued up to TIME = 200 in the second step.

In Analysis 2, initial-state data generated at TIME = 100 is used as the starting point, and the creep analysis is performed only for TIME = 100 to TIME = 200.

The two analyses generate the same results, validating the use of initial creep strain.

!***************************************************************
! Analysis 1:  Multiple Steps *without* INISTATE
!***************************************************************

! Read the FE Model from the CDB File. FE Model has both Plasticity and Creep Material Models Defined.
/prep7
CDREAD,ALL,geom,cdb


! Perform a two-step sample creep problem
/SOLU
RATE,OFF
/OUT, scratch
TOFFST,273,
TIME,1E-6
AUTOTS,0   
NSUBST,1
KBC,0
SOLVE

! Step 1:  Generate initial-state information
RESCONTROL,,2,10
RATE,ON,ON 
TIME,100 !  Reduced time for faster solution run time.
AUTOTS,1   
NSUBST,1000,1000,10
KBC,0    
OUTRES,ALL,10,

inistate,write,1,,,,-1,s
inistate,write,1,,,,-1,eppl
inistate,write,1,,,,-1,pleq
inistate,write,1,,,,-1,epcr
SOLVE
inistate,write,0,,,,-1,s
inistate,write,0,,,,-1,eppl
inistate,write,0,,,,-1,pleq
inistate,write,0,,,,-1,epcr

! Step 2:  Perform Step 2 of the creep problem
TIME,200
SOLVE

FINISH

! Print out the results
/POST26
/OUT
/com -------------------------------------------------------------------------
/com | The deflections in y direction  of nozzle top from continuous solution|
/com -------------------------------------------------------------------------
/OUT,scratch
NSOL,2,453,U,Y,Etype181
/OUT
PRVAR,2
FINISH
/post1
presol,epcr,comp
finish

! Clear the database
/clear


!***************************************************************
! Analysis 2:  Multiple Steps *with* INISTATE
!***************************************************************
! Resume old cdb file
/prep7
CDREAD,ALL,geom,cdb

! Step 1:  Read in INISTATE data with creep strain from the IST 
!     file with rate off and solve
/SOLU
RATE,OFF
/OUT, scratch
TOFFST,273,
TIME,100
AUTOTS,0   
NSUBST,10,10,10
KBC,0
inistate,read,filename ist
SOLVE

! Step 2:  Continue and generate the same results as Analysis 1
RESCONTROL,,2,10
RATE,ON,ON 
TIME,200
AUTOTS,1   
NSUBST,10,100,10
KBC,0    
OUTRES,ALL,10,
pred,off
SOLVE


FINISH

/POST26
/OUT
/com -------------------------------------------------------------------------
/com | The deflections in y direction  of nozzle top from continuous solution|
/com -------------------------------------------------------------------------
/OUT,scratch
NSOL,2,453,U,Y,Etype181
/OUT
PRVAR,2
FINISH
/post1
presol,epcr,comp
finish

4.7.7. Example: Initial Plastic Strain with State Variables

This initial-state example shows how you can use initial-state data (as state variables) from one analysis, then continue the problem in a subsequent analysis.

To continue an isotropic hardening plasticity analysis, plastic strain, accumulated equivalent plastic strain, and stress are needed. In this problem, the accumulated equivalent plastic strain is saved from the UserMat routine as state variables, which are then used as initial-state data for the initial accumulated equivalent plastic strain applied in the subsequent analysis.

Analysis 1: Adisplacement of ux = 0.3 is applied in load step 1, unloaded to ux = 0.2 in load step 2, and an additional displacement of ux = 0.2 is applied in load step 3. Initial-state data is generated at the end of load step 2. Plastic strain, stress and accumulated equivalent plastic strain are saved in the .ist file.

Analysis 2: The initial-state data generated previously is used as the starting point. An additional displacement of 0.2--the difference between the displacement in load step 3 and load step 2 in the prior analysis--is applied in load step 2 in this analysis.

The two analyses generate the same results, validating the use of initial state with state variables.

/filname,tutor-bag06s

/prep7
et,1,185
keyopt,1,3,1

! Define 
tb,user,1,2,4
tbdata,1,19e5, 0.3, 1e4,2000,       ! E, posn, sigy, H
tb,state,mat2,,10
tbdata,1,0.0,0.0,0.0,0.0,0.0,0.0   ! initialize state variables
tbdata,7,0.0                       ! initialize state variables

type,1
real,1
mat,1

sectype,1,shell
secdata, 0.125, 1, 0.0,1
secdata, 0.125, 1, 30.0,1
secdata, 0.125, 1, 60.0,1
secdata, 0.125, 1, 90.0,1

block,0,1,0,1,0,1

esize,0.5
vmesh,all

nsel,s,loc,x,0
d,all,ux
nsel,s,loc,y,0
d,all,uy
nsel,s,loc,z,0
d,all,uz

allsel,all

cdwrite,comb,tutor-bag06s,cdb
finish

/solu

outres,all,all
time,0.5
eresx,no
nsel,s,loc,x,1
d,all,ux,0.03         ! First load step,displacement on x-axis
allsel,all
solve                          

time,1
nsel,s,loc,x,1
d,all,ux,0.02
allsel,all
! Save Plastic Strain, Elastic Strain and State Variables.
inis,write,1,,,,-2,s
inis,write,1,,,,-2,eppl
inis,write,1,,,,-2,svar
solve                          
inis,write,0,,,,-2,s      
inis,write,0,,,,-2,eppl
inis,write,0,,,,-2,svar

time,2
nsel,s,loc,x,1         ! Second load step , displacement on x-axis
d,all,ux,0.04
allsel,all
solve
finish

/post1
/com
/com +**************************************************************
/com    Results fron the  analysis without INIS command
/com ***************************************************************
rsys,solu
set,2
esel,s,elem,,1
etable,epplx_2r,eppl,x
etable,epply_2r,eppl,y
etable,epplz_2r,eppl,z
set,last
etable,epplx_3r,eppl,x
etable,epply_3r,eppl,y
etable,epplz_3r,eppl,z
allsel,all
pretab,epplx_2r,epply_2r,epplz_2r,epplx_3r,epply_3r,epplz_3r
fini

/clear,nostart
/delet,tutor-bag06s,rst
/filname,tutor-bag06s
cdread,comb,tutor-bag06s,cdb

/com ***********************************************************************
/com       Second case: analysis with INISTATE command
/com ***********************************************************************

/solu

outres,all,all

time,0.1

inis,read,tutor-bag06s,ist              ! First load step, reading back initial strain datas

ddele,all,all
nsel,s,loc,x,0
d,all,ux

nsel,s,loc,y,0
d,all,uy
allsel,all
        
nsel,s,loc,x,1                        ! First load step ,no displacement on x-axis
d,all,ux,0.0
allsel,all

inis,set,dtyp
inis,list,1
solve                          

time,2
           
nsel,s,loc,x,1                        ! Second load step , displacement on x-axis
d,all,ux,0.02
allsel,all
solve
finish

/post1
/com
/com ***************************************************************
/com    Results fron the analysis with the INIS command
/com ***************************************************************
rsys,solu
set,1
esel,s,elem,,1
etable,epplx_2r,eppl,x
etable,epply_2r,eppl,y
etable,epplz_2r,eppl,z
set,last
etable,epplx_3r,eppl,x
etable,epply_3r,eppl,y
etable,epplz_3r,eppl,z
allsel,all
pretab,epplx_2r,epply_2r,epplz_2r,epplx_3r,epply_3r,epplz_3r
fini

4.7.8. Example: Node-Based Initial Strain

This example node-based initial-state problem describes how to generate a node-based initial-state file from another analysis and then apply that data to a modal analysis.

In step 1, a node-based initial-state file is generated. In step 2, the file is read in and a static solution is generated. In step 3, the modal analysis is done.

/prep7
!********** Define the material **********
mp,ex,1,210e9                   ! Pa
mp,nuxy,1,.29                   ! No units
mp,dens,1,7850                  ! kg/m3
et,1,182
rectng,0,10,0,2,
esize,0.5
amesh,all
nsel,s,loc,x
d,all,ux
nsel,s,loc,x,10
d,all,ux,0.1
nsel,s,loc,y,2
d,all,ux,0.01
nall
finish

/solu
antype,static
time,1
nsubst,10,10,10
solve                  	     ! Solve for sample prestress loads
fini

/post1
*get,mxnid,node,,num,max
nsel,s,node,,mxnid
prnsol,s,comp
nsel,all,all
*vget,nl,node,,nlist
*vget,epsx,node,,epel,x
*vget,epsy,node,,epel,y
*vget,epsz,node,,epel,z
*vget,epsxy,node,,epel,xy
*cfopen,tutor-bag07s-ist.dat    ! Generate .ist File
*vwrite
('INIS,SET,NODE,1')
*vwrite,nl(1),epsx(1),epsy(1),epsz(1),epsxy(1)
('INIS,DEFI,',F4.0,' , , , , ',E,' , ',E,' , ',E,',',E,',0.0,0.0')
*cfclos

/solu
ddele,all,all
d,all,all
nall
antype,static
time,1
nsubst,10,10,10
/inp,tutor-bag07s-ist.dat      ! Read in Node Based .ist Data
esel,s,elem,,1,80,5
inis,list
allsel,all
rescontrol,linear,all,1
solve
finish

!********** Perform a perturbed modal analysis **********
/solu
antype,static,restart,,,perturb
perturb,modal,,,nokeep
solve,elform

nsel,s,loc,x
nsel,a,loc,x,10.0
d,all,ux
nsel,s,loc,y,0
nsel,a,loc,y,2.0
d,all,uy
nall
modopt,lanb,5
mxpand,5
solve
fini

/post1
file,,rstp
set,list
fini

4.7.9. Example: Initial Pore Pressure and Void Ratio

This example shows how to apply and use initial pore pressure and void ratio on coupled pore-pressure-thermal elements (CPTnnn).

/PREP7
ET,1,212
KEYO,1,3,1
R,1

!-------------------------------------------------------------------------------
!---- MATERIAL PROPERTY DEFINITION
! SET MATERIAL DENSITY
DENS,1,1.2 				! 

! ELASTIC MATERIAL LAW
KAPPA=0.054  			! 
NU0=0.35				! NU0=(3*P0*(1+E0)/KAPPA-2*MU0)/(2*(3*P0*(1+E0)/KAPPA)-MU0)
E0=0.34					! VOID RATIO E0=N_F0_F/N_S0_S

A0=20					! INITIAL SIZE OF THE YIELD SURFACE
AH_MIN=0.01*A0
EM=1440
K0=EM/(1-2*NU0)			! FOOTING PROBLEM: K0=EM/(1-2*NU0)
PT_EL=K0*KAPPA/(1+E0)	! FOOTING PROBLEM: K0=EM/(1-2*NU0)

!PARAMETER TO VON MISES PLASTICITY 
BETA_DRY=1.0			! SHAPE OF THE YIELD SURFACE IN DRY PART [-]
BETA_WET=1.0			! SHAPE OF THE YIELD SURFACE IN WETTING PART [-]
LAMBDA_F=0.37			! PLASTIC SLOPE (STIFFNESS)  [M^2/KN] >KAPPA (2-3 TIME OF KAPPA)
KS=1.0	 				! SHAPE OF THE YIELD SURFACE IN THE OCTAHEDRAL STRESS PLANE
MC=1.4					! SLOPE OF THE CSL IN THE HYDROSTATIC STRESS PLANE 6*SIN(PHI)/(3+SIN(PHI)->PHI: STRESS FRICTION ANGLE

!TBDATA,8, KAPPA, NU0, E0, PT_EL
TB,PELAS,1,,,POISSON
TBDATA,1, KAPPA, PT_EL, NU0, E0 

!---- POROUS MATERIAL DEFINITION
FPX=8.62E-3
ONE=1.0
TB,PM,1,,,PERM
TBDATA,1,FPX,FPX,FPX
TB,PM,1,,,BIOT
TBDATA,1,ONE
ALLSEL
!-------------------------------------------------------------------------------

W=3						! WIDTH 

RECTNG,0,6*W,0,-9*W

TYPE,1
REAL,1
MAT,1
MSHAP,0,2D
ESIZE,W/4
AMESH,1

NSEL,S,LOC,Y,-9*W
D,ALL,UX,0
D,ALL,UY,0
ALLSEL

NSEL,S,LOC,X,0
NSEL,A,LOC,X,6*W
D,ALL,UX,0
ALLSEL

NSEL,S,LOC,Y,0
D,ALL,UX,0
D,ALL,PRES,0
NSEL,R,LOC,X,0,W
SF,ALL,PRES,1E3
ALLSEL
FINI

/SOLU
! SET AN INITIAL PORE PRESSURE OF P0
P0=69
INISTATE,SET,DTYP,PPRE
INISTATE,DEFI,ALL,,,,P0

! Override the void ratio defined in the TB,PELAS with 0.4
newvratio=0.4
INISTATE,SET,DTYP,VOID
INISTATE,DEFI,ALL,,,,newvratio

ANTYPE,STATIC
NROPT,UNSYM!FULL
NEQIT,30
TIME,1E3
NSUBST,100,1000,20
OUTRES,ALL,ALL
KBC,1
SOLVE
FINI

/POST1
/OUT,
ESEL,S,ELEM,,1
!Output Pore Pressure in element 1
PRES,PMSV
PRES,EPTO

/COM, EXPECTED RESULTS: EVOID=E0+VCE+(1+E0)=0.3453
FINISH

4.7.10. Example: Initial Degree of Saturation and Relative Permeability

This example shows how to apply and use initial degree of saturation and relative permeability on coupled pore-pressure-thermal elements (CPTnnn).

For more information, see Porous Media in the Material Reference.

/prep7
et,1,213
keyopt,1,3,2
rectng,0,0.2,0,1
esize,0.2
amesh,1

MP,EX,1,22E6            ! YOUNG'S MODULUS   22MPa     
MP,NUXY,1,0.1           ! POISSON'S RATIO

FPX=1.0e-6  
ONE=1.0
TB,PM,1,,,PERM
TBDATA,1,FPX
TB,PM,1,,,BIOT           ! BIOT COEFFICIENT
TBDATA,1,ONE

   grav_val = 9.8
   KS=38e20                                 !---BULK MODULUS OF SAND
   GS=18000                                 !---SPECIFIC WEIGHT OF SAND
   KF=2.0e9                                 !---BULK MODULUS OF WATER
   GF=9800                                  !---SPECIFIC WEIGHT OF WATER
   PORO=0.46
   TB,PM,1,,,SP
   TBDATA,1,KS,GS
   TB,PM,1,,,FP
   TBDATA,1,KF,9800,PORO
   TB,PM,1,,,GRAV
   TBDATA,1,grav_val
   TB,PM,1,,,DSAT
   TBPT, DEFI,-29392.04436, 6.55E-01
   TBPT, DEFI,-19496.6884 , 6.97E-01
   TBPT, DEFI,-9684.84608 , 7.68E-01
   TBPT, DEFI,-4019.864744, 8.55E-01
   TBPT, DEFI,-2600.901772, 8.93E-01
   TBPT, DEFI,-1960, 9.16E-01
   TBPT, DEFI,-1303.344238, 9.47E-01
   TBPT, DEFI,-379.9278504, 9.76E-01
   TBPT, DEFI,0,	1

   TB,PM,1,,,RPER
   TBPT,DEFI,-29399.14446, 1.49E-02
   TBPT,DEFI,-19506.50996, 2.86E-02
   TBPT,DEFI,-9792.20116, 0.105711
   TBPT,DEFI,-4375.105336, 0.28040033
   TBPT,DEFI,-2800.991802, 0.50408592
   TBPT,DEFI,-2143.613388, 0.7166936
   TBPT,DEFI,-1955.016308, 0.7875667
   TBPT,DEFI,-1675.97297, 0.84350266
   TBPT,DEFI,-1583.528982, 0.8546851
   TBPT,DEFI,-1303.344238, 0.92554665
   TBPT,DEFI,-841.695638, 0.9739965
   TBPT,DEFI,0, 1

d,all,ux,0
nsel,s,loc,y,0
d,all,uy,0
allsel

init_kr=0.92554665
init_sw=9.47E-01

inistate,set,dtyp,rper
inistate,defi,all,,,,init_kr

inistate,set,dtyp,dsat
inistate,defi,all,,,,init_sw

init_pres=-1303.344238  

nsel,s,loc,y,0
d,all,pres,init_pres
allsel

nsel,s,loc,y,1
d,all,uy,0.01
allsel
finish

/solu

ANTYPE,SOIL  
SSOPT,SFSW,0,-1,0,OFF,OFF            ! NO FLUID WEIGHT
SSOPT,CONSOLIDATION
NROPT,UNSYM
NSUBST,50,5000,25
KBC,0                                ! LOADS CHANGED IN STEPS
OUTRES,ALL,ALL  
tim1 = 50   
TIME,tim1
SOLVE
finish

/post1
set,first
*get, pp,node,node(0.2,0.4,0),pmsv,ppre
/out,
ppnode=pp

finish
/exit,nosave

4.7.11. Example: Function-Based Initial State

This example shows how to apply and use initial pore pressure and void ratio as a function of location.

/PREP7
ET,1,212
KEYO,1,3,1
KEYO,1,12,1
R,1

!-------------------------------------------------------------------------------
!---- MATERIAL PROPERTY DEFINITION
! SET MATERIAL DENSITY
DENS,1,1.2 			 

! ELASTIC MATERIAL LAW
KAPPA=0.054                       ! 
NU0=0.35				! NU0=(3*P0*(1+E0)/KAPPA-2*MU0)/(2*(3*P0*(1+E0)/KAPPA)-MU0)
E0=0.34                           ! VOID RATIO E0=N_F0_F/N_S0_S

A0=20                             ! INITIAL SIZE OF THE YIELD SURFACE
AH_MIN=0.01*A0
EM=1440
K0=EM/(1-2*NU0)                   ! FOOTING PROBLEM: K0=EM/(1-2*NU0)
PT_EL=K0*KAPPA/(1+E0)             ! FOOTING PROBLEM: K0=EM/(1-2*NU0)

!PARAMETER TO VON MISES PLASTICITY 
BETA_DRY=1.0                      ! SHAPE OF THE YIELD SURFACE IN DRY PART [-]
BETA_WET=1.0                      ! SHAPE OF THE YIELD SURFACE IN WETTING PART [-]
LAMBDA_F=0.37                     ! PLASTIC SLOPE (STIFFNESS)  [M^2/KN] >KAPPA (2-3 TIME OF KAPPA)
KS=1.0                            ! SHAPE OF THE YIELD SURFACE IN THE OCTAHEDRAL STRESS PLANE
MC=1.4                            ! SLOPE OF THE CSL IN THE HYDROSTATIC STRESS PLANE 6*SIN(PHI)/(3+SIN(PHI)->PHI: STRESS FRICTION ANGLE

!TBDATA,8, KAPPA, NU0, E0, PT_EL
TB,PELAS,1,,,POISSON
TBDATA,1, KAPPA, PT_EL, NU0, E0 

!---- POROUS MATERIAL DEFINITION
FPX=8.62E-3
ONE=1.0
TB,PM,1,,,PERM
TBDATA,1,FPX,FPX,FPX
TB,PM,1,,,BIOT
TBDATA,1,ONE
ALLSEL
!-------------------------------------------------------------------------------

W=3                                ! WIDTH 

RECTNG,0,6*W,0,-9*W

TYPE,1
REAL,1
MAT,1
MSHAP,0,2D
ESIZE,W/4
AMESH,1

NSEL,S,LOC,Y,-9*W
D,ALL,UX,0
D,ALL,UY,0
ALLSEL

NSEL,S,LOC,X,0
NSEL,A,LOC,X,6*W
D,ALL,UX,0
ALLSEL

NSEL,S,LOC,Y,0
D,ALL,UX,0
D,ALL,PRES,0
NSEL,R,LOC,X,0,W
SF,ALL,PRES,1E3
ALLSEL
FINI

/SOLU
! SET AN INITIAL PORE PRESSURE OF P0 AND INCREASES WITH DEPTH
P0=69
SL=0.1
INIS,SET,DATA,FUNC
INISTATE,SET,DTYP,PPRE
INISTATE,DEFI,ALL,,,,LINY,P0,SL

! OVERRIDE THE VOID RATIO DEFINED IN THE TB,PELAS WITH 0.4
NEWVRATIO=0.4
INISTATE,SET,DTYP,VOID
INISTATE,DEFI,ALL,,,,LINY,NEWVRATIO,0

ANTYPE,STATIC
NROPT,UNSYM!FULL
NEQIT,30
TIME,1E-2
NSUBST,100,1000,20
OUTRES,ALL,ALL
KBC,1
SOLVE
FINI

/POST1
/OUT,
ESEL,S,ELEM,,1
!OUTPUT PORE PRESSURE IN ELEMENT 1
PRES,PMSV
PRES,EPTO

/COM, EXPECTED RESULTS: EVOID=E0+VCE+(1+E0)=0.3453
FINISH

4.7.12. Example: Mesh-Independent Initial State

This example shows how to apply initial-state data via the mesh-independent method:

Elastic strain is defined as a function of X and Y location

! Create a mesh-independent data file
*create,data,ist
/dtyp,epel
/idat,1,coor,1,X
/idat,2,coor,2,Y

/ddat,1,epel,1,XX
/ddat,2,epel,2,YY
/ddat,3,epel,3,XY

0,0,1e-4,0,0
0,1,1e-4,0,0
1,0,3e-4,0,0
1,1,3e-4,0,0
*end


/prep7
et,1,183
keyo,1,1,1
keyopt,1,3,3           ! Plane stress with thickness
r,1,.1

keyo,1,6,0


tb,elas,1
tbdat,,1e6,0.5

ex_1= 14E6
et_1 = 1.2E6
ep_1 = ex_1*et_1/(ex_1-et_1)
yp=14e6*1.2E6/(14e6-1.2E6)


rect,0,1,0,1

lesiz,all,1,,
amesh,1

elist

/solu
inis,read,data,ist,,mapi
/out
inis,list,all
inis,list,glob
!/out,scratch

nsel,s,loc,x,0
nsel,a,loc,x,1
d,all,ux

nsel,s,loc,x,0
nsel,r,loc,y,0
d,all,uy
allsel,all
solve


/post1
set,last
/out
presol,epel
presol,s
fini
/exit

4.7.13. Example: Initial Backstress

This initial backstress example is a simple 3D block model. The size of each edge is 1. An initial backstress, an initial plastic strain, and an elastic strain are applied to whole model. A Chaboche nonlinear kinematic hardening model (TB,CHABOCHE) with five subchains is used. The setup is a simple uniaxial tension test.

/CLEAR
/PREP7
/UNITS, bin
/TITLE, single element test for cyclic plasticity
MP, ex, 1, 7.010E+04
MP, prxy, 1, 0.33
MP, dens, 1, 0.270E-08, , , ,

TB, CHABOCHE, 1, 1, 5
TBDATA, 1, 18.8
TBDATA, 2, 17155,   1040
TBDATA, 4, 10155,    940
TBDATA, 6,   755,    660
TBDATA, 8,   355,    240
TBDATA,10,    55,     40

N, 1, 1., 0., 0.
N, 2, 1., 1., 0.
N, 3, 0., 1., 0.
N, 4, 0., 0., 0.
N, 5, 1., 0., 1.
N, 6, 1., 1., 1.
N, 7, 0., 1., 1.
N, 8, 0., 0., 1.

ET, 1, SOLID185
MAT, 1
TYPE, 1
EN, 1, 1, 2, 3, 4, 5, 6, 7, 8
ALLSEL, ALL

INIS, READ, 'inis_var', 'ist', , 0

/SOLU
NSEL, s, loc, x, 0
D, all, ux, 0
ALLSEL, all
NSEL, s, loc, y, 0
D, all, uy, 0
ALLSEL, all
NSEL, s, loc, z, 0
D, all, uz, 0
ALLSEL, all
! TEMPERATURE LOADING
TREF, 293.
BF, all, temp, 293.

NLGEOM, off
NSUBST, 100, 100, 100
OUTRES, all, all
NEQIT, 10,
TIME, 1
NSEL, s, loc, y, 1
D, all, uy, 0.006
ALLSEL, all
SOLVE

FINISH

The input file named inis_var.ist is structured as:

/dtyp,eppl
all,all,all,all, -0.265480E-02,  0.530960E-02, -0.265480E-02,  0, -0,  0 
/dtyp,bstr
all,all,all,all,  -5.47642    ,   10.9528    ,  -5.47642    ,   0.00000    ,   0.00000    ,   0.00000    ,  -3.57658    ,   7.15316    ,  -3.57658    ,   0.00000    ,   0.00000    ,   0.00000    , -0.369848    ,  0.739697    , -0.369848    ,   0.00000    ,   0.00000    ,   0.00000    , -0.355185    ,  0.710369    , -0.355185    ,   0.00000    ,   0.00000    ,   0.00000    , -0.877002E-01,  0.175400    , -0.877002E-01,   0.00000    ,   0.00000    ,   0.00000      
/dtyp,epel
all,all,all,all, -0.227833E-03,  0.690402E-03, -0.227833E-03,  0,  0,  0 

A second example uses a 2D quadratic geometry based on a plane-stress setup. The edge size is 1. An initial backstress, an initial plastic strain, and an elastic strain are applied to the whole model. A bilinear kinematic hardening model (TB,PLASTIC,,,,BKIN) is used. The setup is a simple uniaxial tension test.

/CLEAR
/PREP7
/UNITS, bin
/TITLE, single element test for cyclic plasticity
MP, ex, 1, 7.010E+04
MP, prxy, 1, 0.33
MP, dens, 1, 0.270E-08, , , ,

! Bilinear kinematic hardening
TB, plastic, 1, , , BKIN
TBTEMP, 293.,
TBDATA, 1, 1.4E3, 1.2E3

N, 1, 1., 0.
N, 2, 1., 1.
N, 3, 0., 1.
N, 4, 0., 0.

ET, 1, PLANE182, , , ,
MAT, 1
TYPE, 1
EN, 1, 1, 2, 3, 4
ALLSEL, ALL

INIS,SET,MAT,1
INIS,SET,DTYP,EPPL
INIS,DEFINE,ALL,ALL,ALL,ALL,-0.393408E-01,0.786816E-01,-0.393408E-01,0,0,0
INIS,SET,DTYP,BSTR
INIS,DEFINE,ALL,ALL,ALL,ALL,-31.4727,62.9453,-31.4727,0,0,0
INIS,SET,DTYP,EPEL
INIS,DEFINE,ALL,ALL,ALL,ALL,-0.703506E-02,0.213184E-01,-0.703506E-02,0,0,0
INIS,LIST,ALL

/SOLU
NSEL, s, loc, x, 0
D, all, ux, 0
ALLSEL, all
NSEL, s, loc, y, 0
D, all, uy, 0
ALLSEL, all
! TEMPERATURE LOADING
TREF, 293.
BF, all, temp, 293.

NLGEOM, off
NSUBST, 100, 100, 100
OUTRES, all, last
NEQIT, 20,

TIME, 1
NSEL, s, loc, y, 1
D, all, uy, 0.06
ALLSEL, all
SOLVE
   
FINISH

Although a 2D plane-stress example, the variable components still have the values along the z direction. Czz is non-zero. This behavior naturally maintains consistent visualization with POST1 and POST26 output, both of which which present a pure deviatoric form. Before the values are processed to the material record database, a mapping algorithm converts the three-dimensional data into two-dimensional plane-stress data.

4.7.14. Example: Initial-Deformation Gradient

For better clarity, this example shows the typical workflow used to apply the initial-deformation gradient for a purely mechanical system.

In the first simulation, a radial compressive load is applied to a cylinder with hyperelastic Neo-Hookean material. At the end of load step 1, the deformation gradient is saved to an .ist file.

FINISH
/CLEAR
/TITLE,Simulation 1: Calculate the Deformed Initial State

! parameters
radius=1      ! cylinder radius
height=4      ! cylinder height
esize=0.5     ! element size
pressure=0.25 ! radial pressure
mu=80         ! initial shear modulus

/PREP7
! element type
ET,1,PLANE182
KEYOPT,1,3,1 ! axisymmetric
KEYOPT,1,6,1 ! mixed u-P

! incompressible Neo-Hookean
TB,HYPER,1,,,NEO
TBDATA,1,mu

! geometry
BLC4,0,0,radius,height/2

! create mesh
TYPE,1
MAT,1
MSHAPE,0,2D
MSHKEY,1
ESIZE,esize
AMESH,ALL

! define boundary conditions
NSEL,S,LOC,Y
D,ALL,UY
ALLSEL

! define load
NSEL,S,LOC,X,radius
SF,ALL,PRES,pressure
ALLSEL
FINISH

! solution settings
/SOLU
ANTYPE,STATIC
NLGEOM,ON
TIME,1
NSUBST,2,2,2

! save database – file.db
SAVE

! export deformation gradient – file.ist
INISTATE,WRITE,1,,,,0,DEFG

! solve – file.rst
SOLVE
FINISH

! post-processing
/POST1
SET,LAST
PRNSOL,U
PRESOL,S
FINISH
/EXIT,NOSAVE

In the second simulation, the database (including the loading conditions) is resumed. The mesh is updated to the deformed configuration and the initial-deformation gradient is imported. No additional loads are added, and the model is solved for the initial conditions.

FINISH
/CLEAR
/TITLE,Simulation 2: Recover Initial Stress in Deformed Configuration

/PREP7

! resume database from simulation 1 – file.db
RESUME
ALLSEL

! update nodes to deformed configuration at end of simulation 1
UPGEOM,1.0,1,LAST,file,rst
FINISH

! prepare solution
/SOLU
ANTYPE,STATIC
NLGEOM,ON
TIME,1

! since initial state is in equilibrium with external load and
! to avoid load ramping, the initial state is solved in one step
NSUBST,1,1,1

! import deformation gradient as initial state and list
INISTATE,READ,file.ist
INISTATE,LIST

! solve
SOLVE
FINISH

! post-processing
/POST1
SET,LAST

! the displacements should be close to zero
PRNSOL,U

! the stresses should be close to simulation 1
PRESOL,S
FINISH
/EXIT,NOSAVE

As shown in the example, best practice is to contain the initial state in the first load step and to solve only for the loads and boundary conditions which are in equilibrium with the initial state. The loads are then applied and modified in subsequent load steps.

For more information, see Applying Initial Deformation Gradient.