SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
NewtonianEuler::Sources::VortexPerturbation Class Reference

Source generating a modified isentropic vortex. More...

#include <VortexPerturbation.hpp>

Classes

struct  PerturbationAmplitude
 The perturbation amplitude. More...
 

Public Types

using options = implementation defined
 

Public Member Functions

 VortexPerturbation (double perturbation_amplitude)
 
 VortexPerturbation (const VortexPerturbation &)=default
 
VortexPerturbationoperator= (const VortexPerturbation &)=default
 
 VortexPerturbation (VortexPerturbation &&)=default
 
VortexPerturbationoperator= (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
 

Detailed Description

Source generating a modified isentropic vortex.

If Solutions::IsentropicVortex is modifed so that the flow velocity along the zaxis 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,

tρ+iFi(ρ)=S(ρ)tSi+jFj(Si)=S(Si)te+iFi(e)=S(e),

where Fi(u) is the volume flux of the conserved quantity u (see ComputeFluxes), and

S(ρ)=ρdvzdzS(Sx)=SxdvzdzS(Sy)=SydvzdzS(Sz)=2SzdvzdzS(e)=(e+p+vzSz)dvzdz,

where ρ is the mass density of the vortex, Si is its momentum density, e is its energy density, vz=vz(z) is the zcomponent 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 vz(z)=sin(z) is hard-coded.

Member Function Documentation

◆ get_clone()

auto NewtonianEuler::Sources::VortexPerturbation::get_clone ( ) const -> std::unique_ptr< Source< 3 > >
overridevirtual

Member Data Documentation

◆ help

constexpr Options::String NewtonianEuler::Sources::VortexPerturbation::help
staticconstexpr
Initial value:
= {
"Source terms corresponding to a vortex perturbation. Should be used "
"with the IsentropicVortex solution."}

The documentation for this class was generated from the following file: