Tags.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 #include <string>
8 
11 #include "PointwiseFunctions/Hydro/EquationsOfState/EquationOfState.hpp"
12 #include "PointwiseFunctions/Hydro/TagsDeclarations.hpp"
13 
14 /// \ingroup EvolutionSystemsGroup
15 /// \brief Items related to hydrodynamic systems.
16 namespace hydro {
17 /// %Tags for hydrodynamic systems.
18 namespace Tags {
19 
20 /// The Alfvén speed squared \f$v_A^2\f$.
21 template <typename DataType>
23  using type = Scalar<DataType>;
24  static std::string name() noexcept { return "AlfvenSpeedSquared"; }
25 };
26 
27 /// The magnetic field \f$b^\mu = u_\nu F^{\mu \nu}\f$ measured by an observer
28 /// comoving with the fluid with 4-velocity \f$u_\nu\f$ where \f$F^{\mu \nu}\f$
29 /// is the Faraday tensor.
30 template <typename DataType, size_t Dim, typename Fr>
32  using type = tnsr::A<DataType, Dim, Fr>;
33  static std::string name() noexcept {
34  return Frame::prefix<Fr>() + "ComovingMagneticField";
35  }
36 };
37 
38 /// The square of the comoving magnetic field, \f$b^\mu b_\mu\f$
39 template <typename DataType>
41  using type = Scalar<DataType>;
42  static std::string name() noexcept { return "ComovingMagneticFieldSquared"; }
43 };
44 
45 /// The divergence-cleaning field \f$\Phi\f$.
46 template <typename DataType>
48  using type = Scalar<DataType>;
49  static std::string name() noexcept { return "DivergenceCleaningField"; }
50 };
51 
52 /// Base tag for the equation of state
54 
55 /// The equation of state
56 template <typename EquationOfStateType>
58  using type = EquationOfStateType;
59  static std::string name() noexcept { return "EquationOfState"; }
60 };
61 
62 /// The Lorentz factor \f$W\f$.
63 template <typename DataType>
65  using type = Scalar<DataType>;
66  static std::string name() noexcept { return "LorentzFactor"; }
67 };
68 
69 /// The square of the Lorentz factor \f$W^2\f$.
70 template <typename DataType>
72  using type = Scalar<DataType>;
73  static std::string name() noexcept { return "LorentzFactorSquared"; }
74 };
75 
76 /// The magnetic field \f$B^i = n_\mu F^{i \mu}\f$ measured by an Eulerian
77 /// observer, where \f$n_\mu\f$ is the normal to the spatial hypersurface and
78 /// \f$F^{\mu \nu}\f$ is the Faraday tensor.
79 template <typename DataType, size_t Dim, typename Fr>
81  using type = tnsr::I<DataType, Dim, Fr>;
82  static std::string name() noexcept {
83  return Frame::prefix<Fr>() + "MagneticField";
84  }
85 };
86 
87 /// The magnetic field dotted into the spatial velocity, \f$B^iv_i\f$ where
88 /// \f$v_i\f$ is the spatial velocity oneform.
89 template <typename DataType>
91  using type = Scalar<DataType>;
92  static std::string name() noexcept {
93  return "MagneticFieldDotSpatialVelocity";
94  }
95 };
96 
97 /// The oneform of the magnetic field.
98 /// \see hydro::Tags::MagneticField
99 template <typename DataType, size_t Dim, typename Fr>
101  using type = tnsr::i<DataType, Dim, Fr>;
102  static std::string name() noexcept {
103  return Frame::prefix<Fr>() + "MagneticFieldOneForm";
104  }
105 };
106 
107 /// The square of the magnetic field, \f$B^iB_i\f$
108 template <typename DataType>
110  using type = Scalar<DataType>;
111  static std::string name() noexcept { return "MagneticFieldSquared"; }
112 };
113 
114 /// The magnetic pressure \f$p_m\f$.
115 template <typename DataType>
117  using type = Scalar<DataType>;
118  static std::string name() noexcept { return "MagneticPressure"; }
119 };
120 
121 /// The fluid pressure \f$p\f$.
122 template <typename DataType>
124  using type = Scalar<DataType>;
125  static std::string name() noexcept { return "Pressure"; }
126 };
127 
128 /// The rest-mass density \f$\rho\f$.
129 template <typename DataType>
131  using type = Scalar<DataType>;
132  static std::string name() noexcept { return "RestMassDensity"; }
133 };
134 
135 /// The sound speed squared \f$c_s^2\f$.
136 template <typename DataType>
138  using type = Scalar<DataType>;
139  static std::string name() noexcept { return "SoundSpeedSquared"; }
140 };
141 
142 /// The spatial velocity \f$v^i\f$.
143 template <typename DataType, size_t Dim, typename Fr>
145  using type = tnsr::I<DataType, Dim, Fr>;
146  static std::string name() noexcept {
147  return Frame::prefix<Fr>() + "SpatialVelocity";
148  }
149 };
150 
151 /// The spatial velocity one-form \f$v_i\f$.
152 template <typename DataType, size_t Dim, typename Fr>
154  using type = tnsr::i<DataType, Dim, Fr>;
155  static std::string name() noexcept {
156  return Frame::prefix<Fr>() + "SpatialVelocityOneForm";
157  }
158 };
159 
160 /// The spatial velocity squared \f$v^2 = v_i v^i\f$.
161 template <typename DataType>
163  using type = Scalar<DataType>;
164  static std::string name() noexcept { return "SpatialVelocitySquared"; }
165 };
166 
167 /// The specific enthalpy \f$h\f$.
168 template <typename DataType>
170  using type = Scalar<DataType>;
171  static std::string name() noexcept { return "SpecificEnthalpy"; }
172 };
173 
174 /// The specific internal energy \f$\epsilon\f$.
175 template <typename DataType>
177  using type = Scalar<DataType>;
178  static std::string name() noexcept { return "SpecificInternalEnergy"; }
179 };
180 
181 } // namespace Tags
182 
183 /// The tags for the primitive variables for GRMHD.
184 template <typename DataType>
185 using grmhd_tags =
186  tmpl::list<hydro::Tags::RestMassDensity<DataType>,
194 } // namespace hydro
The magnetic field dotted into the spatial velocity, where is the spatial velocity oneform...
Definition: Tags.hpp:90
The spatial velocity .
Definition: Tags.hpp:144
The fluid pressure .
Definition: Tags.hpp:123
The specific internal energy .
Definition: Tags.hpp:176
The magnetic pressure .
Definition: Tags.hpp:116
The square of the comoving magnetic field, .
Definition: Tags.hpp:40
Base tag for the equation of state.
Definition: Tags.hpp:53
Tags for the DataBox inherit from this type.
Definition: DataBoxTag.hpp:65
The spatial velocity one-form .
Definition: Tags.hpp:153
The square of the magnetic field, .
Definition: Tags.hpp:109
tmpl::list< hydro::Tags::RestMassDensity< DataType >, hydro::Tags::SpecificInternalEnergy< DataType >, hydro::Tags::SpatialVelocity< DataType, 3, Frame::Inertial >, hydro::Tags::MagneticField< DataType, 3, Frame::Inertial >, hydro::Tags::DivergenceCleaningField< DataType >, hydro::Tags::LorentzFactor< DataType >, hydro::Tags::Pressure< DataType >, hydro::Tags::SpecificEnthalpy< DataType > > grmhd_tags
The tags for the primitive variables for GRMHD.
Definition: Tags.hpp:193
The magnetic field measured by an Eulerian observer, where is the normal to the spatial hypersurfac...
Definition: Tags.hpp:80
The divergence-cleaning field .
Definition: Tags.hpp:47
The magnetic field measured by an observer comoving with the fluid with 4-velocity where is the Fa...
Definition: Tags.hpp:31
The oneform of the magnetic field.
Definition: Tags.hpp:100
The square of the Lorentz factor .
Definition: Tags.hpp:71
The Lorentz factor .
Definition: Tags.hpp:64
Definition: DataBoxTag.hpp:29
Defines a list of useful type aliases for tensors.
Items related to hydrodynamic systems.
Definition: LorentzFactor.hpp:13
The rest-mass density .
Definition: Tags.hpp:130
The sound speed squared .
Definition: Tags.hpp:137
The Alfvén speed squared .
Definition: Tags.hpp:22
Tags that are base tags, i.e. a simple or compute tag must derive off them for them to be useful...
Definition: DataBoxTag.hpp:83
Defines classes SimpleTag, PrefixTag, ComputeTag and several functions for retrieving tag info...
The specific enthalpy .
Definition: Tags.hpp:169
Tensor< T, Symmetry<>, index_list<> > Scalar
Scalar type.
Definition: TypeAliases.hpp:21
The spatial velocity squared .
Definition: Tags.hpp:162
The equation of state.
Definition: Tags.hpp:57