SpECTRE  v2024.04.12
grmhd::ValenciaDivClean::PrimitiveRecoverySchemes::NewmanHamlin Class Reference

Compute the primitive variables from the conservative variables using the scheme of Newman and Hamlin, SIAM J. Sci. Comput., 36(4) B661-B683 (2014). More...

#include <NewmanHamlin.hpp>

Static Public Member Functions

template<bool EnforcePhysicality, typename EosType >
static std::optional< PrimitiveRecoveryDataapply (double initial_guess_for_pressure, double tau, double momentum_density_squared, double momentum_density_dot_magnetic_field, double magnetic_field_squared, double rest_mass_density_times_lorentz_factor, double electron_fraction, const EosType &equation_of_state, const grmhd::ValenciaDivClean::PrimitiveFromConservativeOptions &primitive_from_conservative_options)
 
static const std::string name ()
 

Detailed Description

Compute the primitive variables from the conservative variables using the scheme of Newman and Hamlin, SIAM J. Sci. Comput., 36(4) B661-B683 (2014).

In the Newman and Hamlin paper, tau is \(e - \rho W\), momentum_density_squared is \({\cal M}^2\), momentum_density_dot_magnetic_field is \({\cal T}\), magnetic_field_squared is \({\cal B}^2\), and rest_mass_density_times_lorentz_factor is \({\tilde \rho}\). Furthermore, the returned PrimitiveRecoveryData.rho_h_w_squared is \({\cal L}\).

In terms of the conservative variables (in our notation):

\begin{align} e = & \frac{{\tilde D} + {\tilde \tau}}{\sqrt{\gamma}} \\ {\cal M}^2 = & \frac{\gamma^{mn} {\tilde S}_m {\tilde S}_n}{\gamma} \\ {\cal T} = & \frac{{\tilde B}^m {\tilde S}_m}{\gamma} \\ {\cal B}^2 = & \frac{\gamma_{mn} {\tilde B}^m {\tilde B}^n}{\gamma} \\ {\tilde \rho} = & \frac{\tilde D}{\sqrt{\gamma}} \end{align}

where the conserved variables \({\tilde D}\), \({\tilde S}_i\), \({\tilde \tau}\), and \({\tilde B}^i\) are a generalized mass-energy density, momentum density, specific internal energy density, and magnetic field, and \(\gamma\) and \(\gamma^{mn}\) are the determinant and inverse of the spatial metric \(\gamma_{mn}\).


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