SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
grmhd::ValenciaDivClean::ComputeSources Struct Reference

Compute the source terms for the flux-conservative Valencia formulation of GRMHD with divergence cleaning, coupled with electron fraction. More...

#include <Sources.hpp>

Public Types

using return_tags = implementation defined
 
using argument_tags = implementation defined
 

Static Public Member Functions

static void apply (gsl::not_null< Scalar< DataVector > * > source_tilde_tau, gsl::not_null< tnsr::i< DataVector, 3, Frame::Inertial > * > source_tilde_s, gsl::not_null< tnsr::I< DataVector, 3, Frame::Inertial > * > source_tilde_b, gsl::not_null< Scalar< DataVector > * > source_tilde_phi, const Scalar< DataVector > &tilde_d, const Scalar< DataVector > &tilde_ye, const Scalar< DataVector > &tilde_tau, const tnsr::i< DataVector, 3, Frame::Inertial > &tilde_s, const tnsr::I< DataVector, 3, Frame::Inertial > &tilde_b, const Scalar< DataVector > &tilde_phi, const tnsr::I< DataVector, 3, Frame::Inertial > &spatial_velocity, const tnsr::I< DataVector, 3, Frame::Inertial > &magnetic_field, const Scalar< DataVector > &rest_mass_density, const Scalar< DataVector > &electron_fraction, const Scalar< DataVector > &specific_internal_energy, const Scalar< DataVector > &lorentz_factor, const Scalar< DataVector > &pressure, const Scalar< DataVector > &lapse, const tnsr::i< DataVector, 3, Frame::Inertial > &d_lapse, const tnsr::iJ< DataVector, 3, Frame::Inertial > &d_shift, const tnsr::ii< DataVector, 3, Frame::Inertial > &spatial_metric, const tnsr::ijj< DataVector, 3, Frame::Inertial > &d_spatial_metric, const tnsr::II< DataVector, 3, Frame::Inertial > &inv_spatial_metric, const Scalar< DataVector > &sqrt_det_spatial_metric, const tnsr::ii< DataVector, 3, Frame::Inertial > &extrinsic_curvature, double constraint_damping_parameter)
 

Detailed Description

Compute the source terms for the flux-conservative Valencia formulation of GRMHD with divergence cleaning, coupled with electron fraction.

A flux-conservative system has the generic form:

tUi+mFm(Ui)=S(Ui)

where Fa() denotes the flux of a conserved variable Ui and S() denotes the source term for the conserved variable.

For the Valencia formulation:

S(D~)=0S(S~i)=12αS~mniγmn+S~miβm(D~+τ~)iαS(τ~)=αS~mnKmnS~mmαS(B~i)=Φ~γimmα+αΦ~(12γilγjkγijγlk)lγjkS(Φ~)=B~kkααKΦ~ακΦ~

where

S~i=S~mγimS~ij=γ[(hρW2+BnBn)vivj+(p+pm)γijBnvn(Bivj+Bjvi)BiBjW2]

where D~, S~i, τ~, B~i, and Φ~ are a generalized mass-energy density, momentum density, specific internal energy density, magnetic field, and divergence cleaning field. Furthermore, γ is the determinant of the spatial metric γij, ρ is the rest mass density, W is the Lorentz factor, h is the specific enthalpy, vi is the spatial velocity, Bk is the magnetic field, p is the pressure, pm=12[(Bnvn)2+BnBn/W2] is the magnetic pressure, α is the lapse, βi is the shift, K is the trace of the extrinsic curvature Kij, and κ is a damping parameter that damps violations of the divergence-free (no-monopole) condition Φ=iB~i=0 .

Note
For the electron fraction side, the source term is currently set to S(Y~e)=0 where the conserved variable Y~e is a generalized electron fraction. Implementing the source term using neutrino scheme is in progress (Last update : Oct 2022).

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