Solid module
Finite-strain kinematics, constitutive responses and virtual-work forms.
A total-Lagrangian hyperelastic model uses a reference domain , displacement and deformation gradient . The stored energy determines the first Piola–Kirchhoff stress and tangent action.
The solid mechanics guide derives the weak equations and explains the reference/current configurations.
Kinematics and constitutive input
KinematicState accepts a displacement gradient and exposes the deformation measures used by a law:
| Getter | Quantity |
|---|---|
getDeformationGradient() | |
getDeformationGradientInverse() | |
getDeformationGradientInverseTranspose() | |
getRightCauchyGreenTensor() | |
getLeftCauchyGreenTensor() | |
getJacobian() | |
getLogJacobian() |
Constitutive models involving and inverse deformation gradients require an admissible deformation, including . ConstitutivePoint combines the kinematics, optional spatial location and tagged auxiliary inputs such as reference fibers and activation. Integrator input callbacks populate those values at quadrature points.
Prepare and evaluate a law
HyperElasticLaw defines the common constitutive interface. Bind a constitutive point through setConstitutivePoint(point), then read getStrainEnergyDensity(), getFirstPiolaKirchhoffStress(P) and getMaterialTangent(dP,dF). Binding captures the inputs needed by the law. Each assembly worker uses its own prepared law; concurrent rebinding of the same object requires synchronization.
For example, NeoHookean implements
The checked constitutive-response example varies and compares a centered energy derivative with over 71 stretches. Its largest scaled discrepancy was with finite-difference increment .
for (size_t sample = 0; sample < 3; ++sample) { const Real value = stretch + (Real(sample) - 1) * increment; Math::SpatialMatrix<Real> gradient(3, 3); gradient.setZero(); gradient(0, 0) = value - 1; Solid::KinematicState state(3); state.setDisplacementGradient(gradient); Solid::ConstitutivePoint point(state); law.setConstitutivePoint(point); energy[sample] = law.getStrainEnergyDensity(); if (!std::isfinite(energy[sample])) return EXIT_FAILURE; if (sample == 1) { Math::SpatialMatrix<Real> firstPiola; law.getFirstPiolaKirchhoffStress(firstPiola); stress = firstPiola(0, 0); if (!std::isfinite(stress)) return EXIT_FAILURE; } }
Other laws include SaintVenantKirchhoff, MooneyRivlin and HolzapfelOgden. Their class pages specify energy, dimensions, parameters and auxiliary inputs. Choose units consistently for the geometry, material parameters and loads.
Assemble internal virtual work
InternalVirtualWork binds a material law to the current displacement. Its residual and tangent represent
The façade supplies Residual(v), Tangent(du,v) and their combined form.
auto internal = Solid::InternalVirtualWork(law, displacement); Problem newton(du, v); newton = internal(du, v) - Integral(bodyForce, v) + DirichletBC(du, Zero()).on(fixedBoundary);
Here displacement is the current state, du is its trial increment and v is the matching test function. Problem assembly negates the physical residual when placing linear forms on the right-hand side, giving . Keep the state and forms valid throughout Newton updates. Nonpolynomial laws and curved geometry require quadrature assessed against the intended accuracy.
Postprocess stresses and strain
FirstPiolaKirchhoffStress, CauchyStress and GreenLagrangeStrain expose constitutive fields. In particular, and . Interpolate or project these fields into an output space appropriate for their regularity, then export with XDMF.
Namespaces
- namespace Tags
- Standard tag types for auxiliary constitutive data.
Classes
-
template<class PassiveLaw, class ActiveLaw = ActiveFiberLaw>class ActiveContraction
- Adds active fiber stress to a passive law.
- class ActiveFiberLaw
- Local active fiber contraction law.
- class HolzapfelOgden
- Compressible Holzapfel-Ogden law with one preferred direction.
- class Hooke
- Isotropic Hooke's law for linear elasticity.
-
template<class Derived>class HyperElasticLaw
- CRTP base class for hyperelastic constitutive laws.
- class MooneyRivlin
- Compressible Mooney-Rivlin hyperelastic law.
- class NeoHookean
- Compressible Neo-Hookean hyperelastic law.
- class SaintVenantKirchhoff
- Saint-Venant-Kirchhoff hyperelastic law.
- class Yeoh
- Compressible Yeoh hyperelastic law.
-
template<class LawDerived>class CauchyStress
- Computes the Cauchy stress from a constitutive law.
-
template<class LawDerived>class FirstPiolaKirchhoffStress
- Computes the first Piola-Kirchhoff stress from a constitutive law.
- class GreenLagrangeStrain
- Computes the Green-Lagrange strain tensor from a kinematic state.
-
template<class Derived>class Input
- CRTP base class for inputs.
-
template<class... Args>class InternalVirtualWorkResidual
- Internal virtual work residual integrator family.
See specializations
Specialization Description LawDerived, TestFunctionType, DisplacementTypeFull specialization
template < class LawDerived, class TestFunctionType, class DisplacementType> class InternalVirtualWorkResidual< LawDerived, TestFunctionType, DisplacementType> final;
Momentum residual (pure displacement formulation). LawDerived, TestFunctionType, DisplacementType, PressureTypeFull specialization
template < class LawDerived, class TestFunctionType, class DisplacementType, class PressureType> class InternalVirtualWorkResidual< LawDerived, TestFunctionType, DisplacementType, PressureType> final;
Momentum residual of the mixed u-p formulation. Bound to the displacement test function $ \mathbf{v} $. -
template<class TestPressFunctionType, class DisplacementType>class InternalVirtualWorkResidualP
- Incompressibility constraint residual of the mixed u-p formulation. Bound to the pressure test function .
-
template<class... Args>class InternalVirtualWorkTangent
- Internal virtual work tangent integrator family.
See specializations
Specialization Description LawDerived, TrialFunctionType, TestFunctionType, DisplacementTypeFull specialization
template < class LawDerived, class TrialFunctionType, class TestFunctionType, class DisplacementType> class InternalVirtualWorkTangent< LawDerived, TrialFunctionType, TestFunctionType, DisplacementType> final;
Displacement tangent (pure displacement formulation). LawDerived, TrialFunctionType, TestFunctionType, DisplacementType, PressureTypeFull specialization
template < class LawDerived, class TrialFunctionType, class TestFunctionType, class DisplacementType, class PressureType> class InternalVirtualWorkTangent< LawDerived, TrialFunctionType, TestFunctionType, DisplacementType, PressureType> final;
Displacement-displacement block $ K_{uu} $ of the mixed u-p formulation. Bound to the (u, v) pair. - class InternalVirtualWorkTangentUP
- Displacement-pressure coupling block . Bound to the (p, v) pair, where columns are pressure DOFs, rows are displacement test DOFs.
See declaration
template<class TrialPressFunctionType, class TestFunctionType, class DisplacementType>class InternalVirtualWorkTangentUP - class InternalVirtualWorkTangentPU
- Pressure-displacement coupling block (linearized incompressibility constraint). Bound to the (u, q) pair, where columns are displacement DOFs, rows are pressure test DOFs.
See declaration
template<class TrialFunctionType, class TestPressFunctionType, class DisplacementType>class InternalVirtualWorkTangentPU -
template<class Law, class State>class InternalVirtualWork
- Façade for the internal virtual work nonlinear form.
-
template<class TestFunctionType, class DisplacementType>class FollowerPressureForce
- Integrates the follower-pressure residual as a linear form. . Add it with "+" to the Problem (it already carries the residual-convention sign of a pressure pushing along the outward normal).
-
template<class TrialFunctionType, class TestFunctionType, class DisplacementType>class FollowerPressureTangent
- Integrates the EXACT load stiffness of the follower pressure, . Add it with "+" alongside the material tangent. NONSYMMETRIC.
- class IsotropicInvariants
- Isotropic invariants of the right Cauchy-Green tensor.
- class FiberInvariants
- Fiber invariants for anisotropic hyperelasticity.
- class KinematicState
- Kinematic state for finite-strain continuum mechanics.
- class ConstitutivePoint
- Central data bundle for constitutive evaluation at a quadrature point.
- class FiberKinematics
- Preferred-direction kinematics at a constitutive point.
-
template<class Derived>class Output
- CRTP base class for outputs.
Typedefs
- using InputFunction = std::function<void(ConstitutivePoint&)>
- Type-erased callable for input injection into ConstitutivePoint.
-
template<class Law>using OutputFunction = std::function<void(const ConstitutivePoint&, const Law&)>
- Type-erased callable for extraction from a constitutive evaluation.
Functions
- FollowerPressureForce
- CTAD guide for the follower-pressure residual.
See declaration
template<class TestFunctionType, class DisplacementType>FollowerPressureForce(const Real& pressure, const TestFunctionType& v, const DisplacementType& displacement) -> FollowerPressureForce< std::decay_t< TestFunctionType >, std::decay_t< DisplacementType > > - FollowerPressureTangent
- CTAD guide for the follower-pressure tangent.
See declaration
template<class TrialFunctionType, class TestFunctionType, class DisplacementType>FollowerPressureTangent(const Real& pressure, const TrialFunctionType& u, const TestFunctionType& v, const DisplacementType& displacement) -> FollowerPressureTangent< std::decay_t< TrialFunctionType >, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType > > - InternalVirtualWork
See declaration
template<class Law, class State>InternalVirtualWork(const Law& law, const State& displacement) -> InternalVirtualWork< std::decay_t< Law >, std::decay_t< State > >- InternalVirtualWorkResidual
See declaration
template<class LawDerived, class TestFunctionType, class DisplacementType>InternalVirtualWorkResidual(const LawDerived& law, const TestFunctionType& v, const DisplacementType& displacement) -> InternalVirtualWorkResidual< LawDerived, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType > >- InternalVirtualWorkResidual
See declaration
template<class LawDerived, class TestFunctionType, class DisplacementType, class PressureType>InternalVirtualWorkResidual(const LawDerived& law, const TestFunctionType& v, const DisplacementType& displacement, const PressureType& pressure) -> InternalVirtualWorkResidual< LawDerived, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType >, std::decay_t< PressureType > >- InternalVirtualWorkResidualP
See declaration
template<class TestPressFunctionType, class DisplacementType>InternalVirtualWorkResidualP(const TestPressFunctionType& q, const DisplacementType& displacement) -> InternalVirtualWorkResidualP< std::decay_t< TestPressFunctionType >, std::decay_t< DisplacementType > >- InternalVirtualWorkTangent
See declaration
template<class LawDerived, class TrialFunctionType, class TestFunctionType, class DisplacementType>InternalVirtualWorkTangent(const LawDerived& law, const TrialFunctionType& u, const TestFunctionType& v, const DisplacementType& displacement) -> InternalVirtualWorkTangent< LawDerived, std::decay_t< TrialFunctionType >, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType > >- InternalVirtualWorkTangent
See declaration
template<class LawDerived, class TrialFunctionType, class TestFunctionType, class DisplacementType, class PressureType>InternalVirtualWorkTangent(const LawDerived& law, const TrialFunctionType& u, const TestFunctionType& v, const DisplacementType& displacement, const PressureType& pressure) -> InternalVirtualWorkTangent< LawDerived, std::decay_t< TrialFunctionType >, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType >, std::decay_t< PressureType > >- InternalVirtualWorkTangentUP
See declaration
template<class TrialPressFunctionType, class TestFunctionType, class DisplacementType>InternalVirtualWorkTangentUP(const TrialPressFunctionType& p, const TestFunctionType& v, const DisplacementType& displacement) -> InternalVirtualWorkTangentUP< std::decay_t< TrialPressFunctionType >, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType > >- InternalVirtualWorkTangentPU
See declaration
template<class TrialFunctionType, class TestPressFunctionType, class DisplacementType>InternalVirtualWorkTangentPU(const TrialFunctionType& u, const TestPressFunctionType& q, const DisplacementType& displacement) -> InternalVirtualWorkTangentPU< std::decay_t< TrialFunctionType >, std::decay_t< TestPressFunctionType >, std::decay_t< DisplacementType > >
Typedef documentation
using InputFunction = std::function<void(ConstitutivePoint&)>
Defined in Rodin/Solid/Local/Input.h
Type-erased callable for input injection into ConstitutivePoint.
template<class Law>
using OutputFunction = std::function<void(const ConstitutivePoint&, const Law&)>
Defined in Rodin/Solid/Local/Output.h
Type-erased callable for extraction from a constitutive evaluation.
| Template parameters | |
|---|---|
| Law | The prepared constitutive law type. |
Function documentation
FollowerPressureForce
Defined in Rodin/Solid/Integrators/FollowerPressure.h
See declaration
CTAD guide for the follower-pressure residual.
| Parameters | |
|---|---|
| pressure | Pressure applied on the surface. |
| v | Test shape-function expression. |
| displacement | Displacement field. |
FollowerPressureTangent
Defined in Rodin/Solid/Integrators/FollowerPressure.h
See declaration
CTAD guide for the follower-pressure tangent.
| Parameters | |
|---|---|
| pressure | The applied pressure, captured by reference |
| u | The trial displacement function |
| v | The test displacement function |
| displacement | The current displacement state |
InternalVirtualWork
Defined in Rodin/Solid/Integrators/InternalVirtualWork.h
See declaration
| Parameters | |
|---|---|
| law | The constitutive law (stored by value) |
| displacement | The current displacement (stored by reference) |
CTAD deduction guide for InternalVirtualWork
InternalVirtualWorkResidual
Defined in Rodin/Solid/Integrators/InternalVirtualWorkResidual.h
See declaration
| Parameters | |
|---|---|
| law | The constitutive law |
| v | The displacement test function |
| displacement | The current displacement state |
CTAD deduction guide for the displacement-only residual
InternalVirtualWorkResidual
Defined in Rodin/Solid/Integrators/InternalVirtualWorkResidual.h
See declaration
| Parameters | |
|---|---|
| law | The isochoric constitutive law |
| v | The displacement test function |
| displacement | The current displacement state |
| pressure | The current pressure state |
CTAD deduction guide for the mixed u-p momentum residual
InternalVirtualWorkResidualP
Defined in Rodin/Solid/Integrators/InternalVirtualWorkResidual.h
See declaration
| Parameters | |
|---|---|
| q | The pressure test function |
| displacement | The current displacement state |
CTAD deduction guide for the incompressibility constraint residual
InternalVirtualWorkTangent
Defined in Rodin/Solid/Integrators/InternalVirtualWorkTangent.h
See declaration
| Parameters | |
|---|---|
| law | The constitutive law |
| u | The trial displacement function |
| v | The test displacement function |
| displacement | The current displacement state |
CTAD deduction guide for the displacement-only tangent
InternalVirtualWorkTangent
Defined in Rodin/Solid/Integrators/InternalVirtualWorkTangent.h
See declaration
| Parameters | |
|---|---|
| law | The isochoric constitutive law |
| u | The trial displacement function |
| v | The test displacement function |
| displacement | The current displacement state |
| pressure | The current pressure state |
CTAD deduction guide for the mixed u-p displacement block
InternalVirtualWorkTangentUP
Defined in Rodin/Solid/Integrators/InternalVirtualWorkTangent.h
See declaration
| Parameters | |
|---|---|
| p | The trial pressure function |
| v | The test displacement function |
| displacement | The current displacement state |
CTAD deduction guide for the K_up block
InternalVirtualWorkTangentPU
Defined in Rodin/Solid/Integrators/InternalVirtualWorkTangent.h
See declaration
| Parameters | |
|---|---|
| u | The trial displacement function |
| q | The test pressure function |
| displacement | The current displacement state |
CTAD deduction guide for the K_pu block