Solid mechanics
Kinematics, constitutive laws and Newton solution for finite-strain solid mechanics.
Introduction
The Solid module implements finite-strain (hyperelastic) solid mechanics on top of the variational form language. Its modules separate local constitutive response, finite element assembly and output fields:
| Layer | Directory | Contents |
|---|---|---|
| Kinematics | Solid/Kinematics/ | Deformation measures and invariants at a point |
| Constitutive laws | Solid/Constitutive/ | Strain-energy densities and their derivatives |
| Integrators | Solid/Integrators/ | The internal virtual work residual and tangent |
| Point plumbing | Solid/Local/ | Constitutive-point inputs (state, fibers, activation) |
| Postprocessing | Solid/Fields/ | Stress and strain fields for output |
| Linear theory | Solid/Linear/ | Small-strain elasticity integrators |
Working examples are available in BlockGravity.cpp (quasi-static NeoHookean block under ramped gravity), CantileverBeam.cpp, and ActiveContractionPlaneWave.cpp (active fiber contraction driven by an activation wave).
The residual/tangent sign convention and finite-difference consistency checks used by Solid are part of Rodin's shared Numerical contracts.
Kinematics
With displacement , the deformation gradient is , the right Cauchy–Green tensor , and the Green–Lagrange strain . Isotropic response is expressed through the invariants , , ; a fiber direction adds the anisotropic invariant (squared fiber stretch).
These live in Solid/Kinematics/ (KinematicState, Invariants) and are computed at constitutive points — laws never see meshes or quadrature, only local state.
InternalVirtualWork uses the total Lagrangian formulation with integration over the reference configuration, reference gradients and first Piola–Kirchhoff stress . The Cauchy stress is available as an output field through Postprocessing fields.
Constitutive laws
A hyperelastic law is a strain-energy density ; stress and tangent follow by differentiation. , . All laws derive from HyperElasticLaw and return, at a constitutive point, the stress and the consistent tangent.
| Law | Energy | Regime / notes |
|---|---|---|
Hooke | quadratic in | Linear elasticity |
SaintVenantKirchhoff | quadratic in | Large rotations, small strains; loses ellipticity in strong compression |
NeoHookean | -based, compressible | General-purpose rubber-like |
MooneyRivlin | -based | Rubber with second-invariant sensitivity |
HolzapfelOgden | isotropic matrix + exponential fiber term in | Anisotropic soft tissue, one fiber family |
ActiveFiberLaw | 1D fiber element with internal state | Active (muscle) contraction |
ActiveContraction<Passive, Active> | passive law + active fiber law | Composition wrapper |
The BlockGravity.cpp example constructs a law and its internal virtual work form as follows.
Solid::NeoHookean law(lambda, mu); auto ivw = Solid::InternalVirtualWork(law, u); // u: current displacement GridFunction
Check a local material response
The ConstitutiveResponse example evaluates a three-dimensional compressible Neo-Hookean law along , with Lamé coefficients and in the chosen stress units. The other two stretches are held at one. All sampled determinants are positive, with .
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; } }


Along this loading path, . The program checks that identity using centered differences with increment . The maximum scaled discrepancy in the checked run is , below the program's threshold. This checks the local energy/stress relation; finite element equilibrium and residual/tangent consistency are separate checks.
The weak form and Newton's method
Static equilibrium in weak form is
and Newton's method solves, at each iterate, . The tangent contains both the material stiffness (from ) and the geometric (initial-stress) stiffness; omitting the latter forfeits quadratic convergence. InternalVirtualWork packages residual and tangent together — the expression ivw(du, v) contributes both to the Newton problem.
// Newton linearization: K δu = -F_int(u) + F_ext Problem newton(du, v); newton = ivw(du, v) - Integral(bodyForce, v) + DirichletBC(du, zero).on(bottomBC); SparseLU linearSolver(newton); NewtonSolver solver(linearSolver); solver.setMaxIterations(50) .setAbsoluteTolerance(1e-10) .setRelativeTolerance(1e-8); solver.solve(u); // iterates du-solves, accumulating into u
The increment is the trial function; the Dirichlet condition on is homogeneous once satisfies the constraint; loads are ramped in steps (incremental loading) because a full load applied to the undeformed state may lie outside Newton's basin of attraction.
New solid terms should be documented and tested as residual/tangent pairs; the tangent must be the derivative of the residual assembled into the Newton problem.
Constitutive-point inputs
Laws that need more than kinematics (time step, activation, previous internal state, fiber directions) receive them through the constitutive point* mechanism (Solid/
auto ivw = Solid::InternalVirtualWork(law, u).setInput(activeInput);
Direct constitutive evaluation binds inputs once, then reads the prepared law through const methods.
Solid::KinematicState state(3); state.setDisplacementGradient(gradient); Solid::ConstitutivePoint point(state); Solid::NeoHookean law(lambda, mu); law.setConstitutivePoint(point); Math::SpatialMatrix<Real> stress, increment; law.getFirstPiolaKirchhoffStress(stress); law.getMaterialTangent(increment, deformationIncrement); const Real energy = law.getStrainEnergyDensity();
The law owns its kinematic snapshot and keeps intermediate data private. Changing a point or its borrowed state affects evaluation only after the next non-const setConstitutivePoint() call. Binding compares the consumed kinematics and auxiliary inputs exactly and reuses unchanged data; no address or cache identity determines validity. Spatially graded laws sample their coefficient on each binding. Copies have independent prepared state, and assembly uses separate working laws per worker. The same law must not be rebound concurrently without external synchronization; const reads of an already prepared law perform no cache updates.
An output supplied to InternalVirtualWork::setOutput() receives the constitutive point and a const prepared law, from which it can read stresses, energy or active residuals. Both references are valid for the callback; retain a law copy if its prepared response is needed afterwards.
This keeps laws pure functions of local state (unit-testable against finite differences at a single point) and keeps integrators ignorant of constitutive details. Solid/
Internal variables
Active laws evolve internal state (active extension, cross-bridge stiffness-like variables) by local ODEs. Their numerical treatment has two requirements:
- The preferred architecture for internal variables in Rodin is to make them first-class fields (grid functions on discontinuous spaces, coupled into the global Newton residual). Their evolution and consistent linearization are then represented in the coupled system.
- Relaxation after deactivation depends on the internal-state evolution, constitutive assumptions and mechanical boundary conditions. Report the active state, relevant time scales, loads and equilibrium residual when assessing relaxation. Dynamic models also include their specified inertia and time-integration scheme.
Postprocessing fields
Solid/Fields/ provides stress/strain functions for output and coupling through FirstPiolaKirchhoffStress ( ), CauchyStress ( ), GreenLagrangeStrain ( ). They are ordinary form-language functions. Project them onto an output space and write them with IO::
A note on units
Select and state one unit system near the example parameters. Moduli, stresses, tractions and body-force densities must use the corresponding force and length units. Time-dependent laws also require consistent time and rate parameters.
See also
- Variational formulations in Rodin — problem composition
- Solvers — the Newton solver and linear solvers
- Checked constitutive response source
- Heart — 0D reduced cardiac models for calibrating the 3D laws