SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
NewtonianEuler::Solutions::IsentropicVortex< Dim > Class Template Reference

Newtonian isentropic vortex in Cartesian coordinates. More...

#include <IsentropicVortex.hpp>

Classes

struct  AdiabaticIndex
 The adiabatic index of the fluid. More...
 
struct  Center
 The position of the center of the vortex at t=0. More...
 
struct  MeanVelocity
 The mean flow velocity. More...
 
struct  PerturbAmplitude
 The amplitude of the perturbation generating a source term. More...
 
struct  Strength
 The strength of the vortex. More...
 

Public Types

using equation_of_state_type = EquationsOfState::PolytropicFluid< false >
 
using options = implementation defined
 

Public Member Functions

 IsentropicVortex (const IsentropicVortex &)=default
 
IsentropicVortexoperator= (const IsentropicVortex &)=default
 
 IsentropicVortex (IsentropicVortex &&)=default
 
IsentropicVortexoperator= (IsentropicVortex &&)=default
 
auto get_clone () const -> std::unique_ptr< evolution::initial_data::InitialData > override
 
 IsentropicVortex (double adiabatic_index, const std::array< double, Dim > &center, const std::array< double, Dim > &mean_velocity, double strength, double perturbation_amplitude=0.0)
 
template<typename DataType , typename... Tags>
tuples::TaggedTuple< Tags... > variables (const tnsr::I< DataType, Dim, Frame::Inertial > &x, const double t, tmpl::list< Tags... >) const
 Retrieve a collection of hydrodynamic variables at position x and time t.
 
template<typename DataType >
DataType perturbation_profile (const DataType &z) const
 Function of z coordinate to compute the perturbation generating a source term. Public so the corresponding source class can also use it.
 
template<typename DataType >
DataType deriv_of_perturbation_profile (const DataType &z) const
 
double perturbation_amplitude () const
 
const EquationsOfState::PolytropicFluid< false > & equation_of_state () const
 
void pup (PUP::er &) override
 
virtual auto get_clone () const -> std::unique_ptr< InitialData >=0
 

Static Public Attributes

static constexpr Options::String help
 

Friends

template<size_t SpatialDim>
bool operator== (const IsentropicVortex< SpatialDim > &lhs, const IsentropicVortex< SpatialDim > &rhs)
 

Detailed Description

template<size_t Dim>
class NewtonianEuler::Solutions::IsentropicVortex< Dim >

Newtonian isentropic vortex in Cartesian coordinates.

The analytic solution to the 2-D Newtonian Euler system representing the slow advection of an incompressible, isentropic vortex . The initial condition is the superposition of a mean uniform flow with a gaussian-profile vortex. When embedded in 3-D space, the isentropic vortex is still a solution to the corresponding 3-D system if the velocity along the third axis is a constant. In Cartesian coordinates (x,y,z), and using dimensionless units, the primitive quantities at a given time t are then

ρ=[1(γ1)β28γπ2exp(1r2)]1/(γ1),vx=Uβy~2πexp(1r22),vy=V+βx~2πexp(1r22),vz=W,ϵ=ργ1γ1,

with

r2=x~2+y~2,x~=xX0Ut,y~=yY0Vt,

where (X0,Y0) is the position of the vortex on the (x,y) plane at t=0, (U,V,W) are the components of the mean flow velocity, β is the vortex strength, and γ is the adiabatic index. The pressure p is then obtained from the dimensionless polytropic relation

p=ργ.

On the other hand, if the velocity along the zaxis is not a constant but a function of the z coordinate, the resulting modified isentropic vortex is still a solution to the Newtonian Euler system, but with source terms that are proportional to dvz/dz. (See NewtonianEuler::Sources::VortexPerturbation.) For testing purposes, we choose to write the velocity as a uniform field plus a periodic perturbation,

vz(z)=W+ϵsinz,

where ϵ is the amplitude of the perturbation. The resulting source for the Newtonian Euler system will then be proportional to ϵcosz.

Member Function Documentation

◆ get_clone()

template<size_t Dim>
auto NewtonianEuler::Solutions::IsentropicVortex< Dim >::get_clone ( ) const -> std::unique_ptr< evolution::initial_data::InitialData >
overridevirtual

Member Data Documentation

◆ help

template<size_t Dim>
constexpr Options::String NewtonianEuler::Solutions::IsentropicVortex< Dim >::help
staticconstexpr
Initial value:
= {
"Newtonian Isentropic Vortex. Works in 2 and 3 dimensions."}

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