# 6. Manufactured Solution Mathematical Forms¶

(Note: All solution variables are in SI units.)

The baseline manufactured solution selected for the verification study is a combination of sine and cosine functions and takes the following general form , 

(6.1)$\begin{split}\phi\left( x,y,z \right) = \phi_{0}& + \phi_{x}f_{\text{ϕx}}\left( \frac{a_{\text{ϕx}}\text{πx}}{L} \right) + \phi_{y}f_{\text{ϕy}}\left( \frac{a_{\text{ϕy}}\text{πy}}{L} \right) + \phi_{z}f_{\text{ϕz}}\left( \frac{a_{\text{ϕz}}\text{πz}}{L} \right)\\ & + \phi_{\text{xy}}f_{\text{ϕxy}}\left( \frac{a_{\text{ϕxy}}\text{πxy}}{L^{2}} \right) + \phi_{\text{yz}}f_{\text{ϕyz}}\left( \frac{a_{\text{ϕyz}}\text{πyz}}{L^{2}} \right) + \phi_{\text{zx}}f_{\text{ϕzx}}\left( \frac{a_{\text{ϕzx}}\text{πzx}}{L^{2}} \right)\end{split}$

where, $$L$$ is a characteristic length (herein, selected equal to the domain length or $$L = 1$$), and $$\phi = \left\lbrack P_{g},u_{g},v_{g},w_{g},u_{s},v_{s},w_{s},T_{g},T_{s} \right\rbrack^{T}$$ represents the set of primitive variables being tested for order of accuracy. The sinusoidal functions ($$f_{\text{ϕx}}$$, $$f_{\text{ϕy}}$$, etc.) selected are shown in Table 6.1

Table 6.1 Functions in baseline manufactured solutions.

Variable, $$ϕ$$

$$f_{ϕx}$$

$$f_{ϕy}$$

$$f_{ϕz}$$

$$f_{ϕxy}$$

$$f_{ϕyz}$$

$$f_{ϕzx}$$

$$u_{g}$$

sin

cos

cos

cos

sin

cos

$$v_{g}$$

sin

cos

cos

cos

sin

cos

$$w_{g}$$

cos

sin

cos

sin

sin

cos

$$u_{s}$$

sin

cos

cos

cos

sin

cos

$$v_{s}$$

sin

cos

cos

cos

sin

cos

$$w_{s}$$

cos

sin

cos

sin

sin

cos

$$P_{g}$$

cos

cos

sin

cos

sin

cos

$$T_{g}$$

cos

cos

sin

cos

sin

cos

$$T_{s}$$

cos

cos

sin

cos

sin

cos

$$\varepsilon_{s}$$

cos

cos

sin

The frequency constants ($$a_{\phi x}$$, $$a_{\phi y}$$, $$a_{\phi xy}$$, etc.) and the amplitude constants ($$\phi_{0}$$, $$\phi_{x}$$, $$\phi_{\text{xy}}$$, etc.) are selected to ensure functions that are smooth but show reasonable periodicity and magnitude within the domain. The frequency constants selected are shown in Table 6.2.

Table 6.2 Frequencies in baseline manufactured solutions.

Variable, $$ϕ$$

$$a_{ϕx}$$

$$a_{ϕy}$$

$$a_{ϕz}$$

$$a_{ϕxy}$$

$$a_{ϕyz}$$

$$a_{ϕzx}$$

$$u_{g}$$

0.5

0.85

0.4

0.6

0.8

0.9

$$v_{g}$$

0.8

0.8

0.5

0.9

0.4

0.6

$$w_{g}$$

0.85

0.9

0.5

0.4

0.8

0.75

$$u_{s}$$

0.5

0.85

0.4

0.6

0.8

0.9

$$v_{s}$$

0.8

0.8

0.5

0.9

0.4

0.6

$$w_{s}$$

0.85

0.9

0.5

0.4

0.8

0.75

$$P_{g}$$

0.4

0.45

0.85

0.75

0.7

0.8

$$T_{g}$$

0.75

1.25

0.8

0.65

0.5

0.6

$$T_{s}$$

0.5

0.9

0.8

0.5

0.65

0.4

$$\varepsilon_{s}$$

0.4

0.5

0.5

