# 2. Method of Manufactured Solutions (MMS)¶

Order of accuracy testing (or ‘order testing’) is considered a rigorous method for performing code verification. During order testing, the formal order of accuracy of a numerical scheme is compared to the observed order of accuracy. The observed order is the order at which the discretization error (which is the difference between the numerical solution to the discrete equations and the exact solution to the PDEs) decreases with systematic mesh refinement. However, the exact solution to a PDE is unknown for most practical problems. In this scenario, the Method of Manufactured Solutions (MMS)  can be used where a selected analytical function (called a ‘manufactured solution’) is forced to be the exact solution by modifying the PDE through additional source terms.

The MMS test cases presented in this chapter are summarized in Table 2.1. These test cases offer an increasing level of computational complexity to isolate any potential problems in the source code. Three explanatory test cases that employ various simplifying assumptions are provided to assist the reader in understanding the MMS. Additional test cases were selected based upon their ability to invoke various parts of the MFIX code, and present physically acceptable data. All cases are executed in serial mode unless explicitly noted.

Table 2.1 Summary of MMS tests by feature.

EX01

EX02

EX03

01

02

03

04

05

06

Frequency†

X

X

X

M

M

M

M

M

M

Dimension

1D

1D

1D

2D

3D

3D

3D

3D

3D

Multiphase

$${\checkmark}$$

$${\checkmark}$$

Continuity

$${\checkmark}$$

$${\checkmark}$$

$${\checkmark}$$

Momentum

$${\checkmark}$$

$${\checkmark}$$

$${\checkmark}$$

$${\checkmark}$$

$${\checkmark}$$

$${\checkmark}$$

$${\checkmark}$$

Thermal Energy

$${\checkmark}$$

$${\checkmark}$$

$${\checkmark}$$

$${\checkmark}$$

Species Mass

Granular Energy

$${\checkmark}$$

$${\checkmark}$$

Turbulence

No-slip Wall BC

$${\checkmark}$$

Free-slip Wall BC

$${\checkmark}$$

Pressure Outflow

$${\checkmark}$$

Distributed Memory

Shared Memory

† C-Incorporated into the continuous integration server; M-Monthly; Q-Quarterly; D-Disabled; X-Manual