Continuum Mechanics-Based Constraints

While simple geometric constraints such as distance and volume are effective for many materials, a more physically rigorous and expressive simulation can be achieved by deriving constraints directly from the principles of continuum mechanics. This approach connects Position-Based Dynamics to the rich theoretical foundation of established methods like the Finite Element Method (FEM), allowing for the simulation of complex material behaviors including anisotropy, elastoplasticity, and nonlinear elasticity. The core idea is to define constraints based on the deformation gradient, a tensor that measures the local stretching and shearing of the material.

This section will first review the necessary concepts of discretized deformation and strain. It will then detail two primary methods for formulating continuum-based constraints: a holistic approach based on strain energy and a more granular method that constrains individual components of the strain tensor directly.

The Strain Energy Constraint

The most direct way to incorporate a standard hyperelastic material model into PBD is to use its strain energy potential as a constraint function.

In a discrete setting, such as a tetrahedral mesh, the deformation gradient is assumed to be constant within each element. For a tetrahedron with material-space vertices and world-space vertices , we can define a material-space shape matrix and a world-space shape matrix from the edge vectors: The deformation gradient for the tetrahedron is then given by . Note that is constant and can be precomputed.

From , we can derive various strain measures. One of the most common is the Green-St. Venant strain tensor, , which is independent of rigid-body rotations: The related right Cauchy-Green deformation tensor, , will be particularly useful for formulating direct strain constraints. If there is no deformation, , , and .

By Hooke’s generalized law, we can relate stress to strain:

where is the elasticity tensor of the material. Recall that the energy of a deformed solid is defined by integrating the scalar strain energy density field over the whole body :

where the strain energy density can be defined in terms of stress and strain:

So the total strain energy for a single tetrahedral element is its rest volume multiplied by the energy density. For an undeformed state, this energy is zero. This naturally leads to the following constraint formulation:

The PBD solver requires the gradient of the constraint with respect to the positions of the vertices. This gradient has a deep physical meaning, as it is directly related to the first Piola-Kirchhoff stress tensor, , which relates forces in the current configuration to areas in the reference configuration. The stress tensor is a function of the deformation gradient, . Using the chain rule, the gradients of the energy for the first three vertices can be computed in a compact matrix form: The gradient for the fourth vertex is determined by the condition of translational invariance (i.e., the net force on the element must be zero): This formulation extends naturally to surface meshes composed of triangles. For a triangle with rest area , the constraint is . The gradients are computed analogously:

Remark 33.5.1 (Handling Element Inversion). Standard constitutive models are often not defined for degenerate or inverted elements (where ), which can cause instabilities in a simulation. This is a critical practical issue. This problem can be robustly addressed by augmenting the constitutive model with techniques designed for inversion handling.

The elegance of this strain energy constraint lies in its generality. It is not limited to a single material type, like the simple St. Venant-Kirchhoff model. More complex and physically accurate models, such as the Neo-Hookean model for rubber-like materials, can be readily supported by simply substituting the appropriate energy density function . This allows PBD to simulate complex physical effects like lateral contraction (Poisson's effect), anisotropy, and elastoplasticity with high fidelity and efficiency.

Direct Strain-Based Constraints

For applications requiring more granular or intuitive control over material properties, particularly for simulating anisotropy, it is advantageous to define separate constraints for each mode of deformation. This approach operates on the components of the right Cauchy-Green deformation tensor, .

Stretch Constraints

The diagonal entries of , , represent the squared stretch along the material's reference axes. In an undeformed state, . To ensure the constraint projection is linear and converges in a single step, the stretch constraint is formulated based on the stretch itself, rather than its square: By defining one such constraint for each principal axis, one can assign independent stiffness parameters, which is the key to modeling anisotropic stretch resistance.

Shear Constraints

The off-diagonal entries of , (where are the column vectors of ), measure the shear between material axes. A naive constraint problematically couples shearing and stretching. To isolate the shearing deformation, the constraint must be normalized, thus depending only on the angle between the deformed axes: This formulation ensures that the shear constraints enforce orthogonality between the material axes without interfering with the stretch constraints that control their length. This decoupling is critical for intuitive and independent tuning of material behavior.