fastga.models.propulsion.fuel_propulsion.basicTurbo_prop.basicTP_engine module
Parametric turboprop engine.
- class fastga.models.propulsion.fuel_propulsion.basicTurbo_prop.basicTP_engine.BasicTPEngine(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, 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.AbstractFuelPropulsionParametric turboprop engine.
It computes engine characteristics using a simplified thermodynamic model, according to the model established byt Aitor Busteros Ramos.
- 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 eta_225: first compressor stage polytropic efficiency :param eta_253: second compressor stage polytropic efficiency :param eta_445: high pressure turbine polytropic efficiency :param eta_455: power turbine polytropic efficiency :param eta_q: combustion efficiency, in J/kg :param eta_axe: high pressure axe mechanical efficiency :param pi_02: inlet total pressure loss :param pi_cc: combustion chamber pressure loss :param cooling_ratio: percentage of the total aspirated airflow used for turbine cooling :param hp_shaft_power_out: power used for electrical generation obtained from the HP shaft, in W :param gearbox_efficiency: power shaft mechanical efficiency :param inter_compressor_bleed: total compressor airflow extracted after the first compression stage (in station 25) :param exhaust_mach_design: mach number at the exhaust in the design point :param pr_1_ratio_design: ratio of the first stage pressure ration to the OPR at the design point.
- property turboprop_sizing_problem: openmdao.core.problem.Problem
OpenMDAO problem to compute the sizing point
- get_ivc_max_thrust_problem() openmdao.core.indepvarcomp.IndepVarComp[source]
The 4 problems that compute the maximum will have all their inputs in common, so we centralize the creation of the IndepVarComp that will supply them.
- property turboprop_max_thrust_power_limit_problem: openmdao.core.problem.Problem
OpenMDAO problem to compute the max thrust if the power is limiting
- property turboprop_max_thrust_opr_limit_problem: openmdao.core.problem.Problem
OpenMDAO problem to compute the max thrust if the opr is limiting
- property turboprop_max_thrust_itt_limit_problem: openmdao.core.problem.Problem
OpenMDAO problem to compute the max thrust if the ITT is limiting
- property turboprop_max_thrust_propeller_thrust_limit_problem: openmdao.core.problem.Problem
OpenMDAO problem to compute the max thrust if the propeller thrust is limiting
- property alpha: float
Return the temperature ratio between turbines at the design point, assumed to be constant.
- property alpha_p: float
Return the pressure ratio between turbines at the design point, assumed to be constant.
- property turboprop_fuel_problem: openmdao.core.problem.Problem
OpenMDAO problem to compute the fuel consumption without linesearch algorithm. Quicker but can sometimes fail so it will be the favored problem to use when computing sfc.
- property turboprop_fuel_problem_ls: openmdao.core.problem.Problem
OpenMDAO problem to compute the fuel consumption with linesearch algorithm. Longer but more likely to converge
- reset_problems()[source]
Resets all the problem to force them to be recreated, except for the sizing problem which should not be necessary to reset
- 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. We’ll assume the max power happens when the max_thrust does so we’ll use the same OpenMDAO problem.
- Parameters
flight_points – current flight point, with altitude in meters as always !
- Returns
maximum power in kW
- sfc(thrust: Union[float, Sequence[float]], atmosphere: stdatm.atmosphere.Atmosphere) Tuple[numpy.ndarray, numpy.ndarray][source]
Computation of the SFC.
- Parameters
thrust – Thrust (in N)
atmosphere – Atmosphere instance at intended altitude
- Returns
SFC (in kg/s/W) and power (in W)
- 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.
- 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 a regression based on the PT6A family which data have been taken according to : https://www.easa.europa.eu/downloads/7787/en.
- class fastga.models.propulsion.fuel_propulsion.basicTurbo_prop.basicTP_engine.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.basicTP_engine.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.