SpECTRE  2021.08.02
NewtonianEuler::Solutions::SmoothFlow< Dim > Class Template Reference

Smooth density wave advecting across the domain. More...

#include <SmoothFlow.hpp>

Public Types

using options = typename smooth_flow::options
 
using source_term_type = Sources::NoSource
 

Public Member Functions

 SmoothFlow (const SmoothFlow &)=delete
 
SmoothFlowoperator= (const SmoothFlow &)=delete
 
 SmoothFlow (SmoothFlow &&) noexcept=default
 
SmoothFlowoperator= (SmoothFlow &&) noexcept=default
 
 SmoothFlow (const std::array< double, Dim > &mean_velocity, const std::array< double, Dim > &wavevector, double pressure, double adiabatic_index, double perturbation_size) noexcept
 
 SmoothFlow (CkMigrateMessage *msg) noexcept
 
template<typename DataType >
tuples::TaggedTuple< Tags::MassDensity< DataType > > variables (const tnsr::I< DataType, Dim > &x, const double t, tmpl::list< Tags::MassDensity< DataType > >) const noexcept
 
template<typename DataType >
tuples::TaggedTuple< Tags::Velocity< DataType, Dim > > variables (const tnsr::I< DataType, Dim > &x, const double t, tmpl::list< Tags::Velocity< DataType, Dim > >) const noexcept
 
template<typename DataType >
tuples::TaggedTuple< Tags::Pressure< DataType > > variables (const tnsr::I< DataType, Dim > &x, const double t, tmpl::list< Tags::Pressure< DataType > >) const noexcept
 
template<typename DataType >
tuples::TaggedTuple< Tags::SpecificInternalEnergy< DataType > > variables (const tnsr::I< DataType, Dim > &x, const double t, tmpl::list< Tags::SpecificInternalEnergy< DataType > >) const noexcept
 
template<typename DataType , typename... Tags>
tuples::TaggedTuple< Tags... > variables (const tnsr::I< DataType, Dim > &x, const double t, tmpl::list< Tags... >) const noexcept
 Retrieve a collection of hydro variables at (x, t)
 
void pup (PUP::er &) noexcept
 

Static Public Attributes

static constexpr Options::String help
 

Friends

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

Detailed Description

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

Smooth density wave advecting across the domain.

A solution with constant pressure and uniform spatial velocity provided that the rest mass density satisfies the advection equation

\begin{align*} \partial_t\rho + v^i\partial_i\rho = 0, \end{align*}

and the specific internal energy is a function of the rest mass density only, \(\epsilon = \epsilon(\rho)\). For testing purposes, this class implements this solution for the case where \(\rho\) is a sine wave. The user specifies the mean flow velocity of the fluid, the wavevector of the density profile, and the amplitude \(A\) of the density profile. In Cartesian coordinates \((x, y, z)\), and using dimensionless units, the primitive variables at a given time \(t\) are then

\begin{align*} \rho(\vec{x},t) &= 1 + A \sin(\vec{k}\cdot(\vec{x} - \vec{v}t)) \\ \vec{v}(\vec{x},t) &= [v_x, v_y, v_z]^{T},\\ P(\vec{x},t) &= P, \\ \epsilon(\vec{x}, t) &= \frac{P}{(\gamma - 1)\rho}\\ \end{align*}

where we have assumed \(\epsilon\) and \(\rho\) to be related through an equation mathematically equivalent to the equation of state of an ideal gas, where the pressure is held constant.

Member Data Documentation

◆ help

template<size_t Dim>
constexpr Options::String NewtonianEuler::Solutions::SmoothFlow< Dim >::help
staticconstexpr
Initial value:
= {
"Smooth density wave advecting across a domain."}