Port FluidSim core and scenarios to C++20
This commit is contained in:
16
include/FluidSim/Constants.hpp
Normal file
16
include/FluidSim/Constants.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user