fastga.models.handling_qualities.unitary_tests.dummy_engines module

Test module for geometry functions of cg components.

class fastga.models.handling_qualities.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.AbstractFuelPropulsion

Dummy 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 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 using thrust_rate (when False) or thrust (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 between thrust_rate and thrust (if both are provided, thrust_rate will be used)

  • if thrust_is_regulated is True or False (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 and thrust should be provided and have the same shape as thrust_is_regulated:code:. The method will consider for each element which input will be used according to thrust_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

compute_max_power(flight_points: Union[fastoad.model_base.flight_point.FlightPoint, pandas.core.frame.DataFrame]) float[source]

Computes max available power on one engine.

Returns

the maximum available power in W

class fastga.models.handling_qualities.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

static get_model(inputs) fastoad.model_base.propulsion.IPropulsion[source]

This method defines the used IPropulsion subclass instance.

Parameters

inputs – OpenMDAO input vector where the parameters that define the propulsion model are

Returns

the propulsion model instance

class fastga.models.handling_qualities.unitary_tests.dummy_engines.DummyEngineSR22[source]

Bases: fastga.models.propulsion.fuel_propulsion.base.AbstractFuelPropulsion

Dummy engine model returning nacelle dimensions height-width-length-wet_area.

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 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 using thrust_rate (when False) or thrust (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 between thrust_rate and thrust (if both are provided, thrust_rate will be used)

  • if thrust_is_regulated is True or False (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 and thrust should be provided and have the same shape as thrust_is_regulated:code:. The method will consider for each element which input will be used according to thrust_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'>)[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

compute_sl_thrust() float[source]
compute_max_power(flight_points: Union[fastoad.model_base.flight_point.FlightPoint, pandas.core.frame.DataFrame]) float[source]

Computes max available power on one engine.

Returns

the maximum available power in W

class fastga.models.handling_qualities.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

static get_model(inputs) fastoad.model_base.propulsion.IPropulsion[source]

This method defines the used IPropulsion subclass instance.

Parameters

inputs – OpenMDAO input vector where the parameters that define the propulsion model are

Returns

the propulsion model instance

class fastga.models.handling_qualities.unitary_tests.dummy_engines.DummyEngineTBM900[source]

Bases: fastga.models.propulsion.fuel_propulsion.base.AbstractFuelPropulsion

Dummy engine model returning nacelle dimensions height-width-length-wet_area.

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 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 using thrust_rate (when False) or thrust (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 between thrust_rate and thrust (if both are provided, thrust_rate will be used)

  • if thrust_is_regulated is True or False (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 and thrust should be provided and have the same shape as thrust_is_regulated:code:. The method will consider for each element which input will be used according to thrust_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'>)[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

compute_sl_thrust() float[source]
compute_max_power(flight_points: Union[fastoad.model_base.flight_point.FlightPoint, pandas.core.frame.DataFrame]) float[source]

Computes max available power on one engine.

Returns

the maximum available power in W

class fastga.models.handling_qualities.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

static get_model(inputs) fastoad.model_base.propulsion.IPropulsion[source]

This method defines the used IPropulsion subclass instance.

Parameters

inputs – OpenMDAO input vector where the parameters that define the propulsion model are

Returns

the propulsion model instance