SpECTRE  v2024.04.12
RelativisticEuler::Valencia Namespace Reference

The Valencia formulation of the relativistic Euler System See Chapter 7 of Relativistic Hydrodynamics by Luciano Rezzolla and Olindo Zanotti or http://iopscience.iop.org/article/10.1086/303604. More...

Namespaces

namespace  BoundaryConditions
 Boundary conditions for the relativistic Euler system.
 
namespace  BoundaryCorrections
 Boundary corrections/numerical fluxes.
 
namespace  Tags
 Tags for the Valencia formulation of the relativistic Euler system.
 

Classes

struct  ComputeFluxes
 The fluxes of the conservative variables. More...
 
struct  ComputeLargestCharacteristicSpeed
 
struct  ComputeSources
 Compute the source terms for the flux-conservative Valencia formulation of the relativistic Euler system. More...
 
struct  ConservativeFromPrimitive
 Compute the conservative variables from primitive variables. More...
 
class  FixConservatives
 Fix conservative variables using the method proposed in F. Foucart's PhD thesis (Cornell) More...
 
struct  PrimitiveFromConservative
 Compute the primitive variables from the conservative variables. More...
 
struct  System
 
struct  TimeDerivativeTerms
 Compute the time derivative of the conserved variables for the Valencia formulation of the relativistic Euler equations. More...
 

Functions

template<size_t Dim>
Matrix right_eigenvectors (const Scalar< double > &rest_mass_density, const tnsr::I< double, Dim > &spatial_velocity, const Scalar< double > &specific_internal_energy, const Scalar< double > &pressure, const Scalar< double > &specific_enthalpy, const Scalar< double > &kappa_over_density, const Scalar< double > &sound_speed_squared, const Scalar< double > &lorentz_factor, const tnsr::ii< double, Dim > &spatial_metric, const tnsr::II< double, Dim > &inv_spatial_metric, const Scalar< double > &det_spatial_metric, const tnsr::i< double, Dim > &unit_normal)
 Right eigenvectors of the Valencia formulation. More...
 
template<size_t Dim>
Matrix left_eigenvectors (const Scalar< double > &rest_mass_density, const tnsr::I< double, Dim > &spatial_velocity, const Scalar< double > &specific_internal_energy, const Scalar< double > &pressure, const Scalar< double > &specific_enthalpy, const Scalar< double > &kappa_over_density, const Scalar< double > &sound_speed_squared, const Scalar< double > &lorentz_factor, const tnsr::ii< double, Dim > &spatial_metric, const tnsr::II< double, Dim > &inv_spatial_metric, const Scalar< double > &det_spatial_metric, const tnsr::i< double, Dim > &unit_normal)
 Left eigenvectors of the Valencia formulation. More...
 
template<size_t Dim>
bool operator!= (const FixConservatives< Dim > &lhs, const FixConservatives< Dim > &rhs)
 
template<size_t Dim>
void characteristic_speeds (gsl::not_null< std::array< DataVector, Dim+2 > * > char_speeds, const Scalar< DataVector > &lapse, const tnsr::I< DataVector, Dim > &shift, const tnsr::I< DataVector, Dim > &spatial_velocity, const Scalar< DataVector > &spatial_velocity_squared, const Scalar< DataVector > &sound_speed_squared, const tnsr::i< DataVector, Dim > &normal)
 Compute the characteristic speeds for the Valencia formulation of the relativistic Euler system. More...
 
template<size_t Dim>
std::array< DataVector, Dim+2 > characteristic_speeds (const Scalar< DataVector > &lapse, const tnsr::I< DataVector, Dim > &shift, const tnsr::I< DataVector, Dim > &spatial_velocity, const Scalar< DataVector > &spatial_velocity_squared, const Scalar< DataVector > &sound_speed_squared, const tnsr::i< DataVector, Dim > &normal)
 Compute the characteristic speeds for the Valencia formulation of the relativistic Euler system. More...
 

Detailed Description

The Valencia formulation of the relativistic Euler System See Chapter 7 of Relativistic Hydrodynamics by Luciano Rezzolla and Olindo Zanotti or http://iopscience.iop.org/article/10.1086/303604.

Function Documentation

◆ characteristic_speeds() [1/2]

template<size_t Dim>
std::array< DataVector, Dim+2 > RelativisticEuler::Valencia::characteristic_speeds ( const Scalar< DataVector > &  lapse,
const tnsr::I< DataVector, Dim > &  shift,
const tnsr::I< DataVector, Dim > &  spatial_velocity,
const Scalar< DataVector > &  spatial_velocity_squared,
const Scalar< DataVector > &  sound_speed_squared,
const tnsr::i< DataVector, Dim > &  normal 
)

Compute the characteristic speeds for the Valencia formulation of the relativistic Euler system.

The principal symbol of the system is diagonalized so that the elements of the diagonal matrix are the \((\text{Dim} + 2)\) characteristic speeds