The amplitude constants selected are shown Table 6.3.

Table 6.3 Amplitudes in baseline manufactured solutions.

Variable, $$ϕ$$

$$ϕ_{0}$$

$$ϕ_{x}$$

$$ϕ_{y}$$

$$ϕ_{z}$$

$$ϕ_{xy}$$

$$ϕ_{yz}$$

$$ϕ_{zx}$$

$$u_{g}$$

7

3

-4

-3

2

1.5

2

$$v_{g}$$

9

-5

4

5

-3

2.5

3.5

$$w_{g}$$

8

-4

3.5

4.2

-2.2

2.1

2.5

$$u_{s}$$

7

3

-4

-3

2

1.5

2

$$v_{s}$$

9

-5

4

5

-3

2.5

3.5

$$w_{s}$$

8

-4

3.5

4.2

-2.2

2.1

2.5

$$P_{g}$$

100

20

-50

20

-25

-10

10

$$T_{g}$$

350

10

-30

20

-12

10

8

$$T_{s}$$

300

15

-20

15

-10

12

10

$$\varepsilon_{s}$$

0.3

0.06

0.1

0.06

The baseline manufactured solutions presented above are used to generate manufactured solutions for the two-phase flow test cases. As an example, the manufactured solution for the test case presented in Section 2.6 is provided next.

The manufactured solutions for the scalar variables ($$P_{g}$$, $$T_{g}$$, and $$T_{s}$$) are simply obtained from Eq.6.1 and by substituting the appropriate functions and constants described above. For example, for the pressure variable ($$P_{g}$$), this function is as follow:

(6.2)$\begin{split}P_{g} = 100& + 20\cos\left( 0.4\pi x \right) - 50\cos\left( 0.45\pi y \right) + 20\sin\left( 0.85\pi z \right) \\ & - 25\cos\left( 0.75\pi xy \right) - 10\sin\left( 0.7\pi yz \right) + 10\cos\left( 0.8\pi zx \right)\end{split}$

The manufactured solutions for velocity components of the gas phase are obtained by taking the curl of the baseline velocity vector field, i.e.,

(6.3)$\begin{split}{\overrightarrow{V}}_{g} = u_{g}\widehat{i} + v_{g}\widehat{j} + w_{g}\widehat{k}\ = \left| \begin{matrix} \widehat{i} & \widehat{j} & \widehat{k} \\ \frac{\partial}{\partial x} & \frac{\partial}{\partial y} & \frac{\partial}{\partial y} \\ \phi(u_{g}) & \phi(v_{g}) & \phi(w_{g}) \\ \end{matrix} \right|\end{split}$

where, for example, $$\phi\left( u_{g} \right)$$ is the baseline manufactured solution obtained from Eq.6.1, the functions, and the constants described above for the variable $$u_{g}$$. This results in a divergence free velocity field because $$\nabla \cdot (\nabla \times \overrightarrow{H})$$ is identically zero for any vector field, $$\overrightarrow{H}$$. Thus, the manufactured solution for $$u_{g}$$ is given as:

(6.4)$\begin{split}u_{g} =& - \pi y\cos\left( 0.4\pi yz \right) + 2.5\pi\sin\left( 0.5\pi z \right) + 2.1\pi x\sin\left( 0.6\pi zx \right) \\ & - \ 0.88\pi x\cos\left( 0.4\pi xy \right) + \ 3.15\pi\cos\left( 0.9\pi y \right) + 0.68\pi z\cos\left( 0.8\pi yz \right)\end{split}$

Similarly, the manufactured solution for $$v_{g}$$ and $$w_{g}$$ can be derived.

Finally, the manufactured solution for velocity components of the solids phase is selected as simply the following divergence free field:

(6.5)$u_{s} = 5\operatorname{}\left( 0.5\pi\left( x + y + z \right) \right)$
(6.6)$v_{s} = 5\operatorname{}\left( 0.5\pi\left( x + y + z \right) \right)$
(6.7)$w_{s} = 5$

Manufactured solutions for other MMS test cases presented are derived using the baseline manufactured solutions and appropriate constraints (divergence free field, boundary conditions, etc.). For a complete look at the MMS function and MMS source terms, please see the MMS_MOD.f file under the respective test case of the MFIX distribution.