ryujin 2.1.1 revision 46bf70e400e423a8ffffe8300887eeb35b8dfb2c
equation_of_state_pressureless.h
Go to the documentation of this file.
1//
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3// Copyright (C) 2023 by the ryujin authors
4//
5
6#pragma once
7
8#include <compile_time_options.h>
9
10#include "equation_of_state.h"
11
12namespace ryujin
13{
14 namespace EquationOfStateLibrary
15 {
22 {
23 public:
28
29 Pressureless(const std::string &subsection)
30 : EquationOfState("pressureless", subsection)
31 {
32 gamma_ = 7. / 5.;
33 this->add_parameter("gamma", gamma_, "The ratio of specific heats");
34 }
35
42 double pressure(double rho [[maybe_unused]],
43 double e [[maybe_unused]]) const final
44 {
45 return 0.0;
46 }
47
54 double specific_internal_energy(double rho [[maybe_unused]],
55 double p [[maybe_unused]]) const final
56 {
57 return 0.0;
58 }
59
66 double temperature(double /*rho*/, double e [[maybe_unused]]) const final
67 {
68 return 0.0;
69 }
70
77 double speed_of_sound(double /*rho*/,
78 double e [[maybe_unused]]) const final
79 {
80 return 0.0;
81 }
82
83 private:
84 double gamma_;
85 };
86 } // namespace EquationOfStateLibrary
87} // 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 rho, double e) const =0
virtual double temperature(double rho, double e) const =0
double specific_internal_energy(double rho, double p) const final
double pressure(double rho, double e) const final