- The paper demonstrates an agentic, human-supervised workflow for porting OpenFOAM infrastructure, IAPWS-IF97 steam properties, and two-phase solvers into Rust, with hierarchical testing and smoke checks guiding each development layer.
- The resulting libraries reproduce key benchmarks, including 1.9% maximum error for a refined lid-driven cavity, approximately 5% Sod shock-tube error away from discontinuities, and HEM critical-flow agreement within εlog G ≤ 0.06 for selected data.
- The paper reports 12.3× higher code production than the authors’ pre-agentic baseline and a 30.6 psia Edwards–O’Brien blowdown RMSE, while emphasizing that validation remains preliminary and solver fixes may not generalize.
Overview
This paper documents the agentic-AI-assisted construction of the thermal-hydraulics components of Outram Park, an open-source Rust-based reactor simulation kit developed at the Singapore Nuclear Research and Safety Institute (SNRSI). The work covers three artifacts: Outram-Foam, a Rust port of OpenFOAM's finite-volume infrastructure; tampines-steam-tables, an IAPWS-IF97 property library extended with homogeneous-equilibrium-model (HEM) two-phase critical-flow solvers; and TampinesSteamArray, a one-dimensional HEM blowdown solver validated against the Edwards–O'Brien pipe test. The central claim is that with Claude Code as the coding agent, code generation ceases to be the bottleneck in scientific software development — human verification, validation, and domain expertise become the limiting factor. The authors report roughly an order-of-magnitude productivity gain over their own pre-agentic baseline, while conceding that all V&V remains preliminary.
Motivation and context
The motivation is framed by Singapore's entry into the IAEA Integrated Nuclear Infrastructure Review and by the practical difficulty of assembling export-controlled or fragmented open-source simulation tools (OpenFOAM, OpenMC, MOOSE, NJOY) into coupled multiphysics capability. The predecessor system TUAS was limited to single-phase Boussinesq flow. Outram Park aims to be a Rust analogue of MOOSE: a single Cargo build across Windows, macOS, Linux, and Android, unifying ports of OpenFOAM, CoolProp, DWSIM, NJOY, OpenMC, and PFLOTRAN. The discovery that motivated the methodology was incidental — porting a guitar-tuner application (lingot) to Rust in a single weekend using Claude Code demonstrated that repository-scale translation was feasible.
Agentic methodology
The workflow rests on several practices worth noting for reproducibility:
- Hierarchical decomposition: translation proceeds bottom-up from matrix solvers, ODE integrators, and root-finders to fvMatrix/fvMesh infrastructure and finally application-level solvers (rhoPimpleFoam, rhoCentralFoam). Each layer is verified before becoming a dependency of the next.
- Smoke tests: every translated component must pass a manufactured-solution check (e.g., recover x from Ab), first on synthetic matrices such as the 5×5 Hilbert matrix, then on the Harwell–Boeing nuclear-engineering benchmark nnc261 (κ≈1013).
- Model tiering: Opus for architecture and physics debugging, Sonnet for bounded translation tasks, Haiku for utilities.
- Human-in-the-loop correction of hallucinated debugging: a documented example shows Opus repeatedly "fixing" intentional panics in a single-phase enthalpy function called in a two-phase steam-generator context, wasting tokens until the human injected the correct fix (use (p,h) flashes rather than (p,T)).
The paper also describes secondary uses of AI: provenance recovery from Git history, conversion of informal Singlish engineering notes into journal prose (with full disclosure per Elsevier policy), and workspace refactoring to eliminate OpenBLAS dependencies in favor of pure-Rust solvers.
Verification and validation results
Matrix libraries. The nnc261 LU round-trip achieved a relative residual below 10−10 and a relative solution error of 1.184×10−2 — acceptable given the condition number, though the paper correctly notes this is consistent with ill-conditioning rather than evidence of high accuracy.
Lid-driven cavity. Code-to-code comparison against OpenFOAM icoFoam shows centerline velocity differences up to 5.6×10−3 (dimensionless). Against Ghia et al.'s benchmark at Re=100, the coarse Ab0 mesh gave a maximum pointwise error of about 6.3%; refinement to Ab1 reduced this to 1.9% maximum error (RMS 0.0118), demonstrating expected grid convergence.
Sod shock tube. The rhoCentralFoam port matches the exact Riemann solution within ~5% away from discontinuities, with errors up to 20% at shocks and contacts. Importantly, the authors explicitly address the self-validation hazard: because Claude Code generated both solver and verification case, they independently cross-checked against Sod's coarse Table II and against Marzouk's Fig. 4 digitized via GraphReader, establishing that the Riemann-solver reference implementation follows the standard Toro chapter 4 method rather than a fabricated one.
HEM critical flow. tampines-steam-tables implements HEM choked flow — functionality the authors state is absent from ThermoSysPro, DWSIM, and other surveyed open-source libraries. Validation against digitized Zaloudek curves (357 points, Saha review data) and Moody's maximum-discharge diagram (321 points across thirteen stagnation-pressure isobars) shows agreement within Ab2 for asserted Region 4 points. A notable numerical difficulty is the genuine discontinuity in equilibrium sound speed at the bubble point, which makes the mass-flux objective non-unimodal; the resolution uses golden-section search applied separately inside and outside the dome, plus a quality discriminator near saturation. The bubble-point kink locus in Moody's chart is qualitatively reproduced.
Edwards–O'Brien blowdown. This is the most technically substantive result. An initial explicit Python mirror truncated at 0.41 s due to sub-freezing temperatures from an EOS validity edge. Three fixes were applied agentically to the Rust TampinesSteamArray PIMPLE solver:
- Enthalpy-drain fix: replacing the non-conservative Ab3 form with a conservative form using continuity-consistent density Ab4 and a two-phase compressibility Ab5 instead of the single-phase Ab6. This recovered the pressure plateau at 392.7 psia (RMSE 59.8 psia).
- Shock-capturing fix: Mach-weighted blending between KNP (rhoCentralFoam-type) dissipation above Ma ≈ 0.3–1.0 and the PIMPLE solver below, damping ringing by 55.5% but reintroducing instability.
- Tail-stability fix: tapering KNP dissipation off below 50 kg/m³, restoring stability through the full 600 ms.
The final HybridAllMach configuration achieves GS-1 RMSE of 30.6 psia against Edwards experimental data, versus 58.6 psia for pure PIMPLE. The parallel density-based reimplementation by the second author could not complete the transient, underscoring that numerical formulation choice dominates outcomes. Void-fraction agreement remains poor, and significant ringing persists — both conceded openly.
Productivity accounting
The quantitative productivity claim is carefully constructed and auditable via a distributed script (kloc_accounting.py). Key figures:
| Metric |
Pre-agentic baseline |
Agentic month |
| Code lines |
181,298 (~3 years) |
175,997 (~1 month) |
| Lines per active day |
494 |
6,069 |
| Ratio |
— |
12.3× |
The composition matters: 77% of agentic output is translation of already-debugged upstream codes rather than novel engineering, and much of the original 15% is tooling and interface code. The authors also present a counterfactual API cost analysis: 2.91 billion billable tokens costing USD Ab770,000+ replacement cost — even with a 10× buffer, agentic development is cheaper. A single-crate addendum (the Offbeat fuel-performance port, 13,863 lines in one day) cost approximately USD $210–234 in API terms. These figures are lower bounds due to transcript pruning and single-machine measurement, and the authors caution that line counts measure volume, not value.
Limitations and open questions
The paper is candid about its constraints, and several bear directly on the headline results:
- All V&V is explicitly labeled preliminary. The Edwards fixes may be case-specific: whether the HybridAllMach solver generalizes to Marviken, natural-circulation, or Zhang–Brooks cases is unresolved, and the authors flag the risk of "random AI fixes" that fit Edwards but fail elsewhere.
- The $\mathbf{A}\mathbf{b}$8 flash has documented accuracy caveats (up to 5 °C temperature error near the critical point, ~20% pressure error at 0.1–1 bar), and pressures above ~240 bar are not covered, excluding SCWR applications.
- Independent, manually derived verification tests were not systematically applied to all cases; the AI-assisted workflow is positioned as a first-pass strategy only.
- The productivity ratio compares agentic translation-heavy work against a mixed pre-agentic baseline; the authors acknowledge the comparison isolates the agentic workflow but not code quality or maintainability equivalence.
- A distinctive contribution is the developer health advisory: 28.7% of commits occurred outside working hours during the intensive month, accompanied by sleep disruption and prolonged illness, motivating enforced working-hour guardrails in the repository. The paper does not claim causation but cites technostress, hyperfocus, and stress-immunity literature.
Conclusion
The paper demonstrates that human-in-the-loop agentic coding can produce verified finite-volume, thermophysical-property, and transient two-phase solver code in Rust at roughly an order-of-magnitude higher rate than the authors' own conventional baseline, at token costs far below equivalent engineering labor. Its most defensible technical contributions are the open-source HEM critical-flow capability and the Edwards blowdown solver at 30.6 psia RMSE. Its most defensible methodological contributions are the auditable line-count and token-cost accounting and the insistence that V&V — not generation — is now the bottleneck. Whether the solver fixes generalize beyond the Edwards case, and whether void-fraction fidelity can be achieved without drift-flux or six-equation models, remain the immediate open questions.