Class PistonEngine
Reciprocating piston engine with RPM-based power curve. Supports naturally aspirated and forced induction configurations. Power output varies with RPM according to the power curve and is affected by atmospheric density.
Inheritance
PistonEngine
Inherited Members
Namespace: NWH.Aerodynamics.AircraftController.Propulsion.Engines
Assembly: NWH.Aerodynamics.dll
Syntax
public class PistonEngine : AircraftEngineBase
Fields
| Edit this page View SourceforcedInduction
Optional forced induction system (turbocharger or supercharger). When present, multiplies engine power output based on boost pressure.
Declaration
[Tooltip("Turbocharger or supercharger.")]
public ForcedInduction forcedInduction
Field Value
| Type | Description |
|---|---|
| ForcedInduction |
Methods
| Edit this page View SourceAwake()
Declaration
public override void Awake()
Overrides
| Edit this page View SourceCalculateTorque(float, float)
Calculates the engine torque output for the current simulation step. Must be implemented by derived engine types (piston, turbine, etc.).
Declaration
public override float CalculateTorque(float t, float dt)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current simulation time in seconds. |
| float | dt | Time step duration in seconds. |
Returns
| Type | Description |
|---|---|
| float | Generated torque in Newton-meters. |