General concepts » 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:

LayerDirectoryContents
KinematicsSolid/Kinematics/Deformation measures and invariants at a point
Constitutive lawsSolid/Constitutive/Strain-energy densities and their derivatives
IntegratorsSolid/Integrators/The internal virtual work residual and tangent
Point plumbingSolid/Local/Constitutive-point inputs (state, fibers, activation)
PostprocessingSolid/Fields/Stress and strain fields for output
Linear theorySolid/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 $ u $ , the deformation gradient is $ F = I + \nabla_X u $ , the right Cauchy–Green tensor $ C = F^\top F $ , and the Green–Lagrange strain $ E = \tfrac12 (C - I) $ . Isotropic response is expressed through the invariants $ I_1 = \operatorname{tr} C $ , $ I_2 $ , $ I_3 = \det C = J^2 $ ; a fiber direction $ f_0 $ adds the anisotropic invariant $ I_{4f} = f_0 \cdot C f_0 $ (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 $\nabla_X$ and first Piola–Kirchhoff stress $P$ . The Cauchy stress is available as an output field through Postprocessing fields.

Constitutive laws

A hyperelastic law is a strain-energy density $ W $ ; stress and tangent follow by differentiation. $ P = \partial W / \partial F $ , $ \mathbb{C} = \partial^2 W / \partial F^2 $ . All laws derive from HyperElasticLaw and return, at a constitutive point, the stress and the consistent tangent.

LawEnergyRegime / notes
Hookequadratic in $ \varepsilon $ Linear elasticity
SaintVenantKirchhoffquadratic in $ E $ Large rotations, small strains; loses ellipticity in strong compression
NeoHookean $ I_1 $ -based, compressibleGeneral-purpose rubber-like
MooneyRivlin $ I_1, I_2 $ -basedRubber with second-invariant sensitivity
HolzapfelOgdenisotropic matrix + exponential fiber term in $ I_{4f} $ Anisotropic soft tissue, one fiber family
ActiveFiberLaw1D fiber element with internal stateActive (muscle) contraction
ActiveContraction<Passive, Active>passive law + active fiber lawComposition 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 $F=\operatorname{diag}(s,1,1)$ , with Lamé coefficients $\lambda=2$ and $\mu=1$ in the chosen stress units. The other two stretches are held at one. All sampled determinants are positive, with $0.7\le s\le1.4$ .

    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;
      }
    }
Image
Stored energy evaluated from the constitutive law.
Image
First Piola stress compared with the finite-difference energy derivative.

Along this loading path, $dW/ds=P_{11}$ . The program checks that identity using centered differences with increment $10^{-6}$ . The maximum scaled discrepancy in the checked run is $1.92\times10^{-10}$ , below the program's $10^{-8}$ 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

\[ R(u; v) = \int_{\Omega_0} P(F) : \nabla_X v \; dX - \ell_{ext}(v) = 0 , \]

and Newton's method solves, at each iterate, $ R'(u)(\delta u, v) = -R(u; v) $ . The tangent $ R' $ contains both the material stiffness (from $ \partial^2 W/\partial C^2 $ ) 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 $ \delta u $ is the trial function; the Dirichlet condition on $ \delta u $ is homogeneous once $ u $ 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/Local/ConstitutivePoint.h). The integrators stamp tags — cell index, quadrature-point index, and any user-relevant quantities — onto the point, and a user-supplied input callable maps tags to law inputs.

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/Local/FiberKinematics.h carries preferred directions; fibers are material (reference-configuration) vectors — their pushforward $ F f_0 $ happens inside laws and fields, never in user setup.

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 ( $ P $ ), CauchyStress ( $ \sigma = J^{-1} P F^\top $ ), GreenLagrangeStrain ( $ E $ ). They are ordinary form-language functions. Project them onto an output space and write them with IO::XDMF.

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