MMS: Incompressible Navier-Stokes — Troubleshooting Guide
By Sitemap
My Mms Navier Stokes simulation is giving me unexpected results — convergence issues, maybe. How do I diagnose this systematically?
Mms Navier Stokes troubleshooting follows patterns once you know what to look for. Most issues fall into three buckets: convergence failures, accuracy problems, and result misinterpretation. Let me give you a systematic diagnostic framework rather than a list of random fixes.
That framing helps. Before we dive in — what's the single most common mistake engineers make with Mms Navier Stokes?
Honestly, it's skipping the sanity checks. Engineers set up a Mms Navier Stokes model, it converges, and they trust the result without verifying it against a hand calculation or a known benchmark. The solver gives you an answer regardless of whether your model is physically correct. Always run a simplified version first.
MMS worked smoothly for heat conduction, but for Navier-Stokes it just falls apart… what's different?
Incompressible NS carries two constraints other equations don't have. First, continuity \( \nabla\cdot\mathbf{u} = 0 \) is a constraint, not an evolution equation — if your manufactured velocity field violates it and the solver can't accept a mass source, the verification is invalid from the start. Second, pressure is a Lagrange multiplier enforcing that constraint — it has no evolution equation of its own, and it's sensitive to boundary conditions, reference fixing, and the element pair (LBB condition). It often shouldn't converge at the same order as velocity. Most NS-MMS troubles reduce to these two facts.
The system under test (constant density, kinematic viscosity \( \nu \)):
$$ \frac{\partial \mathbf{u}}{\partial t} + (\mathbf{u}\cdot\nabla)\mathbf{u} = -\frac{1}{\rho}\nabla p + \nu \nabla^2 \mathbf{u} + \mathbf{s}_u, \qquad \nabla\cdot\mathbf{u} = 0 $$
The momentum source \( \mathbf{s}_u \) comes from substituting \( (\mathbf{u}_m, p_m) \) into the left side. The problem is the continuity side.
An arbitrary velocity field generally has \( \nabla\cdot\mathbf{u}_m \ne 0 \). If your solver accepts a mass source (in-house codes), fine — but most solvers won't let you modify continuity. Then build divergence-free solutions from the start. In 2-D, derive from a stream function \( \psi(x,y) \):
$$ u_m = \frac{\partial \psi}{\partial y}, \qquad v_m = -\frac{\partial \psi}{\partial x} $$
which guarantees \( \nabla\cdot\mathbf{u}_m = 0 \) by construction. Example: \( \psi = \sin(\pi x)\sin(\pi y) \) gives \( u_m = \pi\sin(\pi x)\cos(\pi y) \), \( v_m = -\pi\cos(\pi x)\sin(\pi y) \). In 3-D use a vector potential, \( \mathbf{u}_m = \nabla\times\mathbf{A} \). The pressure solution \( p_m \) can be chosen independently (e.g., \( \cos(\pi x)\sin(\pi y) \)). Always confirm symbolically that \( \nabla\cdot\mathbf{u}_m \) simplifies to zero — if anything survives simplification, the construction is wrong.
| Check | Explanation |
|---|---|
| Pressure indeterminacy fixed? | With all-velocity boundaries, pressure is defined up to a constant. Pin one point or enforce zero mean — and evaluate errors under the same convention (subtract means before comparing) |
| Theoretical order of the element pair | Taylor-Hood (quadratic velocity / linear pressure) gives pressure one order below velocity — by design. Equal-order stabilized schemes bring their own stabilization-order effects |
| Pressure near boundaries | Local pressure order loss at outflow boundaries and corners is common. Re-evaluate with interior-only norms to isolate it |
| Pressure BC consistency | Pressure-specified boundaries must use \( p_m \); velocity boundaries must not also constrain pressure |
Pressure converging at a lower order than velocity is expected for many discretizations. Failure means missing the theoretical order for your element pair — not differing from velocity.
The convective term has several mathematically equivalent forms: advective \( (\mathbf{u}\cdot\nabla)\mathbf{u} \), divergence \( \nabla\cdot(\mathbf{u}\mathbf{u}) \), skew-symmetric, rotational. They coincide for continuous divergence-free fields but not at the discrete level — derive \( \mathbf{s}_u \) with one form while the solver discretizes another and you get subtle order pollution or an error floor. Same story for the viscous term: \( \nu\nabla^2\mathbf{u} \) vs. the stress-divergence form \( \nabla\cdot\left[\nu(\nabla\mathbf{u} + \nabla\mathbf{u}^T)\right] \). Read the solver's documented formulation and derive the source in exactly that form.
SIMPLE/PISO/projection-type pressure-velocity splittings introduce a per-step splitting error; depending on the implementation, pressure can carry a lower temporal order than velocity, often visible as a boundary-adjacent pressure error layer. The standard diagnostic sequence:
| Cause | Explanation and fix |
|---|---|
| Manufactured Reynolds number too high | Amplitude and viscosity choices can push the effective Re into the thousands, destabilizing the steady laminar solution. Raise \( \nu \) or lower amplitudes; design for effective Re of 10–100 |
| Source amplitude too large | Each derivative multiplies by ~\( \pi \)-factors; high wavenumbers explode the source. Start with 1–2 periods per domain |
| Inconsistent initial condition | For unsteady MMS, initialize with the exact \( \mathbf{u}_m(t=0) \); zero initialization breaks in the initial transient |
| Unit/nondimensionalization mix-up | Feeding a dimensional source to a nondimensional solver, or a \( \rho \)-divided form mismatch. Reconcile symbol definitions |
NS has real exact solutions too — Kovasznay flow, Taylor-Green vortices. Can't I just verify with those instead?
Best practice is to use both. Kovasznay and Taylor-Green verify without any source-term machinery, making them an independent check that doesn't depend on your injection working. MMS wins on coverage — you can design solutions that exercise every term and any boundary type. Exact solutions for the basics, MMS for the sweep: the pairing lets you cross-isolate source-term bugs from solver bugs.
Fundamentals in the consolidated MMS for incompressible Navier-Stokes; automated derivation in MMS source terms; general order failures in troubleshooting convergence rates.