SpECTRE
v2024.05.11
|
Source generating a modified isentropic vortex. More...
#include <VortexPerturbation.hpp>
Classes | |
struct | PerturbationAmplitude |
The perturbation amplitude. More... | |
Public Types | |
using | options = tmpl::list< PerturbationAmplitude > |
Public Member Functions | |
VortexPerturbation (double perturbation_amplitude) | |
VortexPerturbation (const VortexPerturbation &)=default | |
VortexPerturbation & | operator= (const VortexPerturbation &)=default |
VortexPerturbation (VortexPerturbation &&)=default | |
VortexPerturbation & | operator= (VortexPerturbation &&)=default |
void | pup (PUP::er &p) override |
auto | get_clone () const -> std::unique_ptr< Source< 3 > > override |
void | operator() (gsl::not_null< Scalar< DataVector > * > source_mass_density_cons, gsl::not_null< tnsr::I< DataVector, 3 > * > source_momentum_density, gsl::not_null< Scalar< DataVector > * > source_energy_density, const Scalar< DataVector > &mass_density_cons, const tnsr::I< DataVector, 3 > &momentum_density, const Scalar< DataVector > &energy_density, const tnsr::I< DataVector, 3 > &velocity, const Scalar< DataVector > &pressure, const Scalar< DataVector > &specific_internal_energy, const EquationsOfState::EquationOfState< false, 2 > &eos, const tnsr::I< DataVector, 3 > &coords, double time) const override |
Public Member Functions inherited from NewtonianEuler::Sources::Source< 3 > | |
virtual auto | get_clone () const -> std::unique_ptr< Source >=0 |
virtual void | operator() (gsl::not_null< Scalar< DataVector > * > source_mass_density_cons, gsl::not_null< tnsr::I< DataVector, Dim > * > source_momentum_density, gsl::not_null< Scalar< DataVector > * > source_energy_density, const Scalar< DataVector > &mass_density_cons, const tnsr::I< DataVector, Dim > &momentum_density, const Scalar< DataVector > &energy_density, const tnsr::I< DataVector, Dim > &velocity, const Scalar< DataVector > &pressure, const Scalar< DataVector > &specific_internal_energy, const EquationsOfState::EquationOfState< false, 2 > &eos, const tnsr::I< DataVector, Dim > &coords, double time) const=0 |
Static Public Attributes | |
static constexpr Options::String | help |
Source generating a modified isentropic vortex.
If Solutions::IsentropicVortex is modifed so that the flow velocity along the \(z-\)axis is not a constant but a function of \(z\), the new vortex will be a solution to the 3-D Newtonian Euler equations with a source term,
\begin{align*} \partial_t\rho + \partial_i F^i(\rho) &= S(\rho)\\ \partial_t S^i + \partial_j F^{j}(S^i) &= S(S^i)\\ \partial_t e + \partial_i F^i(e) &= S(e), \end{align*}
where \(F^i(u)\) is the volume flux of the conserved quantity \(u\) (see ComputeFluxes), and
\begin{align*} S(\rho) &= \rho \dfrac{dv_z}{dz}\\ S(S_x) &= S_x \dfrac{dv_z}{dz}\\ S(S_y) &= S_y \dfrac{dv_z}{dz}\\ S(S_z) &= 2S_z \dfrac{dv_z}{dz}\\ S(e) &= \left(e + p + v_z S_z\right)\dfrac{dv_z}{dz}, \end{align*}
where \(\rho\) is the mass density of the vortex, \(S_i\) is its momentum density, \(e\) is its energy density, \(v_z = v_z(z)\) is the \(z-\)component of its velocity, and \(p\) is its pressure. These quantities are readily obtained from the primitive variables, whose expressions are those in Solutions::IsentropicVortex
Currently \(v_z(z)=sin(z)\) is hard-coded.
|
overridevirtual |
Implements NewtonianEuler::Sources::Source< 3 >.
|
staticconstexpr |