diff --git a/.bumpversion.cfg b/.bumpversion.cfg index a3a4c1790..e7775a430 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.9.4-dev +current_version = 0.9.7-dev commit = False tag = False parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\-(?P[a-z]+))? diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index cd237761c..ef04da1be 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -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 diff --git a/CITATION.cff b/CITATION.cff index c44eee143..4a174317b 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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 diff --git a/aviary/__init__.py b/aviary/__init__.py index 7f33873b3..b336982d3 100644 --- a/aviary/__init__.py +++ b/aviary/__init__.py @@ -1 +1 @@ -__version__ = "0.9.4-dev" +__version__ = "0.9.7-dev" diff --git a/aviary/subsystems/mass/flops_based/air_conditioning.py b/aviary/subsystems/mass/flops_based/air_conditioning.py index 4e2db1cfe..be41e8fc4 100644 --- a/aviary/subsystems/mass/flops_based/air_conditioning.py +++ b/aviary/subsystems/mass/flops_based/air_conditioning.py @@ -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('*', '*') @@ -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='*') diff --git a/aviary/subsystems/mass/flops_based/anti_icing.py b/aviary/subsystems/mass/flops_based/anti_icing.py index 9d7a485da..038b8e36b 100644 --- a/aviary/subsystems/mass/flops_based/anti_icing.py +++ b/aviary/subsystems/mass/flops_based/anti_icing.py @@ -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("*", "*") diff --git a/aviary/subsystems/mass/flops_based/apu.py b/aviary/subsystems/mass/flops_based/apu.py index d71b2ac38..6a36e2f46 100644 --- a/aviary/subsystems/mass/flops_based/apu.py +++ b/aviary/subsystems/mass/flops_based/apu.py @@ -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('*', '*') diff --git a/aviary/subsystems/mass/flops_based/avionics.py b/aviary/subsystems/mass/flops_based/avionics.py index 1f7e75f7d..e681baf7d 100644 --- a/aviary/subsystems/mass/flops_based/avionics.py +++ b/aviary/subsystems/mass/flops_based/avionics.py @@ -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('*', '*') diff --git a/aviary/subsystems/mass/flops_based/canard.py b/aviary/subsystems/mass/flops_based/canard.py index e40b374d3..980e2960b 100644 --- a/aviary/subsystems/mass/flops_based/canard.py +++ b/aviary/subsystems/mass/flops_based/canard.py @@ -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("*", "*") diff --git a/aviary/subsystems/mass/flops_based/cargo.py b/aviary/subsystems/mass/flops_based/cargo.py index dd388e067..ef5311d80 100644 --- a/aviary/subsystems/mass/flops_based/cargo.py +++ b/aviary/subsystems/mass/flops_based/cargo.py @@ -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): diff --git a/aviary/subsystems/mass/flops_based/cargo_containers.py b/aviary/subsystems/mass/flops_based/cargo_containers.py index 18460dcaf..8f0b11d11 100644 --- a/aviary/subsystems/mass/flops_based/cargo_containers.py +++ b/aviary/subsystems/mass/flops_based/cargo_containers.py @@ -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('*', '*') diff --git a/aviary/subsystems/mass/flops_based/crew.py b/aviary/subsystems/mass/flops_based/crew.py index 924840101..1afd6e217 100644 --- a/aviary/subsystems/mass/flops_based/crew.py +++ b/aviary/subsystems/mass/flops_based/crew.py @@ -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( @@ -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( diff --git a/aviary/subsystems/mass/flops_based/electrical.py b/aviary/subsystems/mass/flops_based/electrical.py index 7ba6ee967..6dfc06288 100644 --- a/aviary/subsystems/mass/flops_based/electrical.py +++ b/aviary/subsystems/mass/flops_based/electrical.py @@ -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='*') @@ -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='*') diff --git a/aviary/subsystems/mass/flops_based/empty_margin.py b/aviary/subsystems/mass/flops_based/empty_margin.py index 43fca2b20..5b2ce8b2c 100644 --- a/aviary/subsystems/mass/flops_based/empty_margin.py +++ b/aviary/subsystems/mass/flops_based/empty_margin.py @@ -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('*', '*') diff --git a/aviary/subsystems/mass/flops_based/engine.py b/aviary/subsystems/mass/flops_based/engine.py index 93740cccb..169ff1179 100644 --- a/aviary/subsystems/mass/flops_based/engine.py +++ b/aviary/subsystems/mass/flops_based/engine.py @@ -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 diff --git a/aviary/subsystems/mass/flops_based/engine_controls.py b/aviary/subsystems/mass/flops_based/engine_controls.py index 17058a821..d8a121fd3 100644 --- a/aviary/subsystems/mass/flops_based/engine_controls.py +++ b/aviary/subsystems/mass/flops_based/engine_controls.py @@ -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, diff --git a/aviary/subsystems/mass/flops_based/engine_oil.py b/aviary/subsystems/mass/flops_based/engine_oil.py index 14fc7f429..8ad1e5ea2 100644 --- a/aviary/subsystems/mass/flops_based/engine_oil.py +++ b/aviary/subsystems/mass/flops_based/engine_oil.py @@ -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('*', '*') @@ -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('*', '*') diff --git a/aviary/subsystems/mass/flops_based/engine_pod.py b/aviary/subsystems/mass/flops_based/engine_pod.py index c1c262481..c53be1554 100644 --- a/aviary/subsystems/mass/flops_based/engine_pod.py +++ b/aviary/subsystems/mass/flops_based/engine_pod.py @@ -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('*', '*') diff --git a/aviary/subsystems/mass/flops_based/fin.py b/aviary/subsystems/mass/flops_based/fin.py index b4e9f79ab..280a943dc 100644 --- a/aviary/subsystems/mass/flops_based/fin.py +++ b/aviary/subsystems/mass/flops_based/fin.py @@ -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("*", "*") diff --git a/aviary/subsystems/mass/flops_based/fuel_capacity.py b/aviary/subsystems/mass/flops_based/fuel_capacity.py index d1d2009b6..76e83dbef 100644 --- a/aviary/subsystems/mass/flops_based/fuel_capacity.py +++ b/aviary/subsystems/mass/flops_based/fuel_capacity.py @@ -38,9 +38,9 @@ class FuselageFuelCapacity(om.ExplicitComponent): """ def setup(self): - add_aviary_input(self, Aircraft.Fuel.TOTAL_CAPACITY, 0.0), - add_aviary_input(self, Aircraft.Fuel.WING_FUEL_CAPACITY, 0.0), - add_aviary_output(self, Aircraft.Fuel.FUSELAGE_FUEL_CAPACITY, 0.0), + add_aviary_input(self, Aircraft.Fuel.TOTAL_CAPACITY), + add_aviary_input(self, Aircraft.Fuel.WING_FUEL_CAPACITY), + add_aviary_output(self, Aircraft.Fuel.FUSELAGE_FUEL_CAPACITY), def setup_partials(self): self.declare_partials( @@ -62,10 +62,10 @@ class AuxFuelCapacity(om.ExplicitComponent): """ def setup(self): - add_aviary_input(self, Aircraft.Fuel.TOTAL_CAPACITY, 0.0), - add_aviary_input(self, Aircraft.Fuel.WING_FUEL_CAPACITY, 0.0), - add_aviary_input(self, Aircraft.Fuel.FUSELAGE_FUEL_CAPACITY, 0.0), - add_aviary_output(self, Aircraft.Fuel.AUXILIARY_FUEL_CAPACITY, 0.0), + add_aviary_input(self, Aircraft.Fuel.TOTAL_CAPACITY), + add_aviary_input(self, Aircraft.Fuel.WING_FUEL_CAPACITY), + add_aviary_input(self, Aircraft.Fuel.FUSELAGE_FUEL_CAPACITY), + add_aviary_output(self, Aircraft.Fuel.AUXILIARY_FUEL_CAPACITY), def setup_partials(self): self.declare_partials( @@ -91,10 +91,10 @@ class TotalFuelCapacity(om.ExplicitComponent): """ def setup(self): - add_aviary_input(self, Aircraft.Fuel.WING_FUEL_CAPACITY, 0.0), - add_aviary_input(self, Aircraft.Fuel.FUSELAGE_FUEL_CAPACITY, 0.0), - add_aviary_input(self, Aircraft.Fuel.AUXILIARY_FUEL_CAPACITY, 0.0), - add_aviary_output(self, Aircraft.Fuel.TOTAL_CAPACITY, 0.0), + add_aviary_input(self, Aircraft.Fuel.WING_FUEL_CAPACITY), + add_aviary_input(self, Aircraft.Fuel.FUSELAGE_FUEL_CAPACITY), + add_aviary_input(self, Aircraft.Fuel.AUXILIARY_FUEL_CAPACITY), + add_aviary_output(self, Aircraft.Fuel.TOTAL_CAPACITY), def setup_partials(self): self.declare_partials( @@ -120,20 +120,18 @@ class WingFuelCapacity(om.ExplicitComponent): """ def setup(self): - add_aviary_input(self, Aircraft.Fuel.DENSITY_RATIO, 1.0) - add_aviary_input(self, Aircraft.Fuel.WING_REF_CAPACITY, 0.0) - add_aviary_input(self, Aircraft.Fuel.WING_REF_CAPACITY_AREA, 0.0) - add_aviary_input(self, Aircraft.Fuel.WING_REF_CAPACITY_TERM_A, 0.0) - add_aviary_input(self, Aircraft.Fuel.WING_REF_CAPACITY_TERM_B, 0.0) - - add_aviary_input(self, Aircraft.Fuel.CAPACITY_FACTOR, 23.0) - - add_aviary_input(self, Aircraft.Wing.AREA, 0.0) - add_aviary_input(self, Aircraft.Wing.SPAN, 0.0) - add_aviary_input(self, Aircraft.Wing.TAPER_RATIO, 0.0) - add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD, 0.0) - - add_aviary_output(self, Aircraft.Fuel.WING_FUEL_CAPACITY, 0.0) + add_aviary_input(self, Aircraft.Fuel.DENSITY_RATIO) + add_aviary_input(self, Aircraft.Fuel.WING_REF_CAPACITY) + add_aviary_input(self, Aircraft.Fuel.WING_REF_CAPACITY_AREA) + add_aviary_input(self, Aircraft.Fuel.WING_REF_CAPACITY_TERM_A) + add_aviary_input(self, Aircraft.Fuel.WING_REF_CAPACITY_TERM_B) + add_aviary_input(self, Aircraft.Fuel.CAPACITY_FACTOR) + add_aviary_input(self, Aircraft.Wing.AREA) + add_aviary_input(self, Aircraft.Wing.SPAN) + add_aviary_input(self, Aircraft.Wing.TAPER_RATIO) + add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD) + + add_aviary_output(self, Aircraft.Fuel.WING_FUEL_CAPACITY) def setup_partials(self): self.declare_partials('*', '*') diff --git a/aviary/subsystems/mass/flops_based/fuel_system.py b/aviary/subsystems/mass/flops_based/fuel_system.py index 78dfe92bc..61162104e 100644 --- a/aviary/subsystems/mass/flops_based/fuel_system.py +++ b/aviary/subsystems/mass/flops_based/fuel_system.py @@ -19,11 +19,10 @@ def initialize(self): add_aviary_option(self, Mission.Constraints.MAX_MACH) def setup(self): - add_aviary_input(self, Aircraft.Fuel.FUEL_SYSTEM_MASS_SCALER, val=1.0) + add_aviary_input(self, Aircraft.Fuel.FUEL_SYSTEM_MASS_SCALER) + add_aviary_input(self, Aircraft.Fuel.TOTAL_CAPACITY) - add_aviary_input(self, Aircraft.Fuel.TOTAL_CAPACITY, 0.0) - - add_aviary_output(self, Aircraft.Fuel.FUEL_SYSTEM_MASS, val=0.0) + add_aviary_output(self, Aircraft.Fuel.FUEL_SYSTEM_MASS) def setup_partials(self): self.declare_partials('*', '*') @@ -65,11 +64,10 @@ def initialize(self): add_aviary_option(self, Aircraft.Fuel.NUM_TANKS) def setup(self): - add_aviary_input(self, Aircraft.Fuel.TOTAL_CAPACITY, val=0.0) - - add_aviary_input(self, Aircraft.Fuel.FUEL_SYSTEM_MASS_SCALER, val=1.0) + add_aviary_input(self, Aircraft.Fuel.TOTAL_CAPACITY) + add_aviary_input(self, Aircraft.Fuel.FUEL_SYSTEM_MASS_SCALER) - add_aviary_output(self, Aircraft.Fuel.FUEL_SYSTEM_MASS, val=0.0) + add_aviary_output(self, Aircraft.Fuel.FUEL_SYSTEM_MASS) def setup_partials(self): self.declare_partials('*', '*') diff --git a/aviary/subsystems/mass/flops_based/furnishings.py b/aviary/subsystems/mass/flops_based/furnishings.py index edba25346..4c931fc68 100644 --- a/aviary/subsystems/mass/flops_based/furnishings.py +++ b/aviary/subsystems/mass/flops_based/furnishings.py @@ -20,15 +20,12 @@ def initialize(self): add_aviary_option(self, Aircraft.Fuselage.NUM_FUSELAGES) def setup(self): - add_aviary_input(self, Aircraft.Furnishings.MASS_SCALER, val=1.0) + add_aviary_input(self, Aircraft.Furnishings.MASS_SCALER) + add_aviary_input(self, Aircraft.Fuselage.PASSENGER_COMPARTMENT_LENGTH) + add_aviary_input(self, Aircraft.Fuselage.MAX_WIDTH) + add_aviary_input(self, Aircraft.Fuselage.MAX_HEIGHT) - add_aviary_input(self, Aircraft.Fuselage.PASSENGER_COMPARTMENT_LENGTH, val=0.0) - - add_aviary_input(self, Aircraft.Fuselage.MAX_WIDTH, val=0.0) - - add_aviary_input(self, Aircraft.Fuselage.MAX_HEIGHT, val=0.0) - - add_aviary_output(self, Aircraft.Furnishings.MASS, val=0.0) + add_aviary_output(self, Aircraft.Furnishings.MASS) def setup_partials(self): self.declare_partials(of=Aircraft.Furnishings.MASS, wrt='*') @@ -103,19 +100,15 @@ def initialize(self): add_aviary_option(self, Aircraft.Fuselage.MILITARY_CARGO_FLOOR) def setup(self): - add_aviary_input(self, Aircraft.Furnishings.MASS_SCALER, val=1.0) + add_aviary_input(self, Aircraft.Furnishings.MASS_SCALER) + add_aviary_input(self, Aircraft.BWB.CABIN_AREA) - add_aviary_input(self, Aircraft.BWB.CABIN_AREA, val=100.0) + add_aviary_input(self, Aircraft.Fuselage.MAX_WIDTH) - add_aviary_input(self, Aircraft.Fuselage.MAX_WIDTH, val=30.0) + add_aviary_input(self, Aircraft.Fuselage.MAX_HEIGHT) + add_aviary_input(self, Aircraft.BWB.PASSENGER_LEADING_EDGE_SWEEP) - add_aviary_input(self, Aircraft.Fuselage.MAX_HEIGHT, val=15.0) - - add_aviary_input( - self, Aircraft.BWB.PASSENGER_LEADING_EDGE_SWEEP, val=45.0 - ) - - add_aviary_output(self, Aircraft.Furnishings.MASS, val=0.0) + add_aviary_output(self, Aircraft.Furnishings.MASS) def setup_partials(self): self.declare_partials(of=Aircraft.Furnishings.MASS, wrt='*') @@ -239,9 +232,9 @@ def initialize(self): add_aviary_option(self, Aircraft.CrewPayload.Design.NUM_PASSENGERS) def setup(self): - add_aviary_input(self, Aircraft.Furnishings.MASS_SCALER, val=1.0) + add_aviary_input(self, Aircraft.Furnishings.MASS_SCALER) - add_aviary_output(self, Aircraft.Furnishings.MASS_BASE, val=0.0) + add_aviary_output(self, Aircraft.Furnishings.MASS_BASE) def setup_partials(self): self.declare_partials(of=Aircraft.Furnishings.MASS_BASE, wrt='*') @@ -272,15 +265,12 @@ class AltFurnishingsGroupMass(om.ExplicitComponent): ''' def setup(self): - add_aviary_input(self, Aircraft.Furnishings.MASS_BASE, val=0.0) - - add_aviary_input(self, Aircraft.Design.STRUCTURE_MASS, val=0.0) - - add_aviary_input(self, Aircraft.Propulsion.MASS, val=0.0) - - add_aviary_input(self, Aircraft.Design.SYSTEMS_EQUIP_MASS_BASE, val=0.0) + add_aviary_input(self, Aircraft.Furnishings.MASS_BASE) + add_aviary_input(self, Aircraft.Design.STRUCTURE_MASS) + add_aviary_input(self, Aircraft.Propulsion.MASS) + add_aviary_input(self, Aircraft.Design.SYSTEMS_EQUIP_MASS_BASE) - add_aviary_output(self, Aircraft.Furnishings.MASS, val=0.0) + add_aviary_output(self, Aircraft.Furnishings.MASS) def setup_partials(self): self.declare_partials( diff --git a/aviary/subsystems/mass/flops_based/fuselage.py b/aviary/subsystems/mass/flops_based/fuselage.py index dc0ad71ec..00a757fb6 100644 --- a/aviary/subsystems/mass/flops_based/fuselage.py +++ b/aviary/subsystems/mass/flops_based/fuselage.py @@ -20,13 +20,11 @@ def initialize(self): add_aviary_option(self, Aircraft.Propulsion.TOTAL_NUM_FUSELAGE_ENGINES) def setup(self): - add_aviary_input(self, Aircraft.Fuselage.LENGTH, val=0.0) + add_aviary_input(self, Aircraft.Fuselage.LENGTH) + add_aviary_input(self, Aircraft.Fuselage.MASS_SCALER) + add_aviary_input(self, Aircraft.Fuselage.AVG_DIAMETER) - add_aviary_input(self, Aircraft.Fuselage.MASS_SCALER, val=1.0) - - add_aviary_input(self, Aircraft.Fuselage.AVG_DIAMETER, val=0.0) - - add_aviary_output(self, Aircraft.Fuselage.MASS, val=0.0) + add_aviary_output(self, Aircraft.Fuselage.MASS) def setup_partials(self): self.declare_partials(Aircraft.Fuselage.MASS, "*") @@ -81,15 +79,12 @@ class AltFuselageMass(om.ExplicitComponent): """ def setup(self): - add_aviary_input(self, Aircraft.Fuselage.MASS_SCALER, 1.0) - - add_aviary_input(self, Aircraft.Fuselage.WETTED_AREA, 0.0) - - add_aviary_input(self, Aircraft.Fuselage.MAX_HEIGHT, 0.0) - - add_aviary_input(self, Aircraft.Fuselage.MAX_WIDTH, 0.0) + add_aviary_input(self, Aircraft.Fuselage.MASS_SCALER) + add_aviary_input(self, Aircraft.Fuselage.WETTED_AREA) + add_aviary_input(self, Aircraft.Fuselage.MAX_HEIGHT) + add_aviary_input(self, Aircraft.Fuselage.MAX_WIDTH) - add_aviary_output(self, Aircraft.Fuselage.MASS, 1.0) + add_aviary_output(self, Aircraft.Fuselage.MASS) def setup_partials(self): self.declare_partials(of='*', wrt='*') diff --git a/aviary/subsystems/mass/flops_based/horizontal_tail.py b/aviary/subsystems/mass/flops_based/horizontal_tail.py index a647ebd8f..0b2aa397d 100644 --- a/aviary/subsystems/mass/flops_based/horizontal_tail.py +++ b/aviary/subsystems/mass/flops_based/horizontal_tail.py @@ -12,15 +12,12 @@ class HorizontalTailMass(om.ExplicitComponent): ''' def setup(self): - add_aviary_input(self, Aircraft.HorizontalTail.AREA, val=0.0) - + add_aviary_input(self, Aircraft.HorizontalTail.AREA) add_aviary_input(self, Aircraft.HorizontalTail.TAPER_RATIO, val=0.352) + add_aviary_input(self, Mission.Design.GROSS_MASS) + add_aviary_input(self, Aircraft.HorizontalTail.MASS_SCALER) - add_aviary_input(self, Mission.Design.GROSS_MASS, val=0.0) - - add_aviary_input(self, Aircraft.HorizontalTail.MASS_SCALER, val=1.0) - - add_aviary_output(self, Aircraft.HorizontalTail.MASS, val=0.0) + add_aviary_output(self, Aircraft.HorizontalTail.MASS) def setup_partials(self): self.declare_partials("*", "*") @@ -65,11 +62,10 @@ class AltHorizontalTailMass(om.ExplicitComponent): ''' def setup(self): - add_aviary_input(self, Aircraft.HorizontalTail.AREA, val=0.0) - - add_aviary_input(self, Aircraft.HorizontalTail.MASS_SCALER, val=1.0) + add_aviary_input(self, Aircraft.HorizontalTail.AREA) + add_aviary_input(self, Aircraft.HorizontalTail.MASS_SCALER) - add_aviary_output(self, Aircraft.HorizontalTail.MASS, val=0.0) + add_aviary_output(self, Aircraft.HorizontalTail.MASS) def setup_partials(self): self.declare_partials("*", "*") diff --git a/aviary/subsystems/mass/flops_based/hydraulics.py b/aviary/subsystems/mass/flops_based/hydraulics.py index e2f5ca58c..74aee4af8 100644 --- a/aviary/subsystems/mass/flops_based/hydraulics.py +++ b/aviary/subsystems/mass/flops_based/hydraulics.py @@ -27,17 +27,13 @@ def initialize(self): add_aviary_option(self, Mission.Constraints.MAX_MACH) def setup(self): - add_aviary_input(self, Aircraft.Fuselage.PLANFORM_AREA, val=0.0) + add_aviary_input(self, Aircraft.Fuselage.PLANFORM_AREA) + add_aviary_input(self, Aircraft.Hydraulics.SYSTEM_PRESSURE) + add_aviary_input(self, Aircraft.Hydraulics.MASS_SCALER) + add_aviary_input(self, Aircraft.Wing.AREA) + add_aviary_input(self, Aircraft.Wing.VAR_SWEEP_MASS_PENALTY) - add_aviary_input(self, Aircraft.Hydraulics.SYSTEM_PRESSURE, val=0.0) - - add_aviary_input(self, Aircraft.Hydraulics.MASS_SCALER, val=1.0) - - add_aviary_input(self, Aircraft.Wing.AREA, val=0.0) - - add_aviary_input(self, Aircraft.Wing.VAR_SWEEP_MASS_PENALTY, val=0.0) - - add_aviary_output(self, Aircraft.Hydraulics.MASS, val=0.0) + add_aviary_output(self, Aircraft.Hydraulics.MASS) def setup_partials(self): self.declare_partials('*', '*') @@ -105,17 +101,13 @@ class AltHydraulicsGroupMass(om.ExplicitComponent): ''' def setup(self): - add_aviary_input(self, Aircraft.Wing.AREA, val=0.0) - - add_aviary_input(self, Aircraft.HorizontalTail.WETTED_AREA, val=0.0) - - add_aviary_input(self, Aircraft.HorizontalTail.THICKNESS_TO_CHORD, val=0.0) - - add_aviary_input(self, Aircraft.VerticalTail.AREA, val=0.0) - - add_aviary_input(self, Aircraft.Hydraulics.MASS_SCALER, val=1.0) + add_aviary_input(self, Aircraft.Wing.AREA) + add_aviary_input(self, Aircraft.HorizontalTail.WETTED_AREA) + add_aviary_input(self, Aircraft.HorizontalTail.THICKNESS_TO_CHORD) + add_aviary_input(self, Aircraft.VerticalTail.AREA) + add_aviary_input(self, Aircraft.Hydraulics.MASS_SCALER) - add_aviary_output(self, Aircraft.Hydraulics.MASS, val=0.0) + add_aviary_output(self, Aircraft.Hydraulics.MASS) def setup_partials(self): self.declare_partials('*', '*') diff --git a/aviary/subsystems/mass/flops_based/instruments.py b/aviary/subsystems/mass/flops_based/instruments.py index 04bcda862..1b7ca0bd9 100644 --- a/aviary/subsystems/mass/flops_based/instruments.py +++ b/aviary/subsystems/mass/flops_based/instruments.py @@ -23,8 +23,8 @@ def initialize(self): add_aviary_option(self, Mission.Constraints.MAX_MACH) def setup(self): - add_aviary_input(self, Aircraft.Fuselage.PLANFORM_AREA, 0.0) - add_aviary_input(self, Aircraft.Instruments.MASS_SCALER, 1.0) + add_aviary_input(self, Aircraft.Fuselage.PLANFORM_AREA) + add_aviary_input(self, Aircraft.Instruments.MASS_SCALER) add_aviary_output(self, Aircraft.Instruments.MASS, 0.0) diff --git a/aviary/subsystems/mass/flops_based/landing_gear.py b/aviary/subsystems/mass/flops_based/landing_gear.py index 97f03615f..2bcda12cc 100644 --- a/aviary/subsystems/mass/flops_based/landing_gear.py +++ b/aviary/subsystems/mass/flops_based/landing_gear.py @@ -19,19 +19,14 @@ class LandingGearMass(om.ExplicitComponent): # equations def setup(self): - add_aviary_input(self, Aircraft.LandingGear.MAIN_GEAR_OLEO_LENGTH, val=0.0) + add_aviary_input(self, Aircraft.LandingGear.MAIN_GEAR_OLEO_LENGTH) + add_aviary_input(self, Aircraft.LandingGear.MAIN_GEAR_MASS_SCALER) + add_aviary_input(self, Aircraft.LandingGear.NOSE_GEAR_OLEO_LENGTH) + add_aviary_input(self, Aircraft.LandingGear.NOSE_GEAR_MASS_SCALER) + add_aviary_input(self, Aircraft.Design.TOUCHDOWN_MASS) - add_aviary_input(self, Aircraft.LandingGear.MAIN_GEAR_MASS_SCALER, val=1.0) - - add_aviary_input(self, Aircraft.LandingGear.NOSE_GEAR_OLEO_LENGTH, val=0.0) - - add_aviary_input(self, Aircraft.LandingGear.NOSE_GEAR_MASS_SCALER, val=1.0) - - add_aviary_input(self, Aircraft.Design.TOUCHDOWN_MASS, val=0.0) - - add_aviary_output(self, Aircraft.LandingGear.MAIN_GEAR_MASS, val=0.0) - - add_aviary_output(self, Aircraft.LandingGear.NOSE_GEAR_MASS, val=0.0) + add_aviary_output(self, Aircraft.LandingGear.MAIN_GEAR_MASS) + add_aviary_output(self, Aircraft.LandingGear.NOSE_GEAR_MASS) # TODO landing weight is not a landing_gear component level variable # self.add_input('aircraft:landing_gear:weights:landing_weight', val=0.0, desc='design landing weight', units='lbf') @@ -131,19 +126,14 @@ class AltLandingGearMass(om.ExplicitComponent): ''' def setup(self): - add_aviary_input(self, Aircraft.LandingGear.MAIN_GEAR_OLEO_LENGTH, val=0.0) - - add_aviary_input(self, Aircraft.LandingGear.MAIN_GEAR_MASS_SCALER, val=1.0) - - add_aviary_input(self, Aircraft.LandingGear.NOSE_GEAR_OLEO_LENGTH, val=0.0) - - add_aviary_input(self, Aircraft.LandingGear.NOSE_GEAR_MASS_SCALER, val=1.0) - - add_aviary_input(self, Mission.Design.GROSS_MASS, val=0.0) - - add_aviary_output(self, Aircraft.LandingGear.MAIN_GEAR_MASS, val=0.0) + add_aviary_input(self, Aircraft.LandingGear.MAIN_GEAR_OLEO_LENGTH) + add_aviary_input(self, Aircraft.LandingGear.MAIN_GEAR_MASS_SCALER) + add_aviary_input(self, Aircraft.LandingGear.NOSE_GEAR_OLEO_LENGTH) + add_aviary_input(self, Aircraft.LandingGear.NOSE_GEAR_MASS_SCALER) + add_aviary_input(self, Mission.Design.GROSS_MASS) - add_aviary_output(self, Aircraft.LandingGear.NOSE_GEAR_MASS, val=0.0) + add_aviary_output(self, Aircraft.LandingGear.MAIN_GEAR_MASS) + add_aviary_output(self, Aircraft.LandingGear.NOSE_GEAR_MASS) def setup_partials(self): self.declare_partials(Aircraft.LandingGear.MAIN_GEAR_MASS, [ @@ -245,8 +235,8 @@ class NoseGearLength(om.ExplicitComponent): """ def setup(self): - add_aviary_input(self, Aircraft.LandingGear.MAIN_GEAR_OLEO_LENGTH, val=0.0) - add_aviary_output(self, Aircraft.LandingGear.NOSE_GEAR_OLEO_LENGTH, val=0.0) + add_aviary_input(self, Aircraft.LandingGear.MAIN_GEAR_OLEO_LENGTH) + add_aviary_output(self, Aircraft.LandingGear.NOSE_GEAR_OLEO_LENGTH) def setup_partials(self): self.declare_partials(Aircraft.LandingGear.NOSE_GEAR_OLEO_LENGTH, @@ -271,20 +261,20 @@ def setup(self): num_engine_type = len(self.options[Aircraft.Engine.NUM_ENGINES]) num_wing_engines = self.options[Aircraft.Engine.NUM_WING_ENGINES] - add_aviary_input(self, Aircraft.Fuselage.LENGTH, val=0.0) - 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.Fuselage.LENGTH) + add_aviary_input(self, Aircraft.Fuselage.MAX_WIDTH) + add_aviary_input(self, Aircraft.Nacelle.AVG_DIAMETER, shape=num_engine_type) if any(num_wing_engines) > 0: + # XJ: shape=(num_engine_type, int(num_wing_engines[0]/2)) add_aviary_input(self, Aircraft.Engine.WING_LOCATIONS, val=np.zeros( (num_engine_type, int(num_wing_engines[0] / 2)))) else: add_aviary_input(self, Aircraft.Engine.WING_LOCATIONS, val=[[0.0]]) - add_aviary_input(self, Aircraft.Wing.DIHEDRAL, val=0.0) - add_aviary_input(self, Aircraft.Wing.SPAN, val=0.0) + add_aviary_input(self, Aircraft.Wing.DIHEDRAL) + add_aviary_input(self, Aircraft.Wing.SPAN) - add_aviary_output(self, Aircraft.LandingGear.MAIN_GEAR_OLEO_LENGTH, val=0.0) + add_aviary_output(self, Aircraft.LandingGear.MAIN_GEAR_OLEO_LENGTH) def setup_partials(self): self.declare_partials('*', '*') diff --git a/aviary/subsystems/mass/flops_based/landing_mass.py b/aviary/subsystems/mass/flops_based/landing_mass.py index b809b51dc..721ac1b73 100644 --- a/aviary/subsystems/mass/flops_based/landing_mass.py +++ b/aviary/subsystems/mass/flops_based/landing_mass.py @@ -11,11 +11,10 @@ class LandingTakeoffMassRatio(om.ExplicitComponent): ''' def setup(self): - add_aviary_input(self, Mission.Summary.CRUISE_MACH, val=0.0) + add_aviary_input(self, Mission.Summary.CRUISE_MACH) + add_aviary_input(self, Mission.Design.RANGE) - add_aviary_input(self, Mission.Design.RANGE, val=0.0) - - add_aviary_output(self, Aircraft.Design.LANDING_TO_TAKEOFF_MASS_RATIO, val=0.0) + add_aviary_output(self, Aircraft.Design.LANDING_TO_TAKEOFF_MASS_RATIO) def setup_partials(self): self.declare_partials('*', '*') @@ -53,11 +52,10 @@ class LandingMass(om.ExplicitComponent): ''' def setup(self): - add_aviary_input(self, Mission.Design.GROSS_MASS, val=0.0) - - add_aviary_input(self, Aircraft.Design.LANDING_TO_TAKEOFF_MASS_RATIO, val=0.0) + add_aviary_input(self, Mission.Design.GROSS_MASS) + add_aviary_input(self, Aircraft.Design.LANDING_TO_TAKEOFF_MASS_RATIO) - add_aviary_output(self, Aircraft.Design.TOUCHDOWN_MASS, val=0.0) + add_aviary_output(self, Aircraft.Design.TOUCHDOWN_MASS) def setup_partials(self): self.declare_partials('*', '*') diff --git a/aviary/subsystems/mass/flops_based/mass_summation.py b/aviary/subsystems/mass/flops_based/mass_summation.py index 2a3ae8103..30570ca34 100644 --- a/aviary/subsystems/mass/flops_based/mass_summation.py +++ b/aviary/subsystems/mass/flops_based/mass_summation.py @@ -80,18 +80,18 @@ def initialize(self): def setup(self): num_engine_type = len(self.options[Aircraft.Engine.NUM_ENGINES]) - add_aviary_input(self, Aircraft.Canard.MASS, val=0.0) - add_aviary_input(self, Aircraft.Fins.MASS, val=0.0) - add_aviary_input(self, Aircraft.Fuselage.MASS, val=0.0) - add_aviary_input(self, Aircraft.HorizontalTail.MASS, val=0.0) - add_aviary_input(self, Aircraft.LandingGear.MAIN_GEAR_MASS, val=0.0) - add_aviary_input(self, Aircraft.LandingGear.NOSE_GEAR_MASS, val=0.0) - add_aviary_input(self, Aircraft.Nacelle.MASS, val=np.zeros(num_engine_type)) - add_aviary_input(self, Aircraft.Paint.MASS, val=0.0) - add_aviary_input(self, Aircraft.VerticalTail.MASS, val=0.0) - add_aviary_input(self, Aircraft.Wing.MASS, val=0.0) - - add_aviary_output(self, Aircraft.Design.STRUCTURE_MASS, val=0.0) + add_aviary_input(self, Aircraft.Canard.MASS) + add_aviary_input(self, Aircraft.Fins.MASS) + add_aviary_input(self, Aircraft.Fuselage.MASS) + add_aviary_input(self, Aircraft.HorizontalTail.MASS) + add_aviary_input(self, Aircraft.LandingGear.MAIN_GEAR_MASS) + add_aviary_input(self, Aircraft.LandingGear.NOSE_GEAR_MASS) + add_aviary_input(self, Aircraft.Nacelle.MASS, shape=num_engine_type) + add_aviary_input(self, Aircraft.Paint.MASS) + add_aviary_input(self, Aircraft.VerticalTail.MASS) + add_aviary_input(self, Aircraft.Wing.MASS) + + add_aviary_output(self, Aircraft.Design.STRUCTURE_MASS) def setup_partials(self): num_engine_type = len(self.options[Aircraft.Engine.NUM_ENGINES]) @@ -120,13 +120,12 @@ def compute(self, inputs, outputs): class PropulsionMass(om.ExplicitComponent): def setup(self): - add_aviary_input(self, Aircraft.Fuel.FUEL_SYSTEM_MASS, val=0.0) - add_aviary_input(self, Aircraft.Propulsion.TOTAL_MISC_MASS, val=0.0) - add_aviary_input( - self, Aircraft.Propulsion.TOTAL_THRUST_REVERSERS_MASS, val=0.0) - add_aviary_input(self, Aircraft.Propulsion.TOTAL_ENGINE_MASS, val=0.0) + add_aviary_input(self, Aircraft.Fuel.FUEL_SYSTEM_MASS) + add_aviary_input(self, Aircraft.Propulsion.TOTAL_MISC_MASS) + add_aviary_input(self, Aircraft.Propulsion.TOTAL_THRUST_REVERSERS_MASS) + add_aviary_input(self, Aircraft.Propulsion.TOTAL_ENGINE_MASS) - add_aviary_output(self, Aircraft.Propulsion.MASS, val=0.0) + add_aviary_output(self, Aircraft.Propulsion.MASS) def setup_partials(self): prop_wrt = [ @@ -150,18 +149,18 @@ def compute(self, inputs, outputs): class SystemsEquipMass(om.ExplicitComponent): def setup(self): - add_aviary_input(self, Aircraft.AirConditioning.MASS, val=0.0) - add_aviary_input(self, Aircraft.AntiIcing.MASS, val=0.0) - add_aviary_input(self, Aircraft.APU.MASS, val=0.0) - add_aviary_input(self, Aircraft.Avionics.MASS, val=0.0) - add_aviary_input(self, Aircraft.Electrical.MASS, val=0.0) - add_aviary_input(self, Aircraft.Furnishings.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.Wing.SURFACE_CONTROL_MASS, val=0.0) - add_aviary_input(self, Aircraft.Design.EXTERNAL_SUBSYSTEMS_MASS, val=0.0) - - add_aviary_output(self, Aircraft.Design.SYSTEMS_EQUIP_MASS, val=0.0) + add_aviary_input(self, Aircraft.AirConditioning.MASS) + add_aviary_input(self, Aircraft.AntiIcing.MASS) + add_aviary_input(self, Aircraft.APU.MASS) + add_aviary_input(self, Aircraft.Avionics.MASS) + add_aviary_input(self, Aircraft.Electrical.MASS) + add_aviary_input(self, Aircraft.Furnishings.MASS) + add_aviary_input(self, Aircraft.Hydraulics.MASS) + add_aviary_input(self, Aircraft.Instruments.MASS) + add_aviary_input(self, Aircraft.Wing.SURFACE_CONTROL_MASS) + add_aviary_input(self, Aircraft.Design.EXTERNAL_SUBSYSTEMS_MASS) + + add_aviary_output(self, Aircraft.Design.SYSTEMS_EQUIP_MASS) def setup_partials(self): self.declare_partials(Aircraft.Design.SYSTEMS_EQUIP_MASS, '*', val=1) @@ -187,18 +186,18 @@ def compute(self, inputs, outputs): class AltSystemsEquipMassBase(om.ExplicitComponent): def setup(self): - add_aviary_input(self, Aircraft.AirConditioning.MASS, val=0.0) - add_aviary_input(self, Aircraft.AntiIcing.MASS, val=0.0) - add_aviary_input(self, Aircraft.APU.MASS, val=0.0) - add_aviary_input(self, Aircraft.Avionics.MASS, val=0.0) - add_aviary_input(self, Aircraft.Electrical.MASS, val=0.0) - add_aviary_input(self, Aircraft.Furnishings.MASS_BASE, 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.Wing.SURFACE_CONTROL_MASS, val=0.0) - add_aviary_input(self, Aircraft.Design.EXTERNAL_SUBSYSTEMS_MASS, val=0.0) - - add_aviary_output(self, Aircraft.Design.SYSTEMS_EQUIP_MASS_BASE, val=0.0) + add_aviary_input(self, Aircraft.AirConditioning.MASS) + add_aviary_input(self, Aircraft.AntiIcing.MASS) + add_aviary_input(self, Aircraft.APU.MASS) + add_aviary_input(self, Aircraft.Avionics.MASS) + add_aviary_input(self, Aircraft.Electrical.MASS) + add_aviary_input(self, Aircraft.Furnishings.MASS_BASE) + add_aviary_input(self, Aircraft.Hydraulics.MASS) + add_aviary_input(self, Aircraft.Instruments.MASS) + add_aviary_input(self, Aircraft.Wing.SURFACE_CONTROL_MASS) + add_aviary_input(self, Aircraft.Design.EXTERNAL_SUBSYSTEMS_MASS) + + add_aviary_output(self, Aircraft.Design.SYSTEMS_EQUIP_MASS_BASE) def setup_partials(self): self.declare_partials(Aircraft.Design.SYSTEMS_EQUIP_MASS_BASE, '*', val=1) @@ -224,11 +223,11 @@ def compute(self, inputs, outputs): class AltSystemsEquipMass(om.ExplicitComponent): def setup(self): - add_aviary_input(self, Aircraft.Design.SYSTEMS_EQUIP_MASS_BASE, val=0.0) - add_aviary_input(self, Aircraft.Design.STRUCTURE_MASS, val=0.0) - add_aviary_input(self, Aircraft.Propulsion.MASS, val=0.0) + add_aviary_input(self, Aircraft.Design.SYSTEMS_EQUIP_MASS_BASE) + add_aviary_input(self, Aircraft.Design.STRUCTURE_MASS) + add_aviary_input(self, Aircraft.Propulsion.MASS) - add_aviary_output(self, Aircraft.Design.SYSTEMS_EQUIP_MASS, val=0.0) + add_aviary_output(self, Aircraft.Design.SYSTEMS_EQUIP_MASS) def setup_partials(self): self.declare_partials( @@ -256,12 +255,12 @@ def compute(self, inputs, outputs): class EmptyMass(om.ExplicitComponent): def setup(self): - add_aviary_input(self, Aircraft.Design.EMPTY_MASS_MARGIN, val=0.0) - add_aviary_input(self, Aircraft.Design.STRUCTURE_MASS, val=0.0) - add_aviary_input(self, Aircraft.Propulsion.MASS, val=0.0) - add_aviary_input(self, Aircraft.Design.SYSTEMS_EQUIP_MASS, val=0.0) + add_aviary_input(self, Aircraft.Design.EMPTY_MASS_MARGIN) + add_aviary_input(self, Aircraft.Design.STRUCTURE_MASS) + add_aviary_input(self, Aircraft.Propulsion.MASS) + add_aviary_input(self, Aircraft.Design.SYSTEMS_EQUIP_MASS) - add_aviary_output(self, Aircraft.Design.EMPTY_MASS, val=0.0) + add_aviary_output(self, Aircraft.Design.EMPTY_MASS) def setup_partials(self): self.declare_partials(Aircraft.Design.EMPTY_MASS, '*', val=1) @@ -279,12 +278,12 @@ def compute(self, inputs, outputs): class AltEmptyMass(om.ExplicitComponent): def setup(self): - add_aviary_input(self, Aircraft.Design.EMPTY_MASS_MARGIN, val=0.0) - add_aviary_input(self, Aircraft.Design.STRUCTURE_MASS, val=0.0) - add_aviary_input(self, Aircraft.Propulsion.MASS, val=0.0) - add_aviary_input(self, Aircraft.Design.SYSTEMS_EQUIP_MASS_BASE, val=0.0) + add_aviary_input(self, Aircraft.Design.EMPTY_MASS_MARGIN) + add_aviary_input(self, Aircraft.Design.STRUCTURE_MASS) + add_aviary_input(self, Aircraft.Propulsion.MASS) + add_aviary_input(self, Aircraft.Design.SYSTEMS_EQUIP_MASS_BASE) - add_aviary_output(self, Aircraft.Design.EMPTY_MASS, val=0.0) + add_aviary_output(self, Aircraft.Design.EMPTY_MASS) def setup_partials(self): self.declare_partials(Aircraft.Design.EMPTY_MASS, @@ -309,15 +308,15 @@ def compute(self, inputs, outputs): class OperatingMass(om.ExplicitComponent): def setup(self): - add_aviary_input(self, Aircraft.CrewPayload.CARGO_CONTAINER_MASS, val=0.0) - add_aviary_input(self, Aircraft.CrewPayload.NON_FLIGHT_CREW_MASS, val=0.0) - add_aviary_input(self, Aircraft.CrewPayload.FLIGHT_CREW_MASS, val=0.0) - add_aviary_input(self, Aircraft.CrewPayload.PASSENGER_SERVICE_MASS, val=0.0) - add_aviary_input(self, Aircraft.Design.EMPTY_MASS, val=0.0) - add_aviary_input(self, Aircraft.Fuel.UNUSABLE_FUEL_MASS, val=0.0) - add_aviary_input(self, Aircraft.Propulsion.TOTAL_ENGINE_OIL_MASS, val=0.0) + add_aviary_input(self, Aircraft.CrewPayload.CARGO_CONTAINER_MASS) + add_aviary_input(self, Aircraft.CrewPayload.NON_FLIGHT_CREW_MASS) + add_aviary_input(self, Aircraft.CrewPayload.FLIGHT_CREW_MASS) + add_aviary_input(self, Aircraft.CrewPayload.PASSENGER_SERVICE_MASS) + add_aviary_input(self, Aircraft.Design.EMPTY_MASS) + add_aviary_input(self, Aircraft.Fuel.UNUSABLE_FUEL_MASS) + add_aviary_input(self, Aircraft.Propulsion.TOTAL_ENGINE_OIL_MASS) - add_aviary_output(self, Aircraft.Design.OPERATING_MASS, val=0.0) + add_aviary_output(self, Aircraft.Design.OPERATING_MASS) def setup_partials(self): self.declare_partials(Aircraft.Design.OPERATING_MASS, '*', val=1) @@ -339,12 +338,12 @@ def compute(self, inputs, outputs): class ZeroFuelMass(om.ExplicitComponent): def setup(self): - add_aviary_input(self, Aircraft.CrewPayload.PASSENGER_MASS, val=0.0) - add_aviary_input(self, Aircraft.CrewPayload.BAGGAGE_MASS, val=0.0) - add_aviary_input(self, Aircraft.CrewPayload.CARGO_MASS, val=0.0) - add_aviary_input(self, Aircraft.Design.OPERATING_MASS, val=0.0) + add_aviary_input(self, Aircraft.CrewPayload.PASSENGER_MASS) + add_aviary_input(self, Aircraft.CrewPayload.BAGGAGE_MASS) + add_aviary_input(self, Aircraft.CrewPayload.CARGO_MASS) + add_aviary_input(self, Aircraft.Design.OPERATING_MASS) - add_aviary_output(self, Aircraft.Design.ZERO_FUEL_MASS, val=0.0) + add_aviary_output(self, Aircraft.Design.ZERO_FUEL_MASS) def setup_partials(self): self.declare_partials(Aircraft.Design.ZERO_FUEL_MASS, '*', val=1) @@ -362,10 +361,10 @@ def compute(self, inputs, outputs): class FuelMass(om.ExplicitComponent): def setup(self): - add_aviary_input(self, Mission.Design.GROSS_MASS, val=0.0) - add_aviary_input(self, Aircraft.Design.ZERO_FUEL_MASS, val=0.0) + add_aviary_input(self, Mission.Design.GROSS_MASS) + add_aviary_input(self, Aircraft.Design.ZERO_FUEL_MASS) - add_aviary_output(self, Mission.Design.FUEL_MASS, val=0.0) + add_aviary_output(self, Mission.Design.FUEL_MASS) def setup_partials(self): self.declare_partials(Mission.Design.FUEL_MASS, diff --git a/aviary/subsystems/mass/flops_based/misc_engine.py b/aviary/subsystems/mass/flops_based/misc_engine.py index a77ca24c9..94b7bd11f 100644 --- a/aviary/subsystems/mass/flops_based/misc_engine.py +++ b/aviary/subsystems/mass/flops_based/misc_engine.py @@ -24,13 +24,12 @@ def initialize(self): def setup(self): num_engine_type = len(self.options[Aircraft.Engine.NUM_ENGINES]) - add_aviary_input( - self, Aircraft.Engine.ADDITIONAL_MASS, val=np.zeros(num_engine_type)) - add_aviary_input(self, Aircraft.Propulsion.MISC_MASS_SCALER, val=0.0) - add_aviary_input(self, Aircraft.Propulsion.TOTAL_ENGINE_CONTROLS_MASS, val=0.0) - add_aviary_input(self, Aircraft.Propulsion.TOTAL_STARTER_MASS, val=0.0) + add_aviary_input(self, Aircraft.Engine.ADDITIONAL_MASS, shape=num_engine_type) + add_aviary_input(self, Aircraft.Propulsion.MISC_MASS_SCALER) + add_aviary_input(self, Aircraft.Propulsion.TOTAL_ENGINE_CONTROLS_MASS) + add_aviary_input(self, Aircraft.Propulsion.TOTAL_STARTER_MASS) - add_aviary_output(self, Aircraft.Propulsion.TOTAL_MISC_MASS, val=0.0) + add_aviary_output(self, Aircraft.Propulsion.TOTAL_MISC_MASS) self.declare_partials( of=Aircraft.Propulsion.TOTAL_MISC_MASS, diff --git a/aviary/subsystems/mass/flops_based/nacelle.py b/aviary/subsystems/mass/flops_based/nacelle.py index 7ec531053..7ed085d9a 100644 --- a/aviary/subsystems/mass/flops_based/nacelle.py +++ b/aviary/subsystems/mass/flops_based/nacelle.py @@ -25,19 +25,12 @@ def initialize(self): def setup(self): num_engine_type = len(self.options[Aircraft.Engine.NUM_ENGINES]) - add_aviary_input(self, Aircraft.Nacelle.AVG_DIAMETER, - val=np.zeros(num_engine_type)) + add_aviary_input(self, Aircraft.Nacelle.AVG_DIAMETER, shape=num_engine_type) + add_aviary_input(self, Aircraft.Nacelle.AVG_LENGTH, shape=num_engine_type) + add_aviary_input(self, Aircraft.Nacelle.MASS_SCALER, shape=num_engine_type) + add_aviary_input(self, Aircraft.Engine.SCALED_SLS_THRUST, shape=num_engine_type) - add_aviary_input(self, Aircraft.Nacelle.AVG_LENGTH, - val=np.zeros(num_engine_type)) - - add_aviary_input(self, Aircraft.Nacelle.MASS_SCALER, - val=np.ones(num_engine_type)) - - add_aviary_input(self, Aircraft.Engine.SCALED_SLS_THRUST, - val=np.zeros(num_engine_type)) - - add_aviary_output(self, Aircraft.Nacelle.MASS, val=np.zeros(num_engine_type)) + add_aviary_output(self, Aircraft.Nacelle.MASS, shape=num_engine_type) def setup_partials(self): # derivatives w.r.t vectorized engine inputs have known sparsity pattern diff --git a/aviary/subsystems/mass/flops_based/paint.py b/aviary/subsystems/mass/flops_based/paint.py index 4781a13e6..6e866ae98 100644 --- a/aviary/subsystems/mass/flops_based/paint.py +++ b/aviary/subsystems/mass/flops_based/paint.py @@ -10,11 +10,10 @@ class PaintMass(om.ExplicitComponent): ''' def setup(self): - add_aviary_input(self, Aircraft.Design.TOTAL_WETTED_AREA, val=0.0) + add_aviary_input(self, Aircraft.Design.TOTAL_WETTED_AREA) + add_aviary_input(self, Aircraft.Paint.MASS_PER_UNIT_AREA) - add_aviary_input(self, Aircraft.Paint.MASS_PER_UNIT_AREA, val=0.0) - - add_aviary_output(self, Aircraft.Paint.MASS, val=0.0) + add_aviary_output(self, Aircraft.Paint.MASS) def setup_partials(self): self.declare_partials('*', '*') diff --git a/aviary/subsystems/mass/flops_based/passenger_service.py b/aviary/subsystems/mass/flops_based/passenger_service.py index f333b4011..b7f23cfde 100644 --- a/aviary/subsystems/mass/flops_based/passenger_service.py +++ b/aviary/subsystems/mass/flops_based/passenger_service.py @@ -23,23 +23,10 @@ def initialize(self): add_aviary_option(self, Mission.Constraints.MAX_MACH) def setup(self): - add_aviary_input( - self, - Aircraft.CrewPayload.PASSENGER_SERVICE_MASS_SCALER, - val=1., - ) + add_aviary_input(self, Aircraft.CrewPayload.PASSENGER_SERVICE_MASS_SCALER) + add_aviary_input(self, Mission.Design.RANGE) - add_aviary_input( - self, - Mission.Design.RANGE, - val=0.0, - ) - - add_aviary_output( - self, - Aircraft.CrewPayload.PASSENGER_SERVICE_MASS, - val=0.0, - ) + add_aviary_output(self, Aircraft.CrewPayload.PASSENGER_SERVICE_MASS) def setup_partials(self): self.declare_partials('*', '*') diff --git a/aviary/subsystems/mass/flops_based/starter.py b/aviary/subsystems/mass/flops_based/starter.py index 2bf04fb07..0a2bc5a04 100644 --- a/aviary/subsystems/mass/flops_based/starter.py +++ b/aviary/subsystems/mass/flops_based/starter.py @@ -24,10 +24,9 @@ def initialize(self): def setup(self): num_engine_type = len(self.options[Aircraft.Engine.NUM_ENGINES]) - add_aviary_input(self, Aircraft.Nacelle.AVG_DIAMETER, - val=np.zeros(num_engine_type)) + add_aviary_input(self, Aircraft.Nacelle.AVG_DIAMETER, shape=num_engine_type) - add_aviary_output(self, Aircraft.Propulsion.TOTAL_STARTER_MASS, val=0.0) + add_aviary_output(self, Aircraft.Propulsion.TOTAL_STARTER_MASS) def setup_partials(self): self.declare_partials("*", "*") diff --git a/aviary/subsystems/mass/flops_based/surface_controls.py b/aviary/subsystems/mass/flops_based/surface_controls.py index fb109e427..462e9c6e1 100644 --- a/aviary/subsystems/mass/flops_based/surface_controls.py +++ b/aviary/subsystems/mass/flops_based/surface_controls.py @@ -15,12 +15,12 @@ def initialize(self): add_aviary_option(self, Mission.Constraints.MAX_MACH) def setup(self): - add_aviary_input(self, Aircraft.Wing.SURFACE_CONTROL_MASS_SCALER, val=1.0) - add_aviary_input(self, Mission.Design.GROSS_MASS, val=0.0) - add_aviary_input(self, Aircraft.Wing.CONTROL_SURFACE_AREA_RATIO, val=0.0) - add_aviary_input(self, Aircraft.Wing.AREA, val=0.0) + add_aviary_input(self, Aircraft.Wing.SURFACE_CONTROL_MASS_SCALER) + add_aviary_input(self, Mission.Design.GROSS_MASS) + add_aviary_input(self, Aircraft.Wing.CONTROL_SURFACE_AREA_RATIO) + add_aviary_input(self, Aircraft.Wing.AREA) - add_aviary_output(self, Aircraft.Wing.SURFACE_CONTROL_MASS, val=10) + add_aviary_output(self, Aircraft.Wing.SURFACE_CONTROL_MASS) add_aviary_output(self, Aircraft.Wing.CONTROL_SURFACE_AREA, val=2) self.declare_partials(Aircraft.Wing.SURFACE_CONTROL_MASS, '*') diff --git a/aviary/subsystems/mass/flops_based/test/test_furnishings.py b/aviary/subsystems/mass/flops_based/test/test_furnishings.py index 7dab4cc72..cc0e10d18 100644 --- a/aviary/subsystems/mass/flops_based/test/test_furnishings.py +++ b/aviary/subsystems/mass/flops_based/test/test_furnishings.py @@ -151,6 +151,12 @@ def test_case(self): promotes_outputs=['*'], promotes_inputs=['*'] ) + prob.model.set_input_defaults( + Aircraft.BWB.CABIN_AREA, val=100., units="ft**2") + prob.model.set_input_defaults( + Aircraft.Fuselage.MAX_WIDTH, val=30., units="ft") + prob.model.set_input_defaults( + Aircraft.Fuselage.MAX_HEIGHT, val=15., units="ft") prob.setup(check=False, force_alloc_complex=True) partial_data = prob.check_partials(out_stream=None, method="cs") diff --git a/aviary/subsystems/mass/flops_based/test/test_wing_common.py b/aviary/subsystems/mass/flops_based/test/test_wing_common.py index 5652de62c..4ddd4103c 100644 --- a/aviary/subsystems/mass/flops_based/test/test_wing_common.py +++ b/aviary/subsystems/mass/flops_based/test/test_wing_common.py @@ -223,6 +223,7 @@ def test_case(self): prob.set_val(Aircraft.Wing.SHEAR_CONTROL_MASS, 4000, 'lbm') prob.set_val(Aircraft.Wing.SPAN, 100, 'ft') prob.set_val(Aircraft.Wing.SWEEP, 20, 'deg') + prob.set_val(Aircraft.Wing.ULTIMATE_LOAD_FACTOR, 3.75, 'unitless') partial_data = prob.check_partials(out_stream=None, method="cs") assert_check_partials(partial_data, atol=1e-12, rtol=1e-12) diff --git a/aviary/subsystems/mass/flops_based/thrust_reverser.py b/aviary/subsystems/mass/flops_based/thrust_reverser.py index 6821f182b..5193d6005 100644 --- a/aviary/subsystems/mass/flops_based/thrust_reverser.py +++ b/aviary/subsystems/mass/flops_based/thrust_reverser.py @@ -28,14 +28,14 @@ def setup(self): num_engine_type = len(self.options[Aircraft.Engine.NUM_ENGINES]) add_aviary_input( - self, Aircraft.Engine.THRUST_REVERSERS_MASS_SCALER, val=np.zeros(num_engine_type)) + self, Aircraft.Engine.THRUST_REVERSERS_MASS_SCALER, shape=num_engine_type) add_aviary_input( - self, Aircraft.Engine.SCALED_SLS_THRUST, val=np.zeros(num_engine_type)) + self, Aircraft.Engine.SCALED_SLS_THRUST, shape=num_engine_type) add_aviary_output( - self, Aircraft.Engine.THRUST_REVERSERS_MASS, val=np.zeros(num_engine_type)) + self, Aircraft.Engine.THRUST_REVERSERS_MASS, shape=num_engine_type) add_aviary_output( - self, Aircraft.Propulsion.TOTAL_THRUST_REVERSERS_MASS, val=0) + self, Aircraft.Propulsion.TOTAL_THRUST_REVERSERS_MASS) def setup_partials(self): # derivatives w.r.t vectorized engine inputs have known sparsity pattern diff --git a/aviary/subsystems/mass/flops_based/unusable_fuel.py b/aviary/subsystems/mass/flops_based/unusable_fuel.py index 8913549ee..9aa6c5406 100644 --- a/aviary/subsystems/mass/flops_based/unusable_fuel.py +++ b/aviary/subsystems/mass/flops_based/unusable_fuel.py @@ -25,19 +25,14 @@ def initialize(self): def setup(self): add_aviary_input( - self, Aircraft.Fuel.UNUSABLE_FUEL_MASS_SCALER, val=1.0) - - add_aviary_input(self, Aircraft.Fuel.DENSITY_RATIO, 1.0) - - add_aviary_input(self, Aircraft.Fuel.TOTAL_CAPACITY, 0.0) - - add_aviary_input(self, Aircraft.Propulsion.TOTAL_SCALED_SLS_THRUST, val=0.0) - - add_aviary_input(self, Aircraft.Wing.AREA, val=0.0) - - add_aviary_output(self, Aircraft.Fuel.TOTAL_VOLUME, val=0.0) - - add_aviary_output(self, Aircraft.Fuel.UNUSABLE_FUEL_MASS, val=0.0) + self, Aircraft.Fuel.UNUSABLE_FUEL_MASS_SCALER) + add_aviary_input(self, Aircraft.Fuel.DENSITY_RATIO) + add_aviary_input(self, Aircraft.Fuel.TOTAL_CAPACITY) + add_aviary_input(self, Aircraft.Propulsion.TOTAL_SCALED_SLS_THRUST) + add_aviary_input(self, Aircraft.Wing.AREA) + add_aviary_output(self, Aircraft.Fuel.TOTAL_VOLUME) + + add_aviary_output(self, Aircraft.Fuel.UNUSABLE_FUEL_MASS) def setup_partials(self): diff --git a/aviary/subsystems/mass/flops_based/vertical_tail.py b/aviary/subsystems/mass/flops_based/vertical_tail.py index 0f95fb3da..007218103 100644 --- a/aviary/subsystems/mass/flops_based/vertical_tail.py +++ b/aviary/subsystems/mass/flops_based/vertical_tail.py @@ -16,14 +16,11 @@ def initialize(self): def setup(self): add_aviary_input(self, Aircraft.VerticalTail.AREA, val=0.0) - add_aviary_input(self, Aircraft.VerticalTail.TAPER_RATIO, val=0.0) + add_aviary_input(self, Aircraft.VerticalTail.MASS_SCALER) + add_aviary_input(self, Mission.Design.GROSS_MASS) - add_aviary_input(self, Aircraft.VerticalTail.MASS_SCALER, val=1.0) - - add_aviary_input(self, Mission.Design.GROSS_MASS, val=0.0) - - add_aviary_output(self, Aircraft.VerticalTail.MASS, val=0.0) + add_aviary_output(self, Aircraft.VerticalTail.MASS) def setup_partials(self): self.declare_partials("*", "*") diff --git a/aviary/subsystems/mass/flops_based/wing_common.py b/aviary/subsystems/mass/flops_based/wing_common.py index a932a4e49..b82b1c347 100644 --- a/aviary/subsystems/mass/flops_based/wing_common.py +++ b/aviary/subsystems/mass/flops_based/wing_common.py @@ -16,23 +16,23 @@ def initialize(self): add_aviary_option(self, Aircraft.Fuselage.NUM_FUSELAGES) def setup(self): - add_aviary_input(self, Mission.Design.GROSS_MASS, val=0.0) - add_aviary_input(self, Aircraft.Wing.AEROELASTIC_TAILORING_FACTOR, val=0.0) - add_aviary_input(self, Aircraft.Wing.BENDING_MATERIAL_FACTOR, val=0.0) - add_aviary_input(self, Aircraft.Wing.BENDING_MATERIAL_MASS_SCALER, val=1.0) - add_aviary_input(self, Aircraft.Wing.COMPOSITE_FRACTION, val=0.0) - add_aviary_input(self, Aircraft.Wing.ENG_POD_INERTIA_FACTOR, val=0.0) - add_aviary_input(self, Aircraft.Wing.LOAD_FRACTION, val=0.0) - add_aviary_input(self, Aircraft.Wing.MISC_MASS, val=0.0) - add_aviary_input(self, Aircraft.Wing.MISC_MASS_SCALER, val=1.0) - add_aviary_input(self, Aircraft.Wing.SHEAR_CONTROL_MASS, val=0.0) - add_aviary_input(self, Aircraft.Wing.SHEAR_CONTROL_MASS_SCALER, val=1.0) - add_aviary_input(self, Aircraft.Wing.SPAN, val=0.0) - add_aviary_input(self, Aircraft.Wing.SWEEP, val=0.0) - add_aviary_input(self, Aircraft.Wing.ULTIMATE_LOAD_FACTOR, val=3.75) - add_aviary_input(self, Aircraft.Wing.VAR_SWEEP_MASS_PENALTY, val=0.0) - - add_aviary_output(self, Aircraft.Wing.BENDING_MATERIAL_MASS, val=0.0) + add_aviary_input(self, Mission.Design.GROSS_MASS) + add_aviary_input(self, Aircraft.Wing.AEROELASTIC_TAILORING_FACTOR) + add_aviary_input(self, Aircraft.Wing.BENDING_MATERIAL_FACTOR) + add_aviary_input(self, Aircraft.Wing.BENDING_MATERIAL_MASS_SCALER) + add_aviary_input(self, Aircraft.Wing.COMPOSITE_FRACTION) + add_aviary_input(self, Aircraft.Wing.ENG_POD_INERTIA_FACTOR) + add_aviary_input(self, Aircraft.Wing.LOAD_FRACTION) + add_aviary_input(self, Aircraft.Wing.MISC_MASS) + add_aviary_input(self, Aircraft.Wing.MISC_MASS_SCALER) + add_aviary_input(self, Aircraft.Wing.SHEAR_CONTROL_MASS) + add_aviary_input(self, Aircraft.Wing.SHEAR_CONTROL_MASS_SCALER) + add_aviary_input(self, Aircraft.Wing.SPAN) + add_aviary_input(self, Aircraft.Wing.SWEEP) + add_aviary_input(self, Aircraft.Wing.ULTIMATE_LOAD_FACTOR) + add_aviary_input(self, Aircraft.Wing.VAR_SWEEP_MASS_PENALTY) + + add_aviary_output(self, Aircraft.Wing.BENDING_MATERIAL_MASS) self.A1 = 8.80 self.A2 = 6.25 @@ -212,15 +212,12 @@ def initialize(self): desc='Aircfaft type: Tranpsport, HWB, or GA') def setup(self): - add_aviary_input(self, Aircraft.Wing.COMPOSITE_FRACTION, val=0.0) + add_aviary_input(self, Aircraft.Wing.COMPOSITE_FRACTION) + add_aviary_input(self, Aircraft.Wing.CONTROL_SURFACE_AREA) + add_aviary_input(self, Mission.Design.GROSS_MASS) + add_aviary_input(self, Aircraft.Wing.SHEAR_CONTROL_MASS_SCALER) - add_aviary_input(self, Aircraft.Wing.CONTROL_SURFACE_AREA, val=0.0) - - add_aviary_input(self, Mission.Design.GROSS_MASS, val=0.0) - - add_aviary_input(self, Aircraft.Wing.SHEAR_CONTROL_MASS_SCALER, val=1.0) - - add_aviary_output(self, Aircraft.Wing.SHEAR_CONTROL_MASS, val=0.0) + add_aviary_output(self, Aircraft.Wing.SHEAR_CONTROL_MASS) if ( (self.options['aircraft_type'] == 'Transport') @@ -289,13 +286,11 @@ def initialize(self): desc='Aircfaft type: Tranpsport, HWB, or GA') def setup(self): - add_aviary_input(self, Aircraft.Wing.COMPOSITE_FRACTION, val=0.0) - - add_aviary_input(self, Aircraft.Wing.AREA, val=0.0) - - add_aviary_input(self, Aircraft.Wing.MISC_MASS_SCALER, val=1.0) + add_aviary_input(self, Aircraft.Wing.COMPOSITE_FRACTION) + add_aviary_input(self, Aircraft.Wing.AREA) + add_aviary_input(self, Aircraft.Wing.MISC_MASS_SCALER) - add_aviary_output(self, Aircraft.Wing.MISC_MASS, val=0.0) + add_aviary_output(self, Aircraft.Wing.MISC_MASS) if ( (self.options['aircraft_type'] == 'Transport') @@ -339,17 +334,13 @@ class WingTotalMass(om.ExplicitComponent): """ def setup(self): - add_aviary_input(self, Aircraft.Wing.BENDING_MATERIAL_MASS, val=0.0) - - add_aviary_input(self, Aircraft.Wing.SHEAR_CONTROL_MASS, val=0.0) - - add_aviary_input(self, Aircraft.Wing.MISC_MASS, val=0.0) - - add_aviary_input(self, Aircraft.Wing.BWB_AFTBODY_MASS, val=0.0) - - add_aviary_input(self, Aircraft.Wing.MASS_SCALER, val=1.0) + add_aviary_input(self, Aircraft.Wing.BENDING_MATERIAL_MASS) + add_aviary_input(self, Aircraft.Wing.SHEAR_CONTROL_MASS) + add_aviary_input(self, Aircraft.Wing.MISC_MASS) + add_aviary_input(self, Aircraft.Wing.BWB_AFTBODY_MASS) + add_aviary_input(self, Aircraft.Wing.MASS_SCALER) - add_aviary_output(self, Aircraft.Wing.MASS, val=0) + add_aviary_output(self, Aircraft.Wing.MASS) def setup_partials(self): self.declare_partials("*", "*") diff --git a/aviary/subsystems/mass/flops_based/wing_detailed.py b/aviary/subsystems/mass/flops_based/wing_detailed.py index ba7a01c48..f18c75ea7 100644 --- a/aviary/subsystems/mass/flops_based/wing_detailed.py +++ b/aviary/subsystems/mass/flops_based/wing_detailed.py @@ -33,52 +33,30 @@ def setup(self): # wing_location_default = np.empty(num_engine_type, object) # wing_location_default[:] = [np.array([0]*int(num)) for num in num_wing_engines/2] - add_aviary_input( - self, - Aircraft.Wing.LOAD_PATH_SWEEP_DIST, - val=np.zeros(num_input_stations - 1), - ) - - add_aviary_input( - self, - Aircraft.Wing.THICKNESS_TO_CHORD_DIST, - val=np.zeros(num_input_stations), - ) - - add_aviary_input( - self, - Aircraft.Wing.CHORD_PER_SEMISPAN_DIST, - val=np.zeros(num_input_stations), - ) - - add_aviary_input(self, Mission.Design.GROSS_MASS, val=0.0) - - add_aviary_input(self, Aircraft.Engine.POD_MASS, val=np.zeros(num_engine_type)) - - add_aviary_input(self, Aircraft.Wing.ASPECT_RATIO, val=0.0) - - add_aviary_input(self, Aircraft.Wing.ASPECT_RATIO_REF, val=0.0) - - add_aviary_input(self, Aircraft.Wing.STRUT_BRACING_FACTOR, val=0.0) - - add_aviary_input(self, Aircraft.Wing.AEROELASTIC_TAILORING_FACTOR, val=0.0) + add_aviary_input(self, Aircraft.Wing.LOAD_PATH_SWEEP_DIST, + shape=num_input_stations - 1) + add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD_DIST, + shape=num_input_stations) + add_aviary_input(self, Aircraft.Wing.CHORD_PER_SEMISPAN_DIST, + shape=num_input_stations) + add_aviary_input(self, Mission.Design.GROSS_MASS) + add_aviary_input(self, Aircraft.Engine.POD_MASS, shape=num_engine_type) + add_aviary_input(self, Aircraft.Wing.ASPECT_RATIO) + add_aviary_input(self, Aircraft.Wing.ASPECT_RATIO_REF) + add_aviary_input(self, Aircraft.Wing.STRUT_BRACING_FACTOR) + add_aviary_input(self, Aircraft.Wing.AEROELASTIC_TAILORING_FACTOR) if total_num_wing_engines > 0: - add_aviary_input( - self, - Aircraft.Engine.WING_LOCATIONS, - val=np.zeros(int(total_num_wing_engines / 2)), - ) + add_aviary_input(self, Aircraft.Engine.WING_LOCATIONS, + shape=int(total_num_wing_engines/2)) else: - add_aviary_input(self, Aircraft.Engine.WING_LOCATIONS, val=[[0.0]]) - - add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD, val=0.0) - - add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD_REF, val=0.0) + add_aviary_input(self, Aircraft.Engine.WING_LOCATIONS) - add_aviary_output(self, Aircraft.Wing.BENDING_MATERIAL_FACTOR, val=0.0) + add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD) + add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD_REF) - add_aviary_output(self, Aircraft.Wing.ENG_POD_INERTIA_FACTOR, val=0.0) + add_aviary_output(self, Aircraft.Wing.BENDING_MATERIAL_FACTOR) + add_aviary_output(self, Aircraft.Wing.ENG_POD_INERTIA_FACTOR) def setup_partials(self): # TODO: Analytic derivs will be challenging, but possible. diff --git a/aviary/subsystems/mass/flops_based/wing_simple.py b/aviary/subsystems/mass/flops_based/wing_simple.py index 04808ebdb..05779757a 100644 --- a/aviary/subsystems/mass/flops_based/wing_simple.py +++ b/aviary/subsystems/mass/flops_based/wing_simple.py @@ -15,25 +15,17 @@ def initialize(self): add_aviary_option(self, Aircraft.Propulsion.TOTAL_NUM_WING_ENGINES) def setup(self): - add_aviary_input(self, Aircraft.Wing.AREA, val=0.0) - - add_aviary_input(self, Aircraft.Wing.SPAN, val=0.0) - - add_aviary_input(self, Aircraft.Wing.TAPER_RATIO, val=0.0) - - add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD, val=0.0) - - add_aviary_input(self, Aircraft.Wing.STRUT_BRACING_FACTOR, val=0.0) - - add_aviary_input(self, Aircraft.Wing.AEROELASTIC_TAILORING_FACTOR, val=0.0) - - add_aviary_input(self, Aircraft.Wing.ASPECT_RATIO, val=0.0) - - add_aviary_input(self, Aircraft.Wing.SWEEP, val=0.0) - - add_aviary_output(self, Aircraft.Wing.BENDING_MATERIAL_FACTOR, val=0.0) - - add_aviary_output(self, Aircraft.Wing.ENG_POD_INERTIA_FACTOR, val=0.0) + add_aviary_input(self, Aircraft.Wing.AREA) + add_aviary_input(self, Aircraft.Wing.SPAN) + add_aviary_input(self, Aircraft.Wing.TAPER_RATIO) + add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD) + add_aviary_input(self, Aircraft.Wing.STRUT_BRACING_FACTOR) + add_aviary_input(self, Aircraft.Wing.AEROELASTIC_TAILORING_FACTOR) + add_aviary_input(self, Aircraft.Wing.ASPECT_RATIO) + add_aviary_input(self, Aircraft.Wing.SWEEP) + + add_aviary_output(self, Aircraft.Wing.BENDING_MATERIAL_FACTOR) + add_aviary_output(self, Aircraft.Wing.ENG_POD_INERTIA_FACTOR) def setup_partials(self): self.declare_partials( diff --git a/aviary/variable_info/functions.py b/aviary/variable_info/functions.py index 9961ae891..fbdd77a53 100644 --- a/aviary/variable_info/functions.py +++ b/aviary/variable_info/functions.py @@ -59,13 +59,22 @@ def add_aviary_input(comp, varname, val=None, units=None, desc=None, shape_by_co else: input_desc = meta['desc'] if val is None: - val = meta['default_value'] + if shape is None: + val = meta['default_value'] + if val is None: + val = 0.0 + else: + val = meta['default_value'] + if val is None: + val = np.zeros(shape) + else: + val = np.ones(shape) * val comp.add_input(varname, val=val, units=input_units, desc=input_desc, shape_by_conn=shape_by_conn, shape=shape) -def add_aviary_output(comp, varname, val, units=None, desc=None, shape_by_conn=False, - meta_data=_MetaData): +def add_aviary_output(comp, varname, val=None, units=None, desc=None, shape_by_conn=False, + meta_data=_MetaData, shape=None): """ This function provides a clean way to add variables from the variable hierarchy into components as Aviary outputs. It takes @@ -104,6 +113,17 @@ def add_aviary_output(comp, varname, val, units=None, desc=None, shape_by_conn=F output_desc = desc else: output_desc = meta['desc'] + if val is None: + if shape is None: + val = meta['default_value'] + if val is None: + val = 0.0 + else: + val = meta['default_value'] + if val is None: + val = np.zeros(shape) + else: + val = np.ones(shape) * val comp.add_output(varname, val=val, units=output_units, desc=output_desc, shape_by_conn=shape_by_conn) diff --git a/aviary/variable_info/variable_meta_data.py b/aviary/variable_info/variable_meta_data.py index ce0953edf..8b8919fb4 100644 --- a/aviary/variable_info/variable_meta_data.py +++ b/aviary/variable_info/variable_meta_data.py @@ -70,7 +70,7 @@ }, units='lbm', desc='air conditioning system mass', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -122,7 +122,7 @@ }, units='lbm', desc='mass of anti-icing system (auxiliary gear)', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -163,7 +163,7 @@ }, units='lbm', desc='mass of auxiliary power unit', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -204,7 +204,7 @@ }, units='lbm', desc='avionics mass', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -493,7 +493,7 @@ }, units='lbm', desc='mass of canards', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -519,7 +519,7 @@ }, units='unitless', desc='canard theoretical taper ratio', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -645,6 +645,7 @@ }, units='lbm', desc='mass of passenger baggage', + default_value=0.0, ) add_meta_data( @@ -677,7 +678,7 @@ }, units='lbm', desc='mass of cargo containers', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -708,6 +709,7 @@ }, units='lbm', desc='total mass of cargo', + default_value=0.0, ) add_meta_data( @@ -803,7 +805,7 @@ }, units='lbm', desc='total mass of the flight crew and their baggage', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -863,7 +865,7 @@ }, units='lbm', desc='total mass of the non-flight crew and their baggage', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -1010,6 +1012,7 @@ }, units='lbm', desc='TBD: total mass of all passengers without their baggage', + default_value=0.0, ) add_meta_data( @@ -1030,6 +1033,7 @@ historical_name={"GASP": 'INGASP.WPL', "FLOPS": None, "LEAPS1": None}, units='lbm', desc='mass of passenger payload, including passengers, passenger baggage', + default_value=0.0, ) add_meta_data( @@ -1048,7 +1052,7 @@ }, units='lbm', desc='mass of passenger service equipment', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -1242,7 +1246,7 @@ }, units='lbm', desc='empty mass margin', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -1270,6 +1274,7 @@ meta_data=_MetaData, units='lbm', desc='total mass of all user-defined external subsystems', + default_value=0.0, ) add_meta_data( @@ -1350,7 +1355,7 @@ }, units='unitless', desc='ratio of maximum landing mass to maximum takeoff mass', - default_value=0.9, + default_value=0.0, ) add_meta_data( @@ -1416,6 +1421,7 @@ }, units='lbm', desc='operating mass empty of the aircraft', + default_value=0.0, ) add_meta_data( @@ -1495,6 +1501,7 @@ }, units='lbm', desc='Total structural group mass', + default_value=0.0, ) add_meta_data( @@ -1545,6 +1552,7 @@ }, units='lbm', desc='Total systems & equipment group mass', + default_value=0.0, ) add_meta_data( @@ -1556,6 +1564,7 @@ historical_name={"GASP": None, "FLOPS": None, "LEAPS1": None}, units='lbm', desc='Total systems & equipment group mass without additional 1% of ' 'empty mass', + default_value=0.0, ) add_meta_data( @@ -1580,6 +1589,7 @@ }, units='ft**2', desc='total aircraft wetted area', + default_value=0.0, ) add_meta_data( @@ -1601,7 +1611,7 @@ }, units='lbm', desc='design landing mass', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -1662,6 +1672,7 @@ }, units='lbm', desc='zero fuel mass', + default_value=0.0, ) add_meta_data( @@ -1721,7 +1732,7 @@ }, units='lbm', desc='mass of the electrical system', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -2583,7 +2594,7 @@ }, units='lbm', desc='mass of vertical fins', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -2624,7 +2635,7 @@ }, units='unitless', desc='vertical fin theoretical taper ratio', - default_value=None, + default_value=0.0, ) # ______ _ @@ -2645,7 +2656,7 @@ }, units='lbm', desc='fuel capacity of the auxiliary tank', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -2666,7 +2677,7 @@ }, units='unitless', desc='fuel capacity factor', - default_value=23.0, + default_value=1.0, ) add_meta_data( @@ -2720,7 +2731,7 @@ }, units='lbm', desc='fuel system mass', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -2759,7 +2770,7 @@ }, units='lbm', desc='fuel capacity of the fuselage', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -2792,7 +2803,7 @@ desc='Total fuel capacity of the aircraft including wing, fuselage and ' 'auxiliary tanks. Used in generating payload-range diagram (Default = ' 'wing_capacity + fuselage_capacity + aux_capacity)', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -2810,6 +2821,7 @@ }, units='galUS', # need to check this desc='Total fuel volume', + default_value=0.0, ) add_meta_data( @@ -2828,7 +2840,7 @@ }, units='lbm', desc='unusable fuel mass', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -2864,7 +2876,7 @@ }, units='lbm', desc='fuel capacity of the auxiliary tank', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -2993,7 +3005,7 @@ }, units='lbm', desc='Total furnishings system mass', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3002,6 +3014,7 @@ historical_name={"GASP": None, "FLOPS": None, "LEAPS1": None}, units='lbm', desc='Base furnishings system mass without additional 1% empty mass', + default_value=0.0, ) add_meta_data( @@ -3050,6 +3063,7 @@ }, units='ft', desc='average fuselage diameter', + default_value=0.0, ) add_meta_data( @@ -3212,7 +3226,7 @@ }, units='lbm', desc='mass of the fuselage structure', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3247,6 +3261,7 @@ }, units='ft', desc='maximum fuselage height', + default_value=0.0, ) add_meta_data( @@ -3376,6 +3391,7 @@ }, units='ft**2', desc='fuselage planform area', + default_value=0.0, ) add_meta_data( @@ -3433,7 +3449,7 @@ }, units='ft**2', desc='fuselage wetted area', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3576,7 +3592,7 @@ }, units='lbm', desc='mass of horizontal tail', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3716,7 +3732,7 @@ }, units='ft**2', desc='horizontal tail wetted area', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3776,7 +3792,7 @@ }, units='lbm', desc='mass of hydraulic system', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3803,7 +3819,7 @@ }, units='psi', desc='hydraulic system pressure', - default_value=3000.0, + default_value=0.0, ) # @@ -3831,7 +3847,7 @@ }, units='lbm', desc='instrument group mass', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3932,6 +3948,7 @@ }, units='lbm', desc='mass of main landing gear', + default_value=0, ) add_meta_data( @@ -3993,7 +4010,7 @@ }, units='lbm', desc='mass of nose landing gear', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -4071,6 +4088,7 @@ }, units='ft', desc='Average diameter of engine nacelles for each engine model', + default_value=0.0, ) add_meta_data( @@ -4085,6 +4103,7 @@ }, units='ft', desc='Average length of nacelles for each engine model', + default_value=0.0, ) add_meta_data( @@ -4186,7 +4205,7 @@ }, units='lbm', desc='estimated mass of the nacelles for each engine model', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -4281,6 +4300,7 @@ }, units='lbm', desc='mass of paint for all wetted area', + default_value=0.0, ) add_meta_data( @@ -4335,6 +4355,7 @@ }, units='lbm', desc='Total propulsion group mass', + default_value=0.0, ) # TODO clash with per-engine scaling, need to resolve w/ heterogeneous engine @@ -4359,6 +4380,7 @@ historical_name={"GASP": None, "FLOPS": None, "LEAPS1": None}, units='lbm', desc='total estimated mass of the engine controls for all engines on aircraft', + default_value=0.0, ) add_meta_data( @@ -4367,6 +4389,7 @@ historical_name={"GASP": 'INGASP.WEP', "FLOPS": None, "LEAPS1": None}, units='lbm', desc='total mass of all engines on aircraft', + default_value=0.0, ) add_meta_data( @@ -4385,7 +4408,7 @@ }, units='lbm', desc='engine oil mass', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -4405,7 +4428,7 @@ units='lbm', desc='sum of engine control, starter, and additional mass for all engines ' 'on aircraft', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -4477,7 +4500,7 @@ historical_name={"GASP": None, "FLOPS": None, "LEAPS1": None}, units='lbm', desc='total mass of thrust reversers for all engines on aircraft', - default_value=None, + default_value=0.0, ) # _____ _ _ @@ -4741,7 +4764,7 @@ }, units='lbm', desc='mass of vertical tail', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -4838,7 +4861,7 @@ }, units='unitless', desc='vertical tail theoretical taper ratio', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -5010,6 +5033,7 @@ }, units='unitless', desc='Reference aspect ratio, used for detailed wing mass estimation.', + default_value=0.0, ) add_meta_data( @@ -5031,6 +5055,7 @@ units='unitless', desc='Wing bending material factor with sweep adjustment. Used to compute ' 'Aircraft.Wing.BENDING_MATERIAL_MASS', + default_value=0.0, ) add_meta_data( @@ -5045,7 +5070,7 @@ }, units='lbm', desc='wing mass breakdown term 1', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -5073,7 +5098,7 @@ }, units='lbm', desc='wing mass breakdown term 4', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -5145,7 +5170,7 @@ units='unitless', desc='chord lengths as fractions of semispan at station locations; ' 'overwrites station_chord_lengths', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -5180,6 +5205,7 @@ }, units='ft**2', desc='area of wing control surfaces', + default_value=0.0, ) add_meta_data( @@ -5194,7 +5220,7 @@ units='unitless', desc='Defines the ratio of total moveable wing control surface areas ' '(flaps, elevators, spoilers, etc.) to reference wing area.', - default_value=0.333, + default_value=0.0, ) add_meta_data( @@ -5236,6 +5262,7 @@ units='unitless', desc='Engine inertia relief factor for wingspan inboard of engine locations. Used ' 'to compute Aircraft.Wing.BENDING_MATERIAL_MASS', + default_value=0.0, ) add_meta_data( @@ -5552,7 +5579,7 @@ desc='Define the sweep of load path at station locations. Typically ' 'parallel to rear spar tending toward max t/c of airfoil. The Ith value ' 'is used between wing stations I and I+1.', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -5594,7 +5621,7 @@ }, units='lbm', desc='wing total mass', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -5703,7 +5730,7 @@ }, units='lbm', desc='wing mass breakdown term 3', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -5795,7 +5822,7 @@ }, units='lbm', desc='wing mass breakdown term 2', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -5922,7 +5949,7 @@ }, units='lbm', desc='mass of surface controls', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -6034,7 +6061,7 @@ }, units='unitless', desc='the thickeness-chord ratios at station locations', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -6723,6 +6750,7 @@ units='lbm', desc='fuel carried by the aircraft when it is on the ramp at the ' 'beginning of the design mission', + default_value=0.0, ) add_meta_data( @@ -6753,7 +6781,7 @@ }, units='lbm', desc='design gross mass of the aircraft', - default_value=None, + default_value=0.0, ) add_meta_data( diff --git a/setup.py b/setup.py index 465292ffd..89835c49e 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ version=__version__, packages=find_packages(), install_requires=[ - "openmdao>=3.33.0", + "openmdao>=3.36.0", "dymos>=1.8.1", "hvplot", "importlib_resources", @@ -68,7 +68,7 @@ "models/small_single_aisle/*", "models/test_aircraft/*", "visualization/assets/*", - "visualization/assets/aviary_vars/*" + "visualization/assets/aviary_vars/*", ], f"{pkgname}.docs": [ "*.py", @@ -87,6 +87,6 @@ ], 'openmdao_report': [ 'aviary_reports=aviary.interface.reports:register_custom_reports', - ] - } + ], + }, )