#pragma once #include "FluidSim/EngineConfig.hpp" #include "FluidSim/Fluid.hpp" #include "FluidSim/OutdoorAudio.hpp" #include "FluidSim/Silencer.hpp" #include #include #include #include namespace fluidsim::port { struct ScenarioSnapshot { std::string example_name; EngineLayout layout{EngineLayout::Inline}; float bank_angle{}; bool v8_headers{}; bool staged_headers{}, dual_exhaust{}; PipeSolver pipe_solver{PipeSolver::Rusanov}; int cylinder_count{2}; float rev_limit_rpm{10000}; std::array cylinder_angles{}; std::array cylinder_pressures{}, piston_fractions{}, intake_areas{}, exhaust_areas{}; 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{}; float cylinder_temperature1{}, cylinder_temperature2{}; float cylinder_piston_fraction1{}, cylinder_piston_fraction2{}; float valve1_intake_area{}, valve1_exhaust_area{}, valve2_intake_area{}, valve2_exhaust_area{}; float intake_pressure{}, exhaust_pressure{}, second_bank_pressure{}; std::array crossover_pressures{}; float throttle{}, pedal{}, target_afr{}, clutch{}, intake_flow{}, exhaust_flow{}; bool idle_control{}, fuel_cut{}, ignition_cut{}, two_stroke{}, reed_open{}; bool racing_exhaust{}; bool silencers{}, h_pipe{}; ExhaustConfig exhaust_config{}; float crankcase_pressure{}; OutdoorScene audio_scene{OutdoorScene::Wall}; int gear{}; bool rev_limit1{}, rev_limit2{}; std::array, 32> pipe_states; std::array, 32> pipe_areas, pipe_lengths; void capture_pipes(const std::vector& pipes) { for (std::size_t k = 0; k < pipes.size(); ++k) { pipe_positivity_repairs += pipes[k].positivity_repairs; pipe_areas[k] = pipes[k].cell_areas; pipe_lengths[k] = pipes[k].cell_lengths; pipe_states[k].reserve(pipes[k].cells.size()); for (std::size_t i = 0; i < pipes[k].cells.size(); ++i) pipe_states[k].push_back(pipes[k].state(static_cast(i))); } } }; }