Add American V8 preset, carb fuel transport, and adaptive desktop audio

This commit is contained in:
2026-10-23 12:43:57 +02:00
parent 7a5c77c1c8
commit 85d4fb828a
36 changed files with 805 additions and 144 deletions

View File

@@ -1,10 +1,11 @@
#include "FluidSim/TwoStrokeScenario.hpp"
#include <algorithm>
#include <chrono>
#include <iostream>
using namespace fluidsim::port;
int main() {
std::cout << "exhaust,rpm,shaft_kW,shaft_Nm,firings_per_revolution,repairs,wall_seconds\n";
std::cout << "exhaust,rpm,shaft_kW,shaft_Nm,firings_per_revolution,carb_afr,crankcase_afr,repairs,wall_seconds\n";
for (auto exhaust : {TwoStrokeExhaust::Straight, TwoStrokeExhaust::Racing}) {
for (float rpm : {6000.f, 8000.f, 10000.f, 12000.f, 14000.f, 17000.f}) {
TwoStrokeConfig config;
@@ -31,6 +32,9 @@ int main() {
std::cout << (exhaust == TwoStrokeExhaust::Racing ? "racing" : "straight") << ',' << rpm
<< ',' << power << ',' << torque << ','
<< (s.cylinder.combustion_count()-initial_firings) / (rpm / 120)
<< ',' << s.carburetor.indicated_afr()
<< ',' << s.crankcase.mass() * s.crankcase.air_fraction() /
std::max(s.crankcase.fuel_mass(), 1e-12f)
<< ',' << repairs << ',' << wall << std::endl;
}
}