\begin{align*} \lambda_1 &= \alpha \Lambda^- - \beta_n,\\ \lambda_{i + 1} &= \alpha v_n - \beta_n,\quad i = 1,...,\text{Dim}\\ \lambda_{\text{Dim} + 2} &= \alpha \Lambda^+ - \beta_n, \end{align*}

where \(\alpha\) is the lapse, \(\beta_n = n_i \beta^i\) and \(v_n = n_i v^i\) are the projections of the shift \(\beta^i\) and the spatial velocity \(v^i\) onto the normal one-form \(n_i\), respectively, and

\begin{align*} \Lambda^{\pm} &= \dfrac{1}{1 - v^2 c_s^2}\left[ v_n (1- c_s^2) \pm c_s\sqrt{\left(1 - v^2\right)\left[1 - v^2 c_s^2 - v_n^2(1 - c_s^2)\right]} \right], \end{align*}

where \(v^2 = \gamma_{ij}v^iv^j\) is the magnitude squared of the spatial velocity, and \(c_s\) is the sound speed.

◆ characteristic_speeds() [2/2]

template<size_t Dim>
void RelativisticEuler::Valencia::characteristic_speeds ( gsl::not_null< std::array< DataVector, Dim+2 > * >  char_speeds,
const Scalar< DataVector > &  lapse,
const tnsr::I< DataVector, Dim > &  shift,
const tnsr::I< DataVector, Dim > &  spatial_velocity,
const Scalar< DataVector > &  spatial_velocity_squared,
const Scalar< DataVector > &  sound_speed_squared,
const tnsr::i< DataVector, Dim > &  normal 
)

Compute the characteristic speeds for the Valencia formulation of the relativistic Euler system.

The principal symbol of the system is diagonalized so that the elements of the diagonal matrix are the \((\text{Dim} + 2)\) characteristic speeds

\begin{align*} \lambda_1 &= \alpha \Lambda^- - \beta_n,\\ \lambda_{i + 1} &= \alpha v_n - \beta_n,\quad i = 1,...,\text{Dim}\\ \lambda_{\text{Dim} + 2} &= \alpha \Lambda^+ - \beta_n, \end{align*}

where \(\alpha\) is the lapse, \(\beta_n = n_i \beta^i\) and \(v_n = n_i v^i\) are the projections of the shift \(\beta^i\) and the spatial velocity \(v^i\) onto the normal one-form \(n_i\), respectively, and

\begin{align*} \Lambda^{\pm} &= \dfrac{1}{1 - v^2 c_s^2}\left[ v_n (1- c_s^2) \pm c_s\sqrt{\left(1 - v^2\right)\left[1 - v^2 c_s^2 - v_n^2(1 - c_s^2)\right]} \right], \end{align*}

where \(v^2 = \gamma_{ij}v^iv^j\) is the magnitude squared of the spatial velocity, and \(c_s\) is the sound speed.

◆ left_eigenvectors()

template<size_t Dim>
Matrix RelativisticEuler::Valencia::left_eigenvectors ( const Scalar< double > &  rest_mass_density,
const tnsr::I< double, Dim > &  spatial_velocity,
const Scalar< double > &  specific_internal_energy,
const Scalar< double > &  pressure,
const Scalar< double > &  specific_enthalpy,
const Scalar< double > &  kappa_over_density,
const Scalar< double > &  sound_speed_squared,
const Scalar< double > &  lorentz_factor,
const tnsr::ii< double, Dim > &  spatial_metric,
const tnsr::II< double, Dim > &  inv_spatial_metric,
const Scalar< double > &  det_spatial_metric,
const tnsr::i< double, Dim > &  unit_normal 
)

Left eigenvectors of the Valencia formulation.

The principal symbol of the Valencia formulation, \(A\), is diagonalizable, allowing the introduction of characteristic variables \(U_\text{char}\). In terms of the conservative variables \(U\), \(U = RU_\text{char}\) and \(U_\text{char} = LU\), where \(R\) is the matrix whose columns are the right eigenvectors of \(A\), and \(L = R^{-1}\) contains the left eigenvectors as rows. Here we take the ordering \(U = [\tilde D, \tilde \tau, \tilde S_i]^T\). Explicitly, \(L = [L_-\, L_1\, L_2\, L_3\, L_+]^T\), where [Teukolsky, to be published]

\begin{align*} L_\pm &= \dfrac{1}{2h W c_s^2(1 - v_n^2)}\left[\begin{array}{ccc} W(1-v_n^2)\left[c_s^2(h + W) - K(h - W)\right] - c_\pm, & b_\pm, & -a v^i + c_s\left(c_s v_n \pm d\right)n^i \end{array}\right],\\ L_{1,2} &= \dfrac{1}{h\left(1 - v_n^2\right)}\left[\begin{array}{ccc} -v_{(1,2)}, & -v_{(1,2)}, & v_{(1,2)}v_n n^i + (1 - v_n^2)t_{(1,2)}^i \end{array}\right],\\ L_3 &= \dfrac{1}{hc_s^2}\left[\begin{array}{ccc} h - W, & -W, & Wv^i \end{array}\right], \end{align*}

