ryujin 2.1.1 revision ee5cbcbf2346c1299c942d0e1f13b46449973c18
Loading...
Searching...
No Matches
equation_of_state.h
Go to the documentation of this file.
1//
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3// Copyright (C) 2023 - 2026 by the ryujin authors
4//
5
6#pragma once
7
8#include <compile_time_options.h>
9
10#include "convenience_macros.h"
11
12#include <deal.II/base/exceptions.h>
13#include <deal.II/base/parameter_acceptor.h>
14#include <deal.II/base/tensor.h>
15
16#include <string>
17
18namespace ryujin
19{
20 namespace EquationOfStateLibrary
21 {
28 class EquationOfState : public dealii::ParameterAcceptor
29 {
30 public:
36 EquationOfState(const std::string &name, const std::string &subsection)
37 : ParameterAcceptor(subsection + "/" + name)
38 , name_(name)
39 {
40 /*
41 * Derived EOS can override the covolume constant b.
42 */
44
45 /*
46 * Derived EOS can override the reference pressure that is used in
47 * the interpolatory NASG approach.
48 */
50
51 /*
52 * Derived EOS can override the reference specific internal energy
53 * q that is used in the interpolatory NASG approach.
54 */
56 }
57
64 virtual double pressure(double rho, double e) const = 0;
65
72 virtual double specific_internal_energy(double rho, double p) const = 0;
73
81 virtual double specific_entropy(double /*rho*/, double /*e*/) const
82 {
83 AssertThrow(false, dealii::ExcNotImplemented());
84 __builtin_trap();
85 return 0;
86 }
87
95 virtual double cold_curve_bound(double /*rho*/) const
96 {
97 AssertThrow(false, dealii::ExcNotImplemented());
98 __builtin_trap();
99 return 0;
100 }
101
109 virtual double temperature(double /*rho*/, double /*e*/) const
110 {
111 AssertThrow(false, dealii::ExcNotImplemented());
112 __builtin_trap();
113 return 0;
114 }
115
123 virtual double speed_of_sound(double /*rho*/, double /*e*/) const
124 {
125 AssertThrow(false, dealii::ExcNotImplemented());
126 __builtin_trap();
127 return 0;
128 }
129
133 ACCESSOR_READ_ONLY(covolume_constant)
134
135
138 ACCESSOR_READ_ONLY(interpolation_pinfty)
139
140
143 ACCESSOR_READ_ONLY(interpolation_q)
144
145
149
150 protected:
152
155
156 private:
157 const std::string name_;
158 };
159
160 } // namespace EquationOfStateLibrary
161} /* namespace ryujin */
virtual double specific_internal_energy(double rho, double p) const =0
virtual double pressure(double rho, double e) const =0
virtual double speed_of_sound(double, double) const
virtual double specific_entropy(double, double) const
EquationOfState(const std::string &name, const std::string &subsection)
virtual double temperature(double, double) const
#define ACCESSOR_READ_ONLY(member)