fastoad.models.propulsion.fuel_propulsion.base module¶
Base classes for fuel-consuming propulsion models.
-
class
fastoad.models.propulsion.fuel_propulsion.base.
AbstractFuelPropulsion
[source]¶ Bases:
fastoad.models.propulsion.propulsion.IPropulsion
,abc.ABC
Propulsion model that consume any fuel should inherit from this one.
In inheritors,
compute_flight_points()
is expected to define “sfc” and “thrust” in computed FlightPoint instances.-
get_consumed_mass
(flight_point: fastoad.base.flight_point.FlightPoint, time_step: float) → float[source]¶ Computes consumed mass for provided flight point and time step.
This method should rely on FlightPoint fields that are generated by :meth: compute_flight_points.
- Parameters
flight_point –
time_step –
- Returns
the consumed mass in kg
-
-
class
fastoad.models.propulsion.fuel_propulsion.base.
FuelEngineSet
(engine: fastoad.models.propulsion.propulsion.IPropulsion, engine_count)[source]¶ Bases:
fastoad.models.propulsion.fuel_propulsion.base.AbstractFuelPropulsion
Class for modelling an assembly of identical fuel engines.
Thrust is supposed equally distributed among them.
- Parameters
engine – the engine model
engine_count –
-
compute_flight_points
(flight_points: Union[fastoad.base.flight_point.FlightPoint, pandas.core.frame.DataFrame])[source]¶ Computes Specific Fuel Consumption according to provided conditions.
See
FlightPoint
for available fields that may be used for computation. If a DataFrame instance is provided, it is expected that its columns match field names of FlightPoint (actually, the DataFrame instance should be generated from a list of FlightPoint instances).Note
About thrust_is_regulated, thrust_rate and thrust
thrust_is_regulated
tells if a flight point should be computed usingthrust_rate
(when False) orthrust
(when True) as input. This way, the method can be used in a vectorized mode, where each point can be set to respect a thrust order or a thrust rate order.if
thrust_is_regulated
is not defined, the considered input will be the defined one betweenthrust_rate
andthrust
(if both are provided,thrust_rate
will be used)if
thrust_is_regulated
isTrue
orFalse
(i.e., not a sequence), the considered input will be taken accordingly, and should of course be defined.if there are several flight points,
thrust_is_regulated
is a sequence or array,thrust_rate
andthrust
should be provided and have the same shape asthrust_is_regulated:code:
. The method will consider for each element which input will be used according tothrust_is_regulated
.
- Parameters
flight_points – FlightPoint or DataFram instance
- Returns
None (inputs are updated in-place)