Simulation Tests
Quantitative verification of stability, convergence, and consistency in physical simulations.
Conceptual context
A physical simulation needs tests just as an experiment needs calibration. A result may look reasonable yet depend strongly on , violate an expected conservation law, or amplify small perturbations. Convergence, stability, conservation, and consistency tests turn those doubts into quantitative diagnostics. compares the result with a reference; measures improvement under refinement; monitors invariants; checks equations; and detects amplification. Together they determine whether the calculation is trustworthy within declared limits.
🟢 Essential level
Testing a simulation means asking controlled questions. First, compare with to obtain . The comparison must use the same observable, time, unit, and physical condition.
Next repeat the calculation at several values without changing the model or parameters. A regular reduction in discrepancy supports convergence; a plateau or increase calls for investigation of tolerances, roundoff, or instability. summarizes how much one run improves over another.
Reference agreement alone is insufficient. Expected balances, equation fulfillment, and response to small perturbations must also be checked. Every test needs a documented threshold and a physical justification suited to the observable and interval. A trustworthy simulation combines compatible trends, preserves run provenance, and retains its conclusions when the calculation is extended or refined once more.
No single test is enough: a small discrepancy against a biased reference, conservation demanded where it does not apply, or a well-normalized but poorly scaled residual can each create a false sense of confidence unless they are checked against one another.
🔵 Formal level
Basic formulas
The basic discrepancy between simulation and reference is evaluated with:
Absolute discrepancy
This produces from and . Both must describe the same observable, in the same units, time, and location.
Improvement between two resolutions is quantified by:
Convergence ratio
Here belongs to the coarse run and to the refined run. A value above one indicates reduced discrepancy.
If the steps of both simulations, and , are also known, the discrepancy ratio gives the observed :
Observed order of convergence
An observed order that matches the method's theoretical one is the most convincing evidence that the code is correctly implemented.
Real student questions
Is a small discrepancy enough? No. The reference may share the same bias.
Why are several resolutions needed? One run does not reveal a trend.
Is every drift an error? No. Some drift is physically expected.
Does a small residual guarantee accuracy? No. It only shows good satisfaction of the discrete equation.
Is chaos numerical instability? Not necessarily. Sensitivity may be physical.
Which test matters most? It depends on the model; combining tests is stronger.
Final synthesis
A simulation becomes credible when it passes independent, consistent tests. Varying , measuring , and checking conservation, consistency, and stability separates apparent precision from quantitative evidence.
Formal development
This section is part of the complete theory. See the subscription options to access it.
🔴 Structural level
This section is part of the complete theory. See the subscription options to access it.
Deep physical interpretation
This section is part of the complete theory. See the subscription options to access it.
Order of magnitude
This section is part of the complete theory. See the subscription options to access it.
Personalized resolution method
This section is part of the complete theory. See the subscription options to access it.
Special cases and extended example
This section is part of the complete theory. See the subscription options to access it.
Cross-cutting connections and study paths
This section is part of the complete theory. See the subscription options to access it.