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 
76  // Need lapse, shift, and inverse spatial metric to be projected to the
77  // boundary for Riemann solvers.
79  using argument_tags = tmpl::list<
90  tmpl::size_t<3>, Frame::Inertial>,
92  tmpl::size_t<3>, Frame::Inertial>,
101 
102  static void apply(
103  gsl::not_null<Scalar<DataVector>*> /*non_flux_terms_dt_tilde_d*/,
104  gsl::not_null<Scalar<DataVector>*> non_flux_terms_dt_tilde_tau,
105  gsl::not_null<tnsr::i<DataVector, 3, Frame::Inertial>*>
106  non_flux_terms_dt_tilde_s,
107  gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*>
108  non_flux_terms_dt_tilde_b,
109  gsl::not_null<Scalar<DataVector>*> non_flux_terms_dt_tilde_phi,
110 
111  gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_d_flux,
112  gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_tau_flux,
113  gsl::not_null<tnsr::Ij<DataVector, 3, Frame::Inertial>*> tilde_s_flux,
114  gsl::not_null<tnsr::IJ<DataVector, 3, Frame::Inertial>*> tilde_b_flux,
115  gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_phi_flux,
116 
117  gsl::not_null<tnsr::i<DataVector, 3, Frame::Inertial>*>
118  spatial_velocity_one_form,
119  gsl::not_null<tnsr::i<DataVector, 3, Frame::Inertial>*>
120  magnetic_field_one_form,
121  gsl::not_null<Scalar<DataVector>*> magnetic_field_dot_spatial_velocity,
122  gsl::not_null<Scalar<DataVector>*> magnetic_field_squared,
123  gsl::not_null<Scalar<DataVector>*> one_over_w_squared,
124  gsl::not_null<Scalar<DataVector>*> pressure_star,
126  pressure_star_lapse_sqrt_det_spatial_metric,
127  gsl::not_null<Scalar<DataVector>*> transport_velocity,
128  gsl::not_null<tnsr::i<DataVector, 3, Frame::Inertial>*> lapse_b_over_w,
129 
130  gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_s_up,
131  gsl::not_null<tnsr::II<DataVector, 3, Frame::Inertial>*>
132  densitized_stress,
133  gsl::not_null<tnsr::ijj<DataVector, 3, Frame::Inertial>*>
134  spatial_christoffel_first_kind,
135  gsl::not_null<tnsr::Ijj<DataVector, 3, Frame::Inertial>*>
136  spatial_christoffel_second_kind,
137  gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*>
138  trace_spatial_christoffel_second,
139  gsl::not_null<Scalar<DataVector>*> h_rho_w_squared_plus_b_squared,
140 
141  gsl::not_null<Scalar<DataVector>*> temp_lapse,
142  gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> temp_shift,
143  gsl::not_null<tnsr::II<DataVector, 3, Frame::Inertial>*>
144  temp_inverse_spatial_metric,
145 
146  const Scalar<DataVector>& tilde_d, const Scalar<DataVector>& tilde_tau,
147  const tnsr::i<DataVector, 3, Frame::Inertial>& tilde_s,
148  const tnsr::I<DataVector, 3, Frame::Inertial>& tilde_b,
149  const Scalar<DataVector>& tilde_phi, const Scalar<DataVector>& lapse,
150  const tnsr::I<DataVector, 3, Frame::Inertial>& shift,
151  const Scalar<DataVector>& sqrt_det_spatial_metric,
152  const tnsr::ii<DataVector, 3, Frame::Inertial>& spatial_metric,
153  const tnsr::II<DataVector, 3, Frame::Inertial>& inv_spatial_metric,
154  const tnsr::i<DataVector, 3, Frame::Inertial>& d_lapse,
155  const tnsr::iJ<DataVector, 3, Frame::Inertial>& d_shift,
156  const tnsr::ijj<DataVector, 3, Frame::Inertial>& d_spatial_metric,
157  const Scalar<DataVector>& pressure,
158  const tnsr::I<DataVector, 3, Frame::Inertial>& spatial_velocity,
159  const Scalar<DataVector>& lorentz_factor,
160  const tnsr::I<DataVector, 3, Frame::Inertial>& magnetic_field,
161 
162  const Scalar<DataVector>& rest_mass_density,
163  const Scalar<DataVector>& specific_enthalpy,
164  const tnsr::ii<DataVector, 3, Frame::Inertial>& extrinsic_curvature,
165  double constraint_damping_parameter) noexcept;
166 };
167 } // 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
Mark a struct as a simple tag by inheriting from this.
Definition: Tag.hpp:36
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:88
DataVector
Stores a collection of function values.
Definition: DataVector.hpp:46
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:52
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:116
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: BoundaryCondition.hpp:20
gsl
Implementations from the Guideline Support Library.
Definition: ReadSpecPiecewisePolynomial.hpp:11
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: ReadSpecPiecewisePolynomial.hpp:13
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