# ALECG hydrodynamics

### Contents

Inciter supports multiple hydrodynamics schemes. This page describes the `ALECG`

method at a high level, for more details, see Inciter papers.

The basic ALECG algorithm 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 developed by Waltz and coworkers, see Inciter papers, to solve the governing equations of compressible flow to use an asynchronous-by-default, distributed-memory, task-parallel programming paradigm using the Charm++ runtime system.

Note that the ALECG 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,

where the summation convention on repeated indices has been applied, is the density, is the velocity vector, is the specific total energy, is the specific internal energy, and is the pressure. , , and 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

where 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 and are located at the nodes of the mesh. The solution at any point within the computational domain is represented as

where is the tetrahedron containing the point , is the solution at vertex , and is a linear basis function associated with vertex and element .

Applying a Galerkin, lumped-mass approximation to Euler equations gives the following semi-discrete form of the governing equations for a vertex :

where represent all edges connected to , is the volume surrounding , numerical flux between and . 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 and surrounding edges that lie on the domain boundary. As such, denotes the boundary flux.

The term is effectively the area-weighted normal to the dual face separating and . It is calculated as

where represents all elements attached to an edge . The described numerical scheme is guaranteed conservative since is antisymmetric.

The boundary terms and are defined by the following:

For the derivation and other details, see Inciter papers.

## Numerical flux

The numerical flux is evaluated at the midpoint between and . Here we used the Rusanov flux which approximates the flux between and as

where is the maximum wavespeed, defined as

where is the speed of sound at vertex .

## 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 as follows:

with

where and

This scheme corresponds to a piecewise linear reconstruction for and a piecewise parabolic reconstruction for . The function can be any total variation diminishing limiter function. We use the Van Leer and minmod functions.

## Time integration

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

where is the current stage, is the total number of stages, is the time step, and

The explicit Euler time marching scheme is obtained for and the classical 2nd-order Runge-Kutta method is obtained with .

The global time step is obtained by finding the minimum value for all edges in the domain. The time step for an edge is calculated as

where is the Courant number, and is the legnth of an edge . The global time step is thus

## Example setup, run, and solution

For an example test set up see the page on steady-state solution of transconic flow around an F16. For other examples, see Inciter papers.