8. The momentum equations

This chapter describes the available options for the discretization of convection and diffusion, including various numerical schemes as well as turbulence models and wall models.

8.1. Convection

ComFLOW supports two categories of discretization schemes for convection:

  • B2: first-order upwind or second-order central (three-point stencil)
  • B3: second-order upwind (extended stencil)

The discretization stencil is selected by setting numerical/convection/@scheme to either "b2" or "b3".

When using the B2 scheme, artificial diffusion can be included to stabilize the discretization method. The amount of artificial diffusion can be controlled automatically by means of a flux limiter or manually by specifying a fixed coefficient. The flux limiter is controlled by the attribute numerical/convection/@limiter which can be set to "true" (on) or "false" (off). The fixed amount of artificial diffusion is controlled by the attribute numerical/convection/@artificial_diffusion which can be set to any real value between 0 and 1, with 0 corresponding to a second-order central discretization and 1 with a first-order upwind discretization.

The second-order upwind discretization yields more accuracy, resulting in less numerical damping, but may lead to less stable computations. Near boundaries and the free surface the discretization switches to a B2 scheme (which depending on the specified settings may or may not include artificial diffusion).

Note that changing the discretization scheme for convection can have consequences for the stability of the method which may require you to change the time step size or to select a different time integration scheme (see also Chapter 16).

The following table gives an overview of the possible settings. The recommended settings are indicated in bold font.

Scheme Order of accuracy Stability @scheme @artificial_diffusion @limiter
1-st order upwind 1 ++ b2 1.0 false
2nd-order upwind 2 + b3 between 0.0 and 1.0 false
2nd-order central 2 +/- b2 0.0 false
limited central between 1 and 2 + b2 0.0 true
partially upwind 1 +/- b2 between 0.0 and 1.0 true

8.2. Diffusion

ComFLOW supports two discretization schemes for diffusion:

  • a legacy scheme based on a staircase approximation of the geometry
  • LS-STAG

In the interior of the flow, i.e. away from solid objects, both discretization scheme yield identical results. However, the LS-STAG discretization scheme gives a more accurate approximation of viscous stresses in cells that are cut by the geometry and is therefore recommended for general use. To make a selection set the key boundaries/walls/@diffusion to either "legacy" or "ls_stag".

8.3. Turbulence modeling

The turbulence model in ComFLOW is based on the QR eddy-viscosity model combined with C2 regularization. More details can be found in :cite:`????`.

The turbulence model can be switch on by setting turbulence/@model="QR-blend". No turbulence model is used by default, which comes down to setting turbulence/@model="none".

The turbulence model should not be used in conjunction with any upwind discretization, as this will introduce too much artificial dissipation in the simulation of turbulent flow. It is advised to only use the (limited) second-order central scheme (see Table 8.1).

The turbulence model in ComFLOW can be combined with the Werner-Wengle wall model for the viscous wall-shear stress. The wall model is only active in the presence of unresolved turbulent boundary layers, elsewhere it does not affect the solution. The Werner-Wengle wall model can only be used in conjunction with the LS-STAG discretization for diffusion. To enable this option set boundaries/walls/@wallmodel="werner_wengle" and switch on the LS-STAG scheme for diffusion as explained in Section 8.2. By default, no wall model is used, which comes down to setting boundaries/walls/@wallmodel="none".

8.4. External forces

The gravitational acceleration is defined in the key physical/gravitation/, for example:

<gravitation> 0.0 0.0 -9.81 </gravitation>

Special attention has to be paid to the settings for external forces when a moving coordinate system is used, for more information see Section 6.