Add turbocharged twin scenario and cross-platform test harness
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "FluidSim/Crankcase.hpp"
|
||||
#include <cstdint>
|
||||
|
||||
namespace fluidsim::port {
|
||||
|
||||
@@ -18,6 +19,9 @@ public:
|
||||
float exhaust_open() const { return 180.0f - exhaust_duration_ * 0.5f; }
|
||||
float exhaust_close() const { return 180.0f + exhaust_duration_ * 0.5f; }
|
||||
void set_crankcase(Crankcase& crankcase) { crankcase_ = &crankcase; }
|
||||
float transfer_width{.050f}, exhaust_width{.036f};
|
||||
float minimum_burn_seconds{.0008f};
|
||||
std::uint64_t combustion_count() const { return combustion_count_; }
|
||||
|
||||
float valve_area(float cycle_degrees, bool inlet) const override;
|
||||
void pre_step(Crankshaft& crank, float dt, float throttle) override;
|
||||
@@ -26,7 +30,10 @@ private:
|
||||
float transfer_duration_{}, exhaust_duration_{};
|
||||
Crankcase* crankcase_{};
|
||||
|
||||
static float lift(float angle, float opens, float closes, float peak_lift);
|
||||
float active_burn_duration_{60};
|
||||
float current_rpm_{};
|
||||
float active_spark_angle_{};
|
||||
std::uint64_t combustion_count_{};
|
||||
void handle_cycle_events(float previous_degrees, float current_degrees);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user