ryujin 2.5.0 revision c64172211cf21344cb9b9b0f3a1266aa6400d392
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 <ryujin/base/compile_time_options.h>
10
11#include <deal.II/base/exceptions.h>
12#include <deal.II/base/parameter_acceptor.h>
13#include <deal.II/base/tensor.h>
14
15#include <string>
16
17namespace ryujin
18{
25 class EquationOfState : public dealii::ParameterAcceptor
26 {
27 public:
33 EquationOfState(const std::string &name, const std::string &subsection)
34 : ParameterAcceptor(subsection + "/" + name)
35 , name_(name)
36 {
37 /*
38 * Derived EOS can override the covolume constant b.
39 */
41
42 /*
43 * Derived EOS can override the reference pressure that is used in
44 * the interpolatory NASG approach.
45 */
47
48 /*
49 * Derived EOS can override the reference specific internal energy
50 * q that is used in the interpolatory NASG approach.
51 */
53 }
54
61 virtual double pressure(double rho, double e) const = 0;
62
69 virtual double specific_internal_energy(double rho, double p) const = 0;
70
78 virtual double specific_entropy(double /*rho*/, double /*e*/) const
79 {
80 AssertThrow(false, dealii::ExcNotImplemented());
81 __builtin_trap();
82 return 0;
83 }
84
92 virtual double cold_curve_bound(double /*rho*/) const
93 {
94 AssertThrow(false, dealii::ExcNotImplemented());
95 __builtin_trap();
96 return 0;
97 }
98
106 virtual double temperature(double /*rho*/, double /*e*/) const
107 {
108 AssertThrow(false, dealii::ExcNotImplemented());
109 __builtin_trap();
110 return 0;
111 }
112
120 virtual double speed_of_sound(double /*rho*/, double /*e*/) const
121 {
122 AssertThrow(false, dealii::ExcNotImplemented());
123 __builtin_trap();
124 return 0;
125 }
126
130 ACCESSOR_READ_ONLY(covolume_constant)
131
132
135 ACCESSOR_READ_ONLY(interpolation_pinfty)
136
137
140 ACCESSOR_READ_ONLY(interpolation_q)
141
142
146
147 protected:
149
152
153 private:
154 const std::string name_;
155 };
156} // namespace ryujin
virtual double pressure(double rho, double e) const =0
virtual double temperature(double, double) const
virtual double cold_curve_bound(double) const
virtual double specific_entropy(double, double) const
virtual double speed_of_sound(double, double) const
virtual double specific_internal_energy(double rho, double p) const =0
EquationOfState(const std::string &name, const std::string &subsection)
#define ACCESSOR_READ_ONLY(member)