17 lines
661 B
C++
17 lines
661 B
C++
#pragma once
|
|
|
|
namespace fluidsim::port {
|
|
|
|
inline constexpr float pi = 3.14159265358979323846f;
|
|
inline constexpr float gamma = 1.4f;
|
|
// PipeSystem.cs stores these as independent float constants rather than
|
|
// deriving them from Gamma at runtime; preserve that rounding in the port.
|
|
inline constexpr float pipe_gm1 = 0.4f;
|
|
inline constexpr float pipe_gm1_inverse = 1.0f / pipe_gm1;
|
|
inline constexpr float gas_constant = 287.0f;
|
|
inline constexpr float ambient_pressure = 101325.0f;
|
|
inline constexpr float ambient_temperature = 300.0f;
|
|
inline constexpr float ambient_density = ambient_pressure / (gas_constant * ambient_temperature);
|
|
|
|
} // namespace fluidsim::port
|