Manufactured Solution: Inviscid (Euler)

verification

Manufactured velocity field
Velocity-magnitude of the manufactured solution on a plane of the finest grid.

Overview

The Method of Manufactured Solutions verifies that a discretization is implemented correctly and attains its design order of accuracy. A smooth analytic field is prescribed and substituted into the governing equations, and the source term that makes the field an exact solution is derived analytically. The solver is then run with those sources, so the solution is known everywhere and the discretization error can be measured exactly. Here the manufactured field is forced through the inviscid Euler equations: with viscous diffusion switched off, the case exercises the convective discretization and the gradient reconstruction.

Problem Setup

The manufactured field matches the viscous companion case: a smooth three-dimensional sinusoid with non-zero gradients of every primitive variable in all directions, kept subsonic. With ϕ=π(x+y+z),

p=cosϕ+3,u=v=w=sinϕ+3,T=(cosϕ+3)2,

and density from the ideal-gas law ρ=p/(RT). The analytic Euler source terms for this field are added to the residual. The domain is the unit cube on a family of uniform hexahedral grids at 83, 163, 323, 643 cells (uniform 2× refinement, so the grid size h=(1/N)1/3 halves each level). The discretization uses no limiter, and each grid is converged until the iterative residual is below the discretization error.

Quantities of Interest

For each grid the solver reports the L2 error of every conservative equation, mass, the three momentum components, and energy. The error is plotted against h on a log–log axis alongside the design slope of 2, and the observed order of accuracy is computed from successive-grid error ratios. Across the three grid pairs the observed L2 order is 1.85–1.97 for mass, 2.24–2.31 for each momentum component, and 1.95–2.15 for energy.

Results

Discretization error vs grid size

Discretization error vs grid size
L2 norm of the error in each conservative equation vs grid size h=(1/N)1/3; the black dotted line is the design slope of 2.

Observed order of accuracy

Observed order of accuracy
Observed order of accuracy between successive grids for each conservative equation; the dotted line marks the design order of 2.

Observed order of accuracy per equation

Equation512→40964096→3276832768→262144
Mass (ρ) 1.8511.9281.967
x-momentum (ρu) 2.3092.2852.240
y-momentum (ρv) 2.3092.2852.240
z-momentum (ρw) 2.3092.2852.240
Energy (ρE) 1.9472.1222.153

Solver configuration

features exercised
Verification3DInviscidIdeal gasSteadyEnergy equation