Solid Mechanics

Nine 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.

  5. Plasticity with Newton’s method — replaces L-BFGS by Newton’s method with the consistent tangent of the return map, which converges quadratically; the plastic state reaches the assemblers as quadrature_data. Checked against the elastic and limit pressures of a thick-walled cylinder.

  6. Phase-Field Fracture — adds an inequality constraint: damage cannot heal, so every load step is a bound-constrained minimization, solved field by field with a bound-constrained Newton method.

  7. Geomechanics (Drucker-Prager) — adds pressure-dependent yield, reusing the J2 history-variable pattern through the public DruckerPragerPlasticity assembler for soils and weak rock.

  8. Geomechanics (elastic footing) — solves a small boundary-value problem for footing settlement using the direct linear-elasticity workflow.

  9. Geomechanics (Drucker-Prager footing) — combines the footing boundary-value setup with pressure-dependent plasticity, load stepping, and committed per-quadrature history variables.

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

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

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

  • Newton with a consistent tangent when the tangent of a path-dependent material is known at the quadrature points (plasticity_cylinder).

  • Bound-constrained Newton (torch_sla.vi_solve) when unknowns carry inequality constraints, here damage irreversibility (phase_field_fracture).

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)
Plasticity with Newton’s Method

A thick-walled cylinder pressed to collapse: J2 return map, consistent tangent, limit pressure.

Plasticity with Newton’s Method
Phase-Field Fracture

A crack through a notched plate: AT1/AT2 damage, irreversibility as bounds, alternate minimization.

Phase-Field Fracture

Geomechanics (Drucker-Prager)

Three pressure-dependent examples for soils and weak rock, built on the public DruckerPragerPlasticity assembler and the table-backed FrictionalMaterial presets. They progress from a single-element constitutive driver, through a linear-elastic boundary-value problem, to the full nonlinear footing.

Drucker-Prager triaxial

Pressure-dependent Drucker-Prager plasticity in a small triaxial-compression driver.

Geomechanics: Drucker-Prager triaxial compression
Elastic footing

Linear-elastic soil block under a centered strip footing, with settlement contours and a reaction/load-balance sanity check.

Geomechanics: elastic strip footing
Drucker-Prager footing

Nonlinear strip-footing settlement with pressure-dependent plasticity, plastic-history contours, and a load-settlement sanity check.

Geomechanics: Drucker-Prager strip footing