-
Notifications
You must be signed in to change notification settings - Fork 31
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
Docs overhaul and refactor to organize code #41
Conversation
Codecov Report
@@ Coverage Diff @@
## main #41 +/- ##
==========================================
- Coverage 87.49% 87.27% -0.22%
==========================================
Files 47 47
Lines 6101 6099 -2
==========================================
- Hits 5338 5323 -15
- Misses 763 776 +13
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
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.
A summary of my comments besides typos in the docs:
- It looks like OpenMDAO has an AddSubtractComp that is potentially a copy of the OpenConcept component.
from __future__ import division
shows up a lot and from my understanding isn't necessary in python 3.- It might be useful to define a
Constants
module that collects any constant global variables used across the API
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.
There's one constant in the atmospherics module that can be moved into the constants folder and then I think this will be ready to rock.
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.
Great work @eytanadler. This looks ready to go!
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.
Added comments to the dymos-related files. Other than those, looks good
openconcept/examples/B738_Dymos.py
Outdated
@@ -168,7 +165,7 @@ def show_outputs(prob): | |||
x_label = 'Range (nmi)' | |||
y_labels = ['Altitude (ft)', 'Veas airspeed (knots)', 'Fuel used (lb)', 'Throttle setting', 'Vertical speed (ft/min)', 'Mach number', 'CL'] | |||
phases = ['climb', 'cruise', 'descent','reserve_climb','reserve_cruise','reserve_descent','loiter'] | |||
oc.plot_trajectory(prob, x_var, x_unit, y_vars, y_units, phases, | |||
plot_trajectory(prob, x_var, x_unit, y_vars, y_units, phases, | |||
x_label=x_label, y_labels=y_labels, marker='-', | |||
plot_title='737-800 Mission Profile') | |||
|
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.
Should we remove this file? It is a duplicate of B738.py - I checked the diff between B738_Dymos.py and B738.py and two were identical.
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 catch, I'll remove it
openconcept/mission/dymos_phases.py
Outdated
J['fltcond|CL','weight'] = inputs['fltcond|cosgamma']*GRAV_CONST/inputs['fltcond|q']/inputs['ac|geom|wing|S_ref'] | ||
J['fltcond|CL','fltcond|q'] = - inputs['fltcond|cosgamma']*GRAV_CONST*inputs['weight'] / inputs['fltcond|q']**2 / inputs['ac|geom|wing|S_ref'] | ||
J['fltcond|CL','ac|geom|wing|S_ref'] = - inputs['fltcond|cosgamma']*GRAV_CONST*inputs['weight'] / inputs['fltcond|q'] / inputs['ac|geom|wing|S_ref']**2 | ||
J['fltcond|CL','fltcond|cosgamma'] = GRAV_CONST*inputs['weight']/inputs['fltcond|q']/inputs['ac|geom|wing|S_ref'] | ||
|
||
class DymosSteadyFlightODE(om.Group): |
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.
Other than DymosSteadyFlightODE
, the classes in this file are duplicates of phases.py
. Also, I believe this dymos component is not used anywhere, so we should either remove this file, or only keep DymosSteadyFlightODE
and import other stuff from phases.py
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 DymosSteadyFlightODE
has very few changes from the SteadyFlightPhase
, so I don't think it's worth keeping. I'm getting rid of it too
Purpose
This PR...
six
dependencyDo not bump the version or format the code in this PR, do it in another so we can ignore the changes in git blame.
Type of change
What types of change is it?
Select the appropriate type(s) that describe this PR
Checklist
Put an
x
in the boxes that apply.