Load engines from TOML and improve scenario audio and carb tuning
Migrate 32 engine definitions into validated startup-loaded TOML files and separate configuration and snapshots from scenario assembly. Add camera-based stereo propagation from shared pipe geometry, preserve exhaust character, tune carburetor mixtures and idle, use ignition cuts for carb engines, and support returning to the scenario menu. Validation: full Windows build and all 14 CTest checks passed.
This commit is contained in:
@@ -5,21 +5,30 @@
|
||||
|
||||
namespace fluidsim::port {
|
||||
|
||||
// Lumped slide-carburetor model for the crankcase-scavenged two-stroke. The
|
||||
// Lumped carburetor shared by two-stroke and four-stroke scenarios. The
|
||||
// jets use liquid-orifice flow from a float bowl into the measured venturi
|
||||
// depression. Delivered fuel is injected into the downstream fluid volume and
|
||||
// is then transported as a conserved species; this class never doses a cylinder.
|
||||
class Carburetor {
|
||||
public:
|
||||
struct CarburetorConfig {
|
||||
float fuel_density{740.0f};
|
||||
float pilot_jet_diameter{0.00040f}, main_jet_diameter{0.00150f};
|
||||
float needle_jet_diameter{0.00190f};
|
||||
// Needle annulus area corrections at configured slide positions; jets meter
|
||||
// liquid fuel from measured pressure, without AFR feedback.
|
||||
float needle_low_scale{1.f}, needle_mid_scale{1.f};
|
||||
float needle_off_idle_scale{1.f}, needle_transition_scale{1.f}, needle_tip_scale{1.f};
|
||||
float needle_quarter_scale{1.f}, needle_upper_scale{1.f};
|
||||
float pilot_transition_scale{1.f}, pilot_tip_scale{1.f};
|
||||
float pilot_discharge_coefficient{0.62f}, main_discharge_coefficient{0.72f};
|
||||
float bowl_head_pressure{};
|
||||
float film_fraction{0.28f}, film_time_constant{0.11f};
|
||||
float bowl_capacity{0.008f}, bowl_refill_rate{0.0025f}; // kg, kg/s
|
||||
float overrun_rpm{4200.0f}, overrun_exit_rpm{3300.0f};
|
||||
|
||||
};
|
||||
|
||||
class Carburetor : public CarburetorConfig {
|
||||
public:
|
||||
explicit Carburetor(float throat_diameter = 0.0381f);
|
||||
|
||||
// air_mass_flow is positive from atmosphere toward the engine.
|
||||
|
||||
Reference in New Issue
Block a user