-
Notifications
You must be signed in to change notification settings - Fork 68
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
Initial Implementation of Height Energy in SGM #97
Conversation
…ded required premission susbsytems for testing
This reverts commit 5fc9c65.
Also added some error checking to automatic state detections
also added example of customizing an event function
Included example of changing trigger value after creation
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.
Good stuff Carl, thanks for this!
Do you plan to add HeightEnergy based tests as part of this PR or a follow-on PR?
I can move the unofficial example from the bottom of flops_based/phases/time_integration_phases.py to an official test. |
Awesome, please do that! |
} | ||
add_SGM_required_outputs(self, SGM_required_outputs) | ||
|
||
print_level = 0 if analysis_scheme is AnalysisScheme.SHOOTING else 2 |
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.
Kind of wonder why the default is 2 for colocation.
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.
that's what it was on line 208, so I didn't want to change it.
|
||
|
||
def add_SGM_required_inputs(group: om.Group, inputs_to_add: dict): | ||
blank_execcomp = om.ExecComp() |
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 is the ultimate purpose of creating a "sink" component for these vars?
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 simupy integrator expects that all states be an input to the ODE and all state rates be an output from the ODE. If a state is not directly used in the EOM calculations, this lets you add it without changing the EOM.
iv_comp = om.IndepVarComp() | ||
for output, details in outputs_to_add.items(): | ||
iv_comp.add_output(output, **details) | ||
group.add_subsystem('SGM_required_outputs', |
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.
Similar question for this source indepvarcomp.
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.
same as above, but for the state rates that are not directly calculated by the EOM
Summary
Creation of SGM phases for HeightEnergy, DetailedTakeoff, and DetailedLanding
Related Issues
Backwards incompatibilities
None
New Dependencies
None