TimeDerivativeTerms.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
9 #include "Evolution/Systems/GrMhd/ValenciaDivClean/TagsDeclarations.hpp"
11 #include "PointwiseFunctions/GeneralRelativity/TagsDeclarations.hpp"
12 #include "PointwiseFunctions/Hydro/TagsDeclarations.hpp"
13 #include "Utilities/TMPL.hpp"
14 
15 /// \cond
16 namespace gsl {
17 template <typename T>
18 class not_null;
19 } // namespace gsl
20 
21 class DataVector;
22 /// \endcond
23 
24 namespace grmhd::ValenciaDivClean {
25 /*!
26  * \brief Compute the time derivative of the conserved variables for the
27  * Valencia formulation of the GRMHD equations with divergence cleaning.
28  */
31  using type = tnsr::i<DataVector, 3, Frame::Inertial>;
32  };
34  using type = tnsr::I<DataVector, 3, Frame::Inertial>;
35  };
37  using type = tnsr::II<DataVector, 3, Frame::Inertial>;
38  };
40  using type = Scalar<DataVector>;
41  };
43  using type = Scalar<DataVector>;
44  };
46  using type = Scalar<DataVector>;
47  };
49  using type = Scalar<DataVector>;
50  };
52  using type = Scalar<DataVector>;
53  };
55  using type = tnsr::i<DataVector, 3, Frame::Inertial>;
56  };
57 
58  using temporary_tags = tmpl::list<
59  // Flux terms
67 
68  // Source terms
73  DataVector>,
75  using argument_tags = tmpl::list<
86  tmpl::size_t<3>, Frame::Inertial>,
88  tmpl::size_t<3>, Frame::Inertial>,
97 
98  static void apply(
99  gsl::not_null<Scalar<DataVector>*> /*non_flux_terms_dt_tilde_d*/,
100  gsl::not_null<Scalar<DataVector>*> non_flux_terms_dt_tilde_tau,
101  gsl::not_null<tnsr::i<DataVector, 3, Frame::Inertial>*>
102  non_flux_terms_dt_tilde_s,
103  gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*>
104  non_flux_terms_dt_tilde_b,
105  gsl::not_null<Scalar<DataVector>*> non_flux_terms_dt_tilde_phi,
106 
107  gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_d_flux,
108  gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_tau_flux,
109  gsl::not_null<tnsr::Ij<DataVector, 3, Frame::Inertial>*> tilde_s_flux,
110  gsl::not_null<tnsr::IJ<DataVector, 3, Frame::Inertial>*> tilde_b_flux,
111  gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_phi_flux,
112 
113  gsl::not_null<tnsr::i<DataVector, 3, Frame::Inertial>*>
114  spatial_velocity_one_form,
115  gsl::not_null<tnsr::i<DataVector, 3, Frame::Inertial>*>
116  magnetic_field_one_form,
117  gsl::not_null<Scalar<DataVector>*> magnetic_field_dot_spatial_velocity,
118  gsl::not_null<Scalar<DataVector>*> magnetic_field_squared,
119  gsl::not_null<Scalar<DataVector>*> one_over_w_squared,
120  gsl::not_null<Scalar<DataVector>*> pressure_star,
122  pressure_star_lapse_sqrt_det_spatial_metric,
123  gsl::not_null<Scalar<DataVector>*> transport_velocity,
124  gsl::not_null<tnsr::i<DataVector, 3, Frame::Inertial>*> lapse_b_over_w,
125 
126  gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_s_up,
127  gsl::not_null<tnsr::II<DataVector, 3, Frame::Inertial>*>
128  densitized_stress,
129  gsl::not_null<tnsr::ijj<DataVector, 3, Frame::Inertial>*>
130  spatial_christoffel_first_kind,
131  gsl::not_null<tnsr::Ijj<DataVector, 3, Frame::Inertial>*>
132  spatial_christoffel_second_kind,
133  gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*>
134  trace_spatial_christoffel_second,
135  gsl::not_null<Scalar<DataVector>*> h_rho_w_squared_plus_b_squared,
136 
137  const Scalar<DataVector>& tilde_d, const Scalar<DataVector>& tilde_tau,
138  const tnsr::i<DataVector, 3, Frame::Inertial>& tilde_s,
139  const tnsr::I<DataVector, 3, Frame::Inertial>& tilde_b,
140  const Scalar<DataVector>& tilde_phi, const Scalar<DataVector>& lapse,
141  const tnsr::I<DataVector, 3, Frame::Inertial>& shift,
142  const Scalar<DataVector>& sqrt_det_spatial_metric,
143  const tnsr::ii<DataVector, 3, Frame::Inertial>& spatial_metric,
144  const tnsr::II<DataVector, 3, Frame::Inertial>& inv_spatial_metric,
145  const tnsr::i<DataVector, 3, Frame::Inertial>& d_lapse,
146  const tnsr::iJ<DataVector, 3, Frame::Inertial>& d_shift,
147  const tnsr::ijj<DataVector, 3, Frame::Inertial>& d_spatial_metric,
148  const Scalar<DataVector>& pressure,
149  const tnsr::I<DataVector, 3, Frame::Inertial>& spatial_velocity,
150  const Scalar<DataVector>& lorentz_factor,
151  const tnsr::I<DataVector, 3, Frame::Inertial>& magnetic_field,
152 
153  const Scalar<DataVector>& rest_mass_density,
154  const Scalar<DataVector>& specific_enthalpy,
155  const tnsr::ii<DataVector, 3, Frame::Inertial>& extrinsic_curvature,
156  double constraint_damping_parameter) noexcept;
157 };
158 } // namespace grmhd::ValenciaDivClean
hydro::Tags::Pressure
The fluid pressure .
Definition: Tags.hpp:119
gr::Tags::SpatialChristoffelSecondKind
Definition: Tags.hpp:79
grmhd::ValenciaDivClean::TimeDerivativeTerms::OneOverLorentzFactorSquared
Definition: TimeDerivativeTerms.hpp:39
hydro::Tags::MagneticFieldDotSpatialVelocity
The magnetic field dotted into the spatial velocity, where is the spatial velocity one-form.
Definition: Tags.hpp:90
DataBoxTag.hpp
Frame::Inertial
Definition: IndexType.hpp:44
gr::Tags::SpatialMetric
Definition: Tags.hpp:26
hydro::Tags::MagneticFieldSquared
The square of the magnetic field, .
Definition: Tags.hpp:107
hydro::Tags::SpatialVelocityOneForm
The spatial velocity one-form , where is raised and lowered with the spatial metric.
Definition: Tags.hpp:152
grmhd::ValenciaDivClean::TimeDerivativeTerms::LapseTimesbOverW
Definition: TimeDerivativeTerms.hpp:54
db::SimpleTag
Tags for the DataBox inherit from this type.
Definition: Tag.hpp:23
grmhd::ValenciaDivClean::TimeDerivativeTerms::DensitizedStress
Definition: TimeDerivativeTerms.hpp:36
gr::lapse
Scalar< DataType > lapse(const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric) noexcept
Compute lapse from shift and spacetime metric.
gr::Tags::SpatialChristoffelFirstKind
Definition: Tags.hpp:75
grmhd::ValenciaDivClean::TimeDerivativeTerms
Compute the time derivative of the conserved variables for the Valencia formulation of the GRMHD equa...
Definition: TimeDerivativeTerms.hpp:29
hydro::Tags::LorentzFactor
The Lorentz factor , where is the spatial velocity of the fluid.
Definition: Tags.hpp:64
hydro::Tags::MagneticFieldOneForm
The one-form of the magnetic field. Note that is raised and lowered with the spatial metric.
Definition: Tags.hpp:98
grmhd::ValenciaDivClean::Tags::TildeS
The densitized momentum density .
Definition: Tags.hpp:42
hydro::Tags::SpecificEnthalpy
The relativistic specific enthalpy .
Definition: Tags.hpp:167
grmhd::ValenciaDivClean::TimeDerivativeTerms::TransportVelocity
Definition: TimeDerivativeTerms.hpp:45
grmhd::ValenciaDivClean::Tags::ConstraintDampingParameter
The constraint damping parameter for divergence cleaning.
Definition: Tags.hpp:82
DataVector
Stores a collection of function values.
Definition: DataVector.hpp:42
gr::Tags::Shift
Definition: Tags.hpp:48
grmhd::ValenciaDivClean::TimeDerivativeTerms::TildeSUp
Definition: TimeDerivativeTerms.hpp:33
grmhd::ValenciaDivClean::Tags::TildeB
The densitized magnetic field .
Definition: Tags.hpp:49
Variables.hpp
gr::shift
tnsr::I< DataType, SpatialDim, Frame > shift(const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) noexcept
Compute shift from spacetime metric and inverse spatial metric.
Scalar
Tensor< T, Symmetry<>, index_list<> > Scalar
Definition: TypeAliases.hpp:21
grmhd::ValenciaDivClean::TimeDerivativeTerms::EnthalpyTimesDensityWSquaredPlusBSquared
Definition: TimeDerivativeTerms.hpp:51
TypeAliases.hpp
hydro::Tags::SpatialVelocity
The spatial velocity of the fluid, where . Here is the spatial part of the 4-velocity of the fluid,...
Definition: Tags.hpp:142
hydro::Tags::MagneticField
The magnetic field measured by an Eulerian observer, where is the normal to the spatial hypersurfac...
Definition: Tags.hpp:80
Tags::deriv
Prefix indicating spatial derivatives.
Definition: PartialDerivatives.hpp:53
gr::spatial_metric
tnsr::ii< DataType, SpatialDim, Frame > spatial_metric(const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric) noexcept
Compute spatial metric from spacetime metric.
grmhd::ValenciaDivClean::Tags::TildeD
The densitized rest-mass density .
Definition: Tags.hpp:31
grmhd::ValenciaDivClean::TimeDerivativeTerms::PressureStarLapseSqrtDetSpatialMetric
Definition: TimeDerivativeTerms.hpp:42
grmhd::ValenciaDivClean::Tags::TildePhi
The densitized divergence-cleaning field .
Definition: Tags.hpp:55
gr::Tags::ExtrinsicCurvature
Definition: Tags.hpp:110
grmhd::ValenciaDivClean::TimeDerivativeTerms::MagneticFieldOneForm
Definition: TimeDerivativeTerms.hpp:30
PartialDerivatives.hpp
gr::Tags::TraceSpatialChristoffelSecondKind
Definition: Tags.hpp:105
grmhd::ValenciaDivClean
The Valencia formulation of ideal GRMHD with divergence cleaning.
Definition: Characteristics.hpp:35
gsl
Implementations from the Guideline Support Library.
Definition: Gsl.hpp:80
gr::Tags::Lapse
Definition: Tags.hpp:52
TMPL.hpp
StrahlkorperGr::extrinsic_curvature
void extrinsic_curvature(gsl::not_null< tnsr::ii< DataVector, 3, Frame > * > result, const tnsr::ii< DataVector, 3, Frame > &grad_normal, const tnsr::i< DataVector, 3, Frame > &unit_normal_one_form, const tnsr::I< DataVector, 3, Frame > &unit_normal_vector) noexcept
Extrinsic curvature of a 2D Strahlkorper embedded in a 3D space.
gr::Tags::InverseSpatialMetric
Inverse of the spatial metric.
Definition: Tags.hpp:33
gsl::not_null
Require a pointer to not be a nullptr
Definition: Gsl.hpp:183
hydro::Tags::RestMassDensity
The rest-mass density .
Definition: Tags.hpp:125
grmhd::ValenciaDivClean::Tags::TildeTau
The densitized energy density .
Definition: Tags.hpp:36
grmhd::ValenciaDivClean::TimeDerivativeTerms::PressureStar
Definition: TimeDerivativeTerms.hpp:48
gr::Tags::SqrtDetSpatialMetric
Definition: Tags.hpp:44