Work, Energy, and the Virtual Work Principle in FEM
Table of Contents
- Work, Energy, and Why FEM Uses the Weak Form
- Work: W = F·d and the Dot Product
- Kinetic Energy and the Work-Energy Theorem
- Elastic Strain Energy in Structures
- The Principle of Virtual Work
- From Virtual Work to FEM Weak Form
- Energy Quantities in FEM Output
- Energy Conservation Checks in Simulations
- Cross-Topics
1. Work, Energy, and Why FEM Uses the Weak Form
If Newton's Second Law is the physical foundation of FEM, then the principle of virtual work is the mathematical bridge that makes it numerically solvable. Understanding this connection transforms FEM from a black box into a tool you can reason about.
The core idea: instead of requiring the differential equation of equilibrium to hold at every single point in a body (which is very restrictive when dealing with element boundaries and discontinuities), we instead require that the work done by all forces through any admissible virtual displacement is zero. This "integral form" is weaker than the point-wise form — hence "weak form" — but mathematically equivalent for the solutions we care about.
Every FEM textbook I read says "start with the principle of virtual work" but never explains why. Why can't we just use F=ma directly at each node?
You can, for a simple truss! But for continuum elements — solid elements, shell elements — the stress field is continuous within each element but can be discontinuous across element boundaries. The "strong form" (differential equation) requires smooth derivatives everywhere, which breaks at element interfaces. The virtual work principle sidesteps this by integrating — it only requires the displacement to be continuous, not the stress. That's why it works across element boundaries without special treatment.
2. Work: W = F·d and the Dot Product
Work is done when a force moves its point of application through a displacement. For a constant force $\mathbf{F}$ over displacement $\mathbf{d}$:
The dot product means only the component of force in the direction of displacement does work. This has profound implications for FEM boundary conditions:
- A fixed boundary (zero displacement) does zero work — reactions at fixed nodes contribute nothing to the energy balance
- A symmetry boundary (zero normal displacement, free tangential) does zero normal work — symmetry conditions are energy-conservative by construction
For a varying force over a curved path, work is the line integral:
In FEM, this integral is evaluated numerically using Gauss quadrature within each element.
Units and Scaling
| Force Unit | Displacement Unit | Work/Energy Unit | Typical Use |
|---|---|---|---|
| N | m | J (Joule) | Standard SI |
| N | mm | N·mm = mJ | Abaqus structural (mm model) |
| kN | mm | kN·mm = J | Civil engineering models |
| lbf | in | in·lbf | US customary |
3. Kinetic Energy and the Work-Energy Theorem
The work-energy theorem: the net work done on an object equals its change in kinetic energy.
This is derived directly from Newton's Second Law by integrating $F = ma$ over displacement. In FEM terms, the kinetic energy is:
Where $\dot{\mathbf{u}}$ is the global velocity vector and $[\mathbf{M}]$ is the global mass matrix. In Abaqus, this is the "ALLKE" energy output variable.
In a crash simulation, at what point should ALLKE be approximately zero? And why does it matter?
By the end of the simulation, after the structure has stopped moving. In a 100ms crash event, you want ALLKE to be near zero by around 100-120ms. If it's still high at the end, the vehicle is still moving — either your simulation is too short, or some component is flying off (which might be a real physical result or a mesh problem). The sanity check is: ALLKE initial ≈ ½mv² of the entire vehicle. Final ALLKE + ALLIE + ALLPD (plastic dissipation) should approximately equal initial ALLKE. That's energy conservation.
4. Elastic Strain Energy in Structures
When a structure deforms elastically, work is stored as elastic strain energy. For a simple spring (Hooke's Law: $F = ku$):
For a 3D solid body with stress $\boldsymbol{\sigma}$ and strain $\boldsymbol{\varepsilon}$:
This equivalence between the continuum integral and the matrix product is why the stiffness matrix $[\mathbf{K}]$ can be built by integrating material properties over element volumes — the two formulations are mathematically identical.
Strain Energy Density
The strain energy density $u_0 = \frac{1}{2}\boldsymbol{\sigma}:\boldsymbol{\varepsilon}$ (J/m³) is a local quantity available at each integration point in FEM. It's useful for identifying which parts of a structure carry the most elastic energy — a guide to weight optimization. Material can be efficiently removed from regions with low strain energy density (topology optimization).
| Deformation Mode | Strain Energy Expression |
|---|---|
| Axial (bar) | $U = \frac{F^2 L}{2EA}$ |
| Bending (beam) | $U = \int_0^L \frac{M(x)^2}{2EI} dx$ |
| Torsion (shaft) | $U = \frac{T^2 L}{2GJ}$ |
| General 3D (solid) | $U = \frac{1}{2}\mathbf{u}^T[\mathbf{K}]\mathbf{u}$ |
5. The Principle of Virtual Work
A virtual displacement $\delta\mathbf{u}$ is an infinitesimally small, kinematically admissible (compatible with boundary conditions) imaginary displacement. It's not a real motion — it's a mathematical device.
The Principle of Virtual Work states: for a body in equilibrium, the total virtual work done by all internal and external forces through any virtual displacement is zero:
Expanding:
Where $\mathbf{b}$ is the body force (gravity, etc.), $\mathbf{t}$ is the surface traction, $\boldsymbol{\sigma}$ is the Cauchy stress tensor, and $\delta\boldsymbol{\varepsilon}$ is the virtual strain field corresponding to $\delta\mathbf{u}$.
This equation is the weak form of the equilibrium equation. It integrates over the volume instead of requiring the equilibrium condition to hold pointwise — making it compatible with piecewise polynomial approximations over finite elements.
6. From Virtual Work to FEM Weak Form
FEM approximates the displacement field using shape functions $\mathbf{N}$ and nodal displacements $\mathbf{d}$:
Where $\mathbf{B}$ is the strain-displacement matrix (derivatives of $\mathbf{N}$). Substituting into the virtual work equation with $\delta\mathbf{u} = \mathbf{N}\delta\mathbf{d}$:
Since this must hold for any $\delta\mathbf{d}$:
This is the fundamental FEM system of equations — derived rigorously from the principle of virtual work. The stiffness matrix $[\mathbf{K}] = \int_V \mathbf{B}^T \mathbf{D} \mathbf{B} \, dV$ is computed by Gauss quadrature over each element's volume.
So where does the material's stress-strain law come in? I see $\mathbf{D}$ in the formula but what is it?
$\mathbf{D}$ is the material constitutive matrix — it encodes Hooke's Law for your material. For isotropic linear elastic (steel, aluminum in the elastic range), it's fully determined by two numbers: Young's modulus $E$ and Poisson's ratio $\nu$. $\mathbf{D}$ is a 6×6 matrix (or 3×3 for plane stress) relating all six stress components to all six strain components. For nonlinear materials — plasticity, hyperelastic rubber, creep — $\mathbf{D}$ becomes a tangent stiffness that changes at every load step, which is why nonlinear FEM is iterative.
7. Energy Quantities in FEM Output
Most FEM solvers output a comprehensive energy balance. Understanding these is essential for validating simulation quality:
| Abaqus Variable | Physical Meaning | What to Watch For |
|---|---|---|
| ALLIE (or SE) | Total elastic strain energy = ½ uᵀKu | Should equal external work in linear statics |
| ALLKE | Kinetic energy = ½ u̇ᵀMu̇ | Should be <5% of ALLIE at quasi-static end |
| ALLPD | Plastic dissipation (irreversible) | Increases monotonically in plastic events |
| ALLFD | Frictional dissipation | Energy lost to friction in contact pairs |
| ALLWK | External work done by applied loads | ALLWK = ALLIE + ALLKE + ALLPD + ALLFD (energy balance) |
| ETOTAL | Total energy balance check | Should remain near zero (conservation check) |
8. Energy Conservation Checks in Simulations
The energy balance is one of the most powerful quality checks for any FEM simulation:
If this doesn't balance, something is wrong — hourglass energy (in reduced-integration elements), artificial damping, or contact penetration.
Hourglass Energy: A Common Explicit FEM Problem
Reduced-integration elements (C3D8R, S4R) use one Gauss point instead of eight. This is much faster but introduces "hourglass modes" — zero-energy deformation modes that don't register strain. The solver adds artificial hourglass stiffness to suppress them. Monitor the hourglass energy (ALLAE in Abaqus): if it exceeds 5% of ALLIE, your mesh is too coarse or element aspect ratios are poor.
I ran an explicit crash simulation and ALLAE (hourglass energy) is 18% of ALLIE. My boss says that's too high but I'm not sure what to do about it.
18% is indeed too high — guidelines are typically below 5%, ideally below 2%. Three approaches: First, refine the mesh in the high-hourglass regions (check the ALLAE contour plot to find them). Second, switch to fully integrated elements (C3D8 instead of C3D8R) in those regions — slower but no hourglass. Third, try a different hourglass control formulation (Abaqus has four: relax stiffness, stiffness, viscous, and combined). For crash with large plasticity, the "combined" control often gives the best results. That 18% means your stress/strain results in those regions could be significantly inaccurate.
9. Cross-Topics
| Topic | Connection | Link |
|---|---|---|
| Newton's Laws | Virtual work is the integral form of Newton's 2nd Law | Newton's Laws of Motion |
| Hooke's Law | Elastic strain energy uses Hooke's Law for the stress-strain relationship | Springs & Hooke's Law |
| Momentum & Impulse | Kinetic energy and impulse together describe impact absorption | Momentum and Impulse |
| Structural Mechanics | Full FEM derivation from virtual work principle | Structural Mechanics |
| Stress & Strain | Strain energy density = ½ σ:ε at each material point | Stress and Strain Basics |