SpECTRE  v2024.04.12
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 = tmpl::conditional_t< Dim==3, tmpl::list< AdiabaticIndex, Center, MeanVelocity, Strength, PerturbAmplitude >, tmpl::list< AdiabaticIndex, Center, MeanVelocity, Strength > >
 

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 [191]. 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

\begin{align*} \rho &= \left[1 - \dfrac{(\gamma - 1)\beta^2}{8\gamma\pi^2}\exp\left( 1 - r^2\right)\right]^{1/(\gamma - 1)}, \\ v_x &= U - \dfrac{\beta\tilde y}{2\pi}\exp\left(\dfrac{1 - r^2}{2}\right),\\ v_y &= V + \dfrac{\beta\tilde x}{2\pi}\exp\left(\dfrac{1 - r^2}{2}\right),\\ v_z &= W,\\ \epsilon &= \frac{\rho^{\gamma - 1}}{\gamma - 1}, \end{align*}

with

\begin{align*} r^2 &= {\tilde x}^2 + {\tilde y}^2,\\ \tilde x &= x - X_0 - U t,\\ \tilde y &= y - Y_0 - V t, \end{align*}

where \((X_0, Y_0)\) 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, \(\beta\) is the vortex strength, and \(\gamma\) is the adiabatic index. The pressure \(p\) is then obtained from the dimensionless polytropic relation

\begin{align*} p = \rho^\gamma. \end{align*}

On the other hand, if the velocity along the \(z-\)axis 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 \(dv_z/dz\). (See NewtonianEuler::Sources::VortexPerturbation.) For testing purposes, we choose to write the velocity as a uniform field plus a periodic perturbation,

\begin{align*} v_z(z) = W + \epsilon \sin{z}, \end{align*}

where \(\epsilon\) is the amplitude of the perturbation. The resulting source for the Newtonian Euler system will then be proportional to \(\epsilon \cos{z}\).

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: