Verification oracle: tests/oracle cases, cargo xtask oracle, fixtures, docs/oracle.md, CI job

The oracle binary (modelcraft-testkit) runs each case's recipe through the
command engine, measures its quantities by JSON pointers into step outputs
or commands, compares them with the cited references and the frozen
fixtures, and writes docs/oracle.md. 20 theory cases (patch tests of every
solid element, Timoshenko cantilevers, Lame, Kirsch, beam frequencies,
torsion and bending through couplings, explicit waves and impact, CDT
invariants), 8 published benchmarks (MacNeal-Harder patch, straight and
curved cantilevers, thick cylinder, Scordelis-Lo with solids, NAFEMS LE1,
LE10, FV32) and 10 pending cases with citations.

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-13 21:42:19 -04:00
1 parent a3cb6d749b
commit 6d9452ad84
144 files changed
+5162 -74

No files matched your search

@@ -0,0 +1,5 @@
# Elastic bar striking a rigid wall (explicit)
A bar 10 × 0.1 × 0.1 of 200 one-point hex8 elements (E = 10⁴, ρ = 1, ν = 0, c = 100) moving at
v₀ = 0.1 towards a frictionless rigid wall at x = 0 (its end face is the contact set); linear bulk
viscosity off. Solved to t = 0.3: in contact from 0 to 2L/c = 0.2, then free at +v₀.
@@ -0,0 +1,67 @@
{
"title": "Elastic bar striking a rigid wall (explicit)",
"kind": "theory",
"source": "One-dimensional elastic impact on a rigid wall: contact time 2L/c, rebound at the impact speed, contact stress ρcv₀; Graff, Wave Motion in Elastic Solids, Dover 1991, §2.3; Johnson, Impact Strength of Materials, Arnold 1972, §1.6",
"quantities": [
{
"id": "u_front",
"quantity": "displacement of the struck end at t = 0.3 (in contact until 2L/c = 0.2, then leaving at v₀)",
"measure": {
"command": "solve.probe",
"params": {
"step": "Impact",
"at": [
[
0,
0,
0
]
]
},
"pointer": "/nodes/0/displacement/0"
},
"value": 0.009999999999999998,
"tolerance": {
"relative": 0.03
},
"reason": "the contact ends at 2L/c in the elastic theory; the discrete release front is spread over a few elements, a few tenths of a percent of the time, and the rebound speed is v₀ to about 1%"
},
{
"id": "u_back",
"quantity": "displacement of the far end at t = 0.3 (−v₀L/c, then +v₀ after the reflection)",
"measure": {
"command": "solve.probe",
"params": {
"step": "Impact",
"at": [
[
10.0,
0,
0
]
]
},
"pointer": "/nodes/0/displacement/0"
},
"value": 0.01,
"tolerance": {
"relative": 0.03
},
"reason": "as for the struck end"
},
{
"id": "ke",
"quantity": "kinetic energy after the rebound over the initial ½mv₀²",
"measure": {
"from": "solve",
"pointer": "/energy/kinetic",
"scale": 1999.9999999999995
},
"value": 1.0,
"tolerance": {
"relative": 0.02
},
"reason": "an elastic impact keeps the kinetic energy; quadratic bulk viscosity in the compression front and the vibration left in the bar take about 1%"
}
]
}
@@ -0,0 +1,17 @@
{
"note": "ModelCraft's accepted results for this case, written by `cargo xtask oracle --bless`. A result outside its band fails CI.",
"values": {
"ke": {
"band": 1e-9,
"value": 0.9946927802814477
},
"u_back": {
"band": 1.0000000000000001e-11,
"value": 0.009946347263883909
},
"u_front": {
"band": 1e-11,
"value": 0.009949683285107395
}
}
}
@@ -0,0 +1,9 @@
[
{"command": "mesh.block", "params": {"body": "Bar", "kind": "hex8", "corners": [[0, 0, 0], [10.0, 0, 0], [10.0, 0.1, 0], [0, 0.1, 0], [0, 0, 0.1], [10.0, 0, 0.1], [10.0, 0.1, 0.1], [0, 0.1, 0.1]], "divisions": [200, 1, 1], "faces": {"6": "front"}}},
{"command": "model.set.create", "params": {"name": "all", "geometry": [{"body": "Bar"}]}},
{"command": "model.set.create", "params": {"name": "front", "geometry": [{"body": "Bar", "face": "front"}]}},
{"command": "model.material.create", "params": {"name": "Mat", "elastic": {"type": "isotropic", "young": 10000.0, "poisson": 0.0}, "density": 1.0}},
{"command": "model.section.create", "params": {"name": "bar", "set": "all", "material": "Mat", "kind": {"type": "solid"}, "formulation": {"integration": "reduced"}}},
{"command": "model.step.create", "params": {"name": "Impact", "procedure": {"type": "explicit_dynamic", "end_time": 0.3, "initial_velocities": [{"set": "all", "velocity": [-0.1, 0, 0]}], "rigid_walls": [{"set": "front", "point": [0, 0, 0], "normal": [1, 0, 0]}], "bulk_viscosity": {"linear": 0.0, "quadratic": 1.5}}, "boundary_conditions": [], "loads": []}},
{"command": "solve.explicit", "params": {"step": "Impact"}, "id": "solve"}
]