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} +
Module ConservationLaws
The ConservationLaws
module defines the systems of partial differential equations which are solved by StableSpectralElements.jl.
Overview
The equations to be solved are defined by subtypes of AbstractConservationLaw
on which functions such as physical_flux
and numerical_flux
are dispatched. Whereas first-order problems (i.e. subtypes of AbstractConservationLaw{d, FirstOrder}
) 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 (i.e. subtypes of AbstractConservationLaw{d, SecondOrder}
) 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.
Reference
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} +\end{aligned}\]
Currently, the linear advection and advection-diffusion equations (LinearAdvectionEquation
and LinearAdvectionDiffusionEquation
), the inviscid and viscous Burgers' equations (InviscidBurgersEquation
and ViscousBurgersEquation
), and the compressible Euler equations (EulerEquations
) 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.
Reference
StableSpectralElements.ConservationLaws.AbstractConservationLaw
— TypeAbstractConservationLaw{d, PDEType, N_c}
Abstract type for a conservation law, where d
is the number of spatial dimensions, PDEType <: AbstractPDEType
is either FirstOrder
or SecondOrder
, and N_c
is the number of conservative variables.
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 \\ @@ -14,4 +14,7 @@ \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 $\gamma$, which must be greater than unity.
Settings
This document was generated with Documenter.jl version 1.7.0 on Saturday 5 October 2024. Using Julia version 1.10.5.
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 $\gamma$, which must be greater than unity.