|
SpECTRE
v2026.11.17
|
Items related to the Valencia formulation of ideal GRMHD with divergence cleaning coupled with electron fraction. More...
Namespaces | |
| namespace | BoundaryConditions |
| Boundary conditions for the GRMHD Valencia Divergence Cleaning system. | |
| namespace | BoundaryCorrections |
| Boundary corrections/numerical fluxes. | |
| namespace | fd |
| Finite difference functionality for the ValenciaDivClean form of the GRMHD equations. | |
| namespace | HydroSpeed |
| Labels for the characteristic speeds of the relativistic hydrodynamics system. | |
| namespace | PrimitiveRecoverySchemes |
| Schemes for recovering primitive variables from conservative variables. | |
| namespace | subcell |
| Code required by the DG-subcell/FD hybrid solver. | |
| namespace | Tags |
| Tags for the Valencia formulation of the ideal GRMHD equations with divergence cleaning. | |
Classes | |
| struct | ComputeFluxes |
| The fluxes of the conservative variables. More... | |
| struct | ComputeSources |
| Compute the source terms for the flux-conservative Valencia formulation of GRMHD with divergence cleaning, coupled with electron fraction. More... | |
| struct | ConservativeFromPrimitive |
| Compute the conservative variables from primitive variables. More... | |
| class | FixConservatives |
| Fix conservative variables using method developed by Foucart. More... | |
| class | Flattener |
| Reduces oscillations inside an element in an attempt to guarantee a physical solution of the conserved variables for which the primitive variables can be recovered. More... | |
| class | NumericInitialData |
| Numeric initial data loaded from volume data files. More... | |
| struct | PrimitiveFromConservative |
| Compute the primitive variables from the conservative variables. More... | |
| class | PrimitiveFromConservativeOptions |
| Options to be passed to the Con2Prim algorithm. Currently, we simply set a threshold for tildeD below which the inversion is not performed and the density is set to atmosphere values. More... | |
| struct | SetVariablesNeededFixingToFalse |
| Mutator used with Initialization::Actions::AddSimpleTags to initialize the VariablesNeededFixing to false More... | |
| struct | System |
| Ideal general relativistic magnetohydrodynamics (GRMHD) system with divergence cleaning coupled with electron fraction. More... | |
| struct | TimeDerivativeTerms |
| Compute the time derivative of the conserved variables for the Valencia formulation of the GRMHD equations with divergence cleaning. More... | |
Functions | |
| template<size_t ThermodynamicDim> | |
| void | flux_jacobian_hydro (gsl::not_null< tnsr::iJ< DataVector, 6 > * > characteristic_matrix, const tnsr::I< DataVector, 3, Frame::Inertial > &spatial_velocity, const Scalar< DataVector > &rest_mass_density, const Scalar< DataVector > &specific_internal_energy, const Scalar< DataVector > &electron_fraction, const Scalar< DataVector > &lorentz_factor, const Scalar< DataVector > &specific_enthalpy, const tnsr::ii< DataVector, 3, Frame::Inertial > &spatial_metric, const tnsr::II< DataVector, 3, Frame::Inertial > &inv_spatial_metric, const tnsr::i< DataVector, 3 > &unit_normal, const EquationsOfState::EquationOfState< true, ThermodynamicDim > &equation_of_state) |
| Compute the characteristic matrix (flux Jacobian) for relativistic hydrodynamics + composition ( \(Y_e\)), in a given direction. | |
| template<size_t ThermodynamicDim> | |
| void | numerical_characteristics (gsl::not_null< tnsr::i< DataVector, 6 > * > characteristic_speeds, gsl::not_null< tnsr::ij< DataVector, 6 > * > characteristic_modes, gsl::not_null< tnsr::IJ< DataVector, 6 > * > characteristic_projectors, const tnsr::I< DataVector, 3, Frame::Inertial > &spatial_velocity, const Scalar< DataVector > &rest_mass_density, const Scalar< DataVector > &specific_internal_energy, const Scalar< DataVector > &electron_fraction, const Scalar< DataVector > &lorentz_factor, const Scalar< DataVector > &specific_enthalpy, const tnsr::ii< DataVector, 3, Frame::Inertial > &spatial_metric, const tnsr::II< DataVector, 3, Frame::Inertial > &inv_spatial_metric, const tnsr::i< DataVector, 3 > &unit_normal, const EquationsOfState::EquationOfState< true, ThermodynamicDim > &equation_of_state) |
| Compute numerical characteristic speeds (eigenvalues), characteristic projectors (left eigenvectors), and characteristic modes (right eigenvectors) in a given direction, from the primitive variables. | |
| template<size_t ThermodynamicDim> | |
| void | analytic_characteristics (gsl::not_null< tnsr::i< DataVector, 6 > * > characteristic_speeds, gsl::not_null< tnsr::ij< DataVector, 6 > * > characteristic_modes, gsl::not_null< tnsr::IJ< DataVector, 6 > * > characteristic_projectors, const tnsr::I< DataVector, 3, Frame::Inertial > &spatial_velocity, const Scalar< DataVector > &rest_mass_density, const Scalar< DataVector > &specific_internal_energy, const Scalar< DataVector > &electron_fraction, const Scalar< DataVector > &lorentz_factor, const Scalar< DataVector > &specific_enthalpy, const tnsr::ii< DataVector, 3, Frame::Inertial > &spatial_metric, const tnsr::II< DataVector, 3, Frame::Inertial > &inv_spatial_metric, const tnsr::i< DataVector, 3 > &unit_normal, const EquationsOfState::EquationOfState< true, ThermodynamicDim > &equation_of_state) |
| Compute analytic characteristic speeds (eigenvalues), characteristic projectors (left eigenvectors), and characteristic modes (right eigenvectors) in a given direction, from the primitive variables. | |
| template<typename FluxTags, typename BoundaryVarsType> | |
| void | compute_fluxes_from_primitives (const gsl::not_null< Variables< FluxTags > * > flux_vars, const BoundaryVarsType &boundary_vars) |
| Helper function that computes fluxes from a given set of primitive variables. Primarily used for filling neighbor data when flux information is needed for boundaries. | |
| bool | operator!= (const FixConservatives &lhs, const FixConservatives &rhs) |
| template<typename RecoverySchemesList> | |
| bool | operator!= (const Flattener< RecoverySchemesList > &lhs, const Flattener< RecoverySchemesList > &rhs) |
| bool | operator!= (const PrimitiveFromConservativeOptions &lhs, const PrimitiveFromConservativeOptions &rhs) |
| template<size_t ThermodynamicDim> | |
| std::array< DataVector, 9 > | characteristic_speeds_approximate_mhd (const Scalar< DataVector > &rest_mass_density, const Scalar< DataVector > &electron_fraction, const Scalar< DataVector > &specific_internal_energy, const Scalar< DataVector > &specific_enthalpy, const tnsr::I< DataVector, 3, Frame::Inertial > &spatial_velocity, const Scalar< DataVector > &lorentz_factor, const tnsr::I< DataVector, 3, Frame::Inertial > &magnetic_field, const Scalar< DataVector > &lapse, const tnsr::I< DataVector, 3 > &shift, const tnsr::ii< DataVector, 3, Frame::Inertial > &spatial_metric, const tnsr::i< DataVector, 3 > &unit_normal, const EquationsOfState::EquationOfState< true, ThermodynamicDim > &equation_of_state) |
| Compute the characteristic speeds for the Valencia formulation of GRMHD with divergence cleaning. | |
| template<size_t ThermodynamicDim> | |
| void | characteristic_speeds_approximate_mhd (gsl::not_null< std::array< DataVector, 9 > * > char_speeds, const Scalar< DataVector > &rest_mass_density, const Scalar< DataVector > &electron_fraction, const Scalar< DataVector > &specific_internal_energy, const Scalar< DataVector > &specific_enthalpy, const tnsr::I< DataVector, 3, Frame::Inertial > &spatial_velocity, const Scalar< DataVector > &lorentz_factor, const tnsr::I< DataVector, 3, Frame::Inertial > &magnetic_field, const Scalar< DataVector > &lapse, const tnsr::I< DataVector, 3 > &shift, const tnsr::ii< DataVector, 3, Frame::Inertial > &spatial_metric, const tnsr::i< DataVector, 3 > &unit_normal, const EquationsOfState::EquationOfState< true, ThermodynamicDim > &equation_of_state) |
| Compute the characteristic speeds for the Valencia formulation of GRMHD with divergence cleaning. | |
| template<size_t ThermodynamicDim> | |
| void | characteristic_speeds_hydro (gsl::not_null< tnsr::i< DataVector, 3 > * > characteristic_speeds, const tnsr::I< DataVector, 3, Frame::Inertial > &spatial_velocity, const Scalar< DataVector > &rest_mass_density, const Scalar< DataVector > &specific_internal_energy, const Scalar< DataVector > &electron_fraction, const Scalar< DataVector > &lorentz_factor, const Scalar< DataVector > &specific_enthalpy, const tnsr::ii< DataVector, 3, Frame::Inertial > &spatial_metric, const tnsr::i< DataVector, 3 > &unit_normal, const EquationsOfState::EquationOfState< true, ThermodynamicDim > &equation_of_state) |
| Compute the characteristic speeds for the relativistic hydrodynamics system in the Eulerian frame. | |
| template<size_t ThermodynamicDim> | |
| tnsr::i< DataVector, 3 > | characteristic_speeds_hydro (const tnsr::I< DataVector, 3, Frame::Inertial > &spatial_velocity, const Scalar< DataVector > &rest_mass_density, const Scalar< DataVector > &specific_internal_energy, const Scalar< DataVector > &electron_fraction, const Scalar< DataVector > &lorentz_factor, const Scalar< DataVector > &specific_enthalpy, const tnsr::ii< DataVector, 3, Frame::Inertial > &spatial_metric, const tnsr::i< DataVector, 3 > &unit_normal, const EquationsOfState::EquationOfState< true, ThermodynamicDim > &equation_of_state) |
| Compute the characteristic speeds for the relativistic hydrodynamics system in the Eulerian frame. | |
Items related to the Valencia formulation of ideal GRMHD with divergence cleaning coupled with electron fraction.
References:
| void grmhd::ValenciaDivClean::analytic_characteristics | ( | gsl::not_null< tnsr::i< DataVector, 6 > * > | characteristic_speeds, |
| gsl::not_null< tnsr::ij< DataVector, 6 > * > | characteristic_modes, | ||
| gsl::not_null< tnsr::IJ< DataVector, 6 > * > | characteristic_projectors, | ||
| const tnsr::I< DataVector, 3, Frame::Inertial > & | spatial_velocity, | ||
| const Scalar< DataVector > & | rest_mass_density, | ||
| const Scalar< DataVector > & | specific_internal_energy, | ||
| const Scalar< DataVector > & | electron_fraction, | ||
| const Scalar< DataVector > & | lorentz_factor, | ||
| const Scalar< DataVector > & | specific_enthalpy, | ||
| const tnsr::ii< DataVector, 3, Frame::Inertial > & | spatial_metric, | ||
| const tnsr::II< DataVector, 3, Frame::Inertial > & | inv_spatial_metric, | ||
| const tnsr::i< DataVector, 3 > & | unit_normal, | ||
| const EquationsOfState::EquationOfState< true, ThermodynamicDim > & | equation_of_state ) |
Compute analytic characteristic speeds (eigenvalues), characteristic projectors (left eigenvectors), and characteristic modes (right eigenvectors) in a given direction, from the primitive variables.
It returns the characteristic speeds, modes, and projectors with the same types and ordering as grmhd::ValenciaDivClean::numerical_characteristics, from the closed-form expressions of [207]. The eigenvectors are normalized so that \(\sum_m L^{im} R_{jm} = \delta^{i}_{j}\).
The speeds are \(\lambda_-\), \(v_n\) (four times), and \(\lambda_+\), with \(v_n\), \(\lambda_\pm\), \(W\), \(h\), \(c_s\), and \(d\) as in characteristic_speeds_hydro. In the order \((D, S_j, \tau, D Y_e)\) of flux_jacobian_hydro, the modes and projectors are \(R_{(0)} = R_-\), \(R_{(5)} = R_+\), \(L^{(0)} = L^-\), \(L^{(5)} = L^+\), and
\begin{align} R_\pm &= \left(1,\ h W \left(v_j \pm \frac{c_s}{d} s_j\right),\ h W \left(1 \pm \frac{c_s v_n}{d}\right) - 1,\ Y_e\right), \\ R_{(1,2)} &= \left(W v_{(1,2)},\ h \left(t^{(1,2)}_j + 2 W^2 v_{(1,2)} v_j\right),\ W (2 h W - 1) v_{(1,2)},\ W v_{(1,2)} Y_e\right), \\ R_{(3)} &= \left(\kappa,\ h W (\kappa - \rho c_s^2) v_j,\ h W (\kappa - \rho c_s^2) - \kappa,\ \kappa Y_e\right), \\ R_{(4)} &= (0,\ -\zeta W v_j / \kappa,\ -\zeta W / \kappa,\ 1), \\ L^\pm &= \frac{1}{2 \rho h W c_s^2 (1 - v_n^2)} \left(b_\pm - h W \left(\kappa - \rho c_s^2 + \frac{\zeta Y_e}{h}\right) (1 - v_n^2),\ -a v^j + \rho c_s (c_s v_n \pm d) s^j,\ b_\pm,\ \zeta W (1 - v_n^2)\right), \\ L^{(1,2)} &= \frac{1}{h (1 - v_n^2)} \left(-v_{(1,2)},\ v_{(1,2)} v_n s^j + (1 - v_n^2) t^{(1,2)j},\ -v_{(1,2)},\ 0\right), \\ L^{(3)} &= \frac{1}{\rho h c_s^2} \left(h - W + \frac{\zeta Y_e}{\kappa},\ W v^j,\ -W,\ -\frac{\zeta}{\kappa}\right), \\ L^{(4)} &= (-Y_e,\ 0,\ 0,\ 1), \end{align}
where \(s_j\) is the unit normal, \(t^{(1)}_j\) and \(t^{(2)}_j\) are unit one-forms orthogonal to each other and to \(s_j\) (see orthonormal_oneform), \(v_{(1,2)} = t^{(1,2)}_j v^j\), \(a = W^2 (1 - v_n^2) (\kappa + \rho c_s^2)\), \(b_\pm = a - \rho c_s (c_s \pm v_n d)\), \(\kappa = \partial p / \partial \epsilon |_{\rho, Y_e}\), and \(\zeta = \partial p / \partial Y_e |_{\rho, \epsilon}\).
\(R_{(4)}\) and \(L^{(4)}\) are those of [207] times \(-\zeta W / \kappa\) and its inverse, which keeps them finite as \(\zeta \to 0\). Where \(\zeta = 0\), as for any equation of state with fewer than three thermodynamic variables, we take \(\zeta / \kappa = 0\).
| std::array< DataVector, 9 > grmhd::ValenciaDivClean::characteristic_speeds_approximate_mhd | ( | const Scalar< DataVector > & | rest_mass_density, |
| const Scalar< DataVector > & | electron_fraction, | ||
| const Scalar< DataVector > & | specific_internal_energy, | ||
| const Scalar< DataVector > & | specific_enthalpy, | ||
| const tnsr::I< DataVector, 3, Frame::Inertial > & | spatial_velocity, | ||
| const Scalar< DataVector > & | lorentz_factor, | ||
| const tnsr::I< DataVector, 3, Frame::Inertial > & | magnetic_field, | ||
| const Scalar< DataVector > & | lapse, | ||
| const tnsr::I< DataVector, 3 > & | shift, | ||
| const tnsr::ii< DataVector, 3, Frame::Inertial > & | spatial_metric, | ||
| const tnsr::i< DataVector, 3 > & | unit_normal, | ||
| const EquationsOfState::EquationOfState< true, ThermodynamicDim > & | equation_of_state ) |
Compute the characteristic speeds for the Valencia formulation of GRMHD with divergence cleaning.
Obtaining the exact form of the characteristic speeds involves the solution of a nontrivial quartic equation for the fast and slow modes. Here we make use of a common approximation in the literature (e.g. [87]) where the resulting characteristic speeds are analogous to those of the Valencia formulation of the 3-D relativistic Euler system (see RelativisticEuler::Valencia::characteristic_speeds),
\begin{align*}\lambda_2 &= \alpha \Lambda^- - \beta_n,\\ \lambda_{3, 4, 5, 6, 7} &= \alpha v_n - \beta_n,\\ \lambda_{8} &= \alpha \Lambda^+ - \beta_n, \end{align*}
with the substitution
\begin{align*}c_s^2 \longrightarrow c_s^2 + v_A^2(1 - c_s^2) \end{align*}
in the definition of \(\Lambda^\pm\). Here \(v_A\) is the Alfvén speed. In addition, two more speeds corresponding to the divergence cleaning mode and the longitudinal magnetic field are added,
\begin{align*}\lambda_1 = -\alpha - \beta_n,\\ \lambda_9 = \alpha - \beta_n. \end{align*}
\begin{align*}v^2 &= \gamma_{mn} v^m v^n \\ c_s^2 &= \frac{1}{h} \left[ \left( \frac{\partial p}{\partial \rho} \right)_\epsilon + \frac{p}{\rho^2} \left(\frac{\partial p}{\partial \epsilon} \right)_\rho \right] \\ v_A^2 &= \frac{b^2}{b^2 + \rho h} \\ b^2 &= \frac{1}{W^2} \gamma_{mn} B^m B^n + \left( \gamma_{mn} B^m v^n \right)^2 \end{align*}
where \(\gamma_{mn}\) is the spatial metric, \(\rho\) is the rest mass density, \(W = 1/\sqrt{1-v_i v^i}\) is the Lorentz factor, \(h = 1 + \epsilon + \frac{p}{\rho}\) is the specific enthalpy, \(v^i\) is the spatial velocity, \(\epsilon\) is the specific internal energy, \(p\) is the pressure, and \(B^i\) is the spatial magnetic field measured by an Eulerian observer.
| void grmhd::ValenciaDivClean::characteristic_speeds_approximate_mhd | ( | gsl::not_null< std::array< DataVector, 9 > * > | char_speeds, |
| const Scalar< DataVector > & | rest_mass_density, | ||
| const Scalar< DataVector > & | electron_fraction, | ||
| const Scalar< DataVector > & | specific_internal_energy, | ||
| const Scalar< DataVector > & | specific_enthalpy, | ||
| const tnsr::I< DataVector, 3, Frame::Inertial > & | spatial_velocity, | ||
| const Scalar< DataVector > & | lorentz_factor, | ||
| const tnsr::I< DataVector, 3, Frame::Inertial > & | magnetic_field, | ||
| const Scalar< DataVector > & | lapse, | ||
| const tnsr::I< DataVector, 3 > & | shift, | ||
| const tnsr::ii< DataVector, 3, Frame::Inertial > & | spatial_metric, | ||
| const tnsr::i< DataVector, 3 > & | unit_normal, | ||
| const EquationsOfState::EquationOfState< true, ThermodynamicDim > & | equation_of_state ) |
Compute the characteristic speeds for the Valencia formulation of GRMHD with divergence cleaning.
Obtaining the exact form of the characteristic speeds involves the solution of a nontrivial quartic equation for the fast and slow modes. Here we make use of a common approximation in the literature (e.g. [87]) where the resulting characteristic speeds are analogous to those of the Valencia formulation of the 3-D relativistic Euler system (see RelativisticEuler::Valencia::characteristic_speeds),
\begin{align*}\lambda_2 &= \alpha \Lambda^- - \beta_n,\\ \lambda_{3, 4, 5, 6, 7} &= \alpha v_n - \beta_n,\\ \lambda_{8} &= \alpha \Lambda^+ - \beta_n, \end{align*}
with the substitution
\begin{align*}c_s^2 \longrightarrow c_s^2 + v_A^2(1 - c_s^2) \end{align*}
in the definition of \(\Lambda^\pm\). Here \(v_A\) is the Alfvén speed. In addition, two more speeds corresponding to the divergence cleaning mode and the longitudinal magnetic field are added,
\begin{align*}\lambda_1 = -\alpha - \beta_n,\\ \lambda_9 = \alpha - \beta_n. \end{align*}
\begin{align*}v^2 &= \gamma_{mn} v^m v^n \\ c_s^2 &= \frac{1}{h} \left[ \left( \frac{\partial p}{\partial \rho} \right)_\epsilon + \frac{p}{\rho^2} \left(\frac{\partial p}{\partial \epsilon} \right)_\rho \right] \\ v_A^2 &= \frac{b^2}{b^2 + \rho h} \\ b^2 &= \frac{1}{W^2} \gamma_{mn} B^m B^n + \left( \gamma_{mn} B^m v^n \right)^2 \end{align*}
where \(\gamma_{mn}\) is the spatial metric, \(\rho\) is the rest mass density, \(W = 1/\sqrt{1-v_i v^i}\) is the Lorentz factor, \(h = 1 + \epsilon + \frac{p}{\rho}\) is the specific enthalpy, \(v^i\) is the spatial velocity, \(\epsilon\) is the specific internal energy, \(p\) is the pressure, and \(B^i\) is the spatial magnetic field measured by an Eulerian observer.
| tnsr::i< DataVector, 3 > grmhd::ValenciaDivClean::characteristic_speeds_hydro | ( | const tnsr::I< DataVector, 3, Frame::Inertial > & | spatial_velocity, |
| const Scalar< DataVector > & | rest_mass_density, | ||
| const Scalar< DataVector > & | specific_internal_energy, | ||
| const Scalar< DataVector > & | electron_fraction, | ||
| const Scalar< DataVector > & | lorentz_factor, | ||
| const Scalar< DataVector > & | specific_enthalpy, | ||
| const tnsr::ii< DataVector, 3, Frame::Inertial > & | spatial_metric, | ||
| const tnsr::i< DataVector, 3 > & | unit_normal, | ||
| const EquationsOfState::EquationOfState< true, ThermodynamicDim > & | equation_of_state ) |
Compute the characteristic speeds for the relativistic hydrodynamics system in the Eulerian frame.
These are the eigenvalues of the flux Jacobian projected along a spatial direction with unit normal \( s_i\), measured by an Eulerian observer. They consist of four degenerate modes and two non-degenerate modes:
\begin{align*}\lambda_\mathrm{deg} &= v_n ,\\ \lambda_{\pm} &= \frac{ (1 - c_s^2)\,v_n \pm c_s\,d / W^2 } { 1 - v^2 c_s^2 }. \end{align*}
where
\begin{align*}d &\equiv W\,\sqrt{ 1 - v^2 c_s^2 - v_n^2(1 - c_s^2) } . \end{align*}
The variables are defined as:
\begin{align*}v^2 &= \gamma_{mn} v^m v^n ,\\ v_n &= v^a s_a ,\\ W &= \frac{1}{\sqrt{1 - v^a v_a}} ,\\ h &= 1 + \epsilon + \frac{p}{\rho} ,\\ c_s^2 &= \frac{1}{h}\left(\chi + \kappa \frac{p}{\rho^2}\right) , \end{align*}
The returned tensor has index 0..2, in increasing order (see HydroSpeed):
| void grmhd::ValenciaDivClean::characteristic_speeds_hydro | ( | gsl::not_null< tnsr::i< DataVector, 3 > * > | characteristic_speeds, |
| const tnsr::I< DataVector, 3, Frame::Inertial > & | spatial_velocity, | ||
| const Scalar< DataVector > & | rest_mass_density, | ||
| const Scalar< DataVector > & | specific_internal_energy, | ||
| const Scalar< DataVector > & | electron_fraction, | ||
| const Scalar< DataVector > & | lorentz_factor, | ||
| const Scalar< DataVector > & | specific_enthalpy, | ||
| const tnsr::ii< DataVector, 3, Frame::Inertial > & | spatial_metric, | ||
| const tnsr::i< DataVector, 3 > & | unit_normal, | ||
| const EquationsOfState::EquationOfState< true, ThermodynamicDim > & | equation_of_state ) |
Compute the characteristic speeds for the relativistic hydrodynamics system in the Eulerian frame.
These are the eigenvalues of the flux Jacobian projected along a spatial direction with unit normal \( s_i\), measured by an Eulerian observer. They consist of four degenerate modes and two non-degenerate modes:
\begin{align*}\lambda_\mathrm{deg} &= v_n ,\\ \lambda_{\pm} &= \frac{ (1 - c_s^2)\,v_n \pm c_s\,d / W^2 } { 1 - v^2 c_s^2 }. \end{align*}
where
\begin{align*}d &\equiv W\,\sqrt{ 1 - v^2 c_s^2 - v_n^2(1 - c_s^2) } . \end{align*}
The variables are defined as:
\begin{align*}v^2 &= \gamma_{mn} v^m v^n ,\\ v_n &= v^a s_a ,\\ W &= \frac{1}{\sqrt{1 - v^a v_a}} ,\\ h &= 1 + \epsilon + \frac{p}{\rho} ,\\ c_s^2 &= \frac{1}{h}\left(\chi + \kappa \frac{p}{\rho^2}\right) , \end{align*}
The returned tensor has index 0..2, in increasing order (see HydroSpeed):
| void grmhd::ValenciaDivClean::compute_fluxes_from_primitives | ( | const gsl::not_null< Variables< FluxTags > * > | flux_vars, |
| const BoundaryVarsType & | boundary_vars ) |
Helper function that computes fluxes from a given set of primitive variables. Primarily used for filling neighbor data when flux information is needed for boundaries.
| void grmhd::ValenciaDivClean::flux_jacobian_hydro | ( | gsl::not_null< tnsr::iJ< DataVector, 6 > * > | characteristic_matrix, |
| const tnsr::I< DataVector, 3, Frame::Inertial > & | spatial_velocity, | ||
| const Scalar< DataVector > & | rest_mass_density, | ||
| const Scalar< DataVector > & | specific_internal_energy, | ||
| const Scalar< DataVector > & | electron_fraction, | ||
| const Scalar< DataVector > & | lorentz_factor, | ||
| const Scalar< DataVector > & | specific_enthalpy, | ||
| const tnsr::ii< DataVector, 3, Frame::Inertial > & | spatial_metric, | ||
| const tnsr::II< DataVector, 3, Frame::Inertial > & | inv_spatial_metric, | ||
| const tnsr::i< DataVector, 3 > & | unit_normal, | ||
| const EquationsOfState::EquationOfState< true, ThermodynamicDim > & | equation_of_state ) |
Compute the characteristic matrix (flux Jacobian) for relativistic hydrodynamics + composition ( \(Y_e\)), in a given direction.
The characteristic matrix is the Jacobian of the flux along the unit normal \(n_i\) with respect to the conserved variables \(U_n\),
\begin{equation} A_{m}{}^{n} = \frac{\partial (n_i F^i_m)}{\partial U_n}, \end{equation}
evaluated with unit lapse and zero shift. With lapse \(\alpha\) and shift \(\beta^i\), the physical characteristic speeds are \(\alpha \lambda - \beta_n\), where \(\lambda\) are the eigenvalues of this matrix and \(\beta_n = n_i \beta^i\).
The index \(m\) labels the rows of the matrix (the flux components), and the index \(n\) labels its columns (the conserved variables). Both follow the order \((D, S_i, \tau, D Y_e)\), which differs from the order of the system's variables_tag.
| void grmhd::ValenciaDivClean::numerical_characteristics | ( | gsl::not_null< tnsr::i< DataVector, 6 > * > | characteristic_speeds, |
| gsl::not_null< tnsr::ij< DataVector, 6 > * > | characteristic_modes, | ||
| gsl::not_null< tnsr::IJ< DataVector, 6 > * > | characteristic_projectors, | ||
| const tnsr::I< DataVector, 3, Frame::Inertial > & | spatial_velocity, | ||
| const Scalar< DataVector > & | rest_mass_density, | ||
| const Scalar< DataVector > & | specific_internal_energy, | ||
| const Scalar< DataVector > & | electron_fraction, | ||
| const Scalar< DataVector > & | lorentz_factor, | ||
| const Scalar< DataVector > & | specific_enthalpy, | ||
| const tnsr::ii< DataVector, 3, Frame::Inertial > & | spatial_metric, | ||
| const tnsr::II< DataVector, 3, Frame::Inertial > & | inv_spatial_metric, | ||
| const tnsr::i< DataVector, 3 > & | unit_normal, | ||
| const EquationsOfState::EquationOfState< true, ThermodynamicDim > & | equation_of_state ) |
Compute numerical characteristic speeds (eigenvalues), characteristic projectors (left eigenvectors), and characteristic modes (right eigenvectors) in a given direction, from the primitive variables.
The characteristic speeds \(\lambda_{(i)}\) are the eigenvalues of the characteristic matrix in a given direction, \(A_{m}{}^{n}\). The characteristic projectors \(L^{im}\) and modes \(R_{im}\) are its left and right eigenvectors, with the index conventions of find_real_eigensystem. We provide the characteristics in the following types:
We refer to the left eigenvectors as "projectors" because they are used to project a state into the characteristic basis. Similarly, we refer to the right eigenvectors as "modes" because they are used to reconstruct the state. For example, consider a state vector \(U_{m}\) that can be represented in the characteristic basis as
\begin{equation} U_{m} = \sum_i w^{i} R_{im}. \end{equation}
Then, the characteristic fields \(w^{i}\) can be obtained by projecting the state vector \(U_{m}\) into the characteristic basis using the left eigenvectors:
\begin{equation} w^{i} = \sum_m L^{im} U_{m}. \end{equation}
The eigenvalues are in increasing order. The eigenvectors are normalized so that \(\sum_m L^{im} R_{jm} = \delta^{i}_{j}\). The right eigenvectors are not unit vectors.