Barriers that never let surfaces cross
The question. How can a solver keep two surfaces from ever passing through each other, at every step of its search and not only at the end, and what does it give up to do so?
A penalty carries pressure by letting surfaces overlap: the overlap is the pressure divided by the stiffness, small but never nothing, and a search that takes a long step can carry a point right through a thin body before the penalty notices. For tissues that are always joined this matters little. For the contacts that really open and close, such as the skin against a table or the forearm against the arm in deep flexion, a crossed surface is a wrong shape that the next steps may never undo. This chapter compares three ways of enforcing contact and builds the one that never lets a surface cross.
By the end you will be able to work out the overlap a penalty leaves, how fast augmented-Lagrangian updates remove it, and where a barrier holds two surfaces apart; and to say what a barrier guarantees and what it does not.
The penalty and its overlap
Press a block of height onto a rigid table by moving a plate on its top down by . Table and plate are frictionless and the block is free to widen, so it is squeezed evenly, with the stiffness of a slice that cannot lengthen out of its plane. A penalty of stiffness lets the underside into the table by an overlap ; the block is then shortened by , and the pressure it carries is both and . Setting them equal:
In words: the overlap is the plate’s travel times the block’s stiffness over the penalty’s, roughly; a penalty a thousand times stiffer than the block lets in a thousandth of the travel. It falls as grows, and it never reaches zero.
Updates that carry the pressure over
An augmented Lagrangian keeps the penalty but gives each point a pressure of its own, , carried from one solve to the next (Simo and Laursen 1992). A point at gap pushes with
and after each balance the simulator sets to the pressure the point pushed with, and solves again. With already carrying most of the load, the penalty need only let in what is left. For the evenly pressed block, each update multiplies the overlap by the same factor,
the share of the travel that the first overlap was. Every update is one more balance to solve. The simulator’s tissue arm makes up to ten updates a step, as FEBio’s sliding contact does by default (FEBio feature manual).
A barrier
Incremental potential contact (IPC) keeps surfaces apart by an energy that becomes infinite at touching (Li et al. 2020, section 4). For a distance between two surfaces and a reach ,
In words: nothing at all beyond the reach; inside it, the square of how far within the reach the surfaces are, times the logarithm of the distance over the reach, which is negative for and grows without bound as falls to zero. A point standing for the area stores , with the barrier stiffness in pascals per metre, the unit of a penalty stiffness. It is pushed away with the pressure
In words: no push at the reach, a push that grows as the surfaces close in, and no limit to it at touching.
Four properties make this barrier fit a Newton search.
- It blows up at touching. As falls to zero, grows without bound: no finite energy lets the surfaces meet.
- It switches on smoothly. At , the barrier, its slope and its curvature are all zero, the same as the zero beyond. A search sees no jump in force or in stiffness where the barrier starts.
- It always pushes. Its slope is negative for : the energy falls as the surfaces part.
- It is convex. Its curvature is positive for , so the stiffness it adds to the search is positive, as a spring’s is.
Two numbers show its shape. With mm, at mm the bracket is mm; at mm it is mm. Bringing the surfaces five times closer raises the push ten times.
A step that never crosses
An energy that is infinite at touching helps only if the search never steps over it: a Newton step that carries a point from a gap of 1 mm to an overlap of 1 mm in one go never sees the infinity between. So the search first asks how far along its step a point would reach the other surface.
If a point’s distance changes linearly along a step, from at the start to at the end, then at the fraction of the step it is . When the distance reaches zero at the time of impact
In words: the starting gap over the distance closed by the whole step. For any fraction of the step below , the distance stays positive along the whole of the shortened step, not only at its end; when it is positive all the way. So the search shortens every step to a little less than the smallest time of impact of any point (the laboratory takes 0.9 of it), and then backtracks as usual until the energy falls. Every shape the search visits is free of crossing. Finding the time of impact of triangles that move and turn in three dimensions is a harder calculation, called continuous collision detection, and IPC runs it inside every line search.
What the barrier guarantees, and what it does not
Guaranteed. No crossing, at any shape the search reaches. IPC’s authors found their method “unconditionally robust across all test cases and time steps” of their benchmark (Li et al. 2020, sections 8.1–8.2, read in the authors’ text).
Not guaranteed.
- Exact contact. Touching surfaces are held a distance between zero and apart. The gap is part of the model, like the penalty’s overlap, and must be stated with every result.
- Friction. “We emphasize that we have no guarantee for convergence of lagged friction” (Li et al. 2020, section 5).
- Refinement. The original formulation “prohibits convergence under refinement”, which a later reformulation repairs (Li et al. 2023, abstract).
In time. In a moving model the barrier is one fixed potential, the same at every step, so it never adds energy behind the scenes. The augmented Lagrangian changes the potential at every update, and the change can add energy: in the simulator’s fast curl of the arm the updates between steps added 1.74 J, 13 % of the work of the muscle fibres, most of it from pairs of muscles that never part and are better joined by the laws of the previous chapter. IPC adapts during a solve (Li et al. 2020, section 4); in a moving model that too is a change of potential, and must be held fixed through each step.
Where each belongs. Interfaces that never part need neither: they are equalities, with no overlap to remove. The barrier belongs to contacts that open and close and must never cross, the skin against what lies outside the body, where the gap is stated like the penalty’s overlap. Thin bodies, sheets and rods, can be kept at least their thickness apart by a codimensional version of the same barrier, one made for bodies with fewer dimensions than the space they move in (Li, Kaufman and Jiang 2021, abstract).
A worked example
A block 40 mm wide and 20 mm tall, a slice of a block 40 mm deep, has kPa and , so kPa. It rests on the table, and the plate moves 1 mm down. The stiffness is 20 kPa per mm, Pa/m.
| Method | Calculation | Result |
|---|---|---|
| Penalty: overlap | 0.0396 mm | |
| Penalty: pressure, force | , times m² | 791.6 Pa, 1.266 N |
| Augmented: factor per update | 0.0396 | |
| Augmented: overlap after 1 and 2 updates | , | 0.00157 mm, 0.000062 mm |
| Barrier, mm: gap where the pushes balance | , solved for | 0.408 mm |
Check the barrier’s balance at mm. Within the reach by mm; ; the bracket is mm, so the barrier pushes with Pa. The block, shortened by mm, pushes back with Pa. They agree.
The barrier’s block is shortened by more than the plate’s travel. The block began touching the table, where the barrier is infinite, so the search starts it at the reach, and the barrier holds its underside 0.408 mm up.
Try it: penalty, augmented Lagrangian or barrier
The block is drawn as it is squeezed, on its table, with the plate on top. The arrows under it are the contact pressures.
- Check the worked example. With the penalty, the deepest overlap is 0.0396 mm and the table carries 1.266 N, in 2 Newton iterations and one balance.
- Updates. Choose the augmented Lagrangian. After 3 balances, two of them updates, the overlap is 0.000062 mm, and the force is 1.319 N, the block’s own stiffness times the full 1 mm.
- The barrier. Choose it. Its underside stays 0.408 mm above the table, the plate presses with 1.857 N, and one step of the five Newton iterations was cut short at the time of impact. No point ever went below the table.
- Predict, then check. Stiffen the barrier to 1000 kPa per mm. Does the gap close? It opens, to 0.486 mm, nearer the reach: a stiffer barrier pushes harder at every distance inside its reach, so it holds the surfaces nearer the edge of it. To close the gap, shrink the reach instead: at 0.1 mm and 20 kPa per mm the gap is 0.067 mm. The penalty at 1000 kPa per mm lets in only 0.0008 mm. The second plot shows both across stiffnesses.
- An uneven load. Let the plate cover only the middle third. The pressure under the block is no longer even, and the barrier takes 7 iterations; the augmented Lagrangian still needs three balances. The third plot counts the work of each method across stiffnesses.
- A gap to close. Set the starting gap to 0.5 mm. The plate’s 1 mm now closes the gap first: the penalty’s overlap is 0.0198 mm and its force 0.633 N.
Check against measurement
There is no measurement to compare here: the laboratory compares three numerical methods on one problem whose balance can be worked out by hand, and each method meets it.
What this model leaves out
- Continuous collision detection in three dimensions. A flat table and a slice make the time of impact one division; triangles in three dimensions need far more.
- Friction. Table and plate are frictionless; IPC’s lagged friction is left out, and so is any guarantee for it.
- Time. The block is pressed slowly and balanced once; inertia, and the energy each method adds or removes from one step to the next, are left out.
- Adapting . IPC chooses its stiffness during the solve; the laboratory holds it at the value you set.
Summary
- A penalty leaves an overlap that shrinks as grows and never vanishes.
- An augmented Lagrangian carries each point’s pressure from one balance to the next; each update multiplies the overlap by the same factor, and costs one more balance.
- The barrier is infinite at touching, switches on with no jump in force or stiffness, always pushes and is convex. A search whose steps stop short of the time of impact never crosses a surface.
- The barrier holds touching surfaces between 0 and apart, gives no guarantee for lagged friction, and needs a reformulation to converge under refinement. It belongs to contacts that open and close.
Next: the interfaces so far are surfaces. Fascia is a sheet, thinner than a lattice cell, that only pulls; Sheets that only pull gives it a law of its own.