Skip to content

Commit

Permalink
Merge branch 'OpenMDAO:main' into mount_location
Browse files Browse the repository at this point in the history
  • Loading branch information
xjjiang authored Jan 17, 2025
2 parents c03ba98 + 28457a9 commit b4e1f6f
Show file tree
Hide file tree
Showing 46 changed files with 472 additions and 560 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.9.4-dev
current_version = 0.9.7-dev
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ body:
attributes:
label: Aviary Version
description: What version of Aviary is being used.
placeholder: "0.9.4-dev"
placeholder: "0.9.7-dev"
validations:
required: true
- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ identifiers:
repository-code: 'https://github.com/OpenMDAO/Aviary'
repository: 'https://github.com/OpenMDAO/Aviary_Community'
license: Apache-2.0
version: 0.9.3
version: 0.9.7
2 changes: 1 addition & 1 deletion aviary/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.9.4-dev"
__version__ = "0.9.7-dev"
17 changes: 7 additions & 10 deletions aviary/subsystems/mass/flops_based/air_conditioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,12 @@ def initialize(self):
add_aviary_option(self, Mission.Constraints.MAX_MACH)

def setup(self):
add_aviary_input(self, Aircraft.AirConditioning.MASS_SCALER, val=1.0)
add_aviary_input(self, Aircraft.AirConditioning.MASS_SCALER)
add_aviary_input(self, Aircraft.Avionics.MASS)
add_aviary_input(self, Aircraft.Fuselage.MAX_HEIGHT)
add_aviary_input(self, Aircraft.Fuselage.PLANFORM_AREA)

add_aviary_input(self, Aircraft.Avionics.MASS, val=0.0)

add_aviary_input(self, Aircraft.Fuselage.MAX_HEIGHT, val=0.0)

add_aviary_input(self, Aircraft.Fuselage.PLANFORM_AREA, val=0.0)

add_aviary_output(self, Aircraft.AirConditioning.MASS, val=0.0)
add_aviary_output(self, Aircraft.AirConditioning.MASS)

def setup_partials(self):
self.declare_partials('*', '*')
Expand Down Expand Up @@ -83,9 +80,9 @@ def initialize(self):
add_aviary_option(self, Aircraft.CrewPayload.Design.NUM_PASSENGERS)

def setup(self):
add_aviary_input(self, Aircraft.AirConditioning.MASS_SCALER, val=1.0)
add_aviary_input(self, Aircraft.AirConditioning.MASS_SCALER)

add_aviary_output(self, Aircraft.AirConditioning.MASS, val=0.0)
add_aviary_output(self, Aircraft.AirConditioning.MASS)

def setup_partials(self):
self.declare_partials(of=Aircraft.AirConditioning.MASS, wrt='*')
Expand Down
17 changes: 6 additions & 11 deletions aviary/subsystems/mass/flops_based/anti_icing.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,13 @@ def initialize(self):
def setup(self):
num_engine_type = len(self.options[Aircraft.Engine.NUM_ENGINES])

add_aviary_input(self, Aircraft.AntiIcing.MASS_SCALER, val=1.0)
add_aviary_input(self, Aircraft.AntiIcing.MASS_SCALER)
add_aviary_input(self, Aircraft.Fuselage.MAX_WIDTH)
add_aviary_input(self, Aircraft.Nacelle.AVG_DIAMETER, shape=num_engine_type)
add_aviary_input(self, Aircraft.Wing.SPAN)
add_aviary_input(self, Aircraft.Wing.SWEEP)

add_aviary_input(self, Aircraft.Fuselage.MAX_WIDTH, val=0.0)

add_aviary_input(self, Aircraft.Nacelle.AVG_DIAMETER,
val=np.zeros(num_engine_type))

add_aviary_input(self, Aircraft.Wing.SPAN, val=0.0)

add_aviary_input(self, Aircraft.Wing.SWEEP, val=0.0)

add_aviary_output(self, Aircraft.AntiIcing.MASS, val=0.0)
add_aviary_output(self, Aircraft.AntiIcing.MASS)

def setup_partials(self):
self.declare_partials("*", "*")
Expand Down
7 changes: 3 additions & 4 deletions aviary/subsystems/mass/flops_based/apu.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ def initialize(self):
add_aviary_option(self, Aircraft.CrewPayload.Design.NUM_PASSENGERS)

