Catching Simulations That Run but Lie: A Blind Physics Falsifier for Agent-Written Device Simulations

Language-model agents can now write engineering simulation code, run it, and repair it until it executes. On standard fluid-dynamics and structural-mechanics tasks, the best systems report that close to nine runs in ten succeed. But in these systems "success" means the solver finished. It does not mean the answer was physically right. A simulation that converges with the wrong boundary condition, a unit slip, or a mesh too coarse to resolve the flow produces a confident wrong number. Nothing in the error log flags it. For a medical implant, that number might be the radial force a stent can hold or the shear stress blood feels behind a filter mesh, and a wrong value there is worse than a crash.

We propose to measure and attack this failure mode, which we call the silent physics error. The method adds one agent with a narrow job: given only the task specification and the simulation's outputs, never the generated code, it writes independent physical checks that try to prove the result wrong. These include conservation balances, analytical order-of-magnitude bounds, mesh-refinement sensitivity, and symmetry tests. The test bed is deliberately hard and deliberately concrete: simulations of a drug-eluting stent wrapped in a knitted 28-micron polymer mesh that traps plaque debris. This device has so far been checked only on the bench.

Core Claim

Execution feedback, whether from one model or from a team of agents, mostly fixes code that fails to run. It leaves a residue of code that runs but computes the wrong physics. The claim is that this residue can be cut sharply by a critic that is separated from the generator by information, not just by role. The critic must not read the generator's code or its reasoning, so it cannot inherit the generator's mistaken assumptions. It must also produce executable checks rather than prose critiques, so its objections are grounded in numbers. We expect the separation to matter more than the number of agents.

Where This Sits in Prior Work

Two systems define the starting point and supply most of the machinery.

Foam-Agent 2.0 automates OpenFOAM fluid simulations with six specialized agents. Its Reviewer reads solver logs and repairs divergence or syntax faults. It reports 88.2% success on 110 tasks with Claude 3.5 Sonnet, against 55.5% for MetaOpenFOAM. Removing its Reviewer drops success to about 50%.

AutoFEA generates input files for the CalculiX structural solver step by step, retrieves consistent examples with a graph model, and refines using solver errors. It reports 90.2% success with GPT-4o.

Both papers motivate this proposal as much as they constrain it. AutoFEA itself shows a cantilever displacement corrected from 0.0975 to 0.8738 units: a run that executed and was wrong by nearly an order of magnitude. Our proposal reuses their pipelines and differs in the critic. Their reviewers see logs and code. Ours sees only the specification and outputs, and its job is falsification, not repair.

Three further strands shape the design.

The argument for a separate critic comes from software work. Self-collaboration Code Generation via ChatGPT gives a Tester the mandate to break code. MAGIS shows that a QA agent matters: 25.33% on SWE-bench Lite versus 1.74% for raw GPT-4 on its SWE-bench subset. Do Users Write More Insecure Code with AI Assistants? shows that model-assisted loops raise confidence while raising error rates: 36% versus 7% vulnerable code on SQL injection. That is exactly the failure a blind critic is meant to resist.

The constraints come from iterative-refinement studies. CodeTransOcean reports that compiler-feedback gains plateau after three to five rounds. SlopCodeBench finds that structure erodes in 77% of agent trajectories and verbosity grows in 75.5%. A falsifier that keeps raising objections could therefore make things worse by driving more rounds of edits. We borrow the remedy from MEIC, which rolls back to the last stable version when a patch causes regressions, and we measure erosion directly.

The application comes from A Biodegradable Mesh-Covered Drug Eluting Coronary Embolic Protection Stent. That device combines a cobalt-chromium slotted tube, a sirolimus coating and a PLGA mesh. It reports bench radial strength of 34.46–58.85 N, against the 10 N minimum in the standard the paper cites. The open problems it leaves are the ones the simulations must handle: low wall shear stress and flow stagnation behind mesh pores, and strain on the mesh during crimping and expansion. We do not claim to design a better stent. The stent is the setting where silent errors are both likely and consequential.

Research Program

The system has two parts.

The first part is the generator side. It is a reimplementation of the Foam-Agent and AutoFEA role structure, extended with a geometry agent that writes parametric Gmsh scripts. The scripts cover the slotted-tube unit cell and a simplified periodic knit-mesh cell.

The second part is the falsifier. It receives three things: the natural-language task, a fixed library of physics primitives, and the output fields. The primitives include flux integrals, a Poiseuille pressure drop, a Darcy-type resistance estimate for porous layers, thin-ring stiffness estimates, and Richardson-style refinement comparisons. From these it writes check scripts, each of which returns pass, fail, or inconclusive with a numeric margin.

