fastga.models.propulsion.fuel_propulsion.basicTurbo_prop_map.basicTP_engine_mapped module
Parametric turboprop engine.
- class fastga.models.propulsion.fuel_propulsion.basicTurbo_prop_map.basicTP_engine_mapped.BasicTPEngineMapped(power_design: float, t_41t_design: float, opr_design: float, cruise_altitude_propeller: float, design_altitude: float, design_mach: float, prop_layout: float, bleed_control: float, itt_limit: float, power_limit: float, opr_limit: float, speed_SL, thrust_SL, thrust_limit_SL, efficiency_SL, speed_CL, thrust_CL, thrust_limit_CL, efficiency_CL, effective_J, effective_efficiency_ls, effective_efficiency_cruise, turbo_mach_SL, turbo_thrust_SL, turbo_thrust_max_SL, turbo_sfc_SL, turbo_mach_CL, turbo_thrust_CL, turbo_thrust_max_CL, turbo_sfc_CL, turbo_mach_IL, turbo_thrust_IL, turbo_thrust_max_IL, turbo_sfc_IL, level_IL, eta_225=0.85, eta_253=0.86, eta_445=0.86, eta_455=0.86, eta_q=41097000.0, eta_axe=0.98, pi_02=0.8, pi_cc=0.95, cooling_ratio=0.05, hp_shaft_power_out=37285.0, gearbox_efficiency=0.98, inter_compressor_bleed=0.04, exhaust_mach_design=0.4, pr_1_ratio_design=0.25)[source]
Bases:
fastga.models.propulsion.fuel_propulsion.base.AbstractFuelPropulsionMapped version of the turboprop, need the constructed table beforehand to work.
Parametric turboprop engine reading a map computed beforehand. Based on the basic turboprop engine, but post treatment is done beforehand to save computation time on the sfc estimation function
- Parameters
power_design – thermodynamic power at the design point, in kW
t_41t_design – turbine entry temperature at the design point, in K
opr_design – overall pressure ratio at the design point
cruise_altitude_propeller – cruise altitude, in m
design_altitude – altitude at the design point, in m
design_mach – mach number at the design point
prop_layout – location of the turboprop
bleed_control – usage of the bleed in off-design point, “low” or “high”
itt_limit – temperature limit between the turbines, in K
power_limit – power limit on the gearbox, in kW
opr_limit – opr limit in the compressor
speed_SL – array with the speed at which the sea level performance of the propeller
were computed :param thrust_SL: array with the required thrust at which the sea level performance of the propeller were computed :param thrust_limit_SL: array with the limit thrust available at the speed in speed_SL :param efficiency_SL: array containing the sea level efficiency computed at speed_SL and thrust_SL :param speed_CL: array with the speed at which the cruise level performance of the propeller were computed :param thrust_CL: array with the required thrust at which the cruise level performance of the propeller were computed :param thrust_limit_CL: array with the limit thrust available at the speed in speed_CL :param efficiency_CL: array containing the cruise level efficiency computed at speed_CL and thrust_CL :param turbo_mach_SL: array with the mach at which the sea level performance of the turboprop were computed :param turbo_thrust_SL: array with the required thrust at which the sea level performance of the turboprop were computed :param turbo_thrust_max_SL: array with the limit thrust available at the mach in turbo_mach_SL :param turbo_sfc_SL: array containing the sea level sfc computed at turbo_mach_SL and turbo_thrust_SL :param turbo_mach_CL: array with the mach at which the cruise level performance of the turboprop were computed :param turbo_thrust_CL: array with the required thrust at which the cruise level performance of the turboprop were computed :param turbo_thrust_max_CL: array with the limit thrust available at the mach in turbo_mach_CL :param turbo_sfc_CL: array containing the cruise level sfc computed at turbo_mach_CL and turbo_thrust_CL :param turbo_mach_IL: array with the mach at which the intermediate level performance of the turboprop were computed :param turbo_thrust_IL: array with the required thrust at which the intermediate level performance of the turboprop were computed :param turbo_thrust_max_IL: array with the limit thrust available at the mach in turbo_mach_IL :param turbo_sfc_IL: array containing the intermediate level sfc computed at turbo_mach_IL and turbo_thrust_IL :param level_IL: altitude at which the intermediate level computation were conducted
- property sfc_interpolator_sl
- property sfc_interpolator_il
- property sfc_interpolator_cl
- compute_flight_points(flight_points: fastoad.model_base.flight_point.FlightPoint)[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)
- compute_max_power(flight_points: fastoad.model_base.flight_point.FlightPoint) Union[float, Sequence][source]
Compute the turboprop maximum power @ given flight-point. Uses the original method
- Parameters
flight_points – current flight point, with altitude in meters as always !
- Returns
maximum power in kW
- read_sfc_table(thrust: float, atmosphere: stdatm.atmosphere.Atmosphere) float[source]
Reads the turboprop table and gives corresponding sfc.
- sfc(thrust: Union[float, Sequence[float]], atmosphere: stdatm.atmosphere.Atmosphere) Union[float, numpy.ndarray][source]
Computation of the SFC.
- Parameters
thrust – Thrust (in N)
atmosphere – Atmosphere instance at intended altitude
- Returns
SFC (in kg/s/N)
- max_thrust(atmosphere: stdatm.atmosphere.Atmosphere) numpy.ndarray[source]
Computation of maximum thrust either due to propeller thrust limit or turboprop max power.
- Parameters
atmosphere – Atmosphere instance at intended altitude (should be <=20km)
- Returns
maximum thrust (in N)
- propeller_efficiency(thrust: Union[float, Sequence[float]], atmosphere: stdatm.atmosphere.Atmosphere) Union[float, Sequence][source]
Compute the propeller efficiency. Should only take the thrust of one propeller.
- Parameters
thrust – Thrust (in N)
atmosphere – Atmosphere instance at intended altitude
- Returns
efficiency
- compute_weight() float[source]
Computes weight of uninstalled propulsion depending on maximum power. Uses model described in : Gudmundsson, Snorri. General aviation aircraft design: Applied Methods and Procedures. Butterworth-Heinemann, 2013. Equation (6-44).
- class fastga.models.propulsion.fuel_propulsion.basicTurbo_prop_map.basicTP_engine_mapped.Engine(*args, **kwargs)[source]
Bases:
fastga.models.propulsion.dict.DynamicAttributeDictClass for storing data for engine.
An instance is a simple dict, but for convenience, each item can be accessed as an attribute (inspired by pandas DataFrames). Hence, one can write:
>>> engine = Engine(power_SL=10000.) >>> engine["power_SL"] 10000.0 >>> engine["mass"] = 70000. >>> engine.mass 70000.0 >>> engine.mass = 50000. >>> engine["mass"] 50000.0
Note: constructor will forbid usage of unknown keys as keyword argument, but other methods will allow them, while not making the matching between dict keys and attributes, hence:
>>> engine["foo"] = 42 # Ok >>> bar = engine.foo # raises exception !!!! >>> engine.foo = 50 # allowed by Python >>> # But inner dict is not affected: >>> engine.foo 50 >>> engine["foo"] 42
This class is especially useful for generating pandas DataFrame: a pandas DataFrame can be generated from a list of dict… or a list of oad.FlightPoint instances.
The set of dictionary keys that are mapped to instance attributes is given by the
get_attribute_keys().A dictionary class where keys can also be used as attributes.
The keys that can be used as attributes are defined using decorators
AddKeyAttributeorSetKeyAttributes.They can also be used as keyword arguments when instantiating this class.
Note
Using this class as a dict is useful when instantiating another dict or a pandas DataFrame, or instantiating from them. Direct interaction with DynamicAttributeDict instance should be done through attributes.
Example:
>>> @AddKeyAttributes({"foo": 0.0, "bar": None, "baz": 42.0}) ... class MyDict(DynamicAttributeDict): ... pass ... >>> d = MyDict(foo=5, bar="aa") >>> d.foo 5 >>> d.bar 'aa' >>> d.baz # returns the default value 42.0 >>> d["foo"] = 10.0 # can still be used as a dict >>> d.foo # but change are propagated to/from the matching attribute 10.0 >>> d.foo = np.nan # setting None or numpy.nan returns to default value >>> d["foo"] 0.0 >>> d.foo # But the attribute will now return the default value 0.0 >>> d.bar = None # If default value is None, setting None or numpy.nan deletes the key. >>> # d["bar"] #would trigger a key error >>> d.bar # But the attribute will return None
- Parameters
args – a dict-like object where all keys are contained in
attribute_keyskwargs – argument keywords must be names contained in
attribute_keys
- classmethod get_attribute_keys()
- Returns
list of attributes paired to dict key.
- property height
Height in meters.
- property length
Length in meters.
- property mass
Mass in kilograms.
- property power_SL
power at sea level in watts.
- property width
Width in meters.
- class fastga.models.propulsion.fuel_propulsion.basicTurbo_prop_map.basicTP_engine_mapped.Nacelle(*args, **kwargs)[source]
Bases:
fastga.models.propulsion.dict.DynamicAttributeDictClass for storing data for nacelle.
Similar to
Engine.A dictionary class where keys can also be used as attributes.
The keys that can be used as attributes are defined using decorators
AddKeyAttributeorSetKeyAttributes.They can also be used as keyword arguments when instantiating this class.
Note
Using this class as a dict is useful when instantiating another dict or a pandas DataFrame, or instantiating from them. Direct interaction with DynamicAttributeDict instance should be done through attributes.
Example:
>>> @AddKeyAttributes({"foo": 0.0, "bar": None, "baz": 42.0}) ... class MyDict(DynamicAttributeDict): ... pass ... >>> d = MyDict(foo=5, bar="aa") >>> d.foo 5 >>> d.bar 'aa' >>> d.baz # returns the default value 42.0 >>> d["foo"] = 10.0 # can still be used as a dict >>> d.foo # but change are propagated to/from the matching attribute 10.0 >>> d.foo = np.nan # setting None or numpy.nan returns to default value >>> d["foo"] 0.0 >>> d.foo # But the attribute will now return the default value 0.0 >>> d.bar = None # If default value is None, setting None or numpy.nan deletes the key. >>> # d["bar"] #would trigger a key error >>> d.bar # But the attribute will return None
- Parameters
args – a dict-like object where all keys are contained in
attribute_keyskwargs – argument keywords must be names contained in
attribute_keys
- classmethod get_attribute_keys()
- Returns
list of attributes paired to dict key.
- property height
Height in meters.
- property length
Length in meters.
- property wet_area
Wet area in meters².
- property width
Width in meters.