ryujin
2.5.0 revision c64172211cf21344cb9b9b0f3a1266aa6400d392
Loading...
Searching...
No Matches
include
ryujin
euler_barotropic
barotropic_equation_of_state_isothermal.h
Go to the documentation of this file.
1
//
2
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3
// Copyright (C) 2025 - 2026 by the ryujin authors
4
//
5
6
#pragma once
7
8
#include <ryujin/base/compile_time_options.h>
9
#include <
ryujin/euler_barotropic/barotropic_equation_of_state.h
>
10
11
namespace
ryujin
12
{
13
namespace
BarotropicEquationsOfState
14
{
27
class
Isothermal
:
public
BarotropicEquationOfState
28
{
29
public
:
30
Isothermal
(
const
std::string &subsection)
31
:
BarotropicEquationOfState
(
"isothermal"
, subsection)
32
{
33
speed_of_sound_ = 2.;
34
add_parameter(
"speed of sound"
,
35
speed_of_sound_,
36
"The speed of sound of the isothermal equation of state"
);
37
}
38
39
double
specific_internal_energy
(
double
rho)
const
final
40
{
41
return
speed_of_sound_ * speed_of_sound_ * std::log(rho);
42
}
43
44
double
pressure
(
double
rho)
const
final
45
{
46
return
speed_of_sound_ * speed_of_sound_ * rho;
47
}
48
49
double
speed_of_sound
(
double
/*rho*/
)
const
final
50
{
51
return
speed_of_sound_;
52
}
53
54
private
:
55
double
speed_of_sound_;
56
};
57
}
// namespace BarotropicEquationsOfState
58
}
// namespace ryujin
barotropic_equation_of_state.h
ryujin::BarotropicEquationOfState
Definition
barotropic_equation_of_state.h:27
ryujin::BarotropicEquationsOfState::Isothermal
Definition
barotropic_equation_of_state_isothermal.h:28
ryujin::BarotropicEquationsOfState::Isothermal::specific_internal_energy
double specific_internal_energy(double rho) const final
Definition
barotropic_equation_of_state_isothermal.h:39
ryujin::BarotropicEquationsOfState::Isothermal::speed_of_sound
double speed_of_sound(double) const final
Definition
barotropic_equation_of_state_isothermal.h:49
ryujin::BarotropicEquationsOfState::Isothermal::pressure
double pressure(double rho) const final
Definition
barotropic_equation_of_state_isothermal.h:44
ryujin::BarotropicEquationsOfState::Isothermal::Isothermal
Isothermal(const std::string &subsection)
Definition
barotropic_equation_of_state_isothermal.h:30
ryujin
Definition
computing_timer.h:22
Generated by
1.9.8