# Euler Equation Eigensystem with Gravity in the Energy Flux

I am modifying a conservative form of the Euler equations with gravity in the energy flux (see previous question: Energy Conservation in Conservation Laws with Source Terms) for use in a Riemann solver. I'm seeing some unphysical/unstable results despite total energy conservation to roundoff.

The conservation law equation with source term (a.k.a balance law) $\frac{\partial \vec{Q}}{\partial t} + \nabla \cdot \vec{F} = \vec{S}$, is solved, where the variables are defined in $\vec{Q}$,the flux, $\vec{F_z}$ in the $z$-direction, and the source $\vec{S}$ of modified equations are:

$\vec{Q}= \left[\begin{matrix} \rho \\ \rho u \\ \rho v \\ \rho w \\ E_{total} \end{matrix}\right] \quad \quad \vec{F_z}= \left[\begin{matrix} \rho w \\ \rho uw \\ \rho vw \\ \rho w^2+p \\ (E_{total} + p)w \end{matrix}\right] \quad \quad \vec{S}= \left[\begin{matrix} 0 \\ 0 \\ 0 \\ -\rho g \\ 0 \end{matrix}\right]$

where $\rho$ is the density, $u$,$v$, and $w$ are velocities in the $x$, $y$ and $z$ directions respectively. The total energy is defined as $E_{total} = \frac{p}{\gamma-1} + \frac{1}{2}\rho q^2 + \rho\psi$, with $q^2=u^2+v^2+w^2$, and $\psi=gz$, with $g$ being the acceleration due to gravity in the $z$-direction, and $\gamma$ is the ratio of specific heats. The pressure $p$ can be defined from the total energy, $p=(\gamma-1)(E_{total} - \frac{1}{2}\rho q^2 - \rho\psi)$.

I find the flux Jacobian, $A = \frac{\partial \vec{F_z}}{\partial \vec{Q}}$,

$A = \left[\begin{matrix} 0 & 0 & 0 & 1 & 0 \\ -uw & w & 0 & u & 0 \\ -vw & 0 & w & v & 0 \\ (\gamma-1)(\frac{1}{2} q^2 - \psi) - w^2 & -(\gamma-1)u & - (\gamma-1)v & (3-\gamma)w& (\gamma-1) \\ [(\gamma-1)(\frac{1}{2} q^2 - \psi) - h']w & -(\gamma-1)uw & -(\gamma-1)vw & h'-(\gamma-1)w^2 & \gamma w \end{matrix}\right]$

where $h' = h + \psi$, with $h = \frac{a^2}{\gamma-1} + \frac{1}{2}q^2$, and $a^2 = \frac{\gamma p}{\rho}$.

This systems yields eigenvalues $\lambda =[u-a, u,u,u,u+a]$, and right eigenvectors:

$R = \left[ \begin{matrix} 1 & 0 & 0 & 1 & 1 \\ u & 1 & 0 & u & u \\ v & 0 & 1 & v & v \\ w-a & 0 & 0 & w & w+a \\ h'-ua& u & v & \frac{1}{2}q^2+\psi & h'+ua \end{matrix}\right]$

and left eigenvectors:

$L = R^{-1} = \frac{\gamma-1}{2a^2}\left[ \begin{matrix} (\frac{1}{2}q^2-\psi)+\frac{wa}{\gamma-1} & -u & -v & -w-\frac{a}{\gamma-1} & 1 \\ \frac{2ua^2}{\gamma-1} & -\frac{2a^2}{\gamma-1} & 0 & 0 & 0 \\ -\frac{2va^2}{\gamma-1} & 0 & \frac{2a^2}{\gamma-1} & 0 & 0 \\ 2h'-2q^2 & 2u & 2v & 2w & -2 \\ (\frac{1}{2}q^2-\psi) - \frac{wa}{\gamma-1} & -u & -v & -w + \frac{a}{\gamma-1} & 1 \end{matrix}\right]$

Does anyone see any problems with this formulation? Does anybody have experience including gravity as a source term for the momentum equation, and as a flux for the energy equation? Or does anyone see problems with the calculation of the eigensystem?

Thanks for the help.

• I define $E_t = E + \rho\psi$, so based on the previous question, shouldn't it be $E_t$ in the flux? The pressure should be defined differently, if what you say is true. You are correct about the $z$-flux, and this is the $x$-flux. I can rewrite it, but for now I'll just move the source up to the correct equation, and will have to keep in mind that $x$ actually means $z$. – Wes Lowrie Oct 24 '14 at 15:36
• I've updated the flux and source to represent the $z$-flux, as well as the flux Jacobian, and right and left eigenvectors so it is consistent with the gravity source acting in the $z$-direction. – Wes Lowrie Oct 24 '14 at 16:43
• No problem, I just updated the subscript with $total$ instead of $t$ to avoid confusion. – Wes Lowrie Oct 24 '14 at 16:55