def setup(self):
add_aviary_input(self, Aircraft.APU.MASS_SCALER, val=1.0)
add_aviary_input(self, Aircraft.APU.MASS_SCALER)
add_aviary_input(self, Aircraft.Fuselage.PLANFORM_AREA)

add_aviary_input(self, Aircraft.Fuselage.PLANFORM_AREA, val=0.0)

add_aviary_output(self, Aircraft.APU.MASS, val=0.0)
add_aviary_output(self, Aircraft.APU.MASS)

def setup_partials(self):
self.declare_partials('*', '*')
Expand Down
10 changes: 4 additions & 6 deletions aviary/subsystems/mass/flops_based/avionics.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ def initialize(self):
add_aviary_option(self, Aircraft.CrewPayload.NUM_FLIGHT_CREW)

def setup(self):
add_aviary_input(self, Aircraft.Avionics.MASS_SCALER, val=1.0)
add_aviary_input(self, Aircraft.Avionics.MASS_SCALER)
add_aviary_input(self, Aircraft.Fuselage.PLANFORM_AREA)
add_aviary_input(self, Mission.Design.RANGE)

add_aviary_input(self, Aircraft.Fuselage.PLANFORM_AREA, val=0.0)

add_aviary_input(self, Mission.Design.RANGE, val=0.0)

add_aviary_output(self, Aircraft.Avionics.MASS, val=0.0)
add_aviary_output(self, Aircraft.Avionics.MASS)

def setup_partials(self):
self.declare_partials('*', '*')
Expand Down
10 changes: 5 additions & 5 deletions aviary/subsystems/mass/flops_based/canard.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ class CanardMass(om.ExplicitComponent):
'''

def setup(self):
add_aviary_input(self, Mission.Design.GROSS_MASS, val=0.0)
add_aviary_input(self, Aircraft.Canard.AREA, val=0.0)
add_aviary_input(self, Aircraft.Canard.TAPER_RATIO, val=00)
add_aviary_input(self, Aircraft.Canard.MASS_SCALER, val=1.0)
add_aviary_input(self, Mission.Design.GROSS_MASS)
add_aviary_input(self, Aircraft.Canard.AREA)
add_aviary_input(self, Aircraft.Canard.TAPER_RATIO)
add_aviary_input(self, Aircraft.Canard.MASS_SCALER)

add_aviary_output(self, Aircraft.Canard.MASS, val=0.0)
add_aviary_output(self, Aircraft.Canard.MASS)

def setup_partials(self):
self.declare_partials("*", "*")
Expand Down
16 changes: 7 additions & 9 deletions aviary/subsystems/mass/flops_based/cargo.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ def initialize(self):
add_aviary_option(self, Aircraft.CrewPayload.NUM_PASSENGERS)

def setup(self):
add_aviary_output(self, Aircraft.CrewPayload.PASSENGER_MASS, 0.)
add_aviary_output(self, Aircraft.CrewPayload.BAGGAGE_MASS, 0.)
add_aviary_output(self, Aircraft.CrewPayload.PASSENGER_PAYLOAD_MASS, 0.)

add_aviary_input(self, Aircraft.CrewPayload.WING_CARGO, 0.)
add_aviary_input(self, Aircraft.CrewPayload.MISC_CARGO, 0.)

add_aviary_output(self, Aircraft.CrewPayload.CARGO_MASS, 0.)
add_aviary_output(self, Aircraft.CrewPayload.TOTAL_PAYLOAD_MASS, 0.)
add_aviary_input(self, Aircraft.CrewPayload.WING_CARGO)
add_aviary_input(self, Aircraft.CrewPayload.MISC_CARGO)
add_aviary_output(self, Aircraft.CrewPayload.PASSENGER_MASS)
add_aviary_output(self, Aircraft.CrewPayload.BAGGAGE_MASS)
add_aviary_output(self, Aircraft.CrewPayload.PASSENGER_PAYLOAD_MASS)
add_aviary_output(self, Aircraft.CrewPayload.CARGO_MASS)
add_aviary_output(self, Aircraft.CrewPayload.TOTAL_PAYLOAD_MASS)

def setup_partials(self):

Expand Down
11 changes: 4 additions & 7 deletions aviary/subsystems/mass/flops_based/cargo_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@ class TransportCargoContainersMass(om.ExplicitComponent):
'''

