Linear Elastic model (Automatic Differentiation)
This material is intended for demonstration purposes, to illustrate how to use the capabilities of the AD Material.
Theory
The constitutive law is given in total form as
relating the nominal stress tensor \(\sig\) to the linearized strain tensor \(\eps\) with the fourth order stiffness tensor \(\Cel\). For the given definitions it is important to note, that the Voigt notation is used. The stiffness tensor can be specified for isotropic material behavior as follows:
Isotropic Behavior
Number of independent material parameters: 2
with
Implementation
-
class ADLinearElastic : public MarmotMaterialHypoElasticAD
Inheritance diagram for Marmot::Materials::ADLinearElastic:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"1" [label="Marmot::Materials::ADLinearElastic" tooltip="Marmot::Materials::ADLinearElastic" fillcolor="#BFBFBF"]
"3" [label="MarmotMaterialHypoElastic" tooltip="MarmotMaterialHypoElastic"]
"2" [label="MarmotMaterialHypoElasticAD" tooltip="MarmotMaterialHypoElasticAD"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
"2" -> "3" [dir=forward tooltip="public-inheritance"]
}](../../_images/graphviz-dbd66cd2655515c3e396af71a3291558843f60fb.png)
Collaboration diagram for Marmot::Materials::ADLinearElastic:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"1" [label="Marmot::Materials::ADLinearElastic" tooltip="Marmot::Materials::ADLinearElastic" fillcolor="#BFBFBF"]
"3" [label="MarmotMaterialHypoElastic" tooltip="MarmotMaterialHypoElastic"]
"2" [label="MarmotMaterialHypoElasticAD" tooltip="MarmotMaterialHypoElasticAD"]
"4" [label="MarmotStateLayoutDynamic" tooltip="MarmotStateLayoutDynamic"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
"3" -> "4" [dir=forward tooltip="usage"]
"2" -> "3" [dir=forward tooltip="public-inheritance"]
}](../../_images/graphviz-9dc5341a8ea83c77d9e64c781a7190266fdf667f.png)
Implementation of a isotropic linear elastic material for 3D stress states using automatic differentiation.
Public Functions
-
ADLinearElastic(const double *materialProperties, int nMaterialProperties, int materialNumber)
-
virtual double getDensity(const double *stateVars) const override
Get the mass density of the material.
- Parameters:
stateVars – Pointer to the state variable array
- Returns:
Mass density of the material
Protected Functions
-
virtual void computeStressAD(state3DAD &state, const Marmot::Vector6dual &dStrain, const timeInfo &timeInfo) const override
Compute the Cauchy stress tensor \(\boldsymbol{\sigma}\) given an increment of the linearized strain tensor \(\Delta\boldsymbol{\varepsilon}\).
Dual numbers are used for both the Cauchy stress tensor and the linearized strain increment, such that the algorithmic tangent operator \(\frac{\partial\boldsymbol{\sigma}^{(n+1)}}{\partial\boldsymbol{\varepsilon}^{(n+1)}}\) can be obtained by means of automatic differentiation.
- Parameters:
state – [inout] State carrying the dual Cauchy stress, strain energy, and state variables
dStrain – [in] linearized strain increment
timeInfo – Old (pseudo-)time
-
ADLinearElastic(const double *materialProperties, int nMaterialProperties, int materialNumber)