with the definitions

\begin{align*} d &= W\sqrt{1 - v^2c_s^2 - v_n^2(1 - c_s^2)}, \\ a &= W^2\left(1- v_n^2\right)\left(K + c_s^2\right), \\ c_\pm &= c_s\left(c_s \pm v_nd\right), \\ b_\pm &= a - c_\pm. \end{align*}

The rest of the variables are the same as those in Valencia::right_eigenvectors. For numerical purposes, here the quantity \((h - W)\) is computed independently using the expression

\begin{align*} h - W =\epsilon + \frac{p}{\rho} - \frac{W^2v^2}{W + 1}, \end{align*}

which has a well-behaved Newtonian limit.

Following the notation in Valencia::characteristic_speeds, \(L_\pm\) are the eigenvectors of the nondegenerate eigenvalues \((\alpha\Lambda^\pm - \beta_n)\), while \( L_{1,2,3}\) are the eigenvectors of the Dim-fold degenerate eigenvalue \((\alpha v_n - \beta_n)\).

◆ right_eigenvectors()

template<size_t Dim>
Matrix RelativisticEuler::Valencia::right_eigenvectors ( const Scalar< double > &  rest_mass_density,
const tnsr::I< double, Dim > &  spatial_velocity,
const Scalar< double > &  specific_internal_energy,
const Scalar< double > &  pressure,
const Scalar< double > &  specific_enthalpy,
const Scalar< double > &  kappa_over_density,
const Scalar< double > &  sound_speed_squared,
const Scalar< double > &  lorentz_factor,
const tnsr::ii< double, Dim > &  spatial_metric,
const tnsr::II< double, Dim > &  inv_spatial_metric,
const Scalar< double > &  det_spatial_metric,
const tnsr::i< double, Dim > &  unit_normal 
)

Right eigenvectors of the Valencia formulation.

The principal symbol of the Valencia formulation, \(A\), is diagonalizable, allowing the introduction of characteristic variables \(U_\text{char}\). In terms of the conservative variables \(U\), \(U = RU_\text{char}\) and \(U_\text{char} = LU\), where \(R\) is the matrix whose columns are the right eigenvectors of \(A\), and \(L = R^{-1}\) contains the left eigenvectors as rows. Here we take the ordering \(U = [\tilde D, \tilde \tau, \tilde S_i]^T\). Explicitly, \(R = [R_-\, R_1\, R_2\, R_3\, R_+]\), where [Teukolsky, to be published]

\begin{align*} R_\pm = \left[\begin{array}{c} 1 \\ (hW - 1) \pm \dfrac{hW c_s v_n}{d} \\ hW\left(v_i \pm \dfrac{c_s}{d}n_i\right) \end{array}\right],\qquad R_{1,2} = \left[\begin{array}{c} Wv_{(1,2)} \\ W\left(2hW - 1\right)v_{(1,2)} \\ h\left(t_{(1,2)i} + 2W^2v_{(1,2)}v_i \right) \end{array}\right],\qquad R_3 = \left[\begin{array}{c} K \\ K(hW - 1) - hWc_s^2 \\ hW(K - c_s^2)v_i \end{array}\right]. \end{align*}

(One disregards \(R_2\) if working in 2-d, and also \(R_1\) if working in 1-d, so that the number of eigenvectors is always \(\text{Dim} + 2\).) In the above expressions, \(n_i\) is the unit spatial normal along which the characteristic decomposition is carried out, and \(t_{(1,2)}^i\) are unit spatial vectors forming an orthonormal basis with the normal. In addition, \(h\) is the specific enthalpy, \(W\) is the Lorentz factor, \(v^i\) is the spatial velocity, \(v_n = n_i v^i\), \(v_{(1,2)} = v_i t^i_{(1,2)}\), \(c_s\) is the sound speed, \(d = W\sqrt{1 - v^2c_s^2 - v_n^2(1 - c_s^2)}\), \(K = (1/\rho)(\partial p/\partial\epsilon)_\rho\), where \(\rho\) is the rest mass density, \(p\) is the pressure, and \(\epsilon\) is the specific internal energy. Finally, and for numerical purposes, the quantity \((hW - 1)\) is computed independently using the expression

\begin{align*} hW - 1 = W\left(\epsilon + \frac{p}{\rho} + \frac{Wv^2}{W + 1}\right), \end{align*}

which has a well-behaved Newtonian limit.

Following the notation in Valencia::characteristic_speeds, \(R_\pm\) are the eigenvectors of the nondegenerate eigenvalues \((\alpha\Lambda^\pm - \beta_n)\), while \( R_{1,2,3}\) are the eigenvectors of the Dim-fold degenerate eigenvalue \((\alpha v_n - \beta_n)\).