def setup(self):
add_aviary_input(
self, Aircraft.CrewPayload.CARGO_CONTAINER_MASS_SCALER, val=1.0)
add_aviary_input(self, Aircraft.CrewPayload.CARGO_CONTAINER_MASS_SCALER)
add_aviary_input(self, Aircraft.CrewPayload.CARGO_MASS)
add_aviary_input(self, Aircraft.CrewPayload.BAGGAGE_MASS)

add_aviary_input(self, Aircraft.CrewPayload.CARGO_MASS, val=0.0)

add_aviary_input(self, Aircraft.CrewPayload.BAGGAGE_MASS, val=0.0)

add_aviary_output(self, Aircraft.CrewPayload.CARGO_CONTAINER_MASS, val=0.0)
add_aviary_output(self, Aircraft.CrewPayload.CARGO_CONTAINER_MASS)

def setup_partials(self):
self.declare_partials('*', '*')
Expand Down
10 changes: 4 additions & 6 deletions aviary/subsystems/mass/flops_based/crew.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ def initialize(self):
add_aviary_option(self, Aircraft.CrewPayload.NUM_GALLEY_CREW)

def setup(self):
add_aviary_input(
self, Aircraft.CrewPayload.NON_FLIGHT_CREW_MASS_SCALER, 1.)
add_aviary_input(self, Aircraft.CrewPayload.NON_FLIGHT_CREW_MASS_SCALER)

add_aviary_output(self, Aircraft.CrewPayload.NON_FLIGHT_CREW_MASS, 0)
add_aviary_output(self, Aircraft.CrewPayload.NON_FLIGHT_CREW_MASS)

