A hyperelastic material definition with a given function for the strain energy density function per unit undeformed volume with Automatic Differentiation provided by tensortrax.
Ogden-Roxburgh Pseudo-Elastic material formulation for an isotropic treatment of the load-history dependent Mullins-softening of rubber-like materials.
The material model formulations are defined by the first Piola-Kirchhoff stress tensor.
Function-decorators are available to use total_lagrange()
and updated_lagrange() material formulations in
Material.
A hyperelastic material definition with a given function for the strain energy
density function per unit undeformed volume with Automatic Differentiation provided
by tensortrax.
Parameters:
fun (callable) – A strain energy density function in terms of the right Cauchy-Green deformation
tensor \(\boldsymbol{C}\). Function signature must be
fun=lambdaC,**kwargs:psi for functions without state variables and
fun=lambdaC,statevars,**kwargs:[psi,statevars_new] for functions
with state variables. The right Cauchy-Green deformation tensor will be a
tensortrax.Tensor when the function is evaluated. It is important to
use only differentiable math-functions from tensortrax.math.
nstatevars (int, optional) – Number of state variables (default is 0).
parallel (bool, optional) – A flag to invoke threaded strain energy density function evaluations (default
is False). May introduce additional overhead for small-sized problems.
**kwargs (dict, optional) – Optional keyword-arguments for the strain energy density function.
Notes
The strain energy density function \(\psi\) must be given in terms of the right
Cauchy-Green deformation tensor
\(\boldsymbol{C} = \boldsymbol{F}^T \boldsymbol{F}\).
Warning
It is important to use only differentiable math-functions from
tensortrax.math!
Take this minimal code-block as template
\[\psi = \psi(\boldsymbol{C})\]
importfelupeasfemimportfelupe.constitution.tensortraxasmatimporttensortrax.mathastmdefneo_hooke(C,mu):"Strain energy function of the Neo-Hookean material formulation."returnmu/2*(tm.linalg.det(C)**(-1/3)*tm.trace(C)-3)umat=mat.Hyperelastic(neo_hooke,mu=1)
and this code-block for material formulations with state variables.
importfelupeasfemimportfelupe.constitution.tensortraxasmatimporttensortrax.mathastmdefviscoelastic(C,Cin,mu,eta,dtime):"Finite strain viscoelastic material formulation."# unimodular part of the right Cauchy-Green deformation tensorCu=tm.linalg.det(C)**(-1/3)*C# update of state variables by evolution equationCi=tm.special.from_triu_1d(Cin,like=C)+mu/eta*dtime*CuCi=tm.linalg.det(Ci)**(-1/3)*Ci# first invariant of elastic part of right Cauchy-Green deformation tensorI1=tm.trace(Cu@tm.linalg.inv(Ci))# strain energy function and state variablereturnmu/2*(I1-3),tm.special.triu_1d(Ci)umat=mat.Hyperelastic(viscoelastic,mu=1,eta=1,dtime=1,nstatevars=6)
View force-stretch curves on elementary incompressible deformations.
>>> importfelupeasfem>>> importfelupe.constitution.tensortraxasmat>>> importtensortrax.mathastm>>>>>> defneo_hooke(C,mu):... "Strain energy function of the Neo-Hookean material formulation."... returnmu/2*(tm.linalg.det(C)**(-1/3)*tm.trace(C)-3)>>>>>> umat=mat.Hyperelastic(neo_hooke,mu=1)>>> ax=umat.plot(incompressible=True)
Return the evaluated gradient of the strain energy density function.
Parameters:
x (list of ndarray) – The list with input arguments. These contain the extracted fields of a
FieldContainer along with the old vector of state
variables, [*field.extract(),statevars_old].
Returns:
A list with the evaluated gradient(s) of the strain energy density function
and the updated vector of state variables.
Return the evaluated upper-triangle components of the hessian(s) of the
strain energy density function.
Parameters:
x (list of ndarray) – The list with input arguments. These contain the extracted fields of a
FieldContainer along with the old vector of state
variables, [*field.extract(),statevars_old].
Returns:
A list with the evaluated upper-triangle components of the hessian(s) of the
strain energy density function.
Optimize the material parameters by a least-squares fit on experimental
stretch-stress data.
Parameters:
ux (array of shape (2, ...) or None, optional) – Experimental uniaxial stretch and force-per-undeformed-area data (default is
None).
ps (array of shape (2, ...) or None, optional) – Experimental planar-shear stretch and force-per-undeformed-area data
(default is None).
bx (array of shape (2, ...) or None, optional) – Experimental biaxial stretch and force-per-undeformed-area data (default is
None).
incompressible (bool, optional) – A flag to enforce incompressible deformations (default is False).
relative (bool, optional) – A flag to optimize relative instead of absolute residuals, i.e.
(predicted-observed)/observed instead of predicted-observed
(default is False).
Return a plot with normal force per undeformed area vs. stretch curves for
the elementary homogeneous deformations uniaxial tension/compression, planar
shear and biaxial tension of a given isotropic material formulation.
Parameters:
incompressible (bool, optional) – A flag to enforce views on incompressible deformations (default is False).
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous incompressible deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
Save a screenshot with normal force per undeformed area vs. stretch curves
for the elementary homogeneous deformations uniaxial tension/compression, planar
shear and biaxial tension of a given isotropic material formulation.
Parameters:
filename (str, optional) – The filename of the screenshot (default is “umat.png”).
incompressible (bool, optional) – A flag to enforce views on incompressible deformations (default is False).
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous incompressible deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
Create views on normal force per undeformed area vs. stretch curves for the
elementary homogeneous deformations uniaxial tension/compression, planar shear
and biaxial tension of a given isotropic material formulation.
Parameters:
incompressible (bool, optional) – A flag to enforce views on incompressible deformations (default is False).
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous incompressible deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
A material definition with a given function for the partial derivative of the
strain energy function w.r.t. the deformation gradient tensor with Automatic
Differentiation provided by tensortrax.
Parameters:
fun (callable) – A gradient of the strain energy density function w.r.t. the deformation gradient
tensor \(\boldsymbol{F}\). Function signature must be
fun=lambdaF,**kwargs:P for functions without state variables and
fun=lambdaF,statevars,**kwargs:[P,statevars_new] for functions
with state variables. The deformation gradient tensor will be a
tensortrax.Tensor when the function is evaluated. It is important to
use only differentiable math-functions from tensortrax.math!
nstatevars (int, optional) – Number of state variables (default is 0).
parallel (bool, optional) – A flag to invoke threaded gradient of strain energy density function evaluations
(default is False). May introduce additional overhead for small-sized problems.
**kwargs (dict, optional) – Optional keyword-arguments for the gradient of the strain energy density
function.
Notes
The gradient of the strain energy density function
\(\frac{\partial \psi}{\partial \boldsymbol{F}}\) must be given in terms of the
deformation gradient tensor \(\boldsymbol{F}\).
Warning
It is important to use only differentiable math-functions from
tensortrax.math!
importfelupeasfemimportfelupe.constitution.tensortraxasmatimporttensortrax.mathastmdefneo_hooke(F,mu):"First Piola-Kirchhoff stress of the Neo-Hookean material formulation."C=tm.dot(tm.transpose(F),F)Cu=tm.linalg.det(C)**(-1/3)*Creturnmu*F@tm.special.dev(Cu)@tm.linalg.inv(C)umat=mat.Material(neo_hooke,mu=1)
and this code-block for material formulations with state variables:
importfelupeasfemimportfelupe.constitution.tensortraxasmatimporttensortrax.mathastmdefviscoelastic(F,Cin,mu,eta,dtime):"Finite strain viscoelastic material formulation."# unimodular part of the right Cauchy-Green deformation tensorC=tm.dot(tm.transpose(F),F)Cu=tm.linalg.det(C)**(-1/3)*C# update of state variables by evolution equationCi=tm.special.from_triu_1d(Cin,like=C)+mu/eta*dtime*CuCi=tm.linalg.det(Ci)**(-1/3)*Ci# second Piola-Kirchhoff stress tensorS=mu*tm.special.dev(Cu@tm.linalg.inv(Ci))@tm.linalg.inv(C)# first Piola-Kirchhoff stress tensor and state variablereturnF@S,tm.special.triu_1d(Ci)umat=mat.Material(viscoelastic,mu=1,eta=1,dtime=1,nstatevars=6)
Return the evaluated gradient of the strain energy density function.
Parameters:
x (list of ndarray) – The list with input arguments. These contain the extracted fields of a
FieldContainer along with the old vector of state
variables, [*field.extract(),statevars_old].
Returns:
A list with the evaluated gradient(s) of the strain energy density function
and the updated vector of state variables.
Return the evaluated upper-triangle components of the hessian(s) of the
strain energy density function.
Parameters:
x (list of ndarray) – The list with input arguments. These contain the extracted fields of a
FieldContainer along with the old vector of state
variables, [*field.extract(),statevars_old].
Returns:
A list with the evaluated upper-triangle components of the hessian(s) of the
strain energy density function.
Optimize the material parameters by a least-squares fit on experimental
stretch-stress data.
Parameters:
ux (array of shape (2, ...) or None, optional) – Experimental uniaxial stretch and force-per-undeformed-area data (default is
None).
ps (array of shape (2, ...) or None, optional) – Experimental planar-shear stretch and force-per-undeformed-area data
(default is None).
bx (array of shape (2, ...) or None, optional) – Experimental biaxial stretch and force-per-undeformed-area data (default is
None).
incompressible (bool, optional) – A flag to enforce incompressible deformations (default is False).
relative (bool, optional) – A flag to optimize relative instead of absolute residuals, i.e.
(predicted-observed)/observed instead of predicted-observed
(default is False).
Return a plot with normal force per undeformed area vs. stretch curves for
the elementary homogeneous deformations uniaxial tension/compression, planar
shear and biaxial tension of a given isotropic material formulation.
Parameters:
incompressible (bool, optional) – A flag to enforce views on incompressible deformations (default is False).
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous incompressible deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
Save a screenshot with normal force per undeformed area vs. stretch curves
for the elementary homogeneous deformations uniaxial tension/compression, planar
shear and biaxial tension of a given isotropic material formulation.
Parameters:
filename (str, optional) – The filename of the screenshot (default is “umat.png”).
incompressible (bool, optional) – A flag to enforce views on incompressible deformations (default is False).
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous incompressible deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
Create views on normal force per undeformed area vs. stretch curves for the
elementary homogeneous deformations uniaxial tension/compression, planar shear
and biaxial tension of a given isotropic material formulation.
Parameters:
incompressible (bool, optional) – A flag to enforce views on incompressible deformations (default is False).
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous incompressible deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
A hyperelastic material definition with a given function for the strain energy
density function per unit undeformed volume with Automatic Differentiation provided
by tensortrax.
Parameters:
fun (callable) – A strain energy density function in terms of the right Cauchy-Green deformation
tensor \(\boldsymbol{C}\). Function signature must be
fun=lambdaC,**kwargs:psi for functions without state variables and
fun=lambdaC,statevars,**kwargs:[psi,statevars_new] for functions
with state variables. The right Cauchy-Green deformation tensor will be a
tensortrax.Tensor when the function is evaluated. It is important to
use only differentiable math-functions from tensortrax.math.
nstatevars (int, optional) – Number of state variables (default is 0).
parallel (bool, optional) – A flag to invoke threaded strain energy density function evaluations (default
is False). May introduce additional overhead for small-sized problems.
**kwargs (dict, optional) – Optional keyword-arguments for the strain energy density function.
Notes
The strain energy density function \(\psi\) must be given in terms of the right
Cauchy-Green deformation tensor
\(\boldsymbol{C} = \boldsymbol{F}^T \boldsymbol{F}\).
Warning
It is important to use only differentiable math-functions from
tensortrax.math!
Take this minimal code-block as template
\[\psi = \psi(\boldsymbol{C})\]
importfelupeasfemimportfelupe.constitution.tensortraxasmatimporttensortrax.mathastmdefneo_hooke(C,mu):"Strain energy function of the Neo-Hookean material formulation."returnmu/2*(tm.linalg.det(C)**(-1/3)*tm.trace(C)-3)umat=mat.Hyperelastic(neo_hooke,mu=1)
and this code-block for material formulations with state variables.
importfelupeasfemimportfelupe.constitution.tensortraxasmatimporttensortrax.mathastmdefviscoelastic(C,Cin,mu,eta,dtime):"Finite strain viscoelastic material formulation."# unimodular part of the right Cauchy-Green deformation tensorCu=tm.linalg.det(C)**(-1/3)*C# update of state variables by evolution equationCi=tm.special.from_triu_1d(Cin,like=C)+mu/eta*dtime*CuCi=tm.linalg.det(Ci)**(-1/3)*Ci# first invariant of elastic part of right Cauchy-Green deformation tensorI1=tm.trace(Cu@tm.linalg.inv(Ci))# strain energy function and state variablereturnmu/2*(I1-3),tm.special.triu_1d(Ci)umat=mat.Hyperelastic(viscoelastic,mu=1,eta=1,dtime=1,nstatevars=6)
View force-stretch curves on elementary incompressible deformations.
>>> importfelupeasfem>>> importfelupe.constitution.tensortraxasmat>>> importtensortrax.mathastm>>>>>> defneo_hooke(C,mu):... "Strain energy function of the Neo-Hookean material formulation."... returnmu/2*(tm.linalg.det(C)**(-1/3)*tm.trace(C)-3)>>>>>> umat=mat.Hyperelastic(neo_hooke,mu=1)>>> ax=umat.plot(incompressible=True)
Return the evaluated gradient of the strain energy density function.
Parameters:
x (list of ndarray) – The list with input arguments. These contain the extracted fields of a
FieldContainer along with the old vector of state
variables, [*field.extract(),statevars_old].
Returns:
A list with the evaluated gradient(s) of the strain energy density function
and the updated vector of state variables.
Return the evaluated upper-triangle components of the hessian(s) of the
strain energy density function.
Parameters:
x (list of ndarray) – The list with input arguments. These contain the extracted fields of a
FieldContainer along with the old vector of state
variables, [*field.extract(),statevars_old].
Returns:
A list with the evaluated upper-triangle components of the hessian(s) of the
strain energy density function.
Optimize the material parameters by a least-squares fit on experimental
stretch-stress data.
Parameters:
ux (array of shape (2, ...) or None, optional) – Experimental uniaxial stretch and force-per-undeformed-area data (default is
None).
ps (array of shape (2, ...) or None, optional) – Experimental planar-shear stretch and force-per-undeformed-area data
(default is None).
bx (array of shape (2, ...) or None, optional) – Experimental biaxial stretch and force-per-undeformed-area data (default is
None).
incompressible (bool, optional) – A flag to enforce incompressible deformations (default is False).
relative (bool, optional) – A flag to optimize relative instead of absolute residuals, i.e.
(predicted-observed)/observed instead of predicted-observed
(default is False).
Return a plot with normal force per undeformed area vs. stretch curves for
the elementary homogeneous deformations uniaxial tension/compression, planar
shear and biaxial tension of a given isotropic material formulation.
Parameters:
incompressible (bool, optional) – A flag to enforce views on incompressible deformations (default is False).
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous incompressible deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
Save a screenshot with normal force per undeformed area vs. stretch curves
for the elementary homogeneous deformations uniaxial tension/compression, planar
shear and biaxial tension of a given isotropic material formulation.
Parameters:
filename (str, optional) – The filename of the screenshot (default is “umat.png”).
incompressible (bool, optional) – A flag to enforce views on incompressible deformations (default is False).
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous incompressible deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
Create views on normal force per undeformed area vs. stretch curves for the
elementary homogeneous deformations uniaxial tension/compression, planar shear
and biaxial tension of a given isotropic material formulation.
Parameters:
incompressible (bool, optional) – A flag to enforce views on incompressible deformations (default is False).
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
Create views on normal force per undeformed area vs. stretch curves for the elementary homogeneous incompressible deformations uniaxial tension/compression, planar shear and biaxial tension of a given isotropic material formulation.
A hyperelastic material definition with a given function for the strain energy density function per unit undeformed volume with Automatic Differentiation.
A material definition with a given function for the partial derivative of the strain energy function w.r.t. the deformation gradient tensor with Automatic Differentiation.
A hyperelastic material definition with a given function for the strain energy density function per unit undeformed volume with Automatic Differentiation.
A material definition with a given function for the partial derivative of the strain energy function w.r.t. the deformation gradient tensor with Automatic Differentiation.
A hyperelastic material definition with a given function for the strain energy density function per unit undeformed volume with Automatic Differentiation.
A material definition with a given function for the partial derivative of the strain energy function w.r.t. the deformation gradient tensor with Automatic Differentiation.
A hyperelastic material definition with a given function for the strain energy density function per unit undeformed volume with Automatic Differentiation.
A material definition with a given function for the partial derivative of the strain energy function w.r.t. the deformation gradient tensor with Automatic Differentiation.
C1 (float) – Scale factor for the first invariant term.
C2 (float) – Scale factor for the second invariant term.
C3 (float) – Scale factor for the logarithmic second invariant term.
gamma (float) – Offset-normalization parameter for the logarithmic second invariant term.
k (float) – Scale factor for the exponential first invariant term.
Notes
Warning
The strain energy function of the Alexander model formulation is not directly
implemented. Only its gradient and hessian w.r.t. the right Cauchy-Green
deformation tensor are defined. This is because the imaginary error-function
\(\text{erfi}(x)\) is not included in NumPy - this would require SciPy as a
dependency.
The initial shear modulus results from the sum of the cross-link and the constraint
contributions to the total initial shear modulus as denoted in Eq.
(22).
The material formulation is built upon the multiplicative decomposition of the
distortional part of the deformation gradient tensor into an elastic and an
inelastic part, see Eq. (23).
The components of the inelastic right Cauchy-Green deformation tensor are used as
state variables with the evolution equation and its explicit update formula as given
in Eq. (24)[1]_. The elastic part of the multiplicative decomposition of
the deformation gradient tensor is also enforced to be an unimodular tensor which
leads to the constraint \(\det(\boldsymbol{F_i})=1\). Hence, the inelastic right
Cauchy-Green deformation tensor must be an unimodular tensor
\(\det(\boldsymbol{C_i})=1\).
felupe.constitution.tensortrax.models.hyperelastic.ogden_roxburgh(C, Wmax_n, material, r, m, beta, **kwargs)[source]#
Ogden-Roxburgh Pseudo-Elastic
material formulation for an isotropic treatment of the load-history dependent
Mullins-softening of rubber-like materials.
Wmax_n (ndarray) – State variable: value of the maximum strain energy density in load-history from
the previous solution.
material (callable) – Isotropic strain-energy density function. Optional keyword arguments are passed
to material.
r (float) – Reciprocal value of the maximum relative amount of softening. i.e. r=3 means
the shear modulus of the base material scales down from \(1\) (no softening)
to \(1 - 1/3 = 2/3\) (maximum softening).
m (float) – The initial Mullins softening modulus.
beta (float) – Maximum deformation-dependent part of the Mullins softening modulus.
**kwargs (dict) – Optional keyword arguments are passed to the isotropic strain energy density
function material.
warning:: (..) – The keyword arguments of material must not
include the names r, m and beta.
Notes
The pseudo-elastic strain energy density function \(\widetilde{\psi}\) and the
Mullins-effect related evolution equation are given in Eq. (35).
The variation of the functional \(\phi\) is defined in such a way that the term
\(\delta \eta \ \hat{\psi}\) is canceled in the variation of the strain energy
function:math:delta psi. The evolution equation`:math:eta acts as a
deformation and deformation-history dependent scaling factor on the variation of the
distortional part of the strain energy density function.
mu (float) – Second Lamé constant (shear modulus).
lmbda (float) – First Lamé constant (shear modulus).
k (float, optional) – Strain exponent (default is 2). If 2, the Green-Lagrange strain measure is used.
For any other value, the family of Seth-Hill strains is used.
with the first and second invariant of the Green-Lagrange strain tensor
\(\boldsymbol{E} = \frac{1}{2} (\boldsymbol{C} - \boldsymbol{1})\), see Eq.
(37).
mu (list of float) – List of the three second Lamé parameters \(\mu_1,\mu_2, \mu_3\).
lmbda (list of float) – List of six (upper triangle) first Lamé parameters \(\lambda_{11},
\lambda_{12}, \lambda_{13}, \lambda_{22}, \lambda_{23}, \lambda_{33}\).
r1 (list of float) – First normal vector of planes of symmetry.
r2 (list of float) – Second normal vector of planes of symmetry.
r3 (list of float or None, optional) – Third normal vector of planes of symmetry. If None, the third normal vector
is evaluated as \(r_1 \times r_2\). Default is None.
k (float, optional) – Strain exponent (default is 2). If 2, the Green-Lagrange strain measure is used.
For any other value, the family of Seth-Hill strains is used.
statevars (array) – Vector of stacked state variables (CTS, C, SA).
p (list of float) – A list which contains the 8 material parameters.
Notes
The MORPH material model is implemented as a second Piola-Kirchhoff stress-based
formulation with automatic differentiation. The Tresca invariant of the distortional
part of the right Cauchy-Green deformation tensor is used as internal state
variable, see Eq. (48).
Warning
While the MORPH-material
formulation captures the Mullins effect and quasi-static hysteresis effects of
rubber mixtures very nicely, it has been observed to be unstable for medium- to
highly-distorted states of deformation.
The rate of deformation is described by the Lagrangian tensor and its Tresca-
invariant, see Eq. (50).
Note
It is important to evaluate the incremental right Cauchy-Green tensor by the
difference of the final and the previous state of deformation, not by its
variation with respect to the deformation gradient tensor.
The additional stresses evolve between the limiting stresses, see Eq.
(51). The additional deviatoric-enforcement terms [1]_ are neglected
in this implementation.
Only the upper-triangle entries of the symmetric stress-tensor state
variables are stored in the solid body. Hence, it is necessary to extract such
variables with tm.special.from_triu_1d() and export them as
tm.special.triu_1d().
Examples
First, choose the desired automatic differentiation backend
>>> importfelupeasfem>>>>>> # import felupe.constitution.jax as mat>>> importfelupe.constitution.tensortraxasmat