This module provides constitutivematerial formulations. In FElupe, a constitutive material definition, or so-called umat (user material), is a class with methods for evaluating gradients and hessians of the strain energy density function with respect to the defined fields in the field container, where the gradient of the first (displacement) field is passed as the deformation gradient. For all following fields, the field values (no gradients) are provided. An attribute x=[np.zeros(statevars_shape)] has to be added to the class to define the shape of optional state variables. For reasons of performance, FElupe passes the field gradients and values all at once, e.g. the deformation gradient is of shape (3,3,q,c), where q refers to the number of quadrature points per cell and c to the number of cells. These last two axes are the so-called trailing axes. Math-functions from felupe.math all support the operation on trailing axes. The constitutive material definition class should be inherited from ConstitutiveMaterial in order to provide force-stretch curves for elementary deformations. Take this code-block as a template for a two-field \((\boldsymbol{u}, p)\) formulation with the old displacement gradient as a state variable:
importnumpyasnpimportfelupeasfem# math-functions which support trailing axesfromfelupe.mathimportdet,dya,identity,transpose,invclassMyMaterialFormulation(fem.ConstitutiveMaterial):def__init__(self):# provide the shape of state variables without trailing axes# values are ignored - state variables are always initiated with zerosself.x=[np.zeros((3,3))]defgradient(self,x):"Gradients of the strain energy density function."# extract variablesF,p,statevars=x[0],x[1],x[-1]# user codedWdF=None# first Piola-Kirchhoff stress tensordWdp=None# update state variables# example: the displacement gradientstatevars_new=F-identity(F)return[dWdF,dWdp,statevars_new]defhessian(self,x,**kwargs):"Hessians of the strain energy density function."# extract variablesF,p,statevars=x[0],x[1],x[-1]# user coded2WdFdF=None# fourth-order elasticity tensord2WdFdp=Noned2Wdpdp=None# upper-triangle items of the hessianreturn[d2WdFdF,d2WdFdp,d2Wdpdp]umat=MyMaterialFormulation()
There are many different pre-defined constitutive material formulations available, including definitions for linear-elasticity, small-strain plasticity, hyperelasticity or pseudo-elasticity. The generation of user materials may be simplified when using frameworks for user-defined functions, like hyperelasticity (with automatic differentiation) or a small-strain based framework with state variables. The most general case is given by a framework with functions for the evaluation of stress and elasticity tensors in terms of the deformation gradient.
View Force-Stretch Curves on Elementary Deformations
A nearly-incompressible material formulation to augment the distortional part of the strain energy function by a volumetric part and a constraint equation.
Ogden-Roxburgh Pseudo-Elastic material formulation for an isotropic treatment of the load-history dependent Mullins-softening of rubber-like materials.
Hyperelastic User-Materials with Automatic Differentation
A hyperelastic material definition with a given function for the strain energy density function per unit undeformed volume with Automatic Differentiation provided by tensortrax.
A user-defined material definition with given functions for the (first Piola-Kirchhoff) stress tensor \(\boldsymbol{P}\), optional constraints on additional fields (e.g. \(p\) and \(J\)), updated state variables \(\boldsymbol{\zeta}\) as well as the according fourth-order elasticity tensor \(\mathbb{A}\) and the linearizations of the constraint equations.
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.
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:
umat (class) – A class with methods for the gradient and hessian of the strain energy density
function w.r.t. the deformation gradient. See Material for
further details.
ux (ndarray, optional) – Array with stretches for uniaxial tension/compression. Default is
linsteps([0.7,2.5],num=36).
ps (ndarray, optional) – Array with stretches for planar shear. Default is
linsteps([1.0,2.5],num=30).
bx (ndarray, optional) – Array with stretches for equi-biaxial tension. Default is
linsteps([1.0,1.75],num=15)`.
statevars (ndarray or None, optional) – Array with state variables (default is None). If None, the state variables are
assumed to be initially zero.
Normal force per undeformed area vs. stretch curve for a equi-biaxial
incompressible deformation.
Parameters:
stretches (ndarray or None, optional) – Array with stretches at which the forces are evaluated (default is None). If
None, the stretches from initialization are used.
Returns:
3-tuple with array of stretches and array of forces and the label.
Evaluate normal force per undeformed area vs. stretch curves for the
elementary homogeneous incompressible deformations uniaxial tension/compression,
planar shear and biaxial tension. A load case is not included if its array of
stretches (attribute ux, ps or bx) is None.
Returns:
List with 3-tuple of stretch and force arrays and the label string for each
load case.
Normal force per undeformed area vs. stretch curve for a planar shear
incompressible deformation.
Parameters:
stretches (ndarray or None, optional) – Array with stretches at which the forces are evaluated (default is None). If
None, the stretches from initialization are used.
Returns:
3-tuple with array of stretches and array of forces and the label.
Plot normal force per undeformed area vs. stretch curves for the elementary
homogeneous incompressible deformations uniaxial tension/compression, planar
shear and biaxial tension.
Normal force per undeformed area vs. stretch curve for a uniaxial
deformation.
Parameters:
stretches (ndarray or None, optional) – Array with stretches at which the forces are evaluated (default is None). If
None, the stretches from initialization are used.
Returns:
3-tuple with array of stretches and array of forces and the label.
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.
Parameters:
umat (class) – A class with methods for the gradient and hessian of the strain energy density
function w.r.t. the deformation gradient. See Material for
further details.
ux (ndarray, optional) – Array with stretches for incompressible uniaxial tension/compression. Default is
linsteps([0.7,2.5],num=36).
ps (ndarray, optional) – Array with stretches for incompressible planar shear. Default is
linsteps([1,2.5],num=30).
bx (ndarray, optional) – Array with stretches for incompressible equi-biaxial tension. Default is
linsteps([1,1.75],num=15).
statevars (ndarray or None, optional) – Array with state variables (default is None). If None, the state variables are
assumed to be initially zero.
Normal force per undeformed area vs. stretch curve for a equi-biaxial
incompressible deformation.
Parameters:
stretches (ndarray or None, optional) – Array with stretches at which the forces are evaluated (default is None). If
None, the stretches from initialization are used.
Returns:
3-tuple with array of stretches and array of forces and the label.
Evaluate normal force per undeformed area vs. stretch curves for the
elementary homogeneous incompressible deformations uniaxial tension/compression,
planar shear and biaxial tension. A load case is not included if its array of
stretches (attribute ux, ps or bx) is None.
Returns:
List with 3-tuple of stretch and force arrays and the label string for each
load case.
Normal force per undeformed area vs. stretch curve for a planar shear
incompressible deformation.
Parameters:
stretches (ndarray or None, optional) – Array with stretches at which the forces are evaluated (default is None). If
None, the stretches from initialization are used.
Returns:
3-tuple with array of stretches and array of forces and the label.
Plot normal force per undeformed area vs. stretch curves for the elementary
homogeneous incompressible deformations uniaxial tension/compression, planar
shear and biaxial tension.
Normal force per undeformed area vs. stretch curve for a uniaxial
incompressible deformation.
Parameters:
stretches (ndarray or None, optional) – Array with stretches at which the forces are evaluated (default is None). If
None, the stretches from initialization are used.
Returns:
3-tuple with array of stretches and array of forces and the label.
Do not merge two constitutive materials with the same keys of material
parameters. In this case, the values of these material parameters are taken from
the first constitutive material.
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.
Nearly-incompressible isotropic hyperelastic Neo-Hookean material
formulation. The strain energy density function of the Neo-Hookean
material formulation is a linear function of the trace of the
isochoric part of the right Cauchy-Green deformation tensor.
At least one of the two material parameters must not be None.
In a nearly-incompressible constitutive framework the strain energy
density is an additive composition of an isochoric and a volumetric
part. While the isochoric part is defined on the distortional part of
the deformation gradient, the volumetric part of the strain
energy function is defined on the determinant of the deformation
gradient.
The volumetric part of the strain energy density function is a function
the volume ratio.
\[U(J) = \frac{K}{2} (J - 1)^2\]
The first Piola-Kirchhoff stress tensor is evaluated as the gradient
of the strain energy density function. The hessian of the strain
energy density function enables the corresponding elasticity tensor.
A chain rule application leads to the following expression for the stress tensor.
It is formulated as a sum of the physical-deviatoric (not the mathematical
deviator!) and the physical-hydrostatic stress tensors.
With the above partial derivatives the (physical-deviatoric and
-hydrostatic) parts of the elasticity tensor associated
to the first Piola-Kirchhoff stress tensor of the Neo-Hookean
material model takes the following form.
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.
Compressible isotropic hyperelastic Neo-Hookean material formulation. The strain
energy density function of the Neo-Hookean material formulation is a linear function
of the trace of the right Cauchy-Green deformation tensor.
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.
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.
classfelupe.OgdenRoxburgh(material, r, m, beta)[source]#
Ogden-Roxburgh Pseudo-Elastic
material formulation for an isotropic treatment of the load-history dependent
Mullins-softening of rubber-like materials.
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.
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.
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.
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.
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.
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.
Hu-Washizu hydrostatic-volumetric selective
\((\boldsymbol{u},p,J)\) - three-field variation for nearly-
incompressible material formulations. The total potential energy
for nearly-incompressible hyperelasticity is formulated with a
determinant-modified deformation gradient. Pressure and volume ratio fields
should be kept one order lower than the interpolation order of the
displacement field, e.g. linear displacement fields should be paired with
element-constant (mean) values of pressure and volume ratio.
The total potential energy of internal forces is defined with a strain
energy density function in terms of a determinant-modified deformation
gradient and an additional control equation.
\[ \begin{align}\begin{aligned}\Pi &= \Pi_{int} + \Pi_{ext}\\\Pi_{int} &= \int_V \psi(\boldsymbol{F}) \ dV \qquad \rightarrow
\qquad \Pi_{int}(\boldsymbol{u},p,J) = \int_V \psi(\overline{\boldsymbol{F}})
\ dV + \int_V p (J-\overline{J}) \ dV\\\overline{\boldsymbol{F}} &=
\left(\frac{\overline{J}}{J}\right)^{1/3} \boldsymbol{F}\end{aligned}\end{align} \]
The variations of the total potential energy w.r.t.
\((\boldsymbol{u},p,J)\) lead to the following expressions. We denote
first partial derivatives as \(\boldsymbol{f}_{(\bullet)}\) and second
partial derivatives as \(\boldsymbol{A}_{(\bullet,\bullet)}\).
\[\boldsymbol{P}' = \boldsymbol{P} - p J \boldsymbol{F}^{-T}\]
Parameters:
material (ConstitutiveMaterial) – A hyperelastic material definition for the strain energy density function with
methods for the gradient and the hessian w.r.t the deformation gradient
tensor.
parallel (bool, optional) – A flag to invoke parallel (threaded) math operations (default is False).
Return a list of variations of the total potential energy w.r.t. the fields
displacements, pressure and volume ratio.
Parameters:
x (list of ndarray) – List of extracted field values with the Deformation gradient tensor
\(\boldsymbol{F}\) as first, the hydrostatic pressure \(p\) as
second and the volume ratio \(\bar{J}\) as third list item.
Returns:
List of gradients w.r.t. the input variables \(\boldsymbol{F}\),
\(p\) and \(\bar{J}\).
List of linearized variations of total potential energy w.r.t
displacements, pressure and volume ratio (these expressions are
symmetric; A_up=A_pu if derived from a total potential energy
formulation). List entries have to be arranged as a flattened list
from the upper triangle blocks:
Δ_u(δ_u(Π_int)) = ∫_V δF : (∂²ψ/(∂F∂F) + p ∂cof(F)/∂F) : ΔF dV
Δ_p(δ_u(Π_int)) = ∫_V δF : J cof(F) Δp dV
Δ_J(δ_u(Π_int)) = ∫_V δF : ∂²ψ/(∂F∂J) ΔJ dV
Δ_p(δ_p(Π_int)) = ∫_V δp 0 Δp dV
Δ_J(δ_p(Π_int)) = ∫_V δp (-1) ΔJ dV
Δ_J(δ_J(Π_int)) = ∫_V δJ ∂²ψ/(∂J∂J) ΔJ dV
[[0 1 2],
[ 3 4],
[ 5]] --> [0 1 2 3 4 5]
Parameters:
extract (list of ndarray) – List of extracted field values with Deformation gradient F
as first, the hydrostatic pressure p as second and the
volume ratio J as third item.
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 nearly-incompressible material formulation to augment the distortional part of
the strain energy function by a volumetric part and a constraint equation.
Notes
The total potential energy of internal forces is given in Eq.
(5).
(1)#\[\Pi_{int}(\boldsymbol{F}, p, \bar{J}) =
\int_V \hat{\psi}(\boldsymbol{F})\ dV +
\int_V U(\bar{J})\ dV +
\int_V p (J - \bar{J})\ dV\]
The volumetric part of the strain energy density function is denoted in Eq.
(9) along with its first and second derivatives.
material (ConstitutiveMaterial) – A hyperelastic material definition for the distortional part of the strain
energy density function \(\hat{\psi}(\boldsymbol{F})\) with methods for the
gradient\(\partial_\boldsymbol{F}(\hat{\psi})\) and the hessian\(\partial_\boldsymbol{F}[\partial_\boldsymbol{F}(\hat{\psi})]\) w.r.t the
deformation gradient tensor \(\boldsymbol{F}\).
bulk (float) – The bulk modulus \(K\) for the volumetric part of the strain energy
function.
parallel (bool, optional) – A flag to invoke parallel (threaded) math operations (default is False).
dUdJ (callable, optional) – A function which evaluates the derivative of the volumetric part of the strain
energy function \(\bar{U}'\) w.r.t. the volume ratio \(\bar{J}\).
Function signature must be lambdaJ,bulk:dUdJ. Default is
\(\bar{U}' = K (\bar{J} - 1)\) or lambdaJ,bulk:bulk*(J-1).
d2UdJdJ (callable, optional) – A function which evaluates the second derivative of the volumetric part of the
strain energy function \(\bar{U}''\) w.r.t. the volume ratio
\(\bar{J}\). Function signature must be lambdaJ,bulk:d2UdJdJ.
Default is \(\bar{U}'' = K\) or lambdaJ,bulk:bulk.
Return a list with the gradient of the strain energy density function
w.r.t. the fields displacements, pressure and volume ratio.
Parameters:
x (list of ndarray) – List of extracted field values with the deformation gradient tensor
\(\boldsymbol{F}\) as first, the pressure \(p\) as
second and the volume ratio \(\bar{J}\) as third list item. Initial
state variables are stored in the last (fourth) list item.
out (ndarray or None, optional) – A location into which the result is stored (default is None).
Returns:
List of gradients w.r.t. the input variables \(\boldsymbol{F}\),
\(p\) and \(\bar{J}\). The last item of the list contains the
updated state variables.
Return a list with the hessian of the strain energy density function
w.r.t. the fields displacements, pressure and volume ratio.
Parameters:
x (list of ndarray) – List of extracted field values with the deformation gradient tensor
\(\boldsymbol{F}\) as first, the pressure \(p\) as
second and the volume ratio \(\bar{J}\) as third list item. Initial
state variables are stored in the last (fourth) list item.
out (ndarray or None, optional) – A location into which the result is stored (default is None).
Returns:
List of the hessian w.r.t. the input variables \(\boldsymbol{F}\),
\(p\) and \(\bar{J}\). The upper-triangle items of the hessian are
returned as the items of the list.
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 user-defined material definition with given functions for the (first
Piola-Kirchhoff) stress tensor \(\boldsymbol{P}\), optional constraints on
additional fields (e.g. \(p\) and \(J\)), updated state variables
\(\boldsymbol{\zeta}\) as well as the according fourth-order elasticity tensor
\(\mathbb{A}\) and the linearizations of the constraint equations. Both
functions take a list of the 3x3 deformation gradient \(\boldsymbol{F}\) and
optional vector of state variables \(\boldsymbol{\zeta}_n\) as the first input
argument. The stress-function must return the updated state variables
\(\boldsymbol{\zeta}\).
Parameters:
stress (callable) – A constitutive material definition which returns a list containting the (first
Piola-Kirchhoff) stress tensor, optional additional constraints as well as the
state variables. The state variables must always be included even if they are
None. See template code-blocks for the required function signature.
elasticity (callable) – A constitutive material definition which returns a list containing the fourth-
order elasticity tensor as the jacobian of the (first Piola-Kirchhoff) stress
tensor w.r.t. the deformation gradient, optional linearizations of the
additional constraints. The state variables must not be returned. See template
code-blocks for the required function signature.
nstatevars (int, optional) – Number of internal state variable components (default is 0). State variable
components must always be concatenated into a 1d-array.
Notes
Note
The first item in the list of the input arguments always contains the
gradient of the (displacement) field \(\boldsymbol{u}\) w.r.t. the
undeformed coordinates \(\boldsymbol{X}\). The identity matrix
\(\boldsymbol{1}\) is added to this gradient, i.e. the first item of the
list x contains the deformation gradient \(\boldsymbol{F} =
\boldsymbol{1} + \frac{\partial \boldsymbol{u}}{\partial \boldsymbol{X}}\). All
other fields are provided as interpolated values (no gradients evaluated).
For \((\boldsymbol{u})\) single-field formulations, the callables for
stress and elasticity must return the gradient and hessian of the strain
energy density function \(\psi(\boldsymbol{F})\) w.r.t. the deformation
gradient tensor \(\boldsymbol{F}\).
defstress(x,**kwargs):"First Piola-Kirchhoff stress tensor."# extract variablesF,statevars=x[0],x[-1]# user code for (first Piola-Kirchhoff) stress tensorP=None# update state variablesstatevars_new=Nonereturn[P,statevars_new]defelasticity(x,**kwargs):"Fourth-order elasticity tensor."# extract variablesF,statevars=x[0],x[-1]# user code for fourth-order elasticity tensor# according to the (first Piola-Kirchhoff) stress tensordPdF=Nonereturn[dPdF]umat=Material(stress,elasticity,**kwargs)
For \((\boldsymbol{u}, p, J)\) mixed-field formulations, the callables for
stress and elasticity must return the gradients and hessians of the
(augmented) strain energy density function w.r.t. the deformation gradient and the
other fields.
For \((\boldsymbol{u}, p, J)\) mixed-field formulations, take this code-block as
template:
defgradient(x,**kwargs):"Gradients of the strain energy density function."# extract variablesF,p,J,statevars=x[0],x[1],x[2],x[-1]# user codedWdF=None# first Piola-Kirchhoff stress tensordWdp=NonedWdJ=None# update state variablesstatevars_new=Nonereturn[dWdF,dWdp,dWdJ,statevars_new]defhessian(x,**kwargs):"Hessians of the strain energy density function."# extract variablesF,p,J,statevars=x[0],x[1],x[2],x[-1]# user coded2WdFdF=None# fourth-order elasticity tensord2WdFdp=Noned2WdFdJ=Noned2Wdpdp=Noned2WdpdJ=Noned2WdJdJ=None# upper-triangle items of the hessianreturn[d2WdFdF,d2WdFdp,d2WdFdJ,d2Wdpdp,d2WdpdJ,d2WdJdJ]umat=Material(gradient,hessian,**kwargs)
Examples
The compressible isotropic hyperelastic Neo-Hookean material formulation is given
by the strain energy density function.
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.
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 strain-based user-defined material definition with a given function
for the stress tensor and the (fourth-order) elasticity tensor.
Take this code-block from the linear-elastic material formulation
fromfelupe.mathimportidentity,cdya,dya,tracedeflinear_elastic(dε,εn,σn,ζn,λ,μ,**kwargs):'''3D linear-elastic material formulation. Arguments --------- dε : ndarray Incremental strain tensor. εn : ndarray Old strain tensor. σn : ndarray Old stress tensor. ζn : ndarray Old state variables. λ : float First Lamé-constant. μ : float Second Lamé-constant (shear modulus). '''# change of stress due to change of strainI=identity(dε)dσ=2*μ*dε+λ*trace(dε)*I# update stress and evaluate elasticity tensorσ=σn+dσdσdε=2*μ*cdya(I,I)+λ*dya(I,I)# update state variables (not used here)ζ=ζnreturndσdε,σ,ζumat=MaterialStrain(material=linear_elastic,μ=1,λ=2)
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.
Given state in point \(\boldsymbol{x} (\boldsymbol{\sigma}_n)\) (valid).
Given strain increment \(\Delta\boldsymbol{\varepsilon}\), so that
\(\boldsymbol{\varepsilon} = \boldsymbol{\varepsilon}_n + \Delta\boldsymbol{\varepsilon}\).
Evaluation of the stress \(\boldsymbol{\sigma}\) and the algorithmic
consistent tangent modulus \(\mathbb{C}\) (=``dσdε``).
A user-defined 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
only use 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 only use differentiable math-functions from
tensortrax.math!
importtensortrax.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=fem.MaterialAD(neo_hooke,mu=1)
and this code-block for material formulations with state variables:
importtensortrax.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=fem.MaterialAD(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.
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
only use 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 only use differentiable math-functions from
tensortrax.math!
Take this minimal code-block as template
\[\psi = \psi(\boldsymbol{C})\]
importtensortrax.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=fem.Hyperelastic(neo_hooke,mu=1)
and this code-block for material formulations with state variables.
importtensortrax.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=fem.Hyperelastic(viscoelastic,mu=1,eta=1,dtime=1,nstatevars=6)
View force-stretch curves on elementary incompressible deformations.
>>> importfelupeasfem>>> 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=fem.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.
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.
Convert the pair of given material parameters Young’s modulus \(E\) and
Poisson ratio \(\nu\) to first and second Lamé - constants \(\lambda\) and
\(\mu\).