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

\[\sig = \Cel : \eps\]

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

\[\begin{split}\Cel^{-1} = \begin{bmatrix} \frac{1}{E} & \frac{-\nu}{E} & \frac{-\nu}{E} & 0 & 0 & 0 \\ \frac{-\nu}{E} & \frac{1}{E} & \frac{-\nu}{E} & 0 & 0 & 0 \\ \frac{-\nu}{E} & \frac{-\nu}{E} & \frac{1}{E} & 0 & 0 & 0 \\ 0 & 0 & 0 & \frac{1}{G} & 0 & 0 \\ 0 & 0 & 0 & 0 & \frac{1}{G} & 0 \\ 0 & 0 & 0 & 0 & 0 & \frac{1}{G} \end{bmatrix}\end{split}\]

with

\[\displaystyle G = \frac{E}{2\,(1 + \nu)}\]

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"]
    "5" [label="MarmotMaterial" tooltip="MarmotMaterial"]
    "3" [label="MarmotMaterialHypoElastic" tooltip="MarmotMaterialHypoElastic"]
    "2" [label="MarmotMaterialHypoElasticAD" tooltip="MarmotMaterialHypoElasticAD"]
    "4" [label="MarmotMaterialMechanical" tooltip="MarmotMaterialMechanical"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
    "3" -> "4" [dir=forward tooltip="public-inheritance"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "4" -> "5" [dir=forward tooltip="public-inheritance"]
}

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"]
    "5" [label="MarmotMaterial" tooltip="MarmotMaterial"]
    "3" [label="MarmotMaterialHypoElastic" tooltip="MarmotMaterialHypoElastic"]
    "2" [label="MarmotMaterialHypoElasticAD" tooltip="MarmotMaterialHypoElasticAD"]
    "4" [label="MarmotMaterialMechanical" tooltip="MarmotMaterialMechanical"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
    "3" -> "4" [dir=forward tooltip="public-inheritance"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "4" -> "5" [dir=forward tooltip="public-inheritance"]
}

Implementation of a isotropic linear elastic material for 3D stress states using automatic differentiation.

Public Functions

ADLinearElastic(const double *materialProperties, int nMaterialProperties, int materialNumber)

Public Members

const double &E

Young’s modulus for isotropic materials.

const double &nu

Poisson’s ratio for isotropic materials.

Protected Functions

virtual void computeStressAD(autodiff::dual *stress, const autodiff::dual *dStrain, const double *timeOld, const double dT, double &pNewDT)

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:
  • stress[inout] Cauchy stress tensor

  • dStrain[in] linearized strain increment

  • timeOld[in] Old (pseudo-)time

  • dT[in] (Pseudo-)time increment from the old (pseudo-)time to the current (pseudo-)time

  • pNewDT[inout] Suggestion for a new time increment

inline virtual StateView getStateView(const std::string &result)

Access material state variables by name.

Parameters:

stateName[in] Name of the requested state variable.

Returns:

A view into the state variable array.

inline virtual int getNumberOfRequiredStateVars()
Returns:

Number of state variables required by the material.