Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
da4eeaf
fixes for electric test case
jkirk5 Mar 4, 2026
978ad0d
removed hardcoded design vars from motor model
jkirk5 Mar 4, 2026
34c4f0e
minor updates to electrified turboprop test case
jkirk5 Mar 5, 2026
d678d3c
Merge latest, resolve conflicts
Kenneth-T-Moore Mar 17, 2026
f1d0f48
Merge branch 'ham' of github.com:Kenneth-T-Moore/aviary into jason_turbo
Kenneth-T-Moore Mar 17, 2026
50fa7b7
jason_t
Kenneth-T-Moore Mar 17, 2026
13bdce1
cleanup
Kenneth-T-Moore Mar 17, 2026
63a8d36
debugging
Kenneth-T-Moore Mar 17, 2026
03e1d67
debugging
Kenneth-T-Moore Mar 17, 2026
9d41d0e
Merge branch 'ham' of github.com:Kenneth-T-Moore/aviary into jason_turbo
Kenneth-T-Moore Mar 18, 2026
f34a0b8
Merge branch 'ham' of github.com:Kenneth-T-Moore/aviary into jason_turbo
Kenneth-T-Moore Mar 18, 2026
850d286
Merge branch 'ham' of github.com:Kenneth-T-Moore/aviary into jason_turbo
Kenneth-T-Moore Mar 18, 2026
ee82900
Merge branch 'ham' of github.com:Kenneth-T-Moore/aviary into jason_turbo
Kenneth-T-Moore Mar 18, 2026
602e985
Debugging
Kenneth-T-Moore Mar 19, 2026
68ede9f
Merge latest
Kenneth-T-Moore Mar 21, 2026
492d58d
Merge branch 'main' of github.com:OpenMDAO/Aviary into jason_turbo
Kenneth-T-Moore Mar 21, 2026
2d24043
Lower drag for the turboprop problem
Kenneth-T-Moore Mar 24, 2026
4a8ed06
Merge branch 'main' of github.com:OpenMDAO/Aviary into jason_turbo
Kenneth-T-Moore Mar 24, 2026
dd33703
merge in real fix for the broken constraint in 2dof
Kenneth-T-Moore Mar 27, 2026
99d3b8c
Merge pull request #29 from Kenneth-T-Moore/jason_turbo
jkirk5 Mar 30, 2026
dcd40ab
Merge branch 'main' into turboprop_freighter_fixes
jkirk5 Apr 3, 2026
2b1c649
Merge branch 'main' into turboprop_freighter_fixes
jkirk5 Apr 3, 2026
e2dbb96
updates for latest merge
jkirk5 Apr 3, 2026
8d3b18b
moved motor data file to correct location
jkirk5 Apr 3, 2026
d8b557c
A few small fixes.
Kenneth-T-Moore Apr 7, 2026
a9ab293
Added pack initial guess.
Kenneth-T-Moore Apr 8, 2026
2b31ccf
Merge pull request #30 from Kenneth-T-Moore/jason_turbo2
jkirk5 Apr 9, 2026
87f3c42
typehints for subsystembuilder
jkirk5 Apr 13, 2026
9e8d05f
builder updates
jkirk5 Apr 13, 2026
90d18e0
returned kwargs to reports
jkirk5 Apr 13, 2026
d63a595
rpm control electroprop wip
jkirk5 Apr 13, 2026
af211ef
debugging motor RPM control
jkirk5 Apr 14, 2026
e3bd336
Fixed a couple of bugs
Kenneth-T-Moore Apr 14, 2026
e09ce7a
Merge pull request #31 from Kenneth-T-Moore/jason_turbo3
jkirk5 Apr 14, 2026
a86057e
Fix an indentation error in the Hamilton Standard interps that affect…
Kenneth-T-Moore Apr 14, 2026
b2653a0
Merge pull request #32 from Kenneth-T-Moore/jason_turbo3
jkirk5 Apr 14, 2026
da484f5
propeller RPM connection bug fixed
jkirk5 Apr 14, 2026
85d054d
Merge branch 'turboprop_freighter_fixes' of https://github.com/jkirk5…
jkirk5 Apr 14, 2026
c1ce2bc
RPM & throttle pairing in motor model
jkirk5 Apr 16, 2026
4f8bd0c
Merge branch 'main' into turboprop_freighter_fixes
jkirk5 Apr 16, 2026
2f25d36
removed redundant max calc from motor
jkirk5 Apr 16, 2026
570bdc2
remove obsolete kwargs references in turboprop model
jkirk5 Apr 16, 2026
99f52ba
fix turboprop test
jkirk5 Apr 16, 2026
cb6cbc8
experimental motor fixes
jkirk5 Apr 16, 2026
9b88581
electric turboprop model updates
jkirk5 Apr 16, 2026
985e19a
fixed mistake in phase info user options
jkirk5 Apr 17, 2026
50f4cf6
update subsystem name typo
jkirk5 Apr 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ aviary/reports/

