## EntropyStableEuler.jl

Entropy stable fluxes and variables for compressible Euler/Navier-Stokes
Author jlchan
Popularity
6 Stars
Updated Last
1 Year Ago
Started In
August 2020

# EntropyStableEuler

Provides entropy stable finite volume fluxes for the compressible Euler equations, as well as formulas for transformations between conservative and entropy variables.

Code based off of formulas in Chandrashekar 2012 and Winters et al. 2019. Formulas for entropy variables are from Hughes, Mallet, Franca 1986.

# Usage

The package exports

• The `Euler{d}` type, which is used to dispatch on 1D, 2D, and 3D formulas.
• `fS(Euler{d}(),UL,UR)`, which evaluates d-dimensional EC fluxes using conservative variables.
• `fS_prim(Euler{d}(),QL,QR)`, which evaluates entropy conservative fluxes using primitive variables `Q = (ρ,uvw...,β)`.
• `fS_prim_log(Euler{d}(),QL,QR)`, which takes advantage of precomputed logarithms. Solutions are assumed to be of the form `Q = (ρ,uvw...,β,log(ρ),log(β))`.
• `u_vfun(Euler{d}(),V), v_ufun(Euler{d}(),U)` to convert between conservative variables `U` and entropy variables `V`
• `cons_to_prim_beta(Euler{d}(),U)` to convert between conservative and "primitive" variables (involving inverse temperature β) used to evaluate fluxes.

# Example

```using EntropyStableEuler

# construct solution at two states
UL = map(x->x.*ones(4),(1,.1,.2,2))
UR = map(x->x.*ones(4),(1.1,.2,.3,2.5))

# evaluate fluxes
Fx,Fy = fS(Euler{2}(),UL,UR)

# pass in primitive vars/precomputed logs for efficiency
QL,QR = cons_to_prim_beta.(Euler{2}(),(UL,UR))
Fx,Fy = fS_prim(Euler{2}(),QL,QR)

QlogL = map(x->log.(x),(first(QL),last(QL)))
QlogR = map(x->log.(x),(first(QR),last(QR)))
Fx,Fy = fS_prim_log(Euler{2}(),QL,QR,QlogL,QlogR)```

# To-do

• add Lax-Friedrichs penalty and matrix dissipation from Winters et al. 2017
• Jacobians for transforms between conservative and entropy variables
• viscous entropy variable matrices for compressible Navier-Stokes