fastga.models.propulsion.fuel_propulsion.basicTurbo_prop.openmdao module

OpenMDAO wrapping of basic IC engine.

class fastga.models.propulsion.fuel_propulsion.basicTurbo_prop.openmdao.OMBasicTurbopropWrapper[source]

Bases: fastoad.model_base.propulsion.IOMPropulsionWrapper

Wrapper class of for basic IC engine model. It is made to allow a direct call to BasicICEngine in an OpenMDAO component. Example of usage of this class:

import openmdao.api as om
class MyComponent(om.ExplicitComponent):
    def initialize():
        self._engine_wrapper = OMRubberEngineWrapper()
    def setup():
        # Adds OpenMDAO variables that define the engine
        self._engine_wrapper.setup(self)
        # Do the normal setup
        self.add_input("my_input")
        [finish the setup...]
    def compute(self, inputs, outputs, discrete_inputs=None, discrete_outputs=None):
        [do something]
        # Get the engine instance, with parameters defined from OpenMDAO inputs
        engine = self._engine_wrapper.get_model(inputs)
        # Run the engine model. This is a pure Python call. You have to define
        # its inputs before, and to use its outputs according to your needs
        sfc, thrust_rate, thrust = engine.compute_flight_points(
            mach,
            altitude,
            engine_setting,
            thrust_is_regulated,
            thrust_rate,
            thrust
            )
        [do something else]
)
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]
Parameters

inputs – input parameters that define the engine

Returns

an BasicTPEngine instance

class fastga.models.propulsion.fuel_propulsion.basicTurbo_prop.openmdao.OMBasicTPEngineComponent(**kwargs)[source]

Bases: fastga.models.propulsion.propulsion.BaseOMPropulsionComponent

Parametric engine model as OpenMDAO component See BasicICEngine for more information.

Store some bound methods so we can detect runtime overrides.

setup()[source]

Declare inputs and outputs.

Available attributes:

name pathname comm options

static get_wrapper() fastga.models.propulsion.fuel_propulsion.basicTurbo_prop.openmdao.OMBasicTurbopropWrapper[source]

This method defines the used IOMPropulsionWrapper instance.

Returns

an instance of OpenMDAO wrapper for propulsion model