Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
294cadd
added verbosity to get_path() call
xjjiang Jun 5, 2026
0faf4e0
fixed a minor bug when calling get_path()
xjjiang Jun 5, 2026
83d8a58
Merge branch 'main' into get_path_with_verbosity
xjjiang Jun 9, 2026
f20ecf4
Merge branch 'main' into get_path_with_verbosity
xjjiang Jun 12, 2026
3c3799f
Merge branch 'main' into get_path_with_verbosity
xjjiang Jun 18, 2026
d1cdbe6
Merge branch 'main' into get_path_with_verbosity
xjjiang Jun 22, 2026
669e2f0
update landing EOM and ODE
xjjiang Jun 23, 2026
b8c090e
update test_landing_eom.py and test_mission_eom.py
xjjiang Jun 23, 2026
968140e
update range_rate.py and test_range_rate.py
xjjiang Jun 23, 2026
b604b23
update test_required_thrust.py
xjjiang Jun 23, 2026
ae3ff44
update required_thrust.py
xjjiang Jun 23, 2026
97fbd12
failed one test. Change one self.add_input to add_aviary_input
xjjiang Jun 23, 2026
91559c8
changed the second one self.add_input to add_aviary_input
xjjiang Jun 23, 2026
809e8f2
changed the third one self.add_input to add_aviary_input
xjjiang Jun 23, 2026
ded7fa4
update takeoff_eom.py
xjjiang Jun 24, 2026
0911ed3
update test_takeoff_eom.py and test_takeoff_ode.py
xjjiang Jun 24, 2026
8beb634
update test_building_landing.py test_building_takeoff.py test_simplif…
xjjiang Jun 24, 2026
db276c6
update simplified_takeoff.py
xjjiang Jun 24, 2026
3efaa0f
update altitude_rate.py specific_energy_rate.py
xjjiang Jun 24, 2026
9ac331d
update test_altitude_rate.py and test_specific_energy_rate.py
xjjiang Jun 24, 2026
76897ad
update gamma_comp.py
xjjiang Jun 24, 2026
e6a4466
update unsteady_solved_eom.py and unsteady_solved_flight_conditions.py
xjjiang Jun 24, 2026
5507f29
update unsteady_solved_flight_conditions.py
xjjiang Jun 24, 2026
090397c
added use_tempdirs
xjjiang Jun 24, 2026
8c625be
update groundroll_eom.py
xjjiang Jun 24, 2026
e5136a2
update flight_constraints.py and speed_constraints.py
xjjiang Jun 24, 2026
ad0302c
added use_tempdirs to test_climb_constraints.py and test_flight_const…
xjjiang Jun 24, 2026
d305b15
added use_tempdirs
xjjiang Jun 24, 2026
3dedefd
update accel_eom.py breguet_cruise_eom.py landing_eom.py simple_cruis…
xjjiang Jun 24, 2026
55927f5
added 'tags' to function add_aviary_output()
xjjiang Jun 24, 2026
dbfa505
update test_interface_bugs.py, test_shape_by_conn.py, and engine_deck…
xjjiang Jun 24, 2026
b288cb1
try update required_thrust.py again
xjjiang Jun 24, 2026
c54fe86
try update required_thrust.py again
xjjiang Jun 24, 2026
3db3887
it worked this time. Updating the last one
xjjiang Jun 24, 2026
7cac310
Merge branch 'OpenMDAO:main' into standardize_aviary_commands
xjjiang Jun 26, 2026
d1efa88
removed my mod on add_aviary_output
xjjiang Jun 26, 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: 1 addition & 1 deletion aviary/core/aviary_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def load_inputs(
## LOAD PHASE_INFO ###
# if phase info is a file, load it
if isinstance(phase_info, str) or isinstance(phase_info, Path):
phase_info_path = get_path(phase_info)
phase_info_path = get_path(phase_info, verbosity)
spec = spec_from_file_location('phase_info_file', str(phase_info_path))
phase_info_file = module_from_spec(spec)
sys.modules['phase_info_file'] = phase_info_file
Expand Down
2 changes: 1 addition & 1 deletion aviary/core/aviary_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -2156,7 +2156,7 @@ def reload_aviary_problem(
# Initialize a new aviary problem and aviary_input data structure
prob = AviaryProblem()

filename = get_path(filename)
filename = get_path(filename, verbosity)

aviary_inputs = _read_sizing_json(filename, metadata, verbosity)

Expand Down
4 changes: 3 additions & 1 deletion aviary/docs/user_guide_unreviewed/aviary_commands.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@
"{glue:md}`aviary run_mission models/aircraft/small_single_aisle/small_single_aisle_GASP.csv` in\n",
"{glue:md}`aviary/models/aircraft/small_single_aisle`\n",
"\n",
"SNOPT is the default optimizer, but IPOPT is available as well."
"SNOPT is the default optimizer, but IPOPT is available as well.\n",
"\n",
"Note: Do not use the test models in `validation_cases/validation_data/test_models`. They are for testing purpose only."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion aviary/interface/run_aviary.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def run_aviary_cmd(
}

if isinstance(phase_info, str):
phase_info_path = get_path(phase_info)
phase_info_path = get_path(phase_info, verbosity)
spec = spec_from_file_location('phase_info_file', str(phase_info_path))
phase_info_file = module_from_spec(spec)
sys.modules['phase_info_file'] = phase_info_file
Expand Down
5 changes: 3 additions & 2 deletions aviary/interface/test/test_interface_bugs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
)
from aviary.subsystems.subsystem_builder import SubsystemBuilder
from aviary.utils.functions import get_aviary_resource_path
from aviary.variable_info.functions import add_aviary_input, add_aviary_output
from aviary.variable_info.variables import Aircraft


class WingWeightSubsys(om.ExplicitComponent):
def setup(self):
self.add_input(Aircraft.Engine.MASS, 1.0, units='lbm')
self.add_output(Aircraft.Canard.ASPECT_RATIO, 1.0, units='unitless')
add_aviary_input(self, Aircraft.Engine.MASS, 1.0, units='lbm')
add_aviary_output(self, Aircraft.Canard.ASPECT_RATIO, 1.0, units='unitless')
self.add_output('Tail', 1.0, units='unitless')

self.declare_partials(Aircraft.Canard.ASPECT_RATIO, Aircraft.Engine.MASS, val=2.0)
Expand Down
4 changes: 3 additions & 1 deletion aviary/interface/test/test_shape_by_conn.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ def test_shape_bug_two(self):

class PostComponent(om.ExplicitComponent):
def setup(self):
self.add_input(Aircraft.Design.DRAG_POLAR, shape_by_conn=True, units='unitless')
add_aviary_input(
self, Aircraft.Design.DRAG_POLAR, shape_by_conn=True, units='unitless'
)
add_aviary_input(
self, Aircraft.Design.LIFT_POLAR, shape_by_conn=True, units='unitless'
)
Expand Down
4 changes: 2 additions & 2 deletions aviary/mission/energy_state/ode/landing_eom.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def setup(self):
add_aviary_input(self, Dynamic.Vehicle.LIFT, val=np.ones(nn), units='N')
add_aviary_input(self, Dynamic.Vehicle.DRAG, val=np.ones(nn), units='N')

self.add_input(Dynamic.Vehicle.ANGLE_OF_ATTACK, val=np.zeros(nn), units='rad')
add_aviary_input(self, Dynamic.Vehicle.ANGLE_OF_ATTACK, val=np.zeros(nn), units='rad')

add_aviary_input(self, Dynamic.Mission.FLIGHT_PATH_ANGLE, val=np.zeros(nn), units='rad')

Expand Down Expand Up @@ -322,7 +322,7 @@ def setup(self):
add_aviary_input(self, Dynamic.Vehicle.Propulsion.THRUST_TOTAL, val=np.ones(nn), units='N')
add_aviary_input(self, Dynamic.Vehicle.DRAG, val=np.ones(nn), units='N')

self.add_input(Dynamic.Vehicle.ANGLE_OF_ATTACK, val=np.zeros(nn), units='rad')
add_aviary_input(self, Dynamic.Vehicle.ANGLE_OF_ATTACK, val=np.zeros(nn), units='rad')

add_aviary_input(self, Dynamic.Mission.FLIGHT_PATH_ANGLE, val=np.zeros(nn), units='rad')

Expand Down
10 changes: 7 additions & 3 deletions aviary/mission/energy_state/ode/range_rate.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import numpy as np
import openmdao.api as om
from aviary.variable_info.functions import add_aviary_input, add_aviary_output

from aviary.variable_info.variables import Dynamic

Expand All @@ -16,19 +17,22 @@ def initialize(self):
def setup(self):
nn = self.options['num_nodes']

self.add_input(
add_aviary_input(
self,
Dynamic.Mission.ALTITUDE_RATE,
val=np.ones(nn),
desc='climb rate',
units='m/s',
)
self.add_input(
add_aviary_input(
self,
Dynamic.Mission.VELOCITY,
val=np.ones(nn),
desc='current velocity',
units='m/s',
)
self.add_output(
add_aviary_output(
self,
Dynamic.Mission.DISTANCE_RATE,
val=np.ones(nn),
desc='current horizontal velocity (assumed no wind)',
Expand Down
16 changes: 10 additions & 6 deletions aviary/mission/energy_state/ode/required_thrust.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import numpy as np
import openmdao.api as om
from aviary.variable_info.functions import add_aviary_input

from aviary.constants import GRAV_METRIC_FLOPS as gravity
from aviary.variable_info.variables import Dynamic
Expand All @@ -17,27 +18,30 @@ def initialize(self):
def setup(self):
nn = self.options['num_nodes']

self.add_input(Dynamic.Vehicle.DRAG, val=np.zeros(nn), units='N', desc='drag force')
self.add_input(
add_aviary_input(self, Dynamic.Vehicle.DRAG, val=np.zeros(nn), units='N', desc='drag force')
add_aviary_input(
self,
Dynamic.Mission.ALTITUDE_RATE,
val=np.zeros(nn),
units='m/s',
desc='rate of change of altitude',
)
self.add_input(
add_aviary_input(
self,
Dynamic.Mission.VELOCITY,
val=np.zeros(nn),
units='m/s',
desc=Dynamic.Mission.VELOCITY,
)
self.add_input(
add_aviary_input(
self,
Dynamic.Mission.VELOCITY_RATE,
val=np.zeros(nn),
units='m/s**2',
desc='rate of change of velocity',
)
self.add_input(
Dynamic.Vehicle.MASS, val=np.zeros(nn), units='kg', desc='mass of the aircraft'
add_aviary_input(
self, Dynamic.Vehicle.MASS, val=np.zeros(nn), units='kg', desc='mass of the aircraft'
)
self.add_output('thrust_required', val=np.zeros(nn), units='N', desc='required thrust')

Expand Down
4 changes: 2 additions & 2 deletions aviary/mission/energy_state/ode/takeoff_eom.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ def setup(self):
add_aviary_input(self, Dynamic.Vehicle.Propulsion.THRUST_TOTAL, val=np.ones(nn), units='N')
add_aviary_input(self, Dynamic.Vehicle.DRAG, val=np.ones(nn), units='N')

self.add_input(Dynamic.Vehicle.ANGLE_OF_ATTACK, val=np.zeros(nn), units='rad')
add_aviary_input(self, Dynamic.Vehicle.ANGLE_OF_ATTACK, val=np.zeros(nn), units='rad')

add_aviary_input(self, Dynamic.Mission.FLIGHT_PATH_ANGLE, val=np.zeros(nn), units='rad')

Expand Down Expand Up @@ -770,7 +770,7 @@ def setup(self):
add_aviary_input(self, Dynamic.Vehicle.Propulsion.THRUST_TOTAL, val=np.ones(nn), units='N')
add_aviary_input(self, Dynamic.Vehicle.DRAG, val=np.ones(nn), units='N')

self.add_input(Dynamic.Vehicle.ANGLE_OF_ATTACK, val=np.zeros(nn), units='rad')
add_aviary_input(self, Dynamic.Vehicle.ANGLE_OF_ATTACK, val=np.zeros(nn), units='rad')

add_aviary_input(self, Dynamic.Mission.FLIGHT_PATH_ANGLE, val=np.zeros(nn), units='rad')

Expand Down
7 changes: 3 additions & 4 deletions aviary/mission/energy_state/ode/test/test_landing_eom.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import numpy as np
import openmdao.api as om
from openmdao.utils.assert_utils import assert_check_partials, assert_near_equal
from openmdao.utils.testing_utils import use_tempdirs

from aviary.mission.energy_state.ode.landing_eom import (
FlareEOM,
Expand All @@ -21,6 +22,7 @@
from aviary.variable_info.variables import Dynamic


@use_tempdirs
class FlareEOMTest(unittest.TestCase):
"""Test against data of detailed_landing_flare from models/aircraft/advanced_single_aisle/advanced_single_aisle_data.py."""

Expand Down Expand Up @@ -201,7 +203,4 @@ def test_GroundSumForces(self):


if __name__ == '__main__':
# unittest.main()
test = FlareEOMTest()
test.setUp()
test.test_case()
unittest.main()
2 changes: 2 additions & 0 deletions aviary/mission/energy_state/ode/test/test_landing_ode.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import unittest

import openmdao.api as om
from openmdao.utils.testing_utils import use_tempdirs

from aviary.mission.energy_state.ode.landing_ode import FlareODE
from aviary.validation_cases.validation_data.test_data.advanced_single_aisle_data import (
Expand All @@ -18,6 +19,7 @@
from aviary.variable_info.variables import Aircraft, Dynamic


@use_tempdirs
class FlareODETest(unittest.TestCase):
"""Test against data of detailed_landing_flare from models/aircraft/advanced_single_aisle/advanced_single_aisle_data.py."""

Expand Down
3 changes: 3 additions & 0 deletions aviary/mission/energy_state/ode/test/test_mission_eom.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
import numpy as np
import openmdao.api as om
from openmdao.utils.assert_utils import assert_check_partials, assert_near_equal
from openmdao.utils.testing_utils import use_tempdirs


from aviary.mission.energy_state.ode.mission_EOM import MissionEOM
from aviary.utils.test_utils.variable_test import assert_match_varnames
from aviary.variable_info.variables import Dynamic


@use_tempdirs
class MissionEOMTest(unittest.TestCase):
"""Test energy-method equations of motion."""

Expand Down
2 changes: 2 additions & 0 deletions aviary/mission/energy_state/ode/test/test_range_rate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import unittest

import openmdao.api as om
from openmdao.utils.testing_utils import use_tempdirs

from aviary.mission.energy_state.ode.range_rate import RangeRate
from aviary.utils.test_utils.variable_test import assert_match_varnames
Expand All @@ -9,6 +10,7 @@
from aviary.variable_info.variables import Dynamic


@use_tempdirs
class RangeRateTest(unittest.TestCase):
def setUp(self):
"""Test using data from validation_cases/validation_data/flops_data/full_mission_test_data.py."""
Expand Down
2 changes: 2 additions & 0 deletions aviary/mission/energy_state/ode/test/test_required_thrust.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
import numpy as np
import openmdao.api as om
from openmdao.utils.assert_utils import assert_check_partials, assert_near_equal
from openmdao.utils.testing_utils import use_tempdirs

from aviary.mission.energy_state.ode.required_thrust import RequiredThrust
from aviary.utils.test_utils.variable_test import assert_match_varnames
from aviary.variable_info.variables import Dynamic


@use_tempdirs
class RequiredThrustTest(unittest.TestCase):
"""Test required thrust."""

Expand Down
2 changes: 2 additions & 0 deletions aviary/mission/energy_state/ode/test/test_takeoff_eom.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import numpy as np
import openmdao.api as om
from openmdao.utils.assert_utils import assert_check_partials, assert_near_equal
from openmdao.utils.testing_utils import use_tempdirs

from aviary.mission.energy_state.ode.takeoff_eom import (
Accelerations,
Expand All @@ -27,6 +28,7 @@
inputs.set_val(Aircraft.Engine.NUM_ENGINES, np.array([2]))


@use_tempdirs
class TakeoffEOMTest(unittest.TestCase):
"""Test detailed takeoff equation of motion."""

Expand Down
2 changes: 2 additions & 0 deletions aviary/mission/energy_state/ode/test/test_takeoff_ode.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from copy import deepcopy

import openmdao.api as om
from openmdao.utils.testing_utils import use_tempdirs

from aviary.mission.energy_state.ode.takeoff_ode import TakeoffODE
from aviary.validation_cases.validation_data.test_data.advanced_single_aisle_data import (
Expand All @@ -22,6 +23,7 @@
takeoff_subsystem_options = deepcopy(takeoff_subsystem_options)


@use_tempdirs
class TakeoffODETest(unittest.TestCase):
"""Test detailed takeoff ODE."""

Expand Down
6 changes: 4 additions & 2 deletions aviary/mission/energy_state/phases/simplified_takeoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def setup(self):
desc='mass of the aircraft',
)

self.add_input(
add_aviary_input(
self,
Dynamic.Atmosphere.DENSITY,
val=1.225,
units='kg/m**3',
Expand Down Expand Up @@ -105,7 +106,8 @@ def setup(self):

add_aviary_input(self, Mission.Takeoff.FUEL_MASS, val=10.0e3)

self.add_input(
add_aviary_input(
self,
Dynamic.Atmosphere.DENSITY,
val=1.225,
units='kg/m**3',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

import openmdao.api as om
from openmdao.utils.assert_utils import assert_check_partials, assert_near_equal
from openmdao.utils.testing_utils import use_tempdirs

from aviary.mission.energy_state.phases.build_landing import Landing
from aviary.variable_info.variables import Mission


@use_tempdirs
class LandingPhaseTest(unittest.TestCase):
"""Test landing phase builder."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

import openmdao.api as om
from openmdao.utils.assert_utils import assert_check_partials, assert_near_equal
from openmdao.utils.testing_utils import use_tempdirs

from aviary.mission.energy_state.phases.build_takeoff import Takeoff
from aviary.variable_info.variables import Aircraft, Mission


@use_tempdirs
class TakeoffPhaseTest(unittest.TestCase):
"""Test takeoff phase builder."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

import openmdao.api as om
from openmdao.utils.assert_utils import assert_check_partials, assert_near_equal
from openmdao.utils.testing_utils import use_tempdirs

from aviary import constants
from aviary.mission.energy_state.phases.simplified_landing import LandingCalc, LandingGroup
from aviary.variable_info.variables import Aircraft, Dynamic, Mission


@use_tempdirs
class LandingCalcTest(unittest.TestCase):
"""Test computation in LandingCalc class (the simplified landing)."""

Expand Down Expand Up @@ -77,6 +79,7 @@ def test_case1(self):
assert_check_partials(partial_data, atol=1e-12, rtol=1e-12)


@use_tempdirs
class LandingGroupTest(unittest.TestCase):
"""Test the computation of LandingGroup."""

Expand Down
Loading
Loading