Solid Mechanics

Four worked solid-mechanics examples in examples/solid/, built as a progressive ladder — each rung adds exactly one new concept on top of the previous one:

  1. Cantilever Beam — linear elasticity, one direct solve. The baseline.

  2. Hyperelastic Beam — finite strain (Neo-Hookean); introduces the L-BFGS energy-minimization recipe.

  3. Hertzian Contact — adds a constraint (contact penalty) and a closed-form verification, reusing the same L-BFGS recipe.

  4. Plasticity (J2) — adds path-dependence: per-quadrature history variables and a variational constitutive update, in 2D and 3D.

Together they cover the two solver patterns TensorMesh uses for solid problems:

  • Direct linear solve for small-strain linear elasticity (cantilever_beam).

  • L-BFGS energy minimization for nonlinear problems where the potential energy is well-defined — hyperelasticity, contact, and plasticity (hyperelastic_beam, hertzian_contact, plasticity_strip).

The order below mirrors solver complexity.

Cantilever Beam

Linear elasticity, steel cantilever with a tip load — the simplest end-to-end recipe.

Cantilever Beam
Hyperelastic Beam

Rubber beam under torsion, compressible Neo-Hookean, L-BFGS load stepping.

Hyperelastic Beam (Neo-Hookean)
Hertzian Contact

Penalty contact between a circular indenter and an elastic block, checked against the Hertz solution.

Hertzian Contact
Plasticity (J2)

Plane-strain J2 plasticity with isotropic hardening, load / unload cycle, plus a 3D cube.

Plasticity (J2 with Isotropic Hardening)