{"slug": "moju-open-source-physics-auditing-for-cfd-and-sciml-training-data", "title": "Moju – Open-source physics auditing for CFD and SciML training data", "summary": "Moju, an open-source physics-auditing tool, scored two Nektar++ 5.10.0 simulations of 2D incompressible flow past a cylinder at Reynolds number 100 as 19.5% (Non-Admissible) at polynomial order 4 and 90.6% (Moderate Admissibility) at order 6, even though the two runs agreed within 0.01% on Strouhal number (0.16524 vs 0.16523), mean drag coefficient (1.33446 vs 1.33451) and RMS lift coefficient (0.22940 vs 0.22938). Moju's implied-viscosity check found the order-4 field behaved as if viscosity were off by 4.3% at the 95th percentile and 8.0% at the worst near-wall point, versus 0.10% and 0.26% at order 6, while near-wall continuity and momentum residuals scored High (about 0.95 to 1.00) at both orders. The authors argue the discrepancy matters because simulation fields used as training data for neural surrogates will teach a model near-wall errors exactly where wall shear and pressure generate the forces.", "body_md": "*2D flow past a circular cylinder at Re = 100, simulated in Nektar++. Audited with Moju.*\n\n- We ran the same mesh at polynomial order 4 and 6. Lift, drag and shedding frequency agree within 0.01%. By the usual convergence check, the two runs are the same.\n- Moju's implied-viscosity check says otherwise. Near the wall, the order-4 field behaves as if the fluid's viscosity were wrong: 4.3% off at the 95th percentile and 8.0% at the worst point, against 0.10% and 0.26% at order 6.\n- Moju scores the order-4 field 19.5% (Non-Admissible) and the order-6 field 90.6% (Moderate Admissibility).\n- A convergence study only tells you whether two runs agree with each other. A physics audit tells you whether each one satisfies the physics. That matters when simulation fields become training data for neural surrogates: a model trained on near-wall errors learns them too, right where the wall shear and pressure that make the forces come from.\n\n| Item | Value | \n|---|---|\n| Solver | Nektar++ 5.10.0, `IncNavierStokesSolver` (spectral/hp elements) | \n| Flow | 2D, incompressible, Re = 100 (D = 1, U = 1, ν = 0.01), unconfined, settled periodic shedding | \n| Mesh | 6,883 quadrilaterals, identical for both runs | \n| Resolutions | polynomial order 4 ( `NUMMODES=5` ) and 6 (`NUMMODES=7` ), i.e. p-refinement on the same mesh | \n| Domain | 30D upstream, 25D downstream, 30D to each side | \n\nStatistics over the settled window:\n\n| Quantity | Order 4 | Order 6 | Change | \n|---|---|---|---|\n| Strouhal number (zero-crossing) | 0.16524 | 0.16523 | 0.0042% | \n| Mean drag coefficient | 1.33446 | 1.33451 | 0.0042% | \n| RMS lift coefficient | 0.22940 | 0.22938 | 0.0090% | \n\nMoju turns each predicted state into residuals of the governing laws you declare and into **law-linked constitutive checks** ([docs](https://github.com/IfimoAI/moju/blob/main/docs/law_implied_audits.md)). For incompressible Navier–Stokes, the constitutive check asks: *what viscosity does the local momentum balance imply at this point, and does it match the viscosity you declared?*\n\n- At each sample point, Moju solves the momentum balance for a local viscosity ν̃ (a least-squares projection onto ∇²u) and computes the fractional mismatch δ = (ν − ν̃)/ν.\n- It only uses points where the viscous term is large enough for ν to be identifiable. Elsewhere, inertia or pressure dominate and the implied value is ill-conditioned, so those points are reported as not identifiable, not scored. Near the wall that leaves 156 of 380 samples at both orders.\n- The score uses the 95th percentile of |δ| with noise normalization (the opt-in `implied_metric=\"percentile\"` setting, added in Moju 2.2.0). The worst point is reported alongside it but does not set the score.\n\nThe fields passed to Moju are the solver's own output: velocity and pressure at five closely spaced snapshots (for ∂u/∂t), and spatial derivatives from Nektar++'s `FieldConvert`.\n\n|  | Order 4 | Order 6 | \n|---|---|---|\n| Implied-viscosity mismatch, 95th percentile | 4.3% | 0.10% | \n| Implied-viscosity mismatch, worst point | 8.0% | 0.26% | \n| Moju admissibility (implied viscosity) | **19.5%, Non-Admissible** | **90.6%, Moderate** | \n\nTwo things are worth noting:\n\n- **The governing laws look fine at both orders.** Near-wall continuity and momentum residuals score High (about 0.95 to 1.00). The problem only shows up when you ask whether the field's viscous balance matches the stated fluid.\n- **A global summary hides it.** The median implied viscosity over the identifiable near-wall points is 0.009998 at order 4 and 0.010000 at order 6, both essentially the declared 0.01. The error is local, and a central summary washes it out.\n\nWe are generating simulation data intended for training specialized neural surrogates. Integrated quantities such as forces and frequencies are the usual convergence criteria, and they converge long before the near-wall derivatives do. A surrogate learns the whole field, so the data has to be right where the physics is hardest, not only where the integrals are.\n\n- This is one benchmark: 2D, laminar, Re = 100. Nothing here is a claim about 3D, turbulent or high-Reynolds-number flow.\n- A tier means consistency with the stated physics on the sampled points. It is not a certification and does not replace validation against experiments.\n- Moderate at order 6 is not \"perfect\": on Moju's scale, High starts at 90.9%.\n- Scores were computed with Moju 2.3.2 and re-checked with 2.4.2 (strict evaluation coverage), with identical outcomes.\n- We are verifying the audit pipeline itself against exact Navier–Stokes solutions sampled through the same mesh and derivative path. A steady exact solution (Kovasznay flow) passes; an unsteady check (Taylor–Green) is still being worked through. Both orders go through the same pipeline, so any pipeline effect applies equally to both. We will update this page when the check is complete.\n- The simulation fields themselves are not published in this repository.\n\n```\npip install moju\n```\n\n- Law-linked implied audits: [`docs/law_implied_audits.md`](https://github.com/IfimoAI/moju/blob/main/docs/law_implied_audits.md)\n- Auditing CFD snapshots: [`examples/cfd_snapshot_cookbook_heat_1d.py`](https://github.com/IfimoAI/moju/blob/main/examples/cfd_snapshot_cookbook_heat_1d.py)\n- Navier–Stokes term diagnostics: [`examples/cookbook_taylor_green_diagnostics.py`](https://github.com/IfimoAI/moju/blob/main/examples/cookbook_taylor_green_diagnostics.py)\n- Getting derivatives right: [`docs/getting_derivatives_right.md`](https://github.com/IfimoAI/moju/blob/main/docs/getting_derivatives_right.md)\n\nSimulations and case study by Ifimo Lab. Questions and critique are welcome in [Issues](https://github.com/IfimoAI/moju/issues).", "url": "https://wpnews.pro/news/moju-open-source-physics-auditing-for-cfd-and-sciml-training-data", "canonical_source": "https://github.com/IfimoAI/moju/blob/main/docs/case-studies/cylinder-re100-converged-forces.md", "published_at": "2026-10-30 18:57:56+00:00", "updated_at": "2026-10-30 19:16:47.931495+00:00", "lang": "en", "topics": ["ai-safety", "ai-research", "machine-learning", "ai-tools"], "entities": ["Moju", "Nektar++ 5.10.0", "IncNavierStokesSolver", "FieldConvert", "IfimoAI"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/moju-open-source-physics-auditing-for-cfd-and-sciml-training-data", "markdown": "https://wpnews.pro/news/moju-open-source-physics-auditing-for-cfd-and-sciml-training-data.md", "text": "https://wpnews.pro/news/moju-open-source-physics-auditing-for-cfd-and-sciml-training-data.txt", "jsonld": "https://wpnews.pro/news/moju-open-source-physics-auditing-for-cfd-and-sciml-training-data.jsonld"}}