Improve physical geometry, fluid solvers, audio, and profiling

This commit is contained in:
max
2026-10-30 18:57:56 +01:00
parent bf8621ad39
commit eb2b6366c2
130 changed files with 14649 additions and 862 deletions

View File

@@ -7,10 +7,19 @@
#include <cstdint>
#include <string>
#include <vector>
#include <memory>
namespace fluidsim::port {
struct ScenarioSnapshot {
struct StorageVolume {std::string id;GeometryBox box;float pressure{};};
struct PipeHousing {std::size_t pipe{};float start{},length{},diameter{};};
std::shared_ptr<const PhysicalGeometry> geometry;
std::vector<StorageVolume> storage_volumes;
std::vector<PipeHousing> pipe_housings;
float cylinder_bore{},cylinder_stroke{},cylinder_rod{},cylinder_clearance{};
float intake_valve_diameter{},exhaust_valve_diameter{};
std::string example_name;
float cells_per_meter{};
EngineLayout layout{EngineLayout::Inline};
float bank_angle{};
bool v8_headers{};
@@ -20,6 +29,8 @@ struct ScenarioSnapshot {
float rev_limit_rpm{10000};
std::array<float, 12> cylinder_angles{};
std::array<float, 12> cylinder_pressures{}, piston_fractions{}, intake_areas{}, exhaust_areas{};
std::array<float,12> intake_lifts{},exhaust_lifts{};
std::uint64_t junction_fallbacks{}, junction_iterations{}, boundary_limited_fluxes{}, junction_limited_fluxes{};
std::uint64_t solver_substeps{}, boundary_iterations{}, pipe_positivity_repairs{};
float rpm{}, speed_kmh{}, kinetic_energy{}, average_power{}, average_torque{};
float cylinder_pressure1{}, cylinder_pressure2{};
@@ -30,6 +41,10 @@ struct ScenarioSnapshot {
std::array<float,2> crossover_pressures{};
float throttle{}, pedal{}, target_afr{}, clutch{}, intake_flow{}, exhaust_flow{};
bool idle_control{}, fuel_cut{}, ignition_cut{}, two_stroke{}, reed_open{};
bool valve_float{};
// Cylinder 1 lift over the most recently sampled 720 degree cycle (4 degree bins, metres).
std::array<float,181> intake_cam_lifts{},exhaust_cam_lifts{},intake_lift_trace{},exhaust_lift_trace{};
float intake_lift{},exhaust_lift{},valve_contact_impulse{};
bool racing_exhaust{};
bool silencers{}, h_pipe{};
ExhaustConfig exhaust_config{};