JP | EN | ZH
HomeVerification & ValidationMethod of Manufactured Solutions

Method of Manufactured Solutions — Rigorous Code Verification

MMS procedure, manufactured exact solutions, convergence rate testing, and application to structural, thermal, and fluid solver verification.

Articles in This Section

Quick Explainer

🧑‍🎓 Student

What is the Method of Manufactured Solutions and how does it work?

🎓 Engineer

MMS works backward: start with a desired "manufactured" solution (any smooth function), compute what source terms and boundary conditions would produce it, then run your code with those inputs and check that the numerical solution converges to the manufactured solution at the theoretically expected rate. Any smooth function works — the method verifies the solver, not any particular physics.

🧑‍🎓 Student

How do you verify that your solver has second-order spatial accuracy using MMS?

🎓 Engineer

Run on a series of systematically refined grids (halving h each time). Compute L2 norm of error (numerical minus manufactured solution) on each grid. Plot log(error) vs. log(h). The slope is the observed order of convergence. A second-order scheme should give slope 2 (error proportional to h^2). If slope is 1, you have a first-order error — often at boundary conditions. If slope is below 1, there is likely a bug.