-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aviary Options overhaul: Replace aviary_options with individual options on the analysis components. #553
base: main
Are you sure you want to change the base?
Conversation
…ns on a separate story.
aviary/subsystems/aerodynamics/gasp_based/flaps_model/meta_model.py
Outdated
Show resolved
Hide resolved
@@ -190,7 +190,8 @@ def setUp(self): | |||
|
|||
pp = prob.model.add_subsystem( | |||
'pp', | |||
PropellerPerformance(num_nodes=num_nodes, aviary_options=options), | |||
PropellerPerformance(num_nodes=num_nodes, | |||
aviary_options=options), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interpolator builder still uses aviary_options. I am pretty sure we can remove it from there too, though that can be a nice compact follow-on.
aviary/utils/conflict_checks.py
Outdated
@@ -3,13 +3,10 @@ | |||
from aviary.variable_info.variables import Aircraft | |||
|
|||
|
|||
def check_fold_location_definition(inputs, options: AviaryValues): | |||
def check_fold_location_definition(inputs, choose_fold_location, has_strut): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these might need defaults, these conflict checks were originally intended to have a standardized interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What default values would you recommend for the 2 options?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
originally, all of the conflict checks (half dozen or so) all took inputs
and options
as positional args. Since this is the only one left, maybe it would be fine to just remove inputs
and have it just take the variables it needs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
self.assertTrue(vals.get_val(Aircraft.Engine.TYPE) | ||
== GASPEngineType.TURBOJET) | ||
except: | ||
self.fail('Expecting to be able to set the value of an Enum from an int.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be string
Summary
Major overhaul of options passing in Aviary.
(100.0 , 'ft')
).setup_model_options
method to sets the model options. This is used in tests and in level 3 models.Due to this change, the "default value" and "types" fields in the variable metadata are now serving a dual role for type-checking in the AivaryValues user-facing API and in the OptionsDictionary.
types
related to propulsion were changed to include container types (list, ndarray, tuple).There are some matters that are left to possibly be addressed in the future:
Related Issues
Backwards incompatibilities
There shouldn't be any changes to the level 1 and level 2 user.
For level 3, a new helper function "setup_model_options" has been added to handle the model options. Level 3 users will need to call this before setup.
New Dependencies
None