Finding Numerical Fluxes for DG

Copyright (C) 2020 Andreas Kloeckner

MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

NB: This note book uses the Maxima-Jupyter kernel to interface with Maxima, an open-source computer algebra system. I have found that the Docker image is a fairly convenient way of using this kernel.

Some Maxima version info for reproducibility:

Load some packages:

Simplification Utilities

These function simplify expressions coming from the (symbolic) simultaneous diagonalization, by letting Maxima realize that $n \cdot n =1$.

Wave Equation

Define the flux jacobian for the first-order form of the wave-equation:

$$ \begin{align*} \partial_t u &= \nabla \cdot \boldsymbol v\\ \partial_t \boldsymbol v &= \nabla u \end{align*} $$

projected onto a line with normal n:

Find the eigenvalues of the flux Jacobian:

Finding the Numerical Flux

This function sets up a system of Rankine-Hugoniot conditions across the flux fan and solves for the stagnation state:

Find an expression for the flux in characteristic variables.

Note the p and m suffixes for the $+$ and $-$ sides of the interface.

Convert back to conserved variables:

Maxwell's Equations

First, set up some parameter assumptions:

Some helper functions for matrix creation:

Next, write down the flux Jacobian on a line with normal n:

Next, diagonalize to obtain the transformation to/from characteristic variables:

Now find the flux in characteristic variables:

And in conserved variables:

Check against value from the literature90199-U):