preprocessors.py

preprocessors.py#

aviary.utils.preprocessors.preprocess_crewpayload(aviary_options: AviaryValues)[source]

Calculates option values that are derived from other options, and are not direct inputs. This function modifies the entries in the supplied collection, and for convenience also returns the modified collection.

aviary.utils.preprocessors.preprocess_options(aviary_options: AviaryValues, **kwargs)[source]

Run all preprocessors on provided AviaryValues object

Parameters:

aviary_options (AviaryValues) – Options to be updated

aviary.utils.preprocessors.preprocess_propulsion(aviary_options: AviaryValues, engine_models: list = None)[source]

Updates AviaryValues object with values taken from provided EngineModels.

If no EngineModels are provided, either in engine_models or included in aviary_options, an EngineDeck is created using avaliable inputs and options in aviary_options.

Vectorizes variables in aviary_options in the correct order for vehicles with heterogeneous engines.

Performs basic sanity checks on inputs that are universal to all EngineModels.

!!! WARNING !!! Values in aviary_options can be overwritten with corresponding values from engine_models!

Parameters:
  • aviary_options (AviaryValues) – Options to be updated. EngineModels (provided or generated) are added, and Aircraft:Engine:* and Aircraft:Nacelle:* variables are vectorized as numpy arrays

  • engine_models (<list of EngineModels> (optional)) – EngineModel objects to be added to aviary_options. Replaced existing EngineModels in aviary_options