Add machine workshop, typed logic, mechanics and sensor-driven ECUs
This commit is contained in:
@@ -13,6 +13,7 @@ struct Port {
|
||||
float gamma_value{1.4f}, gas_constant_value{287.0f};
|
||||
float air_fraction{1.0f};
|
||||
float fuel_fraction{};
|
||||
float fuel_equivalent_fraction{}; // fuel origin, including fuel already burned
|
||||
float* owner_energy{};
|
||||
float* owner_air_mass{};
|
||||
float* owner_exhaust_mass{};
|
||||
@@ -25,6 +26,8 @@ class Component {
|
||||
public:
|
||||
virtual ~Component() = default;
|
||||
virtual std::vector<Port*> ports() = 0;
|
||||
// Optional actuation at each CFL substep, before boundary fluxes are resolved.
|
||||
virtual void prepare_step(float /*dt*/) {}
|
||||
virtual void update_state(float dt) = 0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user