ryujin
2.1.1 revision ee5cbcbf2346c1299c942d0e1f13b46449973c18
Loading...
Searching...
No Matches
source
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 by the ryujin authors
4
//
5
6
#pragma once
7
8
#include <compile_time_options.h>
9
10
#include "
barotropic_equation_of_state.h
"
11
12
namespace
ryujin
13
{
14
namespace
BarotropicEquationOfStateLibrary
15
{
28
class
Isothermal
:
public
BarotropicEquationOfState
29
{
30
public
:
31
Isothermal
(
const
std::string &subsection)
32
:
BarotropicEquationOfState
(
"isothermal"
, subsection)
33
{
34
speed_of_sound_ = 2.;
35
add_parameter(
"speed of sound"
,
36
speed_of_sound_,
37
"The speed of sound of the isothermal equation of state"
);
38
}
39
40
double
specific_internal_energy
(
double
rho)
const
final
41
{
42
return
speed_of_sound_ * speed_of_sound_ * std::log(rho);
43
}
44
45
double
pressure
(
double
rho)
const
final
46
{
47
return
speed_of_sound_ * speed_of_sound_ * rho;
48
}
49
50
double
speed_of_sound
(
double
/*rho*/
)
const
final
51
{
52
return
speed_of_sound_;
53
}
54
55
private
:
56
double
speed_of_sound_;
57
};
58
}
// namespace BarotropicEquationOfStateLibrary
59
}
// namespace ryujin
barotropic_equation_of_state.h
ryujin::BarotropicEquationOfStateLibrary::BarotropicEquationOfState
Definition
barotropic_equation_of_state.h:30
ryujin::BarotropicEquationOfStateLibrary::Isothermal
Definition
barotropic_equation_of_state_isothermal.h:29
ryujin::BarotropicEquationOfStateLibrary::Isothermal::Isothermal
Isothermal(const std::string &subsection)
Definition
barotropic_equation_of_state_isothermal.h:31
ryujin::BarotropicEquationOfStateLibrary::Isothermal::speed_of_sound
double speed_of_sound(double) const final
Definition
barotropic_equation_of_state_isothermal.h:50
ryujin::BarotropicEquationOfStateLibrary::Isothermal::specific_internal_energy
double specific_internal_energy(double rho) const final
Definition
barotropic_equation_of_state_isothermal.h:40
ryujin::BarotropicEquationOfStateLibrary::Isothermal::pressure
double pressure(double rho) const final
Definition
barotropic_equation_of_state_isothermal.h:45
ryujin
Definition
computing_timer.h:22
Generated by
1.9.8