Add American V8 preset, carb fuel transport, and adaptive desktop audio
This commit is contained in:
@@ -20,6 +20,13 @@ public:
|
||||
float geometry_work() const { return geometry_work_; } // J delivered by gas during the latest geometry step.
|
||||
float mass() const { return mass_; }
|
||||
float air_fraction() const { return air_fraction_; }
|
||||
float fuel_fraction() const { return fuel_fraction_; }
|
||||
float fuel_mass() const { return mass_ * fuel_fraction_; }
|
||||
void initialize_mixture(float afr) {
|
||||
fuel_fraction_ = 1.0f / (1.0f + afr);
|
||||
air_fraction_ = 1.0f - fuel_fraction_;
|
||||
sync_ports();
|
||||
}
|
||||
|
||||
std::vector<Port*> ports() override { return {&intake_port, &transfer_port}; }
|
||||
void pre_step(float dt);
|
||||
@@ -30,7 +37,7 @@ private:
|
||||
float crank_radius_{}, connecting_rod_length_{}, piston_area_{};
|
||||
float clearance_volume_{}, obliquity_{};
|
||||
float geometry_work_{};
|
||||
float mass_{}, energy_{}, air_fraction_{1.0f};
|
||||
float mass_{}, energy_{}, air_fraction_{1.0f}, fuel_fraction_{};
|
||||
float pressure_{101325.0f}, temperature_{300.0f}, volume_{}, previous_volume_{};
|
||||
|
||||
void sync_ports();
|
||||
|
||||
Reference in New Issue
Block a user