fastga.models.weight.mass_breakdown.unitary_tests.dummy_engines module
Test module for geometry functions of mass breakdown components.
- class fastga.models.weight.mass_breakdown.unitary_tests.dummy_engines.DummyEngineBE76(max_power: float, design_altitude_propeller: float, fuel_type: float, strokes_nb: float, prop_layout: float)[source]
Bases:
fastga.models.propulsion.fuel_propulsion.base.AbstractFuelPropulsionDummy engine model returning nacelle aerodynamic drag force.
- 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)
- compute_weight() float[source]
Computes total propulsion mass.
- Returns
the total uninstalled mass in kg
- compute_dimensions() -> (<class 'float'>, <class 'float'>, <class 'float'>, <class 'float'>, <class 'float'>, <class 'float'>)[source]
Computes propulsion sub-components dimensions.
- compute_drag(mach, unit_reynolds, wing_mac)[source]
Computes nacelle drag force for out of fuselage engine.
- Parameters
mach – mach at which drag should be calculated
unit_reynolds – unitary Reynolds for calculation
wing_mac – wing MAC length in m
- Returns
drag force cd0*wing_area
- 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.weight.mass_breakdown.unitary_tests.dummy_engines.DummyEngineWrapperBE76[source]
Bases:
fastoad.model_base.propulsion.IOMPropulsionWrapper- setup(component: openmdao.core.component.Component)[source]
Defines the needed OpenMDAO inputs for propulsion instantiation as done in
get_model()Use add_inputs and declare_partials methods of the provided component
- Parameters
component –
- class fastga.models.weight.mass_breakdown.unitary_tests.dummy_engines.DummyEngineSR22(max_power: float, design_altitude_propeller: float, fuel_type: float, strokes_nb: float, prop_layout: float)[source]
Bases:
fastga.models.propulsion.fuel_propulsion.base.AbstractFuelPropulsionDummy engine model returning nacelle aerodynamic drag force.
- 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)
- compute_weight() float[source]
Computes total propulsion mass.
- Returns
the total uninstalled mass in kg
- compute_dimensions() -> (<class 'float'>, <class 'float'>, <class 'float'>, <class 'float'>, <class 'float'>, <class 'float'>)[source]
Computes propulsion sub-components dimensions.
- compute_drag(mach, unit_reynolds, wing_mac)[source]
Computes nacelle drag force for out of fuselage engine.
- Parameters
mach – mach at which drag should be calculated
unit_reynolds – unitary Reynolds for calculation
wing_mac – wing MAC length in m
- Returns
drag force cd0*wing_area
- 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.weight.mass_breakdown.unitary_tests.dummy_engines.DummyEngineWrapperSR22[source]
Bases:
fastoad.model_base.propulsion.IOMPropulsionWrapper- setup(component: openmdao.core.component.Component)[source]
Defines the needed OpenMDAO inputs for propulsion instantiation as done in
get_model()Use add_inputs and declare_partials methods of the provided component
- Parameters
component –
- class fastga.models.weight.mass_breakdown.unitary_tests.dummy_engines.DummyEngineTBM900(fuel_type: float, prop_layout: float)[source]
Bases:
fastga.models.propulsion.fuel_propulsion.base.AbstractFuelPropulsionDummy engine model returning nacelle aerodynamic drag force.
- 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)
- compute_weight() float[source]
Computes total propulsion mass.
- Returns
the total uninstalled mass in kg
- compute_dimensions() -> (<class 'float'>, <class 'float'>, <class 'float'>, <class 'float'>, <class 'float'>, <class 'float'>)[source]
Computes propulsion sub-components dimensions.
- compute_drag(mach: Union[float, numpy.array], unit_reynolds: Union[float, numpy.array], wing_mac: float) Union[float, numpy.array][source]
Computes nacelle drag force for out of fuselage engine.
- Parameters
mach – mach at which drag should be calculated
unit_reynolds – unitary Reynolds for calculation
wing_mac – wing MAC length in m
- Returns
drag force cd0*wing_area
- 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.weight.mass_breakdown.unitary_tests.dummy_engines.DummyEngineWrapperTBM900[source]
Bases:
fastoad.model_base.propulsion.IOMPropulsionWrapper- setup(component: openmdao.core.component.Component)[source]
Defines the needed OpenMDAO inputs for propulsion instantiation as done in
get_model()Use add_inputs and declare_partials methods of the provided component
- Parameters
component –