#VSCode user settings
.vscode/
#VSCode extensions
.continue/

# Built docs
_build/
Expand Down
2 changes: 1 addition & 1 deletion aviary/core/aviary_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def configure(self):

# Temporarily add extra stuff here, probably patched soon
# add a check for traj using hasattr for pre-mission tests.
if mission_method is ENERGY_STATE and hasattr(self, 'traj'):
if hasattr(self, 'traj'):
# Set a more appropriate solver for dymos when the phases are linked.
if MPI and isinstance(self.traj.phases.linear_solver, om.PETScKrylov):
# When any phase is connected with input_initial = True, dymos puts
Expand Down
5 changes: 2 additions & 3 deletions aviary/interface/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def register_custom_reports():
class_name='AviaryProblem',
method='run_driver',
pre_or_post='post',
# **kwargs
)

register_report(
Expand Down Expand Up @@ -148,7 +147,7 @@ def sizing_results(prob: AviaryProblem):
prob.save_results(report_file)


def subsystem_report(prob: AviaryProblem, **kwargs):
def subsystem_report(prob: AviaryProblem):
"""
Loops through all subsystem builders in the AviaryProblem calls their write_report
method. All generated report files are placed in the "reports/subsystem_reports" folder.
Expand Down Expand Up @@ -176,7 +175,7 @@ def subsystem_report(prob: AviaryProblem, **kwargs):
subsystems = model.subsystems # TODO: redo for multimissions

for subsystem in subsystems:
subsystem.report(prob, reports_folder, **kwargs)
subsystem.report(prob, reports_folder)


def mission_report(prob: AviaryProblem, **kwargs):
Expand Down
49 changes: 33 additions & 16 deletions aviary/mission/two_dof/ode/landing_ode.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import numpy as np
import openmdao.api as om

from aviary.mission.two_dof.ode.landing_eom import (
GlideConditionComponent,
Expand Down Expand Up @@ -35,13 +36,39 @@ def setup(self):
promotes_outputs=[Mission.Landing.INITIAL_ALTITUDE],
)

alias_comp = om.ExecComp(
'alt=airport_alt',
alt={
'val': np.zeros(1),
'units': 'ft',
},
airport_alt={'val': np.zeros(1), 'units': 'ft'},
has_diag_partials=True,
)

alias_comp.add_expr(
'mach=landing_mach',
mach={'val': np.zeros(1), 'units': 'unitless'},
landing_mach={'val': np.zeros(1), 'units': 'unitless'},
)

self.add_subsystem(
name='atmosphere',
subsys=Atmosphere(num_nodes=1, input_speed_type=SpeedType.MACH),
'alias_landing_phase',
alias_comp,
promotes_inputs=[
(Dynamic.Mission.ALTITUDE, Mission.Landing.INITIAL_ALTITUDE),
(Dynamic.Atmosphere.MACH, Mission.Landing.INITIAL_MACH),
('airport_alt', Mission.Landing.AIRPORT_ALTITUDE),
('landing_mach', Mission.Landing.INITIAL_MACH),
],
promotes_outputs=[
('alt', Dynamic.Mission.ALTITUDE),
('mach', Dynamic.Atmosphere.MACH),
],
)

self.add_subsystem(
name='atmosphere',
subsys=Atmosphere(num_nodes=1, input_speed_type=SpeedType.MACH),
promotes_inputs=[Dynamic.Mission.ALTITUDE, Dynamic.Atmosphere.MACH],
promotes_outputs=[
Dynamic.Atmosphere.DENSITY,
Dynamic.Atmosphere.SPEED_OF_SOUND,
Expand Down Expand Up @@ -72,14 +99,9 @@ def setup(self):
aero_system,
promotes_inputs=[
'*',
(
Dynamic.Mission.ALTITUDE,
Mission.Landing.INITIAL_ALTITUDE,
),
Dynamic.Atmosphere.DENSITY,
Dynamic.Atmosphere.SPEED_OF_SOUND,
Dynamic.Atmosphere.DYNAMIC_VISCOSITY,
('airport_alt', Mission.Landing.AIRPORT_ALTITUDE),
(Dynamic.Atmosphere.MACH, Mission.Landing.INITIAL_MACH),
Dynamic.Atmosphere.DYNAMIC_PRESSURE,
('flap_defl', Aircraft.Wing.FLAP_DEFLECTION_LANDING),
Expand Down Expand Up @@ -108,11 +130,7 @@ def setup(self):
propulsion_mission = self.add_subsystem(
subsystem.name,
propulsion_system,
promotes_inputs=[
'*',
(Dynamic.Mission.ALTITUDE, Mission.Landing.AIRPORT_ALTITUDE),
(Dynamic.Atmosphere.MACH, Mission.Landing.INITIAL_MACH),
],
promotes_inputs=['*'],
promotes_outputs=[(Dynamic.Vehicle.Propulsion.THRUST_TOTAL, 'thrust_idle')],
)
propulsion_mission.set_input_defaults(Dynamic.Vehicle.Propulsion.THROTTLE, 0.0)
Expand Down Expand Up @@ -150,7 +168,7 @@ def setup(self):
name='atmosphere_td',
subsys=Atmosphere(num_nodes=1),
promotes_inputs=[
(Dynamic.Mission.ALTITUDE, Mission.Landing.AIRPORT_ALTITUDE),
Dynamic.Mission.ALTITUDE,
(Dynamic.Mission.VELOCITY, 'TAS_touchdown'),
],
promotes_outputs=[
Expand All @@ -175,7 +193,6 @@ def setup(self):
),
promotes_inputs=[
'*',
(Dynamic.Mission.ALTITUDE, Mission.Landing.AIRPORT_ALTITUDE),
(Dynamic.Atmosphere.DENSITY, 'rho_td'),
(Dynamic.Atmosphere.SPEED_OF_SOUND, 'sos_td'),
(Dynamic.Atmosphere.DYNAMIC_VISCOSITY, 'viscosity_td'),
Expand Down
4 changes: 2 additions & 2 deletions aviary/mission/two_dof/ode/simple_cruise_ode.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def setup(self):
bal = om.BalanceComp(
name=Dynamic.Vehicle.Propulsion.THROTTLE,
val=np.ones(nn),
upper=1.0,
lower=0.0,
#upper=1.0,
#lower=0.0,
units='unitless',
lhs_name=Dynamic.Vehicle.Propulsion.THRUST_TOTAL,
rhs_name=Dynamic.Vehicle.DRAG,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
from aviary.variable_info.enums import SpeedType, PhaseType, ThrottleAllocation
from aviary.variable_info.enums import PhaseType, SpeedType

# Energy method
energy_phase_info = {
'pre_mission': {
'include_takeoff': False,
'optimize_mass': True,
},
'pre_mission': {'include_takeoff': False, 'optimize_mass': True},
'climb': {
'subsystem_options': {'core_aerodynamics': {'method': 'cruise', 'solve_alpha': 'true'}},
'subsystem_options': {'aerodynamics': {'method': 'cruise', 'solve_alpha': True}},
'user_options': {
'num_segments': 5,
'order': 3,
Expand All @@ -20,16 +17,18 @@
'no_descent': True,
'mass_ref': (154000, 'lbm'),
'throttle_enforcement': 'control',
'throttle_bounds': ((0.2, 1), 'unitless'),
'time_initial_bounds': ((0.0, 0.0), 'min'),
'time_duration_bounds': ((24.0, 128.0), 'min'),
},
'initial_guesses': {
'altitude': ([100.0, 21_000.0], 'ft'),
'mach': ([0.17, 0.475], 'unitless'),
'throttle': ([1, 1], 'unitless'),
},
},
'cruise': {
'subsystem_options': {'core_aerodynamics': {'method': 'cruise', 'solve_alpha': 'true'}},
'subsystem_options': {'aerodynamics': {'method': 'cruise', 'solve_alpha': True}},
'user_options': {
'num_segments': 5,
'order': 3,
Expand All @@ -41,16 +40,18 @@
'altitude_bounds': ((20_000.0, 22_000.0), 'ft'),
'mass_ref': (154000, 'lbm'),
'throttle_enforcement': 'control',
'throttle_bounds': ((0.2, 1), 'unitless'),
'time_initial_bounds': ((24.0, 128.0), 'min'),
'time_duration_bounds': ((56.5, 1000.0), 'min'),
},
'initial_guesses': {
'altitude': ([21_000, 21_000.0], 'ft'),
'mach': ([0.475, 0.475], 'unitless'),
'throttle': ([1, 1], 'unitless'),
},
},
'descent': {
'subsystem_options': {'core_aerodynamics': {'method': 'cruise', 'solve_alpha': 'true'}},
'subsystem_options': {'aerodynamics': {'method': 'cruise', 'solve_alpha': True}},
'user_options': {
'num_segments': 5,
'order': 3,
Expand All @@ -65,9 +66,11 @@
'mass_ref': (154000, 'lbm'),
'no_climb': True,
'throttle_enforcement': 'control',
'throttle_bounds': ((0.15, 1), 'unitless'),
'time_initial_bounds': ((80, 1056.5), 'min'),
'time_duration_bounds': ((29.0, 128.0), 'min'),
},
'initial_guesses': {'throttle': ([0.5, 0.15], 'unitless')},
},
'post_mission': {
'include_landing': False,
Expand Down Expand Up @@ -253,19 +256,19 @@
'throttle': ([0.956, 0.956], 'unitless'),
},
},
'electric_cruise': {
'cruise': {
'user_options': {
'phase_type': PhaseType.BREGUET_RANGE,
'phase_type': PhaseType.SIMPLE_CRUISE,
'alt_cruise': (21_000, 'ft'),
'mach_cruise': 0.475,
'mass_bounds': ((0, None), 'lbm'),
'mass_ref': (150_000, 'lbm'),
'time_duration_bounds': ((0.0, 15.0), 'h'),
'time_duration_ref': (8, 'h'),
},
'initial_guesses': {
# [Initial mass, delta mass] for special cruise phase.
'mass': ([150_000.0, -35_000], 'lbm'),
'initial_distance': (100.0e3, 'ft'),
'initial_time': (1_000.0, 's'),
'altitude': (21_000, 'ft'),
'mach': (0.475, 'unitless'),
'mass': ([150_000.0, 115000], 'lbm'),
'time': ([1516.0, 2100.0], 's'),
},
},
'desc1': {
Expand All @@ -277,7 +280,7 @@
'input_speed_type': SpeedType.MACH,
'time_duration_bounds': ((300.0, 1800.0), 's'),
'time_duration_ref': (1000, 's'),
'altitude_initial': (21_000, 'ft'),
# 'altitude_initial': (21_000, 'ft'),
'altitude_final': (10_000, 'ft'),
'altitude_bounds': ((10000.0, 21_000.0), 'ft'),
'altitude_ref': (20_000, 'ft'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ settings:mass_method, GASP
############
# AIRCRAFT #
############
aircraft:design:subsonic_drag_coeff_factor, 1.447, unitless
# This was the original value in this file. We needed to decrease the drag
# to get a good optimization.
# aircraft:design:subsonic_drag_coeff_factor, 1.447, unitless
aircraft:design:subsonic_drag_coeff_factor, 1.33, unitless

# Design
aircraft:design:cg_delta, 0.25, unitless
Expand Down Expand Up @@ -49,7 +52,7 @@ aircraft:crew_and_payload:water_mass_per_occupant, 0, lbm

# Engine/Propulsion
# setting electrical mass may not do anything
aircraft:electrical:mass, 300, lbm
#aircraft:electrical:mass, 300, lbm
aircraft:engine:additional_mass_fraction, 0.34, unitless
aircraft:engine:data_file, models/engines/turboshaft_4465hp.csv
aircraft:engine:mass_scaler, 1, unitless
Expand Down
19 changes: 11 additions & 8 deletions aviary/models/aircraft/large_turboprop_freighter/phase_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
energy_phase_info = {
'pre_mission': {'include_takeoff': False, 'optimize_mass': True},
'climb': {
'subsystem_options': {'core_aerodynamics': {'method': 'cruise', 'solve_alpha': 'true'}},
'subsystem_options': {'aerodynamics': {'method': 'cruise', 'solve_alpha': True}},
'user_options': {
'num_segments': 5,
'order': 3,
Expand All @@ -26,7 +26,7 @@
},
},
'cruise': {
'subsystem_options': {'core_aerodynamics': {'method': 'cruise', 'solve_alpha': 'true'}},
'subsystem_options': {'aerodynamics': {'method': 'cruise', 'solve_alpha': True}},
'user_options': {
'num_segments': 5,
'order': 3,
Expand All @@ -47,7 +47,7 @@
},
},
'descent': {
'subsystem_options': {'core_aerodynamics': {'method': 'cruise', 'solve_alpha': 'true'}},
'subsystem_options': {'aerodynamics': {'method': 'cruise', 'solve_alpha': True}},
'user_options': {
'num_segments': 5,
'order': 3,
Expand Down Expand Up @@ -141,18 +141,19 @@
'velocity_ref': (200, 'kn'),
'velocity_ref0': (0, 'kn'),
'time_duration_ref': (10, 's'),
'time_duration_bounds': ((5.0, 25.0), 's'),
'mass_bounds': ((0, None), 'lbm'),
'mass_ref': (150_000, 'lbm'),
'mass_defect_ref': (150_000, 'lbm'),
'distance_bounds': ((0, 15_000), 'ft'),
'distance_ref': (1e4, 'ft'),
'distance_defect_ref': (1e4, 'ft'),
'altitude_bounds': ((0.0, 700.0), 'ft'),
'altitude_ref': (1000, 'ft'),
'altitude_defect_ref': (1000, 'ft'),
'altitude_ref': (500, 'ft'),
'altitude_defect_ref': (500, 'ft'),
'altitude_final': (500, 'ft'),
'altitude_constraint_ref': (500, 'ft'),
'flight_path_angle_bounds': ((-10.0, 20.0), 'rad'),
'flight_path_angle_bounds': ((0.0, 20.0), 'rad'),
'flight_path_angle_ref': (57.2958, 'deg'),
'flight_path_angle_defect_ref': (57.2958, 'deg'),
'flight_path_angle_initial': (0.0, 'deg'),
Expand Down Expand Up @@ -203,7 +204,7 @@
'order': 3,
'EAS_target': (250, 'kn'),
'mach_target': 0.475,
'time_duration_bounds': ((30, 300), 's'),
'time_duration_bounds': ((30, 400), 's'),
'time_duration_ref': (1000, 's'),
'altitude_final': (10.0e3, 'ft'),
'altitude_bounds': ((400.0, 11_000.0), 'ft'),
Expand All @@ -212,7 +213,7 @@
'mass_ref': (150_000, 'lbm'),
'mass_defect_ref': (150_000, 'lbm'),
'distance_bounds': ((0, 500.0), 'NM'),
'distance_ref': (10, 'NM'),
'distance_ref': (20, 'NM'),
'distance_ref0': (0, 'NM'),
},
'initial_guesses': {
Expand Down Expand Up @@ -253,6 +254,8 @@
'cruise': {
'user_options': {
'phase_type': PhaseType.SIMPLE_CRUISE,
'num_segments': 1,
'order': 3,
'alt_cruise': (21_000, 'ft'),
'mach_cruise': 0.475,
'mass_bounds': ((0, None), 'lbm'),
Expand Down
2 changes: 1 addition & 1 deletion aviary/subsystems/performance/performance_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PerformanceBuilder(SubsystemBuilder):
Initializes the PerformanceBuilder object with a given name.
"""

_default_name = 'mass'
_default_name = 'performance'


class CorePerformanceBuilder(PerformanceBuilder):
Expand Down
6 changes: 3 additions & 3 deletions aviary/subsystems/propulsion/gearbox/gearbox_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ def get_mass_names(self, aviary_inputs=None):

def get_timeseries(self, aviary_inputs=None, user_options=None, subsystem_options=None):
return [
Dynamic.Vehicle.Propulsion.SHAFT_POWER + '_out',
# Dynamic.Vehicle.Propulsion.SHAFT_POWER + '_out',
# Dynamic.Vehicle.Propulsion.SHAFT_POWER_MAX + '_out',
Dynamic.Vehicle.Propulsion.RPM + '_out',
Dynamic.Vehicle.Propulsion.TORQUE + '_out',
# Dynamic.Vehicle.Propulsion.RPM + '_out',
# Dynamic.Vehicle.Propulsion.TORQUE + '_out',
# Mission.Constraints.GEARBOX_SHAFT_POWER_RESIDUAL,
]

Expand Down
2 changes: 1 addition & 1 deletion aviary/subsystems/propulsion/motor/model/motor_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def setup(self):
)
efficiency_units = units_dict['efficiency']

motor = om.MetaModelStructuredComp(method='slinear', vec_size=n, extrapolate=False)
motor = om.MetaModelStructuredComp(method='slinear', vec_size=n, extrapolate=True)
motor.add_input(
Dynamic.Vehicle.Propulsion.RPM,
val=np.ones(n),
Expand Down
Loading
Loading