Skip to content
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

Mission Report #126

Merged
merged 30 commits into from
Feb 15, 2024
Merged

Mission Report #126

merged 30 commits into from
Feb 15, 2024

Conversation

jkirk5
Copy link
Contributor

@jkirk5 jkirk5 commented Feb 1, 2024

Summary

Addition of mission summary report as well as minor reworks to subsystem reports

  • Adds a mission reporting framework that includes a simplified table of mission parameters, broken up by phase.
  • Reworks propulsion report to query each engine to add to the report, as well as provide system-level metrics.
  • Cleans up formatting for some existing subsystem reports
  • Fixes some bugs related to Aviary reports not always being generated.

Related Issues

None

Backwards incompatibilities

None

New Dependencies

None

@jkirk5 jkirk5 enabled auto-merge February 7, 2024 21:19
@jkirk5 jkirk5 requested review from crecine, jdgratz10 and johnjasa and removed request for jdgratz10 February 7, 2024 21:20
Copy link
Member

@johnjasa johnjasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks slick! Thank you. I added some minor questions.

Comment on lines 68 to 93
vals = prob.get_val(f"{traj}.{phase}.timeseries.{var_name}",
units=units,
indices=indices,)

except KeyError:
try:
vals = prob.get_val(f"{traj}.{phase}.states:{var_name}",
units=units,
indices=indices,)
except KeyError:
try:
vals = prob.get_val(f"{traj}.{phase}.timeseries.states:{var_name}",
units=units,
indices=indices,)
except KeyError:
try:
vals = prob.get_val(f"{traj}.{phase}.{var_name}",
units=units,
indices=indices,)
# 2DOF breguet range cruise uses time integration to track mass
except TypeError:
vals = prob.get_val(f"{traj}.{phase}.timeseries.time",
units=units,
indices=indices,)
except KeyError:
vals = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do all of these try/except blocks strictly need to be here? I'm thinking that most of the values we care about from the mission should be added to the timeseries (so they'd be accessible in the first try block).

Copy link
Contributor Author

@jkirk5 jkirk5 Feb 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I did some experimenting and some of these aren't required. I've removed the unneeded try/except blocks

aviary/interface/reports.py Outdated Show resolved Hide resolved
Copy link
Contributor

@crecine crecine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion that may or may not be possible and a couple of minor comments

aviary/interface/methods_for_level2.py Outdated Show resolved Hide resolved
Comment on lines 67 to 93
try:
vals = prob.get_val(f"{traj}.{phase}.timeseries.{var_name}",
units=units,
indices=indices,)

except KeyError:
try:
vals = prob.get_val(f"{traj}.{phase}.states:{var_name}",
units=units,
indices=indices,)
except KeyError:
try:
vals = prob.get_val(f"{traj}.{phase}.timeseries.states:{var_name}",
units=units,
indices=indices,)
except KeyError:
try:
vals = prob.get_val(f"{traj}.{phase}.{var_name}",
units=units,
indices=indices,)
# 2DOF breguet range cruise uses time integration to track mass
except TypeError:
vals = prob.get_val(f"{traj}.{phase}.timeseries.time",
units=units,
indices=indices,)
except KeyError:
vals = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this be changed to something like:

key_paths = [f"timeseries.{var_name}", f"states:{var_name}", f"timeseries.states:{var_name}", f"{var_name}", "timeseries.time"]
vals = None
for key_path in key_paths:
	try:
		vals = prob.get_val(f"{traj}.{phase}.{key_path}", units=units, indices=indices,)
		return vals
	except KeyError:
		pass

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That will work for everything except catching the TypeError that only shows up for the timeseries.time check. I'll play around a little with this idea

@jkirk5 jkirk5 closed this Feb 15, 2024
auto-merge was automatically disabled February 15, 2024 16:14

Pull request was closed

@jkirk5 jkirk5 reopened this Feb 15, 2024
@johnjasa johnjasa enabled auto-merge February 15, 2024 21:17
@johnjasa johnjasa added this pull request to the merge queue Feb 15, 2024
Merged via the queue into OpenMDAO:main with commit 4881260 Feb 15, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants