Physical Quantities  v1.0.0
C++ library of physical quantities, physical models, and units of measure for scientific computing. https://github.com/acodcha/phq
Loading...
Searching...
No Matches
CompressibleNewtonianFluid.hpp
Go to the documentation of this file.
1// Copyright © 2020-2024 Alexandre Coderre-Chabot
2//
3// This file is part of Physical Quantities (PhQ), a C++ library of physical quantities, physical
4// models, and units of measure for scientific computing.
5//
6// Physical Quantities is hosted at:
7// https://github.com/acodcha/phq
8//
9// Physical Quantities is licensed under the MIT License:
10// https://mit-license.org
11//
12// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
13// associated documentation files (the "Software"), to deal in the Software without restriction,
14// including without limitation the rights to use, copy, modify, merge, publish, distribute,
15// sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
16// furnished to do so, subject to the following conditions:
17// - The above copyright notice and this permission notice shall be included in all copies or
18// substantial portions of the Software.
19// - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
20// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
22// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM
23// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
25#ifndef PHQ_CONSTITUTIVE_MODEL_COMPRESSIBLE_NEWTONIAN_FLUID_HPP
26#define PHQ_CONSTITUTIVE_MODEL_COMPRESSIBLE_NEWTONIAN_FLUID_HPP
27
28#include <cstddef>
29#include <functional>
30#include <ostream>
31#include <string>
32
33#include "../Base.hpp"
34#include "../BulkDynamicViscosity.hpp"
35#include "../ConstitutiveModel.hpp"
36#include "../DynamicViscosity.hpp"
37#include "../Strain.hpp"
38#include "../StrainRate.hpp"
39#include "../Stress.hpp"
40#include "../SymmetricDyad.hpp"
41#include "../Unit/Frequency.hpp"
42#include "../Unit/Pressure.hpp"
43
44namespace PhQ {
45
46/// \brief Constitutive model for a compressible Newtonian fluid. This is the simplest constitutive
47/// model for a compressible fluid. It is similar to the model for an incompressible Newtonian
48/// fluid, but also includes the effect of the volumetric component of the strain rate tensor in
49/// addition to its deviatoric component.
50template <typename NumericType = double>
52public:
53 /// \brief Default constructor. Constructs a compressible Newtonian fluid constitutive model with
54 /// an uninitialized dynamic viscosity and bulk dynamic viscosity.
56
57 /// \brief Constructor. Constructs a compressible Newtonian fluid constitutive model from a given
58 /// dynamic viscosity. Initializes the bulk dynamic viscosity to zero.
63
64 /// \brief Constructor. Constructs a compressible Newtonian fluid constitutive model from a given
65 /// dynamic viscosity and bulk dynamic viscosity.
71
72 /// \brief Destructor. Destroys this compressible Newtonian fluid constitutive model.
73 ~CompressibleNewtonianFluid() noexcept override = default;
74
75 /// \brief Copy constructor. Constructs a compressible Newtonian fluid constitutive model by
76 /// copying another one.
77 constexpr CompressibleNewtonianFluid(const CompressibleNewtonianFluid& other) = default;
78
79 /// \brief Move constructor. Constructs a compressible Newtonian fluid constitutive model by
80 /// moving another one.
81 constexpr CompressibleNewtonianFluid(CompressibleNewtonianFluid&& other) noexcept = default;
82
83 /// \brief Copy assignment operator. Assigns this compressible Newtonian fluid constitutive model
84 /// by copying another one.
85 CompressibleNewtonianFluid& operator=(const CompressibleNewtonianFluid& other) = default;
86
87 /// \brief Move assignment operator. Assigns this compressible Newtonian fluid constitutive model
88 /// by moving another one.
89 CompressibleNewtonianFluid& operator=(CompressibleNewtonianFluid&& other) noexcept = default;
90
91 /// \brief Dynamic viscosity of this compressible Newtonian fluid constitutive model.
92 [[nodiscard]] inline constexpr const PhQ::DynamicViscosity<NumericType>&
93 DynamicViscosity() const noexcept {
94 return dynamic_viscosity;
95 }
96
97 /// \brief Bulk dynamic viscosity of this compressible Newtonian fluid constitutive model.
98 [[nodiscard]] inline constexpr const PhQ::BulkDynamicViscosity<NumericType>&
99 BulkDynamicViscosity() const noexcept {
101 }
102
103 /// \brief Returns this constitutive model's type.
104 [[nodiscard]] inline ConstitutiveModel::Type GetType() const noexcept override {
106 }
107
108 /// \brief Returns the stress resulting from a given strain and strain rate. Since this is a
109 /// compressible Newtonian fluid constitutive model, the strain does not contribute to the stress
110 /// and is ignored.
111 [[nodiscard]] inline PhQ::Stress<float> Stress(
112 const PhQ::Strain<float>& /*strain*/,
113 const PhQ::StrainRate<float>& strain_rate) const override {
114 return this->Stress(strain_rate);
115 }
116
117 /// \brief Returns the stress resulting from a given strain and strain rate. Since this is a
118 /// compressible Newtonian fluid constitutive model, the strain does not contribute to the stress
119 /// and is ignored.
120 [[nodiscard]] inline PhQ::Stress<double> Stress(
121 const PhQ::Strain<double>& /*strain*/,
122 const PhQ::StrainRate<double>& strain_rate) const override {
123 return this->Stress(strain_rate);
124 }
125
126 /// \brief Returns the stress resulting from a given strain and strain rate. Since this is a
127 /// compressible Newtonian fluid constitutive model, the strain does not contribute to the stress
128 /// and is ignored.
129 [[nodiscard]] inline PhQ::Stress<long double> Stress(
130 const PhQ::Strain<long double>& /*strain*/,
131 const PhQ::StrainRate<long double>& strain_rate) const override {
132 return this->Stress(strain_rate);
133 }
134
135 /// \brief Returns the stress resulting from a given strain. Since this is a compressible
136 /// Newtonian fluid constitutive model, the strain does not contribute to the stress, so this
137 /// always returns a stress of zero.
138 [[nodiscard]] inline PhQ::Stress<float> Stress(
139 const PhQ::Strain<float>& /*strain*/) const override {
141 }
142
143 /// \brief Returns the stress resulting from a given strain. Since this is a compressible
144 /// Newtonian fluid constitutive model, the strain does not contribute to the stress, so this
145 /// always returns a stress of zero.
146 [[nodiscard]] inline PhQ::Stress<double> Stress(
147 const PhQ::Strain<double>& /*strain*/) const override {
149 }
150
151 /// \brief Returns the stress resulting from a given strain. Since this is a compressible
152 /// Newtonian fluid constitutive model, the strain does not contribute to the stress, so this
153 /// always returns a stress of zero.
154 [[nodiscard]] inline PhQ::Stress<long double> Stress(
155 const PhQ::Strain<long double>& /*strain*/) const override {
157 }
158
159 /// \brief Returns the stress resulting from a given strain rate.
160 [[nodiscard]] inline PhQ::Stress<float> Stress(
161 const PhQ::StrainRate<float>& strain_rate) const override {
162 // stress = a * strain_rate + b * trace(strain_rate) * identity_matrix
163 // a = 2 * dynamic_viscosity
164 // b = bulk_dynamic_viscosity
165 const float a{static_cast<float>(2) * static_cast<float>(dynamic_viscosity.Value())};
166 const float b{static_cast<float>(bulk_dynamic_viscosity.Value())
167 * static_cast<float>(strain_rate.Value().Trace())};
168 return PhQ::Stress<float>{
169 SymmetricDyad<float>{a * static_cast<SymmetricDyad<float>>(strain_rate.Value())}
170 + SymmetricDyad<float>{b, static_cast<float>(0), static_cast<float>(0), b,
171 static_cast<float>(0), b},
172 Standard<Unit::Pressure>
173 };
174 }
175
176 /// \brief Returns the stress resulting from a given strain rate.
177 [[nodiscard]] inline PhQ::Stress<double> Stress(
178 const PhQ::StrainRate<double>& strain_rate) const override {
179 // stress = a * strain_rate + b * trace(strain_rate) * identity_matrix
180 // a = 2 * dynamic_viscosity
181 // b = bulk_dynamic_viscosity
182 const double a{static_cast<double>(2) * static_cast<double>(dynamic_viscosity.Value())};
183 const double b{static_cast<double>(bulk_dynamic_viscosity.Value())
184 * static_cast<double>(strain_rate.Value().Trace())};
185 return PhQ::Stress<double>{
186 SymmetricDyad<double>{a * static_cast<SymmetricDyad<double>>(strain_rate.Value())}
187 + SymmetricDyad<double>{b, static_cast<double>(0), static_cast<double>(0), b,
188 static_cast<double>(0), b},
189 Standard<Unit::Pressure>
190 };
191 }
192
193 /// \brief Returns the stress resulting from a given strain rate.
194 [[nodiscard]] inline PhQ::Stress<long double> Stress(
195 const PhQ::StrainRate<long double>& strain_rate) const override {
196 // stress = a * strain_rate + b * trace(strain_rate) * identity_matrix
197 // a = 2 * dynamic_viscosity
198 // b = bulk_dynamic_viscosity
199 const long double a{
200 static_cast<long double>(2) * static_cast<long double>(dynamic_viscosity.Value())};
201 const long double b{static_cast<long double>(bulk_dynamic_viscosity.Value())
202 * static_cast<long double>(strain_rate.Value().Trace())};
204 SymmetricDyad<long double>{a * static_cast<SymmetricDyad<long double>>(strain_rate.Value())}
205 + SymmetricDyad<long double>{b, static_cast<long double>(0), static_cast<long double>(0),
206 b, static_cast<long double>(0), b},
207 Standard<Unit::Pressure>
208 };
209 }
210
211 /// \brief Returns the strain resulting from a given stress. Since this is a compressible
212 /// Newtonian fluid constitutive model, stress does not depend on strain, so this always returns a
213 /// strain of zero.
214 [[nodiscard]] inline PhQ::Strain<float> Strain(
215 const PhQ::Stress<float>& /*stress*/) const override {
217 }
218
219 /// \brief Returns the strain resulting from a given stress. Since this is a compressible
220 /// Newtonian fluid constitutive model, stress does not depend on strain, so this always returns a
221 /// strain of zero.
222 [[nodiscard]] inline PhQ::Strain<double> Strain(
223 const PhQ::Stress<double>& /*stress*/) const override {
225 }
226
227 /// \brief Returns the strain resulting from a given stress. Since this is a compressible
228 /// Newtonian fluid constitutive model, stress does not depend on strain, so this always returns a
229 /// strain of zero.
230 [[nodiscard]] inline PhQ::Strain<long double> Strain(
231 const PhQ::Stress<long double>& /*stress*/) const override {
233 }
234
235 /// \brief Returns the strain rate resulting from a given stress.
236 [[nodiscard]] inline PhQ::StrainRate<float> StrainRate(
237 const PhQ::Stress<float>& stress) const override {
238 // strain_rate = a * stress + b * trace(stress) * identity_matrix
239 // a = 1 / (2 * dynamic_viscosity)
240 // b = -1 * bulk_dynamic_viscosity /
241 // (2 * dynamic_viscosity * (2 * dynamic_viscosity + 3 * bulk_dynamic_viscosity))
242 const float a{static_cast<float>(1)
243 / (static_cast<float>(2) * static_cast<float>(dynamic_viscosity.Value()))};
244 const float b{
245 static_cast<float>(-bulk_dynamic_viscosity.Value())
246 / (static_cast<float>(2) * static_cast<float>(dynamic_viscosity.Value())
247 * (static_cast<float>(2) * static_cast<float>(dynamic_viscosity.Value())
248 + static_cast<float>(3) * static_cast<float>(bulk_dynamic_viscosity.Value())))};
249 const float c{b * static_cast<float>(stress.Value().Trace())};
251 a * static_cast<SymmetricDyad<float>>(stress.Value())
252 + SymmetricDyad<float>{c, static_cast<float>(0), static_cast<float>(0), c,
253 static_cast<float>(0), c},
254 Standard<Unit::Frequency>
255 };
256 }
257
258 /// \brief Returns the strain rate resulting from a given stress.
260 const PhQ::Stress<double>& stress) const override {
261 // strain_rate = a * stress + b * trace(stress) * identity_matrix
262 // a = 1 / (2 * dynamic_viscosity)
263 // b = -1 * bulk_dynamic_viscosity /
264 // (2 * dynamic_viscosity * (2 * dynamic_viscosity + 3 * bulk_dynamic_viscosity))
265 const double a{static_cast<double>(1)
266 / (static_cast<double>(2) * static_cast<double>(dynamic_viscosity.Value()))};
267 const double b{
268 static_cast<double>(-bulk_dynamic_viscosity.Value())
269 / (static_cast<double>(2) * static_cast<double>(dynamic_viscosity.Value())
270 * (static_cast<double>(2) * static_cast<double>(dynamic_viscosity.Value())
271 + static_cast<double>(3) * static_cast<double>(bulk_dynamic_viscosity.Value())))};
272 const double c{b * static_cast<double>(stress.Value().Trace())};
274 a * static_cast<SymmetricDyad<double>>(stress.Value())
275 + SymmetricDyad<double>{c, static_cast<double>(0), static_cast<double>(0), c,
276 static_cast<double>(0), c},
277 Standard<Unit::Frequency>
278 };
279 }
280
281 /// \brief Returns the strain rate resulting from a given stress.
283 const PhQ::Stress<long double>& stress) const override {
284 // strain_rate = a * stress + b * trace(stress) * identity_matrix
285 // a = 1 / (2 * dynamic_viscosity)
286 // b = -1 * bulk_dynamic_viscosity /
287 // (2 * dynamic_viscosity * (2 * dynamic_viscosity + 3 * bulk_dynamic_viscosity))
288 const long double a{
289 static_cast<long double>(1)
290 / (static_cast<long double>(2) * static_cast<long double>(dynamic_viscosity.Value()))};
291 const long double b{
292 static_cast<long double>(-bulk_dynamic_viscosity.Value())
293 / (static_cast<long double>(2) * static_cast<long double>(dynamic_viscosity.Value())
294 * (static_cast<long double>(2) * static_cast<long double>(dynamic_viscosity.Value())
295 + static_cast<long double>(3)
296 * static_cast<long double>(bulk_dynamic_viscosity.Value())))};
297 const long double c{b * static_cast<long double>(stress.Value().Trace())};
299 a * static_cast<SymmetricDyad<long double>>(stress.Value())
300 + SymmetricDyad<long double>{c, static_cast<long double>(0), static_cast<long double>(0),
301 c, static_cast<long double>(0), c},
302 Standard<Unit::Frequency>
303 };
304 }
305
306 /// \brief Prints this compressible Newtonian fluid constitutive model as a string.
307 [[nodiscard]] inline std::string Print() const override {
308 return {"Type = " + std::string{Abbreviation(this->GetType())}
309 + ", Dynamic Viscosity = " + dynamic_viscosity.Print()
310 + ", Bulk Dynamic Viscosity = " + bulk_dynamic_viscosity.Print()};
311 }
312
313 /// \brief Serializes this compressible Newtonian fluid constitutive model as a JSON message.
314 [[nodiscard]] inline std::string JSON() const override {
315 return {R"({"type":")" + SnakeCase(Abbreviation(this->GetType())) + R"(","dynamic_viscosity":)"
316 + dynamic_viscosity.JSON()
317 + ",\"bulk_dynamic_viscosity\":" + bulk_dynamic_viscosity.JSON() + "}"};
318 }
319
320 /// \brief Serializes this compressible Newtonian fluid constitutive model as an XML message.
321 [[nodiscard]] inline std::string XML() const override {
322 return {"<type>" + SnakeCase(Abbreviation(this->GetType())) + "</type><dynamic_viscosity>"
323 + dynamic_viscosity.XML() + "</dynamic_viscosity><bulk_dynamic_viscosity>"
324 + bulk_dynamic_viscosity.XML() + "</bulk_dynamic_viscosity>"};
325 }
326
327 /// \brief Serializes this compressible Newtonian fluid constitutive model as a YAML message.
328 [[nodiscard]] inline std::string YAML() const override {
329 return {"{type:\"" + SnakeCase(Abbreviation(this->GetType()))
330 + "\",dynamic_viscosity:" + dynamic_viscosity.YAML()
331 + ",bulk_dynamic_viscosity:" + bulk_dynamic_viscosity.YAML() + "}"};
332 }
333
334private:
335 /// \brief Dynamic viscosity of this compressible Newtonian fluid constitutive model.
337
338 /// \brief Bulk dynamic viscosity of this compressible Newtonian fluid constitutive model.
340};
341
342template <typename NumericType>
343inline constexpr bool operator==(
345 const typename ConstitutiveModel::CompressibleNewtonianFluid<NumericType>& right) noexcept {
346 return left.DynamicViscosity() == right.DynamicViscosity()
347 && left.BulkDynamicViscosity() == right.BulkDynamicViscosity();
348}
349
350template <typename NumericType>
351inline constexpr bool operator!=(
353 const typename ConstitutiveModel::CompressibleNewtonianFluid<NumericType>& right) noexcept {
354 return left.DynamicViscosity() != right.DynamicViscosity()
355 || left.BulkDynamicViscosity() != right.BulkDynamicViscosity();
356}
357
358template <typename NumericType>
359inline constexpr bool operator<(
361 const typename ConstitutiveModel::CompressibleNewtonianFluid<NumericType>& right) noexcept {
362 if (left.DynamicViscosity() != right.DynamicViscosity()) {
363 return left.DynamicViscosity() < right.DynamicViscosity();
364 }
365 return left.BulkDynamicViscosity() < right.BulkDynamicViscosity();
366}
367
368template <typename NumericType>
369inline constexpr bool operator>(
371 const typename ConstitutiveModel::CompressibleNewtonianFluid<NumericType>& right) noexcept {
372 if (left.DynamicViscosity() != right.DynamicViscosity()) {
373 return left.DynamicViscosity() > right.DynamicViscosity();
374 }
375 return left.BulkDynamicViscosity() > right.BulkDynamicViscosity();
376}
377
378template <typename NumericType>
379inline constexpr bool operator<=(
381 const typename ConstitutiveModel::CompressibleNewtonianFluid<NumericType>& right) noexcept {
382 return !(left > right);
383}
384
385template <typename NumericType>
386inline constexpr bool operator>=(
388 const typename ConstitutiveModel::CompressibleNewtonianFluid<NumericType>& right) noexcept {
389 return !(left < right);
390}
391
392template <typename NumericType>
393inline std::ostream& operator<<(
394 std::ostream& stream,
396 stream << model.Print();
397 return stream;
398}
399
400} // namespace PhQ
401
402namespace std {
403
404template <typename NumericType>
405struct hash<typename PhQ::ConstitutiveModel::CompressibleNewtonianFluid<NumericType>> {
406 size_t operator()(
408 size_t result{17};
409 result = static_cast<size_t>(31) * result
411 result = static_cast<size_t>(31) * result
413 return result;
414 }
415};
416
417} // namespace std
418
419#endif // PHQ_CONSTITUTIVE_MODEL_COMPRESSIBLE_NEWTONIAN_FLUID_HPP
Bulk dynamic viscosity, also known as volume dynamic viscosity or dilatational dynamic viscosity....
Constitutive model for a compressible Newtonian fluid. This is the simplest constitutive model for a ...
PhQ::Stress< long double > Stress(const PhQ::Strain< long double > &, const PhQ::StrainRate< long double > &strain_rate) const override
Returns the stress resulting from a given strain and strain rate. Since this is a compressible Newton...
PhQ::StrainRate< double > StrainRate(const PhQ::Stress< double > &stress) const override
Returns the strain rate resulting from a given stress.
PhQ::Stress< long double > Stress(const PhQ::StrainRate< long double > &strain_rate) const override
Returns the stress resulting from a given strain rate.
constexpr CompressibleNewtonianFluid(const DynamicViscosity< NumericType > &dynamic_viscosity, const BulkDynamicViscosity< NumericType > &bulk_dynamic_viscosity)
Constructor. Constructs a compressible Newtonian fluid constitutive model from a given dynamic viscos...
std::string YAML() const override
Serializes this compressible Newtonian fluid constitutive model as a YAML message.
constexpr const PhQ::DynamicViscosity< NumericType > & DynamicViscosity() const noexcept
Dynamic viscosity of this compressible Newtonian fluid constitutive model.
PhQ::Strain< float > Strain(const PhQ::Stress< float > &) const override
Returns the strain resulting from a given stress. Since this is a compressible Newtonian fluid consti...
PhQ::Stress< float > Stress(const PhQ::Strain< float > &) const override
Returns the stress resulting from a given strain. Since this is a compressible Newtonian fluid consti...
PhQ::Stress< float > Stress(const PhQ::StrainRate< float > &strain_rate) const override
Returns the stress resulting from a given strain rate.
PhQ::Strain< long double > Strain(const PhQ::Stress< long double > &) const override
Returns the strain resulting from a given stress. Since this is a compressible Newtonian fluid consti...
PhQ::Stress< long double > Stress(const PhQ::Strain< long double > &) const override
Returns the stress resulting from a given strain. Since this is a compressible Newtonian fluid consti...
constexpr CompressibleNewtonianFluid(const DynamicViscosity< NumericType > &dynamic_viscosity)
Constructor. Constructs a compressible Newtonian fluid constitutive model from a given dynamic viscos...
PhQ::Strain< double > Strain(const PhQ::Stress< double > &) const override
Returns the strain resulting from a given stress. Since this is a compressible Newtonian fluid consti...
CompressibleNewtonianFluid()
Default constructor. Constructs a compressible Newtonian fluid constitutive model with an uninitializ...
std::string XML() const override
Serializes this compressible Newtonian fluid constitutive model as an XML message.
PhQ::Stress< double > Stress(const PhQ::Strain< double > &) const override
Returns the stress resulting from a given strain. Since this is a compressible Newtonian fluid consti...
std::string JSON() const override
Serializes this compressible Newtonian fluid constitutive model as a JSON message.
PhQ::BulkDynamicViscosity< NumericType > bulk_dynamic_viscosity
Bulk dynamic viscosity of this compressible Newtonian fluid constitutive model.
PhQ::DynamicViscosity< NumericType > dynamic_viscosity
Dynamic viscosity of this compressible Newtonian fluid constitutive model.
PhQ::StrainRate< long double > StrainRate(const PhQ::Stress< long double > &stress) const override
Returns the strain rate resulting from a given stress.
~CompressibleNewtonianFluid() noexcept override=default
Destructor. Destroys this compressible Newtonian fluid constitutive model.
std::string Print() const override
Prints this compressible Newtonian fluid constitutive model as a string.
ConstitutiveModel::Type GetType() const noexcept override
Returns this constitutive model's type.
PhQ::Stress< double > Stress(const PhQ::Strain< double > &, const PhQ::StrainRate< double > &strain_rate) const override
Returns the stress resulting from a given strain and strain rate. Since this is a compressible Newton...
constexpr const PhQ::BulkDynamicViscosity< NumericType > & BulkDynamicViscosity() const noexcept
Bulk dynamic viscosity of this compressible Newtonian fluid constitutive model.
PhQ::Stress< double > Stress(const PhQ::StrainRate< double > &strain_rate) const override
Returns the stress resulting from a given strain rate.
PhQ::StrainRate< float > StrainRate(const PhQ::Stress< float > &stress) const override
Returns the strain rate resulting from a given stress.
PhQ::Stress< float > Stress(const PhQ::Strain< float > &, const PhQ::StrainRate< float > &strain_rate) const override
Returns the stress resulting from a given strain and strain rate. Since this is a compressible Newton...
Abstract base class for a material's constitutive model, which is a model that defines the relationsh...
Type
Type of a material's constitutive model.
@ CompressibleNewtonianFluid
Compressible Newtonian fluid constitutive model.
constexpr const PhQ::SymmetricDyad< NumericType > & Value() const noexcept
Value of this physical quantity expressed in its standard unit of measure.
Dynamic viscosity, also known as molecular dynamic viscosity. Dynamic viscosity is the relationship b...
Three-dimensional Euclidean strain rate symmetric dyadic tensor. Time rate of change of strain....
Three-dimensional Euclidean strain symmetric dyadic tensor. Contains six components in Cartesian coor...
Definition Strain.hpp:68
static constexpr Strain< NumericType > Zero()
Statically creates a strain tensor of zero.
Definition Strain.hpp:136
Three-dimensional Euclidean Cauchy stress symmetric dyadic tensor. Contains six components in Cartesi...
Definition Stress.hpp:50
static constexpr Stress< NumericType > Zero()
Statically creates a stress tensor of zero.
Definition Stress.hpp:105
Symmetric three-dimensional Euclidean dyadic tensor. Contains six components in Cartesian coordinates...
Namespace that encompasses all of the Physical Quantities library's content.
std::ostream & operator<<(std::ostream &stream, const Acceleration< NumericType > &acceleration)
constexpr bool operator<(const Acceleration< NumericType > &left, const Acceleration< NumericType > &right) noexcept
constexpr bool operator<=(const Acceleration< NumericType > &left, const Acceleration< NumericType > &right) noexcept
constexpr bool operator>(const Acceleration< NumericType > &left, const Acceleration< NumericType > &right) noexcept
constexpr bool operator==(const Acceleration< NumericType > &left, const Acceleration< NumericType > &right) noexcept
constexpr bool operator>=(const Acceleration< NumericType > &left, const Acceleration< NumericType > &right) noexcept
std::string SnakeCase(const std::string_view string)
Returns a copy of the given string in snake case: all characters are lowercase and all spaces are rep...
Definition Base.hpp:263
std::string_view Abbreviation(const Enumeration enumeration)
Returns the abbreviation of a given enumeration value. For example, PhQ::Abbreviation(PhQ::Unit::Time...
Definition Base.hpp:89
constexpr bool operator!=(const Acceleration< NumericType > &left, const Acceleration< NumericType > &right) noexcept