fastoad.models.propulsion.fuel_propulsion.rubber_engine.openmdao module¶
OpenMDAO wrapping of RubberEngine.
-
class
fastoad.models.propulsion.fuel_propulsion.rubber_engine.openmdao.OMRubberEngineComponent(**kwargs)[source]¶ Bases:
fastoad.models.propulsion.propulsion.BaseOMPropulsionComponentParametric engine model as OpenMDAO component
See
RubberEnginefor more information.Store some bound methods so we can detect runtime overrides.
- Parameters
**kwargs (dict of keyword arguments) – Keyword arguments that will be mapped into the Component options.
-
static
get_wrapper() → fastoad.models.propulsion.fuel_propulsion.rubber_engine.openmdao.OMRubberEngineWrapper[source]¶ This method defines the used
IOMPropulsionWrapperinstance.- Returns
an instance of OpenMDAO wrapper for propulsion model
-
setup()¶ Will replace the original setup method.
-
class
fastoad.models.propulsion.fuel_propulsion.rubber_engine.openmdao.OMRubberEngineWrapper[source]¶ Bases:
fastoad.models.propulsion.propulsion.IOMPropulsionWrapperWrapper class of for rubber engine model.
It is made to allow a direct call to
RubberEnginein 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, use_thrust_rate, thrust_rate, thrust ) [do something else] )
-
property
DESCRIPTION¶ Retrieves the property value, from the iPOPO dictionaries
-
static
get_model(inputs) → fastoad.models.propulsion.propulsion.IPropulsion[source]¶ - Parameters
inputs – input parameters that define the engine
- Returns
an
RubberEngineinstance
-
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 –
-
property