This page will help you choose among the various advection schemes available for Notus. The following point of views and advices are given in the context of the available code and implemented numerical methods. Thus, they should not be taken as a generality. However, they represent a discerning guide for most of the applications that can be simulated with Notus.
We first give a quick overview of the available numerical schemes for the pure advection equation. Then, we go further in details by considering the advection-diffusion equation shared by most physical models.
The advection equation of a scalar variable \( \phi \), in its primitive form, is:
\[ \frac{\partial \phi}{\partial t} + \mathbf{u} \cdot \nabla \phi = 0 \]
where \( \mathbf{u} \) is the velocity of the flow. In a conservative form – as it is common in a Finite Volume approach –, the pure advection equation is rewritten:
\[ \frac{\partial \phi}{\partial t} + \nabla \cdot \left( \mathbf{u} \phi \right) = \phi \nabla \cdot \mathbf{u} \]
which can be simplified when considering an incompressible flow with \( \nabla \cdot \mathbf{u} = 0 \).
Various numerical schemes (see below) are available in Notus and may be chosen in the NTS
file.
There are two main categories of schemes for solving the advection equation in Notus:
There are 3 classical implicit spatial schemes:
o1_upwind
o2_upwind
o2_centered
plus two hybrid schemes for the Navier equation:
hybrid_o2_centered_o1_upwind
hybrid_o2_centered_o2_upwind
The first three ones are tested in the verification/cell_advection_schemes/species_1D/species_linear_advection_1D_implicit
test case, which consist of the classical 1D pure advection with constant velocity. Here is visual result of the advection of an initial exponential function after 100 time steps:
One can clearly notice the main particularities of the various schemes:
Scheme | Damping | Dephasing | Other |
---|---|---|---|
First order upwind | High (-60%) | No | – |
Second order upwind | Moderate (-25%) | Forward | Upfront negative values |
Second order centered | Moderate (-15%) | Backward | Trailing oscillations with negative values |
The following figure shows the impact of temporal precision by comparison between first order in time (SBDF1) and second order in time (SBDF2) schemes: Hence, SBDF2 is clearly less diffusive than SBDF1 with a loss of around 10% for SBDF1/SBDF2.
There are 2 classical explicit spatial schemes:
o1_upwind
o2_upwind
plus two high-order WENO schemes:
weno3
weno5
The 4 different schemes are tested in the verification/cell_advection_schemes/species_1D/species_linear_advection_1D_explicit
test case, which consist of the classical 1D pure advection with constant velocity (as in implicit). However, it is important to note that here, for stability criterions for the high-order schemes, a second order RK scheme NSSP32 have been used for all schemes. Here is visual result of the advection of an initial exponential function after 100 time steps:
One can clearly notice the main particularities of the various schemes:
Scheme | Damping | Dephasing | Other |
---|---|---|---|
First order upwind | High (-60%) | No | Superposed with the equivalent implicit scheme |
Second order upwind | Moderate (-25%) | Forward | Negative values + Superposed with the equivalent implicit scheme |
WENO 3,2 upwind | Moderate (-33%) | Slightly backward | No discernible (but existing) negative values |
WENO 5,3 upwind | Low (-2.5%) | Not discernible | No discernible (but existing) negative values |
We now consider the more complex problem of solving an advection-diffusion equation. Different choices can be made depending on the relative importance of the two terms. In this section we recall common knowledge on the advection-diffusion equation treatment and provide hints on how to choose the appropriate numerical scheme for the advection term.
First of all, one should always look at the dimensionless numbers of the physical problem that you are simulating. Also, in numerical simulation, one has to account for the effective cell dimensionless number which shows the relative importance between two terms of an equation at the cell scale.
This is particularly important for the inertia and viscous terms (eq. to advection and diffusion) of the Navier-Stokes equation, for which the associated cell Reynolds number \( Re_{cell} = \frac{\rho_{cell} |u_{cell}| \delta x}{\mu_{cell}} \) shows the relative importance between advection and diffusion of the flow. For the energy (resp. species) equation, the cell Péclet (resp. Schmidt) number plays a similar role. For the sake of clarity, we will focus on the Reynolds number.
If the cell Reynolds number is approximately equal to 1, it means that, at the scale of a cell, the diffusion term and the advection term are of the same order of magnitude. Below unity, diffusion starts to dominate numerically (see slow advection below); above that, advection starts to dominate numerically (see fast advection below).
The knowledge of the (approximate/maximum/minimum) value of the cell Reynolds number will give you hints on the choice of an adequate numerical scheme for the advection term. For example, for slow advection problems, it might be unefficient and unecessary to use high-order explicit schemes such as WENO. In that case, a classical fast second order centered implicit scheme might be very sufficient!
For low cell Reynolds numbers, \( Re_{cell} \ll 1 \), the advection/inertial/transport term is not dominant. Hence, the impact of numerical errors in this term on the whole simulation will also be negligeable. Thus, an implicit scheme will be a good choice toattain low computational time and large time steps.
It is well known that, for \( Re_{cell} < 2 \), a second order centered implicit scheme can be used. Above that, the scheme will become oscillating and an upwind implicit or explicit scheme should be considered. The choice of a first order upwind scheme will permit to numerically damp high frequencies while not being dephasing at all, ie. all the waves will travel at the good speed but will see their energy decrease. Unless using appropriate flux limiters, the second order upwind scheme might bring unwanted over/undershoots in the solution (numerical values above or below the physical limits), this is why we prefer WENO explicit schemes in such cases (see next section).
Anyway, a second order SBDF method should be used to reduce the impact of important temporal error when choosing a large time step.
For large cell Reynolds numbers, \( Re_{cell} \gg 1 \), the advection/inertial/transport term becomes dominant. Hence, the impact of numerical errors in this term will be very important on the whole simulation. Thus, low order schemes should be avoided and high-order explicit schemes – like WENO – favorized. However, be careful that high-order schemes can get very computationally consuming, particularly the WENO 5,3 scheme that has to be used with (at least) a NSSP 3,2 2nd order in time integration scheme (see the next paragraph for a discussion about accuracy vs efficiency).