fastga.models.propulsion.fuel_propulsion.base module
Base classes for fuel-consuming propulsion models.
- class fastga.models.propulsion.fuel_propulsion.base.AbstractFuelPropulsion[source]
Bases:
fastga.models.propulsion.propulsion.IPropulsionCS23,abc.ABCPropulsion 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.model_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 fastga.models.propulsion.fuel_propulsion.base.FuelEngineSet(engine: fastga.models.propulsion.propulsion.IPropulsionCS23, engine_count)[source]
Bases:
fastga.models.propulsion.fuel_propulsion.base.AbstractFuelPropulsionClass 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.model_base.flight_point.FlightPoint, pandas.core.frame.DataFrame])[source]
Computes Specific Fuel Consumption according to provided conditions.
See
FlightPointfor 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_regulatedtells 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_regulatedis not defined, the considered input will be the defined one betweenthrust_rateandthrust(if both are provided,thrust_ratewill be used)if
thrust_is_regulatedisTrueorFalse(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_regulatedis a sequence or array,thrust_rateandthrustshould 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)