Module ConservationLaws
Overview
The equations to be solved are defined by subtypes of AbstractConservationLaw
on which functions such as physical_flux
and numerical_flux
are dispatched. Objects of type AbstractConservationLaw
contain two type parameters, d
and PDEType
, the former denoting the spatial dimension of the problem, which is inherited by all subtypes, and the latter being a subtype of AbstractPDEType
denoting the particular type of PDE being solved, which is either FirstOrder
or SecondOrder
. Whereas first-order problems remove the dependence of the flux tensor on the solution gradient in order to obtain systems of the form
\[\partial_t \underline{U}(\bm{x},t) + \bm{\nabla}_{\bm{x}} \cdot \underline{\bm{F}}(\underline{U}(\bm{x},t)) = \underline{0},\]
second-order problems are treated by StableSpectralElements.jl as first-order systems of the form
\[\begin{aligned} +\underline{\bm{Q}}(\bm{x},t) - \bm{\nabla}_{\bm{x}} \underline{U}(\bm{x},t) &= \underline{0},\\ +\partial_t \underline{U}(\bm{x},t) + \bm{\nabla}_{\bm{x}} \cdot \underline{\bm{F}}(\underline{U}(\bm{x},t), \underline{\bm{Q}}(\bm{x},t)) &= \underline{0}. +\end{aligned}\]
Currently, the linear advection and advection-diffusion equations, the inviscid and viscous Burgers' equations, and the compressible Euler equations are supported by StableSpectralElements.jl, but any system of the above form can in principle be implemented, provided that appropriate physical and numerical fluxes are defined.
Equations
Listed below are partial differential equations supported by StableSpectralElements.jl.
StableSpectralElements.ConservationLaws.LinearAdvectionEquation
— TypeLinearAdvectionEquation(a::NTuple{d,Float64}) where {d}
Define a linear advection equation of the form
\[\partial_t U(\bm{x},t) + \bm{\nabla}_{\bm{x}} \cdot \big( \bm{a} U(\bm{x},t) \big) = 0,\]
with a constant advection velocity $\bm{a} \in \R^d$. A specialized constructor LinearAdvectionEquation(a::Float64)
is provided for the one-dimensional case.
StableSpectralElements.ConservationLaws.LinearAdvectionDiffusionEquation
— TypeLinearAdvectionDiffusionEquation(a::NTuple{d,Float64}, b::Float64) where {d}
Define a linear advection-diffusion equation of the form
\[\partial_t U(\bm{x},t) + \bm{\nabla}_{\bm{x}} \cdot \big( \bm{a} U(\bm{x},t) - b \bm{\nabla} U(\bm{x},t)\big) = 0,\]
with a constant advection velocity $\bm{a} \in \R^d$ and diffusion coefficient $b \in \R^+$. A specialized constructor LinearAdvectionDiffusionEquation(a::Float64, b::Float64)
is provided for the one-dimensional case.
StableSpectralElements.ConservationLaws.InviscidBurgersEquation
— TypeInviscidBurgersEquation(a::NTuple{d,Float64}) where {d}
Define an inviscid Burgers' equation of the form
\[\partial_t U(\bm{x},t) + \bm{\nabla}_{\bm{x}} \cdot \big(\tfrac{1}{2}\bm{a} U(\bm{x},t)^2 \big) = 0,\]
where $\bm{a} \in \R^d$. A specialized constructor InviscidBurgersEquation()
is provided for the one-dimensional case with a = (1.0,)
.
StableSpectralElements.ConservationLaws.ViscousBurgersEquation
— TypeViscousBurgersEquation(a::NTuple{d,Float64}, b::Float64) where {d}
Define a viscous Burgers' equation of the form
\[\partial_t U(\bm{x},t) + \bm{\nabla}_{\bm{x}} \cdot \big(\tfrac{1}{2}\bm{a} U(\bm{x},t)^2 - b \bm{\nabla} U(\bm{x},t)\big) = 0,\]
where $\bm{a} \in \R^d$ and $b \in \R^+$. A specialized constructor ViscousBurgersEquation(b::Float64)
is provided for the one-dimensional case with a = (1.0,)
.
StableSpectralElements.ConservationLaws.EulerEquations
— TypeEulerEquations{d}(γ::Float64) where {d}
Define an Euler system governing compressible, adiabatic fluid flow, taking the form
\[\frac{\partial}{\partial t}\left[\begin{array}{c} +\rho(\bm{x}, t) \\ +\rho(\bm{x}, t) V_1(\bm{x}, t) \\ +\vdots \\ +\rho(\bm{x}, t) V_d(\bm{x}, t) \\ +E(\bm{x}, t) +\end{array}\right]+\sum_{m=1}^d \frac{\partial}{\partial x_m}\left[\begin{array}{c} +\rho(\bm{x}, t) V_m(\bm{x}, t) \\ +\rho(\bm{x}, t) V_1(\bm{x}, t) V_m(\bm{x}, t)+P(\bm{x}, t) \delta_{1 m} \\ +\vdots \\ +\rho(\bm{x}, t) V_d(\bm{x}, t) V_m(\bm{x}, t)+P(\bm{x}, t) \delta_{d m} \\ +V_m(\bm{x}, t)(E(\bm{x}, t)+P(\bm{x}, t)) +\end{array}\right]=\underline{0},\]
where $\rho(\bm{x},t) \in \mathbb{R}$ is the fluid density, $\bm{V}(\bm{x},t) \in \mathbb{R}^d$ is the flow velocity, $E(\bm{x},t) \in \mathbb{R}$ is the total energy per unit volume, and the pressure is given for an ideal gas with constant specific heat as
\[P(\bm{x},t) = (\gamma - 1)\Big(E(\bm{x},t) - \frac{1}{2}\rho(\bm{x},t) \lVert \bm{V}(\bm{x},t)\rVert^2\Big).\]
The specific heat ratio is specified as a parameter γ::Float64
, which must be greater than unity.