explicit: deformable contact and friction, verified by bars, sliding blocks, the patch test and Hertz

Segment-to-segment penalty contact between element faces: each secondary
face and each main face facing it are projected onto the secondary face's
plane, split into triangles, clipped (Sutherland–Hodgman) and integrated
with a three-point rule per sub-triangle (Puso–Laursen segmentation, the
penalty at the integration points as Fischer–Wriggers), so a uniform
pressure gives the consistent nodal forces on both meshes and the contact
patch test passes on non-matching meshes. Every contact runs both ways at
half the penalty: pairs with each surface as the secondary, general and
self contact face against face. A bucket grid of face boxes every
increment, faces integrated in parallel and their forces added in face
order: the same numbers on any thread count.

The penalty per area ε = s γ min(m/A)/Δt² comes from the lumped masses,
each node's directional area and the stable increment, bounded by
Gershgorin's row sums so contact never shortens the increment. Coulomb
friction with exponential decay by a regularised return map at the
secondary nodes; rigid walls take Coulomb impulses. Contact work and
friction dissipation join the energy balance; each contact reports its
peak force, first and last contact, deepest penetration, friction and the
nodes adjusted at the start (initial penetrations adjusted strain-free or
refused with the node, face and depth); a cap on contact faces.

Verified (crates/explicit/tests/contact.rs, tests/oracle/explicit-*):
colliding bars (2L/c +1.2%, ρcAv₀/2, KE kept to 0.005%, contact energy
back to 8e-5 of it), blocks sliding to a stop on a rigid wall and on a
plate under constant and decaying friction (0.005–0.2%), the patch test
(σ_zz uniform to 0.06%), two spheres colliding against Hertz (peak +2.3%,
duration −0.4%; the oracle case waits for a graded sphere mesher), a free
body untouched by general contact, determinism across threads. Oracle
measures gain `over` (ratios). Existing fixtures do not move.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-14 12:49:45 -04:00
1 parent ecf947c090
commit a30d0b5c5b
37 files changed
+2459 -55

No files matched your search

@@ -0,0 +1,7 @@
# Block sliding to a stop on a rigid wall (explicit, Coulomb friction)
A block 1 × 1 × 0.5 of 4 × 4 × 2 one-point hex8 elements (E = 10⁵, ν = 0.3, ρ = 1, so m = 0.5)
rests on a rigid wall at z = 0 (its bottom nodes) with Coulomb friction μ = 0.3, under gravity
g = 10, and is launched along x at v₀ = 3. Theory for a rigid block: deceleration μg, stop after
v₀/(μg) = 1 at v₀²/(2μg) = 1.5, the kinetic energy ½mv₀² = 2.25 all dissipated by friction.
Solved to t = 1.3.
@@ -0,0 +1,19 @@
{
"title": "Block sliding to a stop on a rigid wall with Coulomb friction (explicit)",
"kind": "theory",
"source": "A rigid block launched at v₀ on a horizontal plane with Coulomb friction μ decelerates at μg and stops after v₀/(μg) at v₀²/(2μg), its kinetic energy all dissipated by friction; Meriam & Kraige, Engineering Mechanics: Dynamics, §3/5 (work and energy)",
"quantities": [
{"id": "distance", "quantity": "distance travelled (top centre node) against v₀²/(2μg) = 1.5",
"measure": {"command": "solve.probe", "params": {"step": "Slide", "at": [[0.5, 0.5, 0.5]]}, "pointer": "/nodes/0/displacement/0"},
"value": 1.5, "tolerance": {"relative": 0.01},
"reason": "the wall's friction impulses are exact Coulomb impulses; the block's elastic vibration from the sudden gravity and the friction moment move the node by a fraction of a percent"},
{"id": "velocity", "quantity": "velocity of the top centre node after the stop",
"measure": {"command": "solve.probe", "params": {"step": "Slide", "at": [[0.5, 0.5, 0.5]]}, "pointer": "/nodes/0/velocity/0"},
"value": 0.0, "tolerance": {"absolute": 0.03},
"reason": "the block sticks; what is left is its elastic vibration, under 1% of v₀"},
{"id": "dissipated", "quantity": "friction dissipation over ½mv₀² = 2.25",
"measure": {"from": "solve", "pointer": "/energy/friction", "scale": 0.4444444444444444},
"value": 1.0, "tolerance": {"relative": 0.01},
"reason": "the kinetic energy goes into friction; the vibration and the work of gravity as the block settles add or take a fraction of a percent"}
]
}
@@ -0,0 +1,17 @@
{
"note": "FieldCraft's accepted results for this case, written by `cargo xtask oracle --bless`. A result outside its band fails CI.",
"values": {
"dissipated": {
"band": 1.0012078586619573e-9,
"value": 1.0012078586619573
},
"distance": {
"band": 1.5000000000000002e-9,
"value": 1.4999205464422256
},
"velocity": {
"band": 0.03,
"value": 0.00027058229054461555
}
}
}
@@ -0,0 +1,10 @@
[
{"command": "mesh.block", "params": {"body": "Block", "kind": "hex8", "corners": [[0, 0, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0], [0, 0, 0.5], [1, 0, 0.5], [1, 1, 0.5], [0, 1, 0.5]], "divisions": [4, 4, 2], "faces": {"1": "bottom"}}},
{"command": "model.set.create", "params": {"name": "block", "geometry": [{"body": "Block"}]}},
{"command": "model.set.create", "params": {"name": "bottom", "geometry": [{"body": "Block", "face": "bottom"}]}},
{"command": "model.material.create", "params": {"name": "Mat", "elastic": {"type": "isotropic", "young": 100000.0, "poisson": 0.3}, "density": 1.0}},
{"command": "model.section.create", "params": {"name": "block", "set": "block", "material": "Mat", "kind": {"type": "solid"}, "formulation": {"integration": "reduced"}}},
{"command": "model.load.create", "params": {"name": "weight", "type": "gravity", "acceleration": [0, 0, -10.0], "set": "block"}},
{"command": "model.step.create", "params": {"name": "Slide", "procedure": {"type": "explicit_dynamic", "end_time": 1.3, "initial_velocities": [{"set": "block", "velocity": [3.0, 0, 0]}], "rigid_walls": [{"set": "bottom", "point": [0, 0, 0], "normal": [0, 0, 1], "friction": {"static": 0.3}}]}, "boundary_conditions": [], "loads": ["weight"]}},
{"command": "solve.explicit", "params": {"step": "Slide"}, "id": "solve"}
]