GASP mass fixed.py and fuel.py updates - #1228
Conversation
…NTINUITIES. The number of engines is replaced by the number of wing engines.
…_DISCONTINUITIES.
…OSITION_FACTOR a scalar not a vector.
jkirk5
left a comment
There was a problem hiding this comment.
We can't remove the multiengine flag from any Aircraft.Engine variables or it could break aircraft with more than one engine type, I have some suggestions to fix
| add_aviary_input(self, Aircraft.Wing.ULTIMATE_LOAD_FACTOR, units='unitless') | ||
| add_aviary_input(self, Aircraft.Wing.MASS_COEFFICIENT, units='unitless') | ||
| add_aviary_input(self, Aircraft.Wing.MATERIAL_FACTOR, units='unitless') | ||
| add_aviary_input(self, Aircraft.Engine.POSITION_FACTOR, shape=num_engine_type) |
There was a problem hiding this comment.
This breaks this component when multiple engines are used - this variable has to remain engine-specific. Instead we need to look for ways to update the component to support a vector of engine positions. In this case maybe we average the wing engine positions together? It is not clear to me what "position factor" actually represents in GASP, so I am not sure what the correct answer is yet. How did GASP handle 4-engine aircraft like the 747 with multiple engine positions on the wing?
| @@ -57,7 +55,6 @@ def setup(self): | |||
| add_aviary_output( | |||
| self, | |||
| Aircraft.Engine.POSITION_FACTOR, | |||
There was a problem hiding this comment.
I already commented on wing.py about this variable change, my comment there applies here too! We need to update the component to work with a vector of engine positions instead of assuming engine position can never be a vector
| c_eng_pos = 1.0 * sigmoidX(max_mach, 0.75, -1.0 / 320.0) + 1.05 * sigmoidX( | ||
| max_mach, 0.75, 1.0 / 320.0 | ||
| ) | ||
| # GASP code has an error. We changed to the following. If num_wing_engines = 3, then |
There was a problem hiding this comment.
Can we extend this method to allow for more engines? Some ideas I have are having it handle odd or even engines instead of hardcoding 2 vs 3 vs 4 engines (which is what FLOPS does), or simply have the last c_eng_pos calculation apply for any number of engines >= 4?
| units='unitless', | ||
| desc='engine position factor', | ||
| default_value=0, | ||
| multivalue=True, |
There was a problem hiding this comment.
We can't remove this flag - all engine variables need to use the multivalue flag so Aviary allows them to be vectors. I have some comments on the places in the code where this variable gets used with suggestions on how to update those components
Summary
c_eng_posinMassParameters()inmass/gasp_based/fixed.py.max_wingfuel_wtinFuelComponents()inmass/gasp_based/fuel.py.Aircraft.Engine.NUM_WING_ENGINESdirectly inMassParameters()class.Aircraft.Engine.POSITION_FACTORas multi-valued.Related Issues
Backwards incompatibilities
None
AI Usage
None