CoreFlows proposes a variety of finite volume methods (see \ref leveque for an introduction). The method can be explicit or implicit (enum \ref TimeScheme), and the convection fluxes can be approximated using the \ref roe, \ref vfroe or \ref vffc formulations (enum \ref NonLinearFormulation).
The basic method for fluid models is the \ref roe scheme with entropic correction (see \ref kieu) and source upwinding (see\ref wbsourceterms). In order to increase precision it is possible to use centered, staggered, pressureCorrection or lowMach schemes through the enum \ref SpaceScheme.
The finite volume discretisation allows an easy handling of general geometries and meshes generated by \ref salome .
Explicit schemes are used in general for fast dynamics solved with small time steps while implicit schemes allow the use of large time step to quickly reach the stationary regime. The implicit schemes result in nonlinear systems that are solved using a Newton type method.
The upwind scheme is the basic scheme but options are available to use a centered scheme (second order in space) or entropic corrections.
Our models can be written in generic form as a nonlinear system of balance laws:
where
-
$U$ is the vector of conservative unknowns, -
$\mathcal{F}^{conv}$ is the convective flux - and
$\mathcal{F}^{diff}$ the diffusive flux.
We decompose the computational domain into
- Two neighboring cells
$C_i$ and$C_j$ have a common boundary$\partial C_{ij}$ with area$s_{ij}$ . - We denote
$N(i)$ the set of neighbors of a given cell$C_i$ and$\vec n_{ij}$ the exterior unit normal vector of$\partial C_{ij}$ .
Integrating the system (\ref NStokesEq) over
$$ \frac{\mathrm{d} U_i}{\mathrm{d} t} + \sum_{j \in N(i)} \frac{s_{ij}}{v_i}\left(\overrightarrow \Phi^{conv}{ij} + \overrightarrow{\Phi}^{diff}{ij}\right)= S_i(U,x). $$
with:
- the numerical convection flux
$$ \overrightarrow{\Phi}{ij}^{conv}= \frac{1}{s{ij}}\int_{\partial C_{ij}}\mathcal F^{conv}(U)\cdot\vec n_{ij}ds, $$
- the numerical diffusion flux
$$ \overrightarrow{\Phi}{ij}^{diff}= \frac{1}{s{ij}}\int_{\partial C_{ij}}\mathcal {F}^{diff}(U)\cdot\vec n_{ij}ds. $$
To approximate the convection numerical flux $\overrightarrow{\Phi}^{conv}{ij}$ we solve an approximate Riemann problem at the interface $\partial C{ij}$. There are three possible formulations for the convection fluxes.
- Using the \ref roe local linearisation of the fluxes, we obtain the following formula:
$$ \overrightarrow{\Phi}^{conv, Roe}{ij}= \frac{\mathcal{F}^{conv}(U_i) + \mathcal{F}^{conv}(U_j)}{2} \vec{n}{ij}- \mathcal{D}(U_i,U_j) \frac{U_j-U_i}{2}\ =\mathcal{F}^{conv}(U_i) \vec{n}_{ij} + A^-(U_i,U_j) (U_j - U_i), $$
- Using the \ref vfroe local linearisation of the fluxes, we obtain the following formula:
$$ \overrightarrow{\Phi}^{conv, VFRoe}{ij}=\mathcal{F}^{conv}\left(\frac{U_i + U_j}{2} - \mathcal{D}(U_i,U_j) \frac{U_j-U_i}{2}\right)\vec{n}{ij}, $$
- Using the \ref vffc local linearisation of the fluxes, we obtain the following formula:
$$ \overrightarrow{\Phi}^{conv, VFFC}{ij}= \frac{\mathcal{F}^{conv}(U_i) + \mathcal{F}^{conv}(U_j)}{2} \vec{n}{ij}- \mathcal{D}(U_i,U_j) \frac{\mathcal{F}^{conv}(U_j)-\mathcal{F}^{conv}(U_i)}{2} \vec{n}_{ij}, $$
where
-
$\mathcal{D}$ is an upwinding matrix, -
$A(U_i,U_j)$ the Roe matrix - and
$A^-= \frac{A - \mathcal{D}}{2}$ .
The choice
The diffusion numerical flux
where
-
the numerical diffusion tensor is
$$ D(U,\vec{n}{ij})=\nabla\mathcal{F}^{diff}(U) \cdot \vec{n}{ij}. $$
The expression of
$\Phi_{ij}^{diff}$ above is not accurate for highly non structured or non conforming meshes. However, since we are mainly interested in convection driven flows, we do not ask for a very precise scheme.
Finally, since
The source term in (\ref{eq:reduced scheme}) can be approximated using either a
or an
$$ \textrm{ Upwind source } S_i=\frac{1}{2}(Id-sign(A^{Roe}{i,i+1}))\frac{S(U_i)+S(U{i+1})}{2} +\frac{1}{2}(Id+sign(A^{Roe}{i-1,i}))\frac{S(U{i-1})+S(U_i)}{2}. $$
In explicit schemes, in order to compute the values
$$ \frac{U_{i}^{n+1} - U_{i}^{n}}{\Delta t} + \sum_{j\in N(i)} \frac{s_{ij}}{v_i}\left(\frac{1}{2}(\mathcal{F}^{conv}(U_i^n) + \mathcal{F}^{conv}(U_j^n))\cdot \vec{n}{ij}- \mathcal{D}(U_i^n,U_j^n,\vec{n}{ij}) \frac{U_j^n-U_i^n}{2}\right) +\frac{s_{ij}}{v_i} D (\frac{U_i+U_j}{2},\vec{n}_{ij})(U_j-U_i)= S(U^n,x_i), $$
or equivalently using (\ref{eq:flux roe})$ and (\ref{eq:flux diff})
From the system (\ref{explicitscheme})
we can obtain
In implicit schemes, in order to compute the values
$$ \frac{U_{i}^{n+1} - U_{i}^{n}}{\Delta t} + \sum_{j\in N(i)} \frac{s_{ij}}{v_i}\left(\frac{1}{2}(\mathcal{F}^{conv}(U_i^{n+1}) + \mathcal{F}^{conv}(U_j^{n+1})). \vec{n}{ij}- \mathcal{D}(U_i^{n+1},U_j^{n+1},\vec{n}{ij}) \frac{U_j^{n+1}-U_i^{n+1}}{2}\right) +\frac{s_{ij}}{v_i} D (\frac{U_i+U_j}{2},\vec{n}_{ij})(U_j-U_i) = S(U^{n+1},x_i), $$
or equivalently using (\ref{eq:flux roe}) and (\ref{eq:flux diff})
The system (\ref{implicitscheme}) is nonlinear. The computation of
We use the following Newton iterative method to obtain the required solutions:
where :
-
$\delta U_i^{k+1} = U_i^{k+1} - U_i^{k}$ is the variation of the$k$ -th iterate that approximate the solution at time$n+1$ .
Defining the unknown vector
For the Navier-Stokes equations
For the Euler equations, we can build the \ref roe matrix $A(U_i,U_j)* explicitly using the Roe averaged state
The Roe matrix writes (see \ref leveque)
The diffusion numerical flux
with the matrix
where