def setup_partials(self):
self.declare_partials(
Expand Down Expand Up @@ -75,10 +74,9 @@ def initialize(self):
add_aviary_option(self, Aircraft.LandingGear.CARRIER_BASED)

def setup(self):
add_aviary_input(
self, Aircraft.CrewPayload.FLIGHT_CREW_MASS_SCALER, 1.)
add_aviary_input(self, Aircraft.CrewPayload.FLIGHT_CREW_MASS_SCALER)

add_aviary_output(self, Aircraft.CrewPayload.FLIGHT_CREW_MASS, 0.)
add_aviary_output(self, Aircraft.CrewPayload.FLIGHT_CREW_MASS)

def setup_partials(self):
self.declare_partials(
Expand Down
12 changes: 6 additions & 6 deletions aviary/subsystems/mass/flops_based/electrical.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ def initialize(self):
add_aviary_option(self, Aircraft.Propulsion.TOTAL_NUM_ENGINES)

def setup(self):
add_aviary_input(self, Aircraft.Fuselage.LENGTH, 0.0)
add_aviary_input(self, Aircraft.Fuselage.MAX_WIDTH, 0.0)
add_aviary_input(self, Aircraft.Electrical.MASS_SCALER, 1.0)
add_aviary_input(self, Aircraft.Fuselage.LENGTH)
add_aviary_input(self, Aircraft.Fuselage.MAX_WIDTH)
add_aviary_input(self, Aircraft.Electrical.MASS_SCALER)

add_aviary_output(self, Aircraft.Electrical.MASS, 1.0)
add_aviary_output(self, Aircraft.Electrical.MASS)

def setup_partials(self):
self.declare_partials(of='*', wrt='*')
Expand Down Expand Up @@ -81,9 +81,9 @@ def initialize(self):
add_aviary_option(self, Aircraft.CrewPayload.Design.NUM_PASSENGERS)

def setup(self):
add_aviary_input(self, Aircraft.Electrical.MASS_SCALER, 1.0)
add_aviary_input(self, Aircraft.Electrical.MASS_SCALER)

add_aviary_output(self, Aircraft.Electrical.MASS, 1.0)
add_aviary_output(self, Aircraft.Electrical.MASS)

def setup_partials(self):
self.declare_partials(of='*', wrt='*')
Expand Down
13 changes: 5 additions & 8 deletions aviary/subsystems/mass/flops_based/empty_margin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ class EmptyMassMargin(om.ExplicitComponent):
"""

def setup(self):
add_aviary_input(self, Aircraft.Propulsion.MASS, val=0.)
add_aviary_input(self, Aircraft.Propulsion.MASS)
add_aviary_input(self, Aircraft.Design.STRUCTURE_MASS)
add_aviary_input(self, Aircraft.Design.SYSTEMS_EQUIP_MASS)
add_aviary_input(self, Aircraft.Design.EMPTY_MASS_MARGIN_SCALER)

add_aviary_input(self, Aircraft.Design.STRUCTURE_MASS, val=0.)

add_aviary_input(self, Aircraft.Design.SYSTEMS_EQUIP_MASS, val=0.)

add_aviary_input(self, Aircraft.Design.EMPTY_MASS_MARGIN_SCALER, val=0.0)

add_aviary_output(self, Aircraft.Design.EMPTY_MASS_MARGIN, val=0.0)
add_aviary_output(self, Aircraft.Design.EMPTY_MASS_MARGIN)

def setup_partials(self):
self.declare_partials('*', '*')
Expand Down
14 changes: 5 additions & 9 deletions aviary/subsystems/mass/flops_based/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,12 @@ def initialize(self):
def setup(self):
num_engine_type = len(self.options[Aircraft.Engine.NUM_ENGINES])

add_aviary_input(self, Aircraft.Engine.SCALED_SLS_THRUST,
val=np.zeros(num_engine_type))
add_aviary_input(self, Aircraft.Engine.SCALED_SLS_THRUST, shape=num_engine_type)
add_aviary_input(self, Aircraft.Engine.MASS_SCALER, shape=num_engine_type)

add_aviary_input(self, Aircraft.Engine.MASS_SCALER,
val=np.zeros(num_engine_type))

add_aviary_output(self, Aircraft.Engine.MASS, val=np.zeros(num_engine_type))
add_aviary_output(self, Aircraft.Engine.ADDITIONAL_MASS,
val=np.zeros(num_engine_type))
add_aviary_output(self, Aircraft.Propulsion.TOTAL_ENGINE_MASS, val=0.0)
add_aviary_output(self, Aircraft.Engine.MASS, shape=num_engine_type)
add_aviary_output(self, Aircraft.Engine.ADDITIONAL_MASS, shape=num_engine_type)
add_aviary_output(self, Aircraft.Propulsion.TOTAL_ENGINE_MASS)

def compute(self, inputs, outputs):
options = self.options
Expand Down
6 changes: 2 additions & 4 deletions aviary/subsystems/mass/flops_based/engine_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ def initialize(self):
add_aviary_option(self, Aircraft.Propulsion.TOTAL_NUM_ENGINES)

def setup(self):
add_aviary_input(
self, Aircraft.Propulsion.TOTAL_SCALED_SLS_THRUST, val=0.0, units='lbf')
add_aviary_input(self, Aircraft.Propulsion.TOTAL_SCALED_SLS_THRUST)

add_aviary_output(
self, Aircraft.Propulsion.TOTAL_ENGINE_CONTROLS_MASS, val=0.0, units='lbm')
add_aviary_output(self, Aircraft.Propulsion.TOTAL_ENGINE_CONTROLS_MASS)

def setup_partials(self):
self.declare_partials(Aircraft.Propulsion.TOTAL_ENGINE_CONTROLS_MASS,
Expand Down
11 changes: 5 additions & 6 deletions aviary/subsystems/mass/flops_based/engine_oil.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ def initialize(self):
add_aviary_option(self, Aircraft.Propulsion.TOTAL_NUM_ENGINES)

def setup(self):
add_aviary_input(self, Aircraft.Propulsion.ENGINE_OIL_MASS_SCALER, val=1.0)
add_aviary_input(self, Aircraft.Propulsion.ENGINE_OIL_MASS_SCALER)
add_aviary_input(self, Aircraft.Propulsion.TOTAL_SCALED_SLS_THRUST)

add_aviary_input(self, Aircraft.Propulsion.TOTAL_SCALED_SLS_THRUST, val=0.0)

add_aviary_output(self, Aircraft.Propulsion.TOTAL_ENGINE_OIL_MASS, val=0.0)
add_aviary_output(self, Aircraft.Propulsion.TOTAL_ENGINE_OIL_MASS)

def setup_partials(self):
self.declare_partials('*', '*')
Expand Down Expand Up @@ -70,9 +69,9 @@ def initialize(self):
add_aviary_option(self, Aircraft.CrewPayload.Design.NUM_PASSENGERS)

def setup(self):
add_aviary_input(self, Aircraft.Propulsion.ENGINE_OIL_MASS_SCALER, val=1.0)
add_aviary_input(self, Aircraft.Propulsion.ENGINE_OIL_MASS_SCALER)

add_aviary_output(self, Aircraft.Propulsion.TOTAL_ENGINE_OIL_MASS, val=0.0)
add_aviary_output(self, Aircraft.Propulsion.TOTAL_ENGINE_OIL_MASS)

def setup_partials(self):
self.declare_partials('*', '*')
Expand Down
25 changes: 12 additions & 13 deletions aviary/subsystems/mass/flops_based/engine_pod.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,20 @@ def initialize(self):
def setup(self):
num_engine_type = len(self.options[Aircraft.Engine.NUM_ENGINES])

add_aviary_input(self, Aircraft.Electrical.MASS, val=0.0)
add_aviary_input(self, Aircraft.Fuel.FUEL_SYSTEM_MASS, val=0.0)
add_aviary_input(self, Aircraft.Hydraulics.MASS, val=0.0)
add_aviary_input(self, Aircraft.Instruments.MASS, val=0.0)
add_aviary_input(self, Aircraft.Nacelle.MASS, val=np.zeros(num_engine_type))
add_aviary_input(self, Aircraft.Propulsion.TOTAL_ENGINE_CONTROLS_MASS, val=0.0)
add_aviary_input(self, Aircraft.Engine.MASS, val=np.zeros(num_engine_type))
add_aviary_input(self, Aircraft.Propulsion.TOTAL_STARTER_MASS, val=0.0)
add_aviary_input(self, Aircraft.Electrical.MASS)
add_aviary_input(self, Aircraft.Fuel.FUEL_SYSTEM_MASS)
add_aviary_input(self, Aircraft.Hydraulics.MASS)
add_aviary_input(self, Aircraft.Instruments.MASS)
add_aviary_input(self, Aircraft.Nacelle.MASS, shape=num_engine_type)
add_aviary_input(self, Aircraft.Propulsion.TOTAL_ENGINE_CONTROLS_MASS)
add_aviary_input(self, Aircraft.Engine.MASS, shape=num_engine_type)
add_aviary_input(self, Aircraft.Propulsion.TOTAL_STARTER_MASS)
add_aviary_input(self, Aircraft.Engine.THRUST_REVERSERS_MASS,
val=np.zeros(num_engine_type))
add_aviary_input(self, Aircraft.Engine.SCALED_SLS_THRUST,
val=np.zeros(num_engine_type))
add_aviary_input(self, Aircraft.Propulsion.TOTAL_SCALED_SLS_THRUST, val=0.0)
shape=num_engine_type)
add_aviary_input(self, Aircraft.Engine.SCALED_SLS_THRUST, shape=num_engine_type)
add_aviary_input(self, Aircraft.Propulsion.TOTAL_SCALED_SLS_THRUST)

add_aviary_output(self, Aircraft.Engine.POD_MASS, val=np.zeros(num_engine_type))
add_aviary_output(self, Aircraft.Engine.POD_MASS, shape=num_engine_type)

def setup_partials(self):
self.declare_partials('*', '*')
Expand Down
10 changes: 5 additions & 5 deletions aviary/subsystems/mass/flops_based/fin.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ def initialize(self):
add_aviary_option(self, Aircraft.Fins.NUM_FINS)

def setup(self):
add_aviary_input(self, Mission.Design.GROSS_MASS, val=0.0)
add_aviary_input(self, Aircraft.Fins.AREA, val=0.0)
add_aviary_input(self, Aircraft.Fins.TAPER_RATIO, val=0.0)
add_aviary_input(self, Aircraft.Fins.MASS_SCALER, val=1.0)
add_aviary_input(self, Mission.Design.GROSS_MASS)
add_aviary_input(self, Aircraft.Fins.AREA)
add_aviary_input(self, Aircraft.Fins.TAPER_RATIO)
add_aviary_input(self, Aircraft.Fins.MASS_SCALER)

add_aviary_output(self, Aircraft.Fins.MASS, val=0.0)
add_aviary_output(self, Aircraft.Fins.MASS)

def setup_partials(self):
self.declare_partials("*", "*")
Expand Down
Loading

0 comments on commit b4e1f6f

Please sign in to comment.