LohCG
This page describes the numerical method in LohCG
at a high level, for more details, see Papers.
LohCG solves the constant-density (incompressible) Navier-Stokes equation modeling inviscid or viscous flows at low Mach numbers. The numerical method employs continuous Galerkin finite elements with linear shapefunctions and stores the unknowns at nodes of a tetrahedron-only mesh. The finite element operators are formulated over edges [1] and implemented using tetrahedron and triangle super-edges [2]. The algorithm is implemented using an asynchronous-by-default, distributed-memory, task-parallel programming paradigm on top of the Charm++ runtime system.
The equations of constant-density flow
The equations solved are the 3D unsteady Navier-Stokes equation, governing Newtonian incompressible flows,
where is the velocity vector, is the pressure, and both the pressure and the viscosity have been normalized by the (constant) density.
The numerical method
The method casts the above system of governing equations into a hyperbolic/parabolic system as
where is the (constant) speed of sound.
Discretization of momentum transport
The above system is discretized in space using an edge-based finite-element method with linear tetrahedra. Using this approach, the velocity vector and pressure are located at the nodes of the mesh. The numerical solution at any point within the computational domain is represented as
where is a tetrahedron containing the spatial point , superscript denotes the discrete numerical solution at vertex , and is a linear basis function associated with vertex and element . Applying a Galerkin lumped-mass approximation to the momentum equation yields the following semi-discrete form for a vertex :
where represent all edges connected to vertex and is the volume surrounding . denotes the numerical flux between vertices and while the boundary flux. Note that summation is implied on the repeated indices and representing spatial directions. The terms , , , and are defined as
where represents all domain elements attached to edge , while all boundary elements attached to edge , and all boundary elements surrounding boundary point . For the derivation of the above and other details see [3] and [4]. The numerical flux above is evaluated on each edge connecting mesh points and . In the LohCG solver this is given by a Galerkin approximation stabilized by artificial viscosity:
where the flux at mesh point is
while is the artificial viscosity (damping) coefficient, and is the maximum wavespeed across edge with
Instead of the above second-order damping term, another, less diffusive, option in LohCG is to stabilize the advection term via solution reconstruction and limited extrapolation, similar to that of implemented in RieCG, applied to the velocity components.
Discretization of pressure transport
The evolution equation governing the pressure is discretized in a similar fashion to the above using the Galerkin finite element operator over edges:
with the flux specifying the velocity divergence. The numerical flux is evaluated on each edge connecting mesh points and . Similar to the advection term the Galerkin approximation is stabilized by artificial viscosity:
where the flux at mesh point is
Startup procedure
The boundary and initial conditions for the velocity, prescribed by the user for a given problem, are not assumed to yield a divergence-free vector field and the initial pressure with its boundary conditions is not assumed to be consistent with the initial velocity, i.e., the velocity and pressure are allowed to be specified independently. To ensure consistency of the initial and boundary conditions with the governing equations, the user-given velocity field, , is decomposed into div-free and curl-free parts as which, taking the divergence, yields the Poisson equation
This is solved for which is then used to project the velocity field onto a divergence-free subspace as
This divergence-free velocity field is then used to compute the initial pressure, satisfying the initial and boundary conditions, by solving the Poisson equation
Time stepping starts after the above startup procedure.
Time integration
The solution is advanced using an explicit -stage Runge-Kutta scheme:
where , is the right hand side, is the current stage, , and the time step size is obtained by finding the minimum value over all mesh points as
where is the Courant number.