Solid namespace
Hyperelastic solid mechanics module for large-deformation problems.
The Solid module provides a layered framework for finite-strain hyperelasticity. It is organized into four sub-layers:
Kinematics
KinematicState encapsulates all finite-strain kinematic quantities at a quadrature point. Set the displacement gradient with setDisplacementGradient(H) and query derived tensors:
| Getter | Returns | Definition |
|---|---|---|
| getDisplacementGradient() | Input gradient | |
| getDeformationGradient() | ||
| getDeformationGradientInverse() | Inverse | |
| getDeformationGradientInverseTranspose() | Inverse transpose | |
| getRightCauchyGreenTensor() | ||
| getLeftCauchyGreenTensor() | ||
| getJacobian() | ||
| getLogJacobian() | Natural log of Jacobian |
Invariant classes compute derived quantities from the kinematic state:
- IsotropicInvariants — , ,
- FiberInvariants — , (for anisotropic materials; constructed with a fiber direction vector)
Constitutive Point and Input Injection
ConstitutivePoint bundles a KinematicState with an optional Geometry::
cp.set<Solid::Tags::FiberDirection>(fiberVec); auto& f = cp.get<Solid::Tags::FiberDirection>(); bool has = cp.has<Solid::Tags::Activation>();
The Input<Derived> CRTP base and InputFunction callable allow the user to inject auxiliary data at each quadrature point during assembly. Integrators accept input via setInput().
Constitutive Laws
Each law derives from HyperElasticLaw<Derived> (CRTP base) and provides:
- A
Cachestruct for precomputed invariant data setCache(cache, cp)— populate the cache from aConstitutivePointgetFirstPiolaKirchhoffStress(P, cache, cp)—getMaterialTangent(dP, cache, cp, dF)— directional derivativegetStrainEnergyDensity(cache, cp)— returns
| Law | Constructor | Energy density |
|---|---|---|
| Hooke | Hooke(lambda, mu) | (linear stress-strain; not hyperelastic) |
| NeoHookean | NeoHookean(lambda, mu) | |
| SaintVenantKirchhoff | SaintVenantKirchhoff(lambda, mu) | |
| MooneyRivlin | MooneyRivlin(c1, c2, kappa) |
where is the Green-Lagrange strain, are modified invariants, and is the bulk modulus.
All Lamé-parameter constructors accept and computed from Young's modulus and Poisson's ratio :
Integrators
Both integrators use setDisplacement() to set the linearization point and setInput() for auxiliary data injection. Quadrature order is auto-selected (2× FE order) unless overridden with setQuadratureOrder().
| Integrator | Form type | Assembles | Mathematical expression |
|---|---|---|---|
| InternalForce<Law, FES> | Linear (residual) | Internal force vector | |
| MaterialTangent<Law, Solution, FES> | Bilinear (tangent) | Tangent stiffness matrix |
Constructor signatures (CTAD-deduced):
Solid::InternalForce residual(law, v); // (law, TestFunction) residual.setDisplacement(u); // set linearization point Solid::MaterialTangent tangent(law, du, v); // (law, TrialFunction, TestFunction) tangent.setDisplacement(u); // set linearization point
Derived Fields
- FirstPiolaKirchhoffStress<Law> — Post-process field
- CauchyStress<Law> — Post-process
- GreenLagrangeStrain — Post-process
Typical Usage
A quasi-static hyperelastic block under gravity using NeoHookean (from examples/Solid/BlockGravity.cpp):
#include <Rodin/Solid.h> #include <Rodin/Solver/NewtonSolver.h> #include <Rodin/Solver/SparseLU.h> // Material from Young's modulus and Poisson's ratio const Real E = 200.0, nu = 0.3; const Real lambda = E * nu / ((1.0 + nu) * (1.0 - 2.0 * nu)); const Real mu = E / (2.0 * (1.0 + nu)); Solid::NeoHookean law(lambda, mu); P1 Vh(mesh, mesh.getSpaceDimension()); // vector P1 space TrialFunction du(Vh); TestFunction v(Vh); GridFunction u(Vh); // accumulated displacement // Build Newton system: K δu = -F_int(u) + F_body Solid::MaterialTangent tangent(law, du, v); tangent.setDisplacement(u); Solid::InternalForce residual(law, v); residual.setDisplacement(u); auto bodyForce = VectorFunction{ Zero(), RealFunction(-10.0) }; Problem newton(du, v); newton = tangent + residual - Integral(bodyForce, v) + DirichletBC(du, VectorFunction{ Zero(), Zero() }).on(bottomBC); SparseLU linearSolver(newton); NewtonSolver solver(linearSolver); solver.setMaxIterations(50) .setAbsoluteTolerance(1e-10) .setRelativeTolerance(1e-8); solver.solve(u);
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.
-
template<class LawDerived>class CauchyStress
- Computes the Cauchy stress from a constitutive law.
- class ConstitutivePoint
- Central data bundle for constitutive evaluation at a quadrature point.
- class FiberInvariants
- Fiber invariants for anisotropic hyperelasticity.
- class FiberKinematics
- Preferred-direction kinematics at a constitutive point.
-
template<class LawDerived>class FirstPiolaKirchhoffStress
- Computes the first Piola-Kirchhoff stress from a constitutive law.
-
template<class TestFunctionType, class DisplacementType>class FollowerPressureForce
- Linear-form integrator: follower pressure residual . 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
- Bilinear-form integrator: the EXACT load stiffness of the follower pressure, . Add it with "+" alongside the material tangent. NONSYMMETRIC.
- class GreenLagrangeStrain
- Computes the Green-Lagrange strain tensor from a kinematic state.
- 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.
-
template<class Derived>class Input
- CRTP base class for inputs.
-
template<class Law, class State>class InternalVirtualWork
- Façade for the internal virtual work nonlinear form.
-
template<class... Args>class InternalVirtualWorkResidual
- Internal virtual work residual integrator family.
-
template<class LawDerived, class TestFunctionType, class DisplacementType>class InternalVirtualWorkResidual<LawDerived, TestFunctionType, DisplacementType>
- Momentum residual (pure displacement formulation).
-
template<class LawDerived, class TestFunctionType, class DisplacementType, class PressureType>class InternalVirtualWorkResidual<LawDerived, TestFunctionType, DisplacementType, PressureType>
- Momentum residual of the mixed u-p formulation. Bound to the displacement test function .
-
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.
-
template<class LawDerived, class TrialFunctionType, class TestFunctionType, class DisplacementType>class InternalVirtualWorkTangent<LawDerived, TrialFunctionType, TestFunctionType, DisplacementType>
- Displacement tangent (pure displacement formulation).
-
template<class LawDerived, class TrialFunctionType, class TestFunctionType, class DisplacementType, class PressureType>class InternalVirtualWorkTangent<LawDerived, TrialFunctionType, TestFunctionType, DisplacementType, PressureType>
- Displacement-displacement block of the mixed u-p formulation. Bound to the (u, v) pair.
-
template<class TrialFunctionType, class TestPressFunctionType, class DisplacementType>class InternalVirtualWorkTangentPU
- Pressure-displacement coupling block (linearized incompressibility constraint). Bound to the (u, q) pair: columns are displacement DOFs, rows are pressure test DOFs.
-
template<class TrialPressFunctionType, class TestFunctionType, class DisplacementType>class InternalVirtualWorkTangentUP
- Displacement-pressure coupling block . Bound to the (p, v) pair: columns are pressure DOFs, rows are displacement test DOFs.
- class IsotropicInvariants
- Isotropic invariants of the right Cauchy-Green tensor.
- class KinematicState
- Kinematic state for finite-strain continuum mechanics.
- class MooneyRivlin
- Compressible Mooney-Rivlin hyperelastic law.
- class NeoHookean
- Compressible Neo-Hookean hyperelastic law.
-
template<class Derived>class Output
- CRTP base class for outputs.
- class SaintVenantKirchhoff
- Saint-Venant-Kirchhoff hyperelastic law.
- class Yeoh
- Compressible Yeoh hyperelastic law.
Typedefs
- using InputFunction = std::function<void(ConstitutivePoint&)>
- Type-erased callable for input injection into ConstitutivePoint.
-
template<class Cache>using OutputFunction = std::function<void(const ConstitutivePoint&, const Cache&)>
- Type-erased callable for extraction from a constitutive evaluation.
Functions
-
template<class TestFunctionType, class DisplacementType>FollowerPressureForce(const Real&, const TestFunctionType&, const DisplacementType&) -> FollowerPressureForce< std::decay_t< TestFunctionType >, std::decay_t< DisplacementType > >
- CTAD guide for the follower-pressure residual.
-
template<class TrialFunctionType, class TestFunctionType, class DisplacementType>FollowerPressureTangent(const Real&, const TrialFunctionType&, const TestFunctionType&, const DisplacementType&) -> FollowerPressureTangent< std::decay_t< TrialFunctionType >, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType > >
- CTAD guide for the follower-pressure tangent.
-
template<class Law, class State>InternalVirtualWork(const Law&, const State&) -> InternalVirtualWork< std::decay_t< Law >, std::decay_t< State > >
- CTAD deduction guide for InternalVirtualWork.
-
template<class LawDerived, class TestFunctionType, class DisplacementType>InternalVirtualWorkResidual(const LawDerived&, const TestFunctionType&, const DisplacementType&) -> InternalVirtualWorkResidual< LawDerived, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType > >
- CTAD deduction guide for the displacement-only residual.
-
template<class LawDerived, class TestFunctionType, class DisplacementType, class PressureType>InternalVirtualWorkResidual(const LawDerived&, const TestFunctionType&, const DisplacementType&, const PressureType&) -> InternalVirtualWorkResidual< LawDerived, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType >, std::decay_t< PressureType > >
- CTAD deduction guide for the mixed u-p momentum residual.
-
template<class TestPressFunctionType, class DisplacementType>InternalVirtualWorkResidualP(const TestPressFunctionType&, const DisplacementType&) -> InternalVirtualWorkResidualP< std::decay_t< TestPressFunctionType >, std::decay_t< DisplacementType > >
- CTAD deduction guide for the incompressibility constraint residual.
-
template<class LawDerived, class TrialFunctionType, class TestFunctionType, class DisplacementType>InternalVirtualWorkTangent(const LawDerived&, const TrialFunctionType&, const TestFunctionType&, const DisplacementType&) -> InternalVirtualWorkTangent< LawDerived, std::decay_t< TrialFunctionType >, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType > >
- CTAD deduction guide for the displacement-only tangent.
-
template<class LawDerived, class TrialFunctionType, class TestFunctionType, class DisplacementType, class PressureType>InternalVirtualWorkTangent(const LawDerived&, const TrialFunctionType&, const TestFunctionType&, const DisplacementType&, const PressureType&) -> InternalVirtualWorkTangent< LawDerived, std::decay_t< TrialFunctionType >, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType >, std::decay_t< PressureType > >
- CTAD deduction guide for the mixed u-p displacement block.
-
template<class TrialPressFunctionType, class TestFunctionType, class DisplacementType>InternalVirtualWorkTangentUP(const TrialPressFunctionType&, const TestFunctionType&, const DisplacementType&) -> InternalVirtualWorkTangentUP< std::decay_t< TrialPressFunctionType >, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType > >
- CTAD deduction guide for the K_up block.
-
template<class TrialFunctionType, class TestPressFunctionType, class DisplacementType>InternalVirtualWorkTangentPU(const TrialFunctionType&, const TestPressFunctionType&, const DisplacementType&) -> InternalVirtualWorkTangentPU< std::decay_t< TrialFunctionType >, std::decay_t< TestPressFunctionType >, std::decay_t< DisplacementType > >
- CTAD deduction guide for the K_pu block.
Typedef documentation
using Rodin:: Solid:: InputFunction = std::function<void(ConstitutivePoint&)>
#include <Rodin/Solid/Local/Input.h>
Type-erased callable for input injection into ConstitutivePoint.
#include <Rodin/Solid/Local/Output.h>
template<class Cache>
using Rodin:: Solid:: OutputFunction = std::function<void(const ConstitutivePoint&, const Cache&)>
Type-erased callable for extraction from a constitutive evaluation.
| Template parameters | |
|---|---|
| Cache | The constitutive law's cache type. |
Function documentation
template<class TestFunctionType, class DisplacementType>
Rodin:: Solid:: FollowerPressureForce(const Real&,
const TestFunctionType&,
const DisplacementType&) -> FollowerPressureForce< std::decay_t< TestFunctionType >, std::decay_t< DisplacementType > >
CTAD guide for the follower-pressure residual.
template<class TrialFunctionType, class TestFunctionType, class DisplacementType>
Rodin:: Solid:: FollowerPressureTangent(const Real&,
const TrialFunctionType&,
const TestFunctionType&,
const DisplacementType&) -> FollowerPressureTangent< std::decay_t< TrialFunctionType >, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType > >
CTAD guide for the follower-pressure tangent.
template<class Law, class State>
Rodin:: Solid:: InternalVirtualWork(const Law&,
const State&) -> InternalVirtualWork< std::decay_t< Law >, std::decay_t< State > >
CTAD deduction guide for InternalVirtualWork.
template<class LawDerived, class TestFunctionType, class DisplacementType>
Rodin:: Solid:: InternalVirtualWorkResidual(const LawDerived&,
const TestFunctionType&,
const DisplacementType&) -> InternalVirtualWorkResidual< LawDerived, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType > >
CTAD deduction guide for the displacement-only residual.
template<class LawDerived, class TestFunctionType, class DisplacementType, class PressureType>
Rodin:: Solid:: InternalVirtualWorkResidual(const LawDerived&,
const TestFunctionType&,
const DisplacementType&,
const PressureType&) -> InternalVirtualWorkResidual< LawDerived, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType >, std::decay_t< PressureType > >
CTAD deduction guide for the mixed u-p momentum residual.
template<class TestPressFunctionType, class DisplacementType>
Rodin:: Solid:: InternalVirtualWorkResidualP(const TestPressFunctionType&,
const DisplacementType&) -> InternalVirtualWorkResidualP< std::decay_t< TestPressFunctionType >, std::decay_t< DisplacementType > >
CTAD deduction guide for the incompressibility constraint residual.
template<class LawDerived, class TrialFunctionType, class TestFunctionType, class DisplacementType>
Rodin:: Solid:: InternalVirtualWorkTangent(const LawDerived&,
const TrialFunctionType&,
const TestFunctionType&,
const DisplacementType&) -> InternalVirtualWorkTangent< LawDerived, std::decay_t< TrialFunctionType >, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType > >
CTAD deduction guide for the displacement-only tangent.
template<class LawDerived, class TrialFunctionType, class TestFunctionType, class DisplacementType, class PressureType>
Rodin:: Solid:: InternalVirtualWorkTangent(const LawDerived&,
const TrialFunctionType&,
const TestFunctionType&,
const DisplacementType&,
const PressureType&) -> InternalVirtualWorkTangent< LawDerived, std::decay_t< TrialFunctionType >, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType >, std::decay_t< PressureType > >
CTAD deduction guide for the mixed u-p displacement block.
template<class TrialPressFunctionType, class TestFunctionType, class DisplacementType>
Rodin:: Solid:: InternalVirtualWorkTangentUP(const TrialPressFunctionType&,
const TestFunctionType&,
const DisplacementType&) -> InternalVirtualWorkTangentUP< std::decay_t< TrialPressFunctionType >, std::decay_t< TestFunctionType >, std::decay_t< DisplacementType > >
CTAD deduction guide for the K_up block.
template<class TrialFunctionType, class TestPressFunctionType, class DisplacementType>
Rodin:: Solid:: InternalVirtualWorkTangentPU(const TrialFunctionType&,
const TestPressFunctionType&,
const DisplacementType&) -> InternalVirtualWorkTangentPU< std::decay_t< TrialFunctionType >, std::decay_t< TestPressFunctionType >, std::decay_t< DisplacementType > >
CTAD deduction guide for the K_pu block.