SpECTRE
v2024.05.11
|
Namespace associated with utilities for the combined Generalized Harmonic and Valencia formulation of ideal GRMHD with divergence cleaning systems. More...
Namespaces | |
namespace | BoundaryConditions |
Boundary conditions for the combined Generalized Harmonic and Valencia GRMHD systems. | |
namespace | BoundaryCorrections |
Boundary corrections/numerical fluxes. | |
namespace | fd |
Finite difference functionality for the coupled Generalized Harmonic and ValenciaDivClean equations. | |
namespace | subcell |
Code required by the DG-subcell/FD hybrid solver. | |
namespace | Tags |
Tags for the combined system of the Generalized Harmonic formulation for the Einstein field equations and the Valencia GRMHD formulation. | |
Classes | |
class | NumericInitialData |
Numeric initial data loaded from volume data files. More... | |
struct | SetPiAndPhiFromConstraints |
Set \(\Pi_{ab}\) from the gauge source function. More... | |
struct | System |
struct | TimeDerivativeTerms |
Compute the RHS terms and flux values for both the Generalized Harmonic formulation of Einstein's equations and the Valencia formulation of the GRMHD equations with divergence cleaning. More... | |
Functions | |
void | add_stress_energy_term_to_dt_pi (gsl::not_null< tnsr::aa< DataVector, 3 > * > dt_pi, const tnsr::aa< DataVector, 3 > &trace_reversed_stress_energy, const Scalar< DataVector > &lapse) |
Add in the trace-reversed stress-energy source term to the \(\Pi\) evolved variable of the Generalized Harmonic system. More... | |
void | trace_reversed_stress_energy (gsl::not_null< tnsr::aa< DataVector, 3 > * > stress_energy, gsl::not_null< tnsr::a< DataVector, 3 > * > four_velocity_one_form_buffer, gsl::not_null< tnsr::a< DataVector, 3 > * > comoving_magnetic_field_one_form_buffer, const Scalar< DataVector > &rest_mass_density, const tnsr::i< DataVector, 3, Frame::Inertial > &spatial_velocity_one_form, const tnsr::i< DataVector, 3, Frame::Inertial > &magnetic_field_one_form, const Scalar< DataVector > &magnetic_field_squared, const Scalar< DataVector > &magnetic_field_dot_spatial_velocity, const Scalar< DataVector > &lorentz_factor, const Scalar< DataVector > &one_over_w_squared, const Scalar< DataVector > &pressure, const Scalar< DataVector > &specific_internal_energy, const tnsr::aa< DataVector, 3, Frame::Inertial > &spacetime_metric, const tnsr::I< DataVector, 3, Frame::Inertial > &shift, const Scalar< DataVector > &lapse) |
Calculate the trace-reversed stress-energy tensor \((T_{\mu \nu} - 1/2 g_{\mu \nu} g^{\lambda \sigma} T_{\lambda \sigma}) \) associated with the matter part of the GRMHD system. More... | |
Namespace associated with utilities for the combined Generalized Harmonic and Valencia formulation of ideal GRMHD with divergence cleaning systems.
void grmhd::GhValenciaDivClean::add_stress_energy_term_to_dt_pi | ( | gsl::not_null< tnsr::aa< DataVector, 3 > * > | dt_pi, |
const tnsr::aa< DataVector, 3 > & | trace_reversed_stress_energy, | ||
const Scalar< DataVector > & | lapse | ||
) |
Add in the trace-reversed stress-energy source term to the \(\Pi\) evolved variable of the Generalized Harmonic system.
The only stress energy source term in the Generalized Harmonic evolution equations is in the equation for \(\Pi_{a b}\):
\[ \partial_t \Pi_{ab} + \text{(spatial derivative terms)} = \text{(GH source terms)} - 16 \pi \alpha (T_{ab} - \frac{1}{2} g_{a b} T^c{}_c) \]
(note that this function takes as argument the trace-reversed stress energy tensor)
This function adds that contribution to the existing value of dt_pi
. The spacetime terms in the GH equation should be computed before passing the dt_pi
to this function for updating.
gh::TimeDerivative
for details about the spacetime part of the time derivative calculation. void grmhd::GhValenciaDivClean::trace_reversed_stress_energy | ( | gsl::not_null< tnsr::aa< DataVector, 3 > * > | stress_energy, |
gsl::not_null< tnsr::a< DataVector, 3 > * > | four_velocity_one_form_buffer, | ||
gsl::not_null< tnsr::a< DataVector, 3 > * > | comoving_magnetic_field_one_form_buffer, | ||
const Scalar< DataVector > & | rest_mass_density, | ||
const tnsr::i< DataVector, 3, Frame::Inertial > & | spatial_velocity_one_form, | ||
const tnsr::i< DataVector, 3, Frame::Inertial > & | magnetic_field_one_form, | ||
const Scalar< DataVector > & | magnetic_field_squared, | ||
const Scalar< DataVector > & | magnetic_field_dot_spatial_velocity, | ||
const Scalar< DataVector > & | lorentz_factor, | ||
const Scalar< DataVector > & | one_over_w_squared, | ||
const Scalar< DataVector > & | pressure, | ||
const Scalar< DataVector > & | specific_internal_energy, | ||
const tnsr::aa< DataVector, 3, Frame::Inertial > & | spacetime_metric, | ||
const tnsr::I< DataVector, 3, Frame::Inertial > & | shift, | ||
const Scalar< DataVector > & | lapse | ||
) |
Calculate the trace-reversed stress-energy tensor \((T_{\mu \nu} - 1/2 g_{\mu \nu} g^{\lambda \sigma} T_{\lambda \sigma}) \) associated with the matter part of the GRMHD system.
The stress energy tensor is needed to compute the backreaction of the matter to the spacetime degrees of freedom. The stress energy is calculated as described in [133] :
\[ T_{\mu \nu} = \rho h^* u_\mu u_\nu + p^* g_{\mu \nu} - b_\mu b_\nu, \]
where \(u_\mu\) is the four-velocity, \(\rho\) is the rest mass density, \(h^*\) is the magnetically modified enthalpy, \(p^*\) is the magnetically modified pressure, and \(b_{\mu}\) is the comoving magnetic field (note that we deviate from the notation of [133] by denoting the pressure with a lower-case \(p\) instead of an upper-case \(P\)).
The spatial components of the four velocity \(u_\mu\) are
\[ u_i = W v_i, \]
and the time component is
\[ u_0 = - \alpha W + \beta^i u_i. \]
.
The magnetically modified enthalpy is
\[ h^* = 1 + \epsilon + (p + b^2) / \rho. \]
The magnetically modified pressure is
\[ p^* = p + b^2 / 2. \]
The comoving magnetic field is computed via
\begin{align} b_i &= B_i / W + v_i W v^k B_k\\ b_0 &= - \alpha W v^i B_i + \beta^i b_i \end{align}
Therefore, the trace-reversed stress energy simplifies to
\[ (T_{\mu \nu} - \frac{1}{2} g_{\mu \nu} g^{\lambda \sigma} T_{\lambda \sigma}) = \rho h^* u_\mu u_\nu + \left(\frac{1}{2} \rho h^* - p\right) g_{\mu \nu} - b_\mu b_\nu \]