ChoCG
This page describes the numerical method in ChoCG
at a high level, for more details, see Papers.
ChoCG 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, p is the pressure, and both the pressure and the viscosity have been normalized by the (constant) density.
The numerical method
The method uses a projection scheme, in which a single time step consists of the following steps
advective/diffusive prediction:
pressure correction:
velocity projection:
Here denotes the implicitness factor for the viscous term: =1: implicit, =0.5: Crank-Nicholson.
Discretization of advection and diffusion
The above advective/diffusive step 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 , and is a linear basis function associated with vertex and element . Applying a Galerkin lumped-mass approximation gives the following semi-discrete form for a vertex :
where represent all edges connected to vertex . 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 see [3] and [4]. The numerical flux above is evaluated on each edge connecting mesh points and . This is given by a Galerkin approximation stabilized by edge-based upwinding:
where
Instead of the above second-order damping term, another, less diffusive, option in ChoCG is to stabilize the advection term via solution reconstruction and limited extrapolation, similar to that of implemented in RieCG, applied to the velocity and pressure.
Discretization of pressure correction
The pressure correction step is carried out by solving the Poisson equation for the pressure increment in time, discretized using Galerkin finite elements and linear shapefunctions:
where represents all elements attached to vertex . The numerical flux is evaluated on each edge connecting mesh points and , given by a Galerkin approximation stabilized as
where
The above linear system of equations for the pressure increment in time is solved using a preconditioned conjugate gradient method.
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 advective/diffusive step is advanced in time using the -scheme outlined above. =0 yields forward Euler, =1 results in backward Euler, and =0.5 in Crank-Nicholson time integration for the diffusion term. For the resulting linear system is solved numerically using a preconditioned conjugate gradient method.
In addition to integrating the diffusion term implicit in time, the advective/diffusive predictor step can be integrated using a multi-stage Runge-Kutta scheme:
where are the Runge-Kutta coefficients for a -step scheme. This improves accuracy and allows larger time steps.