forked from 1b-agent/fieldcraft-upstream
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:
1 parent
a3cb6d749b
commit
6d9452ad84
144 files changed
+5162
-74
No files matched your search
@@ -0,0 +1,6 @@
|
||||
# Thick-walled cylinder under internal pressure, plane strain (Lamé)
|
||||
|
||||
A quarter of a cylinder a = 10, b = 20, one unit long, with symmetry planes x = 0 and y = 0 and
|
||||
u_z = 0 on both ends (plane strain), and internal pressure p = 100 (E = 210000, ν = 0.3);
|
||||
8 × 16 hex20 elements with mid-side nodes on the arcs. Lamé: u_r = (1 + ν)a²p/(E(b² − a²))
|
||||
((1 − 2ν)r + b²/r), σ_θ(a) = p(b² + a²)/(b² − a²).
|
||||
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"title": "Thick-walled cylinder under internal pressure, plane strain (Lamé)",
|
||||
"kind": "theory",
|
||||
"source": "Lamé's solution, Timoshenko and Goodier, Theory of Elasticity, 3rd ed., McGraw-Hill 1970, §28 (thick-walled cylinder)",
|
||||
"quantities": [
|
||||
{
|
||||
"id": "ur_a",
|
||||
"quantity": "radial displacement at the bore (10, 0, 0)",
|
||||
"measure": {
|
||||
"command": "solve.probe",
|
||||
"params": {
|
||||
"step": "Pressure",
|
||||
"at": [
|
||||
[
|
||||
10.0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
]
|
||||
},
|
||||
"pointer": "/nodes/0/displacement/0"
|
||||
},
|
||||
"value": 0.00907936507936508,
|
||||
"tolerance": {
|
||||
"relative": 0.001
|
||||
},
|
||||
"reason": "quadratic elements on 8 radial divisions resolve u_r = A r + B/r to well under 0.1%"
|
||||
},
|
||||
{
|
||||
"id": "ur_b",
|
||||
"quantity": "radial displacement outside (20, 0, 0)",
|
||||
"measure": {
|
||||
"command": "solve.probe",
|
||||
"params": {
|
||||
"step": "Pressure",
|
||||
"at": [
|
||||
[
|
||||
20.0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
]
|
||||
},
|
||||
"pointer": "/nodes/0/displacement/0"
|
||||
},
|
||||
"value": 0.005777777777777778,
|
||||
"tolerance": {
|
||||
"relative": 0.001
|
||||
},
|
||||
"reason": "as for the bore"
|
||||
},
|
||||
{
|
||||
"id": "hoop_a",
|
||||
"quantity": "hoop stress σ_θ = σ_yy at the bore (10, 0, 0)",
|
||||
"measure": {
|
||||
"command": "solve.probe",
|
||||
"params": {
|
||||
"step": "Pressure",
|
||||
"at": [
|
||||
[
|
||||
10.0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
]
|
||||
},
|
||||
"pointer": "/nodes/0/stress/1"
|
||||
},
|
||||
"value": 166.66666666666666,
|
||||
"tolerance": {
|
||||
"relative": 0.01
|
||||
},
|
||||
"reason": "stress extrapolated from the integration points to the bore surface and averaged over two elements: about 0.5% at the steepest gradient"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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": {
|
||||
"hoop_a": {
|
||||
"band": 1.6666666666666668e-7,
|
||||
"value": 166.36121907829693
|
||||
},
|
||||
"ur_a": {
|
||||
"band": 9.07936507936508e-12,
|
||||
"value": 0.009079340794555735
|
||||
},
|
||||
"ur_b": {
|
||||
"band": 5.777777777777779e-12,
|
||||
"value": 0.0057777604134337515
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
[
|
||||
{"command": "mesh.block", "params": {"body": "Pipe", "kind": "hex20", "corners": [[10.0, 0, 0], [20.0, 0, 0], [0, 20.0, 0], [0, 10.0, 0], [10.0, 0, 1], [20.0, 0, 1], [0, 20.0, 1], [0, 10.0, 1]], "divisions": [8, 16, 1], "edges": [{"corners": [2, 3], "arc": {"center": [0, 0, 0]}}, {"corners": [1, 4], "arc": {"center": [0, 0, 0]}}, {"corners": [6, 7], "arc": {"center": [0, 0, 1]}}, {"corners": [5, 8], "arc": {"center": [0, 0, 1]}}], "faces": {"6": "bore", "3": "y0", "5": "x0", "1": "z0", "2": "z1"}}},
|
||||
{"command": "model.set.create", "params": {"name": "all", "geometry": [{"body": "Pipe"}]}},
|
||||
{"command": "model.set.create", "params": {"name": "bore", "geometry": [{"body": "Pipe", "face": "bore"}]}},
|
||||
{"command": "model.set.create", "params": {"name": "x0", "geometry": [{"body": "Pipe", "face": "x0"}]}},
|
||||
{"command": "model.set.create", "params": {"name": "y0", "geometry": [{"body": "Pipe", "face": "y0"}]}},
|
||||
{"command": "model.set.create", "params": {"name": "z0", "geometry": [{"body": "Pipe", "face": "z0"}]}},
|
||||
{"command": "model.set.create", "params": {"name": "z1", "geometry": [{"body": "Pipe", "face": "z1"}]}},
|
||||
{"command": "model.material.create", "params": {"name": "Steel", "elastic": {"type": "isotropic", "young": 210000.0, "poisson": 0.3}}},
|
||||
{"command": "model.section.create", "params": {"name": "pipe", "set": "all", "material": "Steel", "kind": {"type": "solid"}}},
|
||||
{"command": "model.boundary_condition.create", "params": {"name": "sx", "type": "symmetry", "target": {"set": "x0"}, "plane": "x"}},
|
||||
{"command": "model.boundary_condition.create", "params": {"name": "sy", "type": "symmetry", "target": {"set": "y0"}, "plane": "y"}},
|
||||
{"command": "model.boundary_condition.create", "params": {"name": "sz0", "type": "symmetry", "target": {"set": "z0"}, "plane": "z"}},
|
||||
{"command": "model.boundary_condition.create", "params": {"name": "sz1", "type": "symmetry", "target": {"set": "z1"}, "plane": "z"}},
|
||||
{"command": "model.load.create", "params": {"name": "p", "type": "pressure", "set": "bore", "magnitude": 100.0}},
|
||||
{"command": "model.step.create", "params": {"name": "Pressure", "procedure": {"type": "static"}, "boundary_conditions": ["sx", "sy", "sz0", "sz1"], "loads": ["p"]}},
|
||||
{"command": "solve.static", "params": {}, "id": "solve"}
|
||||
]
|
||||
Reference in new issue
Block a user