propeller map implementation
Description
when definining a turboprop engine with an external propeller map provided by the user like this :
shaft_model=EngineDeck(name='shaft',options=options,required_variables=required_vars)
propeller=PropellerMap(name='Centauri_propeller',options=options)
turboprop=TurbopropModel('turboprop',options=options,shaft_power_model=shaft_model,propeller_model=propeller)
prob.load_inputs(r'aircraft_definition.csv',phase_info,engine_builders=[turboprop],verbosity=3)
this leads to an error in the turboprop_model.py on line 191
if self.propeller_model is not None:
params.update(self.propeller_model.get_parameters())
return params
Example
since the PropellerMap function does not currently have attributes of get_parameters,build_pre_mission,build_mission,get_mass ... all of which are variables of propeller_builder . when adding all the attributes to propellermap class function , the leads to circular imports error due to propeller_map importing propeller_performance for the attribute build_mission and propeller_performance imports propeller_map
Aviary Version
0.9.8
Relevant environment information
No response
Apologies I missed your post - It looks like we're missing the ability to use propeller maps with the PropellerBuilder! That can probably get put together pretty quickly by the team. In the meantime, you can take a look at aviary/subsystems/test/test_turboprop_model.py for the ExamplePropModel, that was intended just to use for testing but may be workable for your model.
Ok I made some overhauls to the propeller map code, but the answer to your problem was actually unrelated - all you need to do is add the path to your propeller data file to Aircraft.Engine.Propeller.DATA_FILE. If you are not using a propeller data file then you don't need to do anything when building the TurbopropModel object, propeller performance will be automatically computed using the Hamilton Standard method. It turns out PropellerMaps weren't actually designed to be user-facing, but what you tried made total sense and I didn't even notice the real issue for a good minute.