fastga.models.propulsion.fuel_propulsion.basicIC_engine.openmdao module
OpenMDAO wrapping of basic IC engine.
- class fastga.models.propulsion.fuel_propulsion.basicIC_engine.openmdao.OMBasicICEngineWrapper[source]
Bases:
fastoad.model_base.propulsion.IOMPropulsionWrapperWrapper class of for basic IC engine model. It is made to allow a direct call to
BasicICEnginein 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 –
- class fastga.models.propulsion.fuel_propulsion.basicIC_engine.openmdao.OMBasicICEngineComponent(**kwargs)[source]
Bases:
fastga.models.propulsion.propulsion.BaseOMPropulsionComponentParametric engine model as OpenMDAO component See
BasicICEnginefor more information.Store some bound methods so we can detect runtime overrides.
- static get_wrapper() fastga.models.propulsion.fuel_propulsion.basicIC_engine.openmdao.OMBasicICEngineWrapper[source]
This method defines the used
IOMPropulsionWrapperinstance.- Returns
an instance of OpenMDAO wrapper for propulsion model