Upload
others
View
93
Download
10
Embed Size (px)
Citation preview
User Subroutines in ABAQUS
Saeid Poorasadion
Ph.D. CandidateMechanical Engineering Department
Sharif University of Technology
Email: [email protected], [email protected]
Winter 2015
Contents
Introduction
User Subroutines
UMAT
Writing UMAT Writing UMAT
Examples
• 1D Elastic
• Isotropic Hardening Plasticity
• Neo-Hookean Hyperelasticity
VUMAT
S.Poorasadion User Subroutines in ABAQUS Winter 2015 2
Introduction
Finite Element Software Packages
ANSYS
ABAQUS
LS-DYNA
Which Software??
S.Poorasadion User Subroutines in ABAQUS Winter 2015 4
Introduction
Understanding the fundamental concepts of nonlinearfinite element analysis:
Selecting the best solution procedure and goodstrategy for developing a reasonable model
• Selecting appropriate element and BCs• Selecting appropriate element and BCs
Developing a new solution procedure
• New constitutive model for material
• New element
S.Poorasadion User Subroutines in ABAQUS Winter 2015 5
Textbook for Nonlinear FEM: Nonlinear finite elements for continua and structures (Belytschko, et al.)
Introduction
Finite Element Method
Implicit method
Initial Displacements
Calculate Strain
Calculate Stress
Using Constitutive ModelIf change of one or more sections in these solution is required, we should write a new code in a programming
language!!?
Calculate Internal Force & Compare with
External Force
Calculate Tangent Matrix
Calculate Tangent Stiffness Matrix
Modify Displacements
(Newton method)
Solution Complete
Using Constitutive Model
< Tol
language!!?
S.Poorasadion User Subroutines in ABAQUS Winter 2015 6
Introduction
Main Problem
Creating a software to simulate a specificapplication:
– Simulating shape memory alloys
– Creating a new element (B- spline element)
• Developing a finite element code in program languages– Limitation in BCs and geometry
• Adding an appropriate code to Finite Element SoftwarePackages
User Subroutines
S.Poorasadion User Subroutines in ABAQUS Winter 2015 7
User Subroutines
ABAQUS/Standard 6.10: 51 subroutines
ABAQUS/Explicit 6.10: 20 subroutines
FORTRAN code (.for)
Some popular user subroutines in ABAQUS/StandardSome popular user subroutines in ABAQUS/Standard
DLOAD VDLOAD
UMAT VUMAT
UEL VUEL
UHYPER
S.Poorasadion User Subroutines in ABAQUS Winter 2015 9
User Subroutines
Where User Subroutines Fit into ABAQUS/Standard
S.Poorasadion User Subroutines in ABAQUS Winter 2015 10
User Subroutines
Where User Subroutines Fit into ABAQUS/Standard
S.Poorasadion User Subroutines in ABAQUS Winter 2015 11
User Subroutines
Where User Subroutines Fit into ABAQUS/Standard
S.Poorasadion User Subroutines in ABAQUS Winter 2015 12
User Subroutines
Where User Subroutines Fit into ABAQUS/Standard
User SubroutinesUser Subroutines& Scripting Interface??
S.Poorasadion User Subroutines in ABAQUS Winter 2015 13
Programming
To include user subroutines in an analysis:
Through ABAQUS execution command
• abaqus job=my_analysis user=my_subroutine
Through ABAQUS/CAE
• Job Module > General Tab>Address to User Subroutinefile
S.Poorasadion User Subroutines in ABAQUS Winter 2015 14
Programming
To include user subroutines in an analysis:
Through ABAQUS execution command
• abaqus job=my_analysis user=my_subroutine
Through ABAQUS/CAE
• Job Module > General Tab>Address to User Subroutinefile
S.Poorasadion User Subroutines in ABAQUS Winter 2015 15
Programming
Compiling and Linking User Subroutines
A correct compile and link commands should beused automatically
• Microsoft Visual Studio
• Intel Visual Fortran Compiler• Intel Visual Fortran Compiler
IMPORTANT: Consistency among the abovesoftware
S.Poorasadion User Subroutines in ABAQUS Winter 2015 16
Programming
Subroutine Argument Lists
Variables to be defined
Variables that can be defined
Variables passed in for information
Naming ConventionsSubroutines or COMMON blocks should begin with the letter K
S.Poorasadion User Subroutines in ABAQUS Winter 2015 17
UMAT
FEMPre-Processing
(Boundary ConditionGeometry, Mesh
External Nodal Force)
Stress, DS/De
1.Initial Displacements For increment i
2.Calculate Internal Nodal Force for element3.Calculate tangent Stiffness Matrix for element
1.Assembly Internal Nodal Force2.Assembly tangent Stiffness Matrix Stress, DS/De2.Assembly tangent Stiffness Matrix
3.Apply Boundary Condition4.Check Convergence if yes GOTO 1
5.Modify Displacements GOTO 2
Post-Processing(Stress
DisplacementInternal Nodal Force)
Define B matrix
Calculate StressCalculate Tangent Moduli
Define Internal Nodal ForceDefine Tangent Stiffness Matrix
UMAT
S.Poorasadion User Subroutines in ABAQUS Winter 2015 19
UMAT
Called at all material calculation points of Called at all material calculation points of elements (Gauss points)
S.Poorasadion User Subroutines in ABAQUS Winter 2015 21
UMAT
Allows you to implement general constitutiveequation
Define any constitutive model of arbitrary complexity
User-defined material models can be used with anyUser-defined material models can be used with anyABAQUS structural element type
Multiple user materials can be implemented in asingle UMAT routine and can be used together
S.Poorasadion User Subroutines in ABAQUS Winter 2015 22
Storage of Stress and Strain Components
Stresses and strains are stored as vectors
For plane stress elements: σ_xx, σ_yy, σ_xy
For plane strain and axisymmetric elements: σ_xx,σ_yy, σ_zz, σ_xy
The shear strain is stored as
engineering shear strain
S.Poorasadion User Subroutines in ABAQUS Winter 2015 25
UMAT Variables
Variables to be defined
DDSDDE(NTENS,NTENS)
STRESS(NTENS)
• “true” (Cauchy) stress.
STATEV(NSTATV)
1 JC
J
STATEV(NSTATV)
SSE, SPD and SCD
• Elastic strain energy, plastic dissipation, and “creep”dissipation.
• No effect on the solution and using for energy output
Only in a fully coupled thermal-stress analysis
• RPL (Volumetric heat generation per unit time)
• DDSDDT(NTENS), DRPLDE(NTENS), DRPLDTS.Poorasadion User Subroutines in ABAQUS Winter 2015 26
UMAT Variables
Variables that can be defined
PNEWDT
• Ratio of suggested new time increment to the timeincrement being used
Variables passed in for informationVariables passed in for information
STRAN(NTENS), DSTRAN(NTENS)
• The mechanical strains
• In finite-strain problems, approximations to logarithmicstrain.
TIME, DTIME
TEMP, DTEMP
PREDEF, DPREDS.Poorasadion User Subroutines in ABAQUS Winter 2015 27
UMAT Variables
Variables passed in for information (continued)
CMNAME
NDI, NSHR, NTENS
• Number of direct, shear, total stress components
NSTATV NSTATV
PROPS(NPROPS), NPROPS
COORDS
DROT(3,3)
• Rotation increment matrix
CELENT
• Characteristic element lengthS.Poorasadion User Subroutines in ABAQUS Winter 2015 28
UMAT Variables
Variables passed in for information (continued)
DFGRD0(3,3), DFGRD1(3,3)
NOEL, NPT
• Element, integration point numbers
LAYER, KSPT LAYER, KSPT
• Layer, section point numbers
KSTEP, KINC
• Step, increment numbers
S.Poorasadion User Subroutines in ABAQUS Winter 2015 29
Writing UMAT
Write a code in MATLAB (Debugging in MATLABis fast and easy)
Check MATLAB code with benchmark problems(for example uniaxial test)
Transfer MATLAB code to FORTRAN code
MATLAB CodeStrain,
InformationStress, DS/De
S.Poorasadion User Subroutines in ABAQUS Winter 2015 36
Transfer MATLAB Code to FORTRAN Code
MATLAB
FORTRAN
S.Poorasadion User Subroutines in ABAQUS Winter 2015 37
When assigning a value to a double precisionvariable, D-scientific notation should be used.
Debugging
Fortran Code Output
S.Poorasadion User Subroutines in ABAQUS Winter 2015 38
Debugging
Error: Problem during compilation
Go to file job_name.log in work directory (temp)
S.Poorasadion User Subroutines in ABAQUS Winter 2015 40
Debugging
Divide by zero
5/0.d0
a/b when b is zero in first time (STRAN and DSTRANare zero in first time)
S.Poorasadion User Subroutines in ABAQUS Winter 2015 41
Debugging
Write or print a parameter in Data File tab
write (6,*) 'tt‘ , KINC, …
S.Poorasadion User Subroutines in ABAQUS Winter 2015 42
Small Strain, Large Rotation
Turn on Nlgeom in Steps
STRAN, DSTRAN and STRESS have been rotated toaccount for rigid body motion in the incrementbefore UMATbefore UMAT
the basis system for the material point rotates withthe material
DROT: Rigid body rotation
Use this variable to rotate internal variable inconstitutive model.
• Plastic strain
S.Poorasadion User Subroutines in ABAQUS Winter 2015 44
Large Strain, Large Rotation
Turn on Nlgeom in Steps
STRESS is Cauchy stress and have been rotated toaccount for rigid body motion in the incrementbefore UMAT.
Use DFGRD0 and DFGRD1Use DFGRD0 and DFGRD1
The deformation gradient is available for solid(continuum) elements, membranes, and finite-strain shells. It is not available for beams or small-strain shells
DROT: Rigid body rotation
S.Poorasadion User Subroutines in ABAQUS Winter 2015 45
Large Strain, Large Rotation
The consistent Jacobian should be used to ensurerapid convergence.
The exact consistent Jacobian C
:c cJ J D C
iW W I
W W I
C
:
1
c cJ J D
J
J
C
CD
2 2
2 4
i
i
CE
CEijkl im jn kp lq mnpq
W W I
I
W
C F F F F C
SC C
SC
C C C
T TK B C BdV dV S.Poorasadion User Subroutines in ABAQUS Winter 2015 46
Example 2: Neo-Hookean Hyperelasticity
Neo-Hookean Free energy relationship
The Cauchy and PK2 stress tensor
21
10 21
3
13 1
IU C J
DJ
10
1
2
2
C
KD
The Cauchy and PK2 stress tensor
1
1
2/3 1 1110
1
2 2
2 21
3
IU U U JS
I J
IC J I J J
J D
C C C
C C
1
1
ij
I
JJ
C
CC
101
2 1 21
3C tr I J I
J D
B B
2/3
1
JB B
S.Poorasadion User Subroutines in ABAQUS Winter 2015 48
Example 2: Neo-Hookean Hyperelasticity
The material Jacobian derives from the variation inKirchhoff stress
The material Jacobian:JC D
2
4 2SE U
SC
C C CRelations 5.4.43 and 4 2SE
SEijkl im jn kp lq mnpq
U
C F F F F C
SC
C C C
10
1
2 1
22 2 2 2
2 13 3 9
ijkl ij jl ik jl il jk il jk
ij kl ij kl ij kl mm ij kl
C C B B B BJ
B B B JD
Relations 5.4.43 and 5.4.50 in Textbook
S.Poorasadion User Subroutines in ABAQUS Winter 2015 49
Example 2: Neo-Hookean Hyperelasticity
Main Box
Define Array and Constant
S.Poorasadion User Subroutines in ABAQUS Winter 2015 50
Example 2: Neo-Hookean Hyperelasticity
Calculate Material Parameter
Calculate J and Distortion Tensor
S.Poorasadion User Subroutines in ABAQUS Winter 2015 51
Example 2: Neo-Hookean Hyperelasticity
Calculate deviatoric left Cauchy-Green
deformation tensor
TB FF
Calculate Cauchy Stress
TB FF
10
1
2 1
32
1
C tr IJ
J ID
B B
S.Poorasadion User Subroutines in ABAQUS Winter 2015 52
Example 2: Neo-Hookean Hyperelasticity
Calculate material Calculate material Jacobian
S.Poorasadion User Subroutines in ABAQUS Winter 2015 53
Hyperelastic Materials
Derivation of consistent Jacobian is difficult2
4 2SE
SEijkl im jn kp lq mnpq
U
C F F F F C
SC
C C C
S.Poorasadion User Subroutines in ABAQUS Winter 2015 54
Hyperelastic Materials
Derivation of consistent Jacobian is difficult2
4 2SE
SEijkl im jn kp lq mnpq
U
C F F F F C
SC
C C C
Hyperelastic materials are often implemented more easily in user Subroutine UHYPER
Because of requiring the values of the derivativesof the strain energy density function respect to
the strain invariants
S.Poorasadion User Subroutines in ABAQUS Winter 2015 55
Example 3: Isotropic Hardening Plasticity
Elasticity:
Yield function:
2el elij ij kk ij
30
2pl
ij ij YS S 1
3ij ij ij kkS
Equivalent plastic strain
Plastic flow law
02 ij ij YS S
0
2,
3
t
pl pl pl pl plij ijdt
3ij ij ij kkS
3
2
ijpl plij
Y
S
S.Poorasadion User Subroutines in ABAQUS Winter 2015 56
Example 3: Isotropic Hardening Plasticity
We first calculate the von Mises stress based onpurely elastic behavior (elastic predictor).
If the elastic predictor is larger than the current yieldstress, plastic flow occurs.
The radial return method is used to integrate the The radial return method is used to integrate theequations.
The consistent Jacobian:
* * *2 31 / 3ij ij kk ij ij kl kl
h
h
* * *2, , ,3
prij Y Y
ij pr pr pl
S dk h
d
S.Poorasadion User Subroutines in ABAQUS Winter 2015 57
Example 3: Isotropic Hardening Plasticity
We first calculate the von Mises stress based onpurely elastic behavior (elastic predictor).
If the elastic predictor is larger than the current yieldstress, plastic flow occurs.
The radial return method is used to integrate the
This result is also true for large-strain calculations. The radial return method is used to integrate the
equations.
The consistent Jacobian:
* * *2 31 / 3ij ij kk ij ij kl kl
h
h
* * *2, , ,3
prij Y Y
ij pr pr pl
S dk h
d
S.Poorasadion User Subroutines in ABAQUS Winter 2015 58
calculations.
1
3
2
3
2
ijpl plij
Y
ijpl pl plij ijn n
Yplij n
S
S
Rotate Forward
S.Poorasadion User Subroutines in ABAQUS Winter 2015 61
VUMAT
In ABAQUS/Explicit the user-defined material modelis implemented in user subroutine VUMAT
The material Jacobian does not need to be defined inVUMATVUMAT
UMAT or VUMAT???
S.Poorasadion User Subroutines in ABAQUS Winter 2015 66