RieCG

This page describes the numerical method in RieCG at a high level, for more details, see Papers.

The numerical method in RieCG is an edge-based finite element method for unstructured meshes, composed of tetrahedral cells, intended for the mathematical modelling of energetic, high-speed, compressible flows. This is an implementation of the method originally developed in [1] to use an asynchronous-by-default, distributed-memory, task-parallel programming paradigm using the Charm++ runtime system. The super-edge-based implementation of the finite element operators help reduce indirect addressing and increases performance [2].

Note that the RieCG algorithm can be viewed as either an edge-based finite element method on tetrahedron meshes or a node-centered finite volume method (on the dual mesh, consisting of arbitrary polyhedra).

The equations of compressible flow

The equations solved are the 3D unsteady Euler equations, governing inviscid compressible flow,

\[ \begin{split} \frac{\partial U}{\partial t} + \frac{\partial F_j}{\partial x_j} = S,\qquad U = \begin{Bmatrix} \rho \\ \rho u_i \\ \rho E \end{Bmatrix}, \enskip F_j = \begin{Bmatrix} \rho u_j \\ \rho u_iu_j + p\delta_{ij} \\ u_j(\rho E + p) \end{Bmatrix}, \enskip S = \begin{Bmatrix} S_\rho \\ S_{u,i} \\ S_E \end{Bmatrix} \end{split} \]

where the summation convention on repeated indices has been applied, $\rho$ is the density, $u_i$ is the velocity vector, $E=u_iu_i/2+e$ is the specific total energy, $e$ is the specific internal energy, and $p$ is the pressure. $S_\rho$ , $S_{u,i}$ , and $S_E$ are source terms that arise from the application of the method of manufactured solutions, used for verification; these source terms are zero when computing practical engineering problems. The system is closed with the ideal gas law equation of state

\[ \begin{split} p = \rho e (\gamma - 1) \end{split} \]

where $\gamma$ is the ratio of specific heats. Although the ideal gas law is used most frequently, any arbitrary (i.e. analytic or tabulated) equation of state can be used to relate density and internal energy to pressure.

The numerical method

The above system is solved using an edge-based finite-element method for linear tetrahedra. Using this particular approach, the unknown solution quantities are the conserved variables $U$ and are located at the nodes of the mesh. The solution at any point within the computational domain is represented as

\[ \begin{split} U(\vec{x}) = \sum_{v \in \Omega_h} N^v(\vec{x}) U^v \end{split} \]

where $\Omega_h$ is the tetrahedron containing the point $\vec{x}$ , $U^v$ is the solution at vertex $v$ , and $N^v(\vec{x})$ is a linear basis function associated with vertex $v$ and element $\Omega_h$ . Applying a Galerkin, lumped-mass approximation to the Euler equations gives the following semi-discrete form of the governing equations for a vertex $v$ :

\[ \begin{split} \frac{\text{d}U^v}{\text{d}t} = - \frac{1}{V^v} \sum_j \left[ \sum_{ vw\in v} D^{vw}_j F^{vw}_j + \sum_{vw\in v} B^{vw}_j \left( F^v_j + F^w_j\right) + B^v_j F^v_j \right] \end{split} \]

where $vw$ represent all edges connected to $v$ , $V$ is the volume surrounding $v$ , $F^{vw}_j$ is the numerical flux between $v$ and $w$ . The first term on the right-hand-side above is evaluated for all vertices within the domain. The last two terms are only evaluated for vertices $v$ and surrounding edges $vw$ that lie on the domain boundary. $F^v_j$ denotes the boundary flux. The term $D^{vw}_j$ is effectively the area-weighted normal to the dual face separating $v$ and $w$ . It is calculated as

\[ \begin{split} D^{vw}_j = \frac{1}{2} \sum_{\Omega_h \in vw} \int_{\Omega_h} \left( N^v \frac{\partial N^w}{\partial x_j} - N^w \frac{\partial N^v}{\partial x_j} \right) \, \text{d} \Omega \end{split} \]

where $\Omega_h \in vw$ represents all elements attached to edge $vw$ . This numerical scheme is guaranteed to be conservative since $D^{vw}_j$ is antisymmetric. The boundary terms $B^{vw}_j$ and $B^v_j$ are defined as

\[ \begin{split} B^{vw}_j &= \frac{1}{2} \sum_{\Gamma_h \in vw} \int_{\Gamma_h} N^v N^w n_j \, \text{d} \Gamma \\ B^v_j &= \sum_{\Gamma_h \in v} \int_{\Gamma_h} N^v N^v n_j \, \text{d} \Gamma \end{split} \]

