Gradient and divergence
How do derivatives connect displacement, strain, stress and equilibrium?
A field varies from point to point. A gradient records that variation; a divergence measures its net outward flow. We use a fixed Cartesian basis with , and , following the index convention. The polynomial examples below use dimensionless coordinates and values unless units are shown. They illustrate operators, not solved models.
Gradient of a scalar
The gradient turns a scalar field into a 3-vector of slopes. A component gives the change per unit distance along that coordinate axis:
For , the derivatives are . At , and . A small step along changes by approximately ; a step along does not change it. The gradient points toward the steepest local increase.

Units divide by length: a pressure gradient has units MPa/mm. In FEM, the gradient of a dimensionless shape function has units 1/mm. These derivatives turn nodal displacements into strain.
Gradient of a vector
A 3-vector field has three slopes for each of its three components. Its gradient is a 3 × 3 tensor. Row identifies the vector component; column identifies the differentiation direction.
Take the displacement field
with coordinates and displacement both measured in mm. Its dimensionless gradient is constant:
The entry is ; the entry is . Some texts transpose this convention. Check the component definition before transferring a formula. In an element, differentiating gives : each nodal coefficient multiplies a shape-function slope.
Small strain and shear
The gradient includes both deformation and local rotation. Its symmetric part gives the infinitesimal strain tensor, a symmetric 3 × 3 output:
Here . The engineering shear is . With shear modulus , . See why shear appears twice in tensor work.
As a check, has opposite and derivatives, so its symmetric gradient is zero. This is an infinitesimal rigid rotation. Small-strain kinematics neglect quadratic gradient terms; finite rotations need a different strain measure.
Divergence of a vector
The divergence maps a 3-vector field to a scalar by adding its outward directional changes:
For , , giving 7 at . Positive divergence means a small region has more outgoing than incoming flow. For displacement, gives first-order relative volume change: the example above gives 0.009.
Divergence of stress
Stress is a tensor field, so its divergence is a 3-vector. Using the traction convention , differentiate and sum across each row:
The component is ; the component is ; the component is 3. At , . This is different from taking the gradient of .
In physical units, differentiating stress (N/mm²) gives N/mm³, matching body force per volume . Static equilibrium is . The weak form transfers this derivative to a test displacement so neighbouring FEM elements need not share a pointwise stress derivative.
Sources and further reading
- MIT OpenCourseWare: Multivariable Calculus, gradient, divergence and flux.
- MIT OpenCourseWare: Structural Mechanics, infinitesimal strain and stress equilibrium.
- KoFEM’s solid stress recovery obtains the displacement gradient , symmetrises it and applies the deviatoric part of the Lamé law, which is all von Mises needs. The mixed solid–shell solve uses the same recovery. The calculations here verify the operators, not a full solver or shell formulation.