Port FluidSim core and scenarios to C++20

This commit is contained in:
maxwes08
2026-10-22 23:52:20 +02:00
commit a859740a95
47 changed files with 3851 additions and 0 deletions

View 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