For the derivation of the above and other details, see [3] and [4].

Numerical flux

The numerical flux $F^{vw}_j$ is evaluated at the midpoint between $v$ and $w$ . We use Rusanov's flux which approximates the flux between $v$ and $w$ as

\[ \begin{split} D^{vw}_j F^{vw}_j = D^{vw}_j \left( F^v_j + F^w_j \right) + \left| D^{vw}_j \right| \lambda^{vw} \left( U^w - U^v \right) \end{split} \]

where $\lambda^{vw}=\max (\lambda_v, \lambda_w)$ is the maximum wavespeed, defined as

\[ \begin{split} \lambda_v = \left| u_j \frac{D^{vw}_j}{\left|D^{vw}_j\right|} \right| + c^v \end{split} \]

where $c^v$ is the speed of sound at vertex $v$ . Another option is to use the Harten-Lax-van Leer-Contact (HLLC) flux [3].

Solution reconstruction

The inputs to the flux function above are approximated using a piecewise limited solution reconstruction of the primitive variables. The reconstruction is performed component-wise for each edge $vw$ as follows:

\[ \begin{split} \hat{u}^v &= u^v + \frac{1}{4} \left[ (1-k) \phi(r^v) \delta_1 + (1+k)\phi\left(\frac{1}{r^v}\right)\delta_2 \right]\\ \hat{u}^w &= u^w - \frac{1}{4} \left[ (1-k) \phi(r^w) \delta_3 + (1+k)\phi\left(\frac{1}{r^w}\right)\delta_2 \right] \end{split} \]

with

\[ \begin{split} \delta_1 &= 2x_i^{vw} \frac{\partial u^v}{\partial x_i} - \delta_2 \\ \delta_2 &= u^w - u^v \\ \delta_3 &= 2x_i^{vw} \frac{\partial u^w}{\partial x_i} - \delta_2 \\ x_i^{vw} &= x_i^w - x_i^v \\ r^v &= \delta_2/\delta_1 \\ r^w &= \delta_2/\delta_3 \end{split} \]

This scheme corresponds to a piecewise linear reconstruction for $k=-1$ and a piecewise parabolic reconstruction for $k=1/3$ . The function $\phi$ can be any total variation diminishing limiter function, e.g., that of van Leer. The gradients of the primitive variables are computed in all mesh points based on the edge-based formulation as

\[ V^v\left(\frac{\partial \phi}{\partial x_j}\right)^v = \sum_{vw \in v} D_j^{vw}\left(\phi^w+\phi^v\right) + \sum_{vw \in v} B_j^{vw}\left(\phi^w+\phi^v\right) + B_j^v\phi^v \]

where $\phi$ are scalar components of the primitive variables $\rho,u_i,e$ . The above summations are over all edges $vw \in \Omega_h$ that contribute to point v.

Time integration

The solution is advanced using a multi-stage explicit scheme of the form:

\[ \begin{split} U^k = U^n + \alpha^k \Delta t r^{k-1} \end{split} \]

where $r$ is the right hand side of the discretized governing equations, $k$ is the current stage, $m$ is the total number of stages, $\Delta t$ is the time step, and $ \alpha^k = 1/(1+m-k) $ . The explicit Euler time marching scheme is obtained for $m=1$ and the classical 2nd-order Runge-Kutta method is obtained with $m=2$ . The time step size is adaptive and obtained by finding the minimum value for all mesh points at every time step as

\[ \Delta t = \text{C} \min_{\forall v} \frac{(V^v)^{1/3}}{\lambda^{v}} \]

where $\text{C} \leq 1$ is the Courant number, and $V^{v}$ is the nodal volume of the dual-mesh associated to point $v$ .

References

[1] H. Luo, J. Baum, and R. Lohner, Edge-based finite element scheme for the Euler equations, AIAA Journal, 32(6), 1183-1190, 1994.
[2] R. Löhner, Edges, stars, superedges and chains, Computer Methods in Applied Mechanics and Engineering, 111, 3-4, 255-263, 1994.
[3] J. Waltz, N.R. Morgan, T.R. Canfield, M.R.J. Charest, L.D. Risinger, J.G. Wohlbier, A three-dimensional finite element arbitrary Lagrangian–Eulerian method for shock hydrodynamics on unstructured grids, Computers & Fluids, 92: 172-187, 2014.