A failed check is returned to the generator as a structured counterexample. Any repair that breaks a previously passing check is rolled back, following MEIC. We cap rounds at five, in line with the plateau reported by CodeTransOcean.

To avoid prohibitive compute, the stent work stays at unit-cell and axisymmetric scale. There are three case families. The first is radial crush of a strut unit cell in CalculiX. The second is steady and pulsatile flow through a mesh unit cell modeled with OpenFOAM, both pore-resolved and as an equivalent porous layer, which gives a built-in cross-check. The third is wall shear stress downstream of a mesh-covered segment in an axisymmetric vessel. Fully coupled fluid-structure interaction and polymer degradation are out of scope. We say so explicitly rather than pretend otherwise.

The second deliverable is a seeded-fault benchmark. We start from reference cases whose answers are known, drawn from canonical Foam-Agent and CalculiX tasks plus hand-verified stent cells. Into these we inject faults that still let the solver run: unit errors, swapped boundary-condition types, wrong material constants, under-resolved meshes, and wrong symmetry planes. This turns the silent error rate into something countable.

Baselines

The naive reference point is a single strong model in a loop with the solver, repairing until the run finishes, with the same five-round cap and the same model. It shows how many silent errors plain execution feedback leaves behind.

The strongest existing method is the Foam-Agent 2.0 architecture with its log-reading Reviewer for fluid tasks and the AutoFEA pipeline for structural tasks. They report 88.2% and 90.2% execution success respectively. No reported result was found on Lacuna for any silent-error or physical-correctness rate on either system, so we will measure it. All systems get the same base model, the same tool library, the same token and solver-time budget per task, and the same round cap. Beating these baselines means a lower silent error rate on the reference tasks and higher recall on seeded faults, with execution success no more than two points lower.

The key ablation hands the falsifier the generator's code and reasoning trace while keeping everything else fixed. If this sighted falsifier performs as well as the blind one, our central claim about information separation is wrong.

A second ablation replaces the falsifier with a fixed, hand-written suite of generic physics checks given to the single-agent loop. This isolates whether task-specific generated checks matter.

Why not just…?

Why not just give a single agent a good test suite? This is the most serious threat. If engineers wrote conservation and refinement checks once and gave them to a single solver loop, much of the benefit might appear without any extra agent. The fixed-suite ablation tests exactly this. We expect generic checks to miss task-specific faults, such as a mis-set wall-shear sampling location or an inverted crush direction. That expectation could be wrong. If the fixed suite comes within a few points of the falsifier's recall, the honest conclusion is that the contribution is the check library, not the agent, and we would report it that way.

Why not just use classical optimization over a hand-built parametric model? For searching strut widths or pore sizes, a classical optimizer such as CMA-ES on a validated pipeline is the right tool, and we do not compete with it. The factorial-design work in Optimization of Cardiovascular Stent against Restenosis shows that this style of search already works for coatings. Our target is upstream of search: producing and trusting the pipeline the optimizer would query. An optimizer fed a silently wrong pipeline converges confidently to a wrong design, so falsification makes classical optimization safer rather than replacing it.

Why not just add more refinement rounds or more agents? CodeTransOcean reports plateaus after three to five rounds. SlopCodeBench shows that code quality degrades with more edits. Adversarial Review notes diminishing returns from adding agents. We test this directly by giving the baselines our falsifier's extra token budget, spent as additional rounds. We also track the SlopCodeBench erosion and verbosity measures across rounds for every system.

Decisive Checks

The first decisive experiment is the seeded-fault benchmark. Faults are injected into reference cases across the Foam-Agent task categories, a CalculiX subset drawn from AutoFEA's 512 projects, and the three stent families. We report detection recall, false-alarm rate, and final silent error rate for each system.

The second experiment runs open-ended generation of the stent cases from specifications. Outputs are judged against hand-verified references. For the crush cases, we additionally check whether predicted radial force falls in a physically plausible range relative to the cited bench envelope; this is a sanity check, not a target, since geometries differ.

The third experiment compares the blind falsifier against the sighted variant on identical tasks.

We would count the idea as confirmed under four conditions holding together. The blind falsifier must cut the silent error rate of the Foam-Agent and AutoFEA-style baselines by at least half on seeded faults. It must beat the sighted variant clearly. It must beat the fixed-suite single agent on task-specific faults. And with rollback in place, it must not raise erosion relative to baselines. If false alarms push repairs into thrashing, which the erosion metrics will reveal, the falsifier would need to report only when its margin is large. We would test that threshold rather than tune it away.