diff --git a/aviary/subsystems/mass/flops_based/air_conditioning.py b/aviary/subsystems/mass/flops_based/air_conditioning.py index 894ca14dd..a20a32214 100644 --- a/aviary/subsystems/mass/flops_based/air_conditioning.py +++ b/aviary/subsystems/mass/flops_based/air_conditioning.py @@ -21,15 +21,12 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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('*', '*') @@ -91,9 +88,9 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 779fc3ca0..ae82a546a 100644 --- a/aviary/subsystems/mass/flops_based/anti_icing.py +++ b/aviary/subsystems/mass/flops_based/anti_icing.py @@ -26,18 +26,13 @@ def setup(self): num_engine_type = len(self.options['aviary_options'].get_val( 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 3a8fec051..217f553a7 100644 --- a/aviary/subsystems/mass/flops_based/apu.py +++ b/aviary/subsystems/mass/flops_based/apu.py @@ -18,11 +18,10 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 0c6e54522..9b2b2d61b 100644 --- a/aviary/subsystems/mass/flops_based/avionics.py +++ b/aviary/subsystems/mass/flops_based/avionics.py @@ -19,13 +19,11 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 9223872f1..a8ea05f47 100644 --- a/aviary/subsystems/mass/flops_based/canard.py +++ b/aviary/subsystems/mass/flops_based/canard.py @@ -18,12 +18,12 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 8ac83f493..6d0e4738c 100644 --- a/aviary/subsystems/mass/flops_based/cargo.py +++ b/aviary/subsystems/mass/flops_based/cargo.py @@ -7,7 +7,7 @@ from aviary.utils.aviary_values import AviaryValues from aviary.variable_info.functions import add_aviary_input, add_aviary_output -from aviary.variable_info.variables import Aircraft, Mission +from aviary.variable_info.variables import Aircraft class CargoMass(om.ExplicitComponent): @@ -22,15 +22,13 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 df0967439..74639c5ec 100644 --- a/aviary/subsystems/mass/flops_based/cargo_containers.py +++ b/aviary/subsystems/mass/flops_based/cargo_containers.py @@ -20,14 +20,11 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 60030710b..491567189 100644 --- a/aviary/subsystems/mass/flops_based/crew.py +++ b/aviary/subsystems/mass/flops_based/crew.py @@ -20,10 +20,9 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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( @@ -84,10 +83,9 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 1430945f7..b76f53b22 100644 --- a/aviary/subsystems/mass/flops_based/electrical.py +++ b/aviary/subsystems/mass/flops_based/electrical.py @@ -20,11 +20,11 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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='*') @@ -85,9 +85,9 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 4c4b5cf33..91fee5fe4 100644 --- a/aviary/subsystems/mass/flops_based/empty_margin.py +++ b/aviary/subsystems/mass/flops_based/empty_margin.py @@ -16,15 +16,12 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 ac9644327..613abf343 100644 --- a/aviary/subsystems/mass/flops_based/engine.py +++ b/aviary/subsystems/mass/flops_based/engine.py @@ -24,16 +24,12 @@ def setup(self): num_engine_type = len(self.options['aviary_options'].get_val( 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): aviary_options: AviaryValues = self.options['aviary_options'] diff --git a/aviary/subsystems/mass/flops_based/engine_controls.py b/aviary/subsystems/mass/flops_based/engine_controls.py index c17868c1f..1a4931b74 100644 --- a/aviary/subsystems/mass/flops_based/engine_controls.py +++ b/aviary/subsystems/mass/flops_based/engine_controls.py @@ -30,11 +30,9 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 d82cd8e63..8af91bd3b 100644 --- a/aviary/subsystems/mass/flops_based/engine_oil.py +++ b/aviary/subsystems/mass/flops_based/engine_oil.py @@ -27,11 +27,10 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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('*', '*') @@ -77,9 +76,9 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 256c26d26..393daaab3 100644 --- a/aviary/subsystems/mass/flops_based/engine_pod.py +++ b/aviary/subsystems/mass/flops_based/engine_pod.py @@ -26,21 +26,20 @@ def setup(self): num_engine_type = len(self.options['aviary_options'].get_val( 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 989ee1ee2..5eef4aac8 100644 --- a/aviary/subsystems/mass/flops_based/fin.py +++ b/aviary/subsystems/mass/flops_based/fin.py @@ -18,12 +18,12 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 98d50b2e9..02db66343 100644 --- a/aviary/subsystems/mass/flops_based/fuel_capacity.py +++ b/aviary/subsystems/mass/flops_based/fuel_capacity.py @@ -45,9 +45,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( @@ -69,10 +69,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( @@ -98,10 +98,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( @@ -132,20 +132,18 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 a78851fe2..6a3f5c978 100644 --- a/aviary/subsystems/mass/flops_based/fuel_system.py +++ b/aviary/subsystems/mass/flops_based/fuel_system.py @@ -21,11 +21,10 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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('*', '*') @@ -71,11 +70,10 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 3dfa8416b..5bc5d22b2 100644 --- a/aviary/subsystems/mass/flops_based/furnishings.py +++ b/aviary/subsystems/mass/flops_based/furnishings.py @@ -19,15 +19,12 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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='*') @@ -114,19 +111,15 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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='*') @@ -267,9 +260,9 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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='*') @@ -309,15 +302,12 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 6b349ec20..d1852b417 100644 --- a/aviary/subsystems/mass/flops_based/fuselage.py +++ b/aviary/subsystems/mass/flops_based/fuselage.py @@ -21,13 +21,11 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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, "*") @@ -90,15 +88,12 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 3c182a5b2..9665aac32 100644 --- a/aviary/subsystems/mass/flops_based/horizontal_tail.py +++ b/aviary/subsystems/mass/flops_based/horizontal_tail.py @@ -18,15 +18,12 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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("*", "*") @@ -76,11 +73,10 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 aed93313f..60b699237 100644 --- a/aviary/subsystems/mass/flops_based/hydraulics.py +++ b/aviary/subsystems/mass/flops_based/hydraulics.py @@ -28,17 +28,13 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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('*', '*') @@ -117,17 +113,13 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 3b0c50f84..db0efd247 100644 --- a/aviary/subsystems/mass/flops_based/instruments.py +++ b/aviary/subsystems/mass/flops_based/instruments.py @@ -23,8 +23,8 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 db87a4aee..0f1313b12 100644 --- a/aviary/subsystems/mass/flops_based/landing_gear.py +++ b/aviary/subsystems/mass/flops_based/landing_gear.py @@ -25,19 +25,14 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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') @@ -142,19 +137,14 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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, [ @@ -261,8 +251,8 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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, @@ -290,16 +280,16 @@ def setup(self): num_wing_engines = self.options['aviary_options'].get_val( 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) + # 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)))) - 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 c34686fbe..d24324a79 100644 --- a/aviary/subsystems/mass/flops_based/landing_mass.py +++ b/aviary/subsystems/mass/flops_based/landing_mass.py @@ -17,11 +17,10 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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('*', '*') @@ -64,11 +63,10 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 d1294985e..0fdab13c3 100644 --- a/aviary/subsystems/mass/flops_based/mass_summation.py +++ b/aviary/subsystems/mass/flops_based/mass_summation.py @@ -87,18 +87,18 @@ def setup(self): num_engine_type = len(self.options['aviary_options'].get_val( 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['aviary_options'].get_val( @@ -133,13 +133,12 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 = [ @@ -168,18 +167,18 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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) @@ -210,18 +209,18 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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) @@ -252,11 +251,11 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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( @@ -289,12 +288,12 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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) @@ -317,12 +316,12 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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, @@ -352,15 +351,15 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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) @@ -387,12 +386,12 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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) @@ -415,10 +414,10 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 dba079072..9d2436515 100644 --- a/aviary/subsystems/mass/flops_based/misc_engine.py +++ b/aviary/subsystems/mass/flops_based/misc_engine.py @@ -1,6 +1,5 @@ import numpy as np import openmdao.api as om -import numpy as np from aviary.utils.aviary_values import AviaryValues from aviary.variable_info.functions import add_aviary_input, add_aviary_output @@ -28,13 +27,12 @@ def setup(self): num_engine_type = len(self.options['aviary_options'].get_val( 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 398d8f0af..7cf64d7d9 100644 --- a/aviary/subsystems/mass/flops_based/nacelle.py +++ b/aviary/subsystems/mass/flops_based/nacelle.py @@ -29,19 +29,12 @@ def setup(self): num_engine_type = len(self.options['aviary_options'].get_val( 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 7e1df471a..211287d0c 100644 --- a/aviary/subsystems/mass/flops_based/paint.py +++ b/aviary/subsystems/mass/flops_based/paint.py @@ -16,11 +16,10 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 7d1688085..ceddd868d 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): desc='collection of Aircraft/Mission specific options') 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 e7b06a4d9..49eec2bc9 100644 --- a/aviary/subsystems/mass/flops_based/starter.py +++ b/aviary/subsystems/mass/flops_based/starter.py @@ -25,10 +25,9 @@ def setup(self): num_engine_type = len(self.options['aviary_options'].get_val( 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 441a7fcde..b3207eda0 100644 --- a/aviary/subsystems/mass/flops_based/surface_controls.py +++ b/aviary/subsystems/mass/flops_based/surface_controls.py @@ -18,12 +18,12 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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 b6885b17b..d519ac77c 100644 --- a/aviary/subsystems/mass/flops_based/test/test_furnishings.py +++ b/aviary/subsystems/mass/flops_based/test/test_furnishings.py @@ -127,7 +127,10 @@ def test_case(self): flops_inputs = get_flops_inputs("N3CC", preprocess=True) flops_inputs.update({ Aircraft.Fuselage.MILITARY_CARGO_FLOOR: (False, 'unitless'), - Aircraft.BWB.NUM_BAYS: (5, 'unitless') + Aircraft.BWB.NUM_BAYS: (5, 'unitless'), + Aircraft.BWB.CABIN_AREA: (100, 'ft**2'), + Aircraft.Fuselage.MAX_WIDTH: (30, 'ft'), + Aircraft.Fuselage.MAX_HEIGHT: (15, 'ft'), }) prob.model.add_subsystem( 'furnishings', @@ -135,6 +138,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 69134fa47..0469987b4 100644 --- a/aviary/subsystems/mass/flops_based/test/test_wing_common.py +++ b/aviary/subsystems/mass/flops_based/test/test_wing_common.py @@ -215,6 +215,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 028c2969c..b8cea8872 100644 --- a/aviary/subsystems/mass/flops_based/thrust_reverser.py +++ b/aviary/subsystems/mass/flops_based/thrust_reverser.py @@ -32,14 +32,14 @@ def setup(self): 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 6b994718a..8e0f927b1 100644 --- a/aviary/subsystems/mass/flops_based/unusable_fuel.py +++ b/aviary/subsystems/mass/flops_based/unusable_fuel.py @@ -27,19 +27,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 68df78b73..a43b51ca6 100644 --- a/aviary/subsystems/mass/flops_based/vertical_tail.py +++ b/aviary/subsystems/mass/flops_based/vertical_tail.py @@ -19,14 +19,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 e810dad45..744374201 100644 --- a/aviary/subsystems/mass/flops_based/wing_common.py +++ b/aviary/subsystems/mass/flops_based/wing_common.py @@ -19,23 +19,23 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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_FACTOR, val=0.0) - add_aviary_input(self, Aircraft.Wing.BENDING_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_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_FACTOR) + add_aviary_input(self, Aircraft.Wing.BENDING_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_MASS) self.A1 = 8.80 self.A2 = 6.25 @@ -200,15 +200,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') @@ -281,13 +278,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') @@ -336,17 +331,13 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') def setup(self): - add_aviary_input(self, Aircraft.Wing.BENDING_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_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 521f3c9d0..7b7cb5f21 100644 --- a/aviary/subsystems/mass/flops_based/wing_detailed.py +++ b/aviary/subsystems/mass/flops_based/wing_detailed.py @@ -34,36 +34,24 @@ def setup(self): # 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)) - + shape=num_input_stations - 1) add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD_DIST, - val=np.zeros(num_input_stations)) - + shape=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) - + 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) add_aviary_input(self, Aircraft.Engine.WING_LOCATIONS, - val=np.zeros(int(total_num_wing_engines/2))) - - 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_output(self, Aircraft.Wing.BENDING_FACTOR, val=0.0) + shape=int(total_num_wing_engines/2)) + 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_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 180c8f3de..2c3d1d283 100644 --- a/aviary/subsystems/mass/flops_based/wing_simple.py +++ b/aviary/subsystems/mass/flops_based/wing_simple.py @@ -18,25 +18,17 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') 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_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_FACTOR) + add_aviary_output(self, Aircraft.Wing.ENG_POD_INERTIA_FACTOR) def setup_partials(self): self.declare_partials(of=Aircraft.Wing.BENDING_FACTOR, diff --git a/aviary/variable_info/functions.py b/aviary/variable_info/functions.py index 8c28147a0..a214a2e13 100644 --- a/aviary/variable_info/functions.py +++ b/aviary/variable_info/functions.py @@ -1,4 +1,5 @@ import dymos as dm +import numpy as np import openmdao.api as om from dymos.utils.misc import _unspecified from openmdao.core.component import Component @@ -33,12 +34,21 @@ 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 @@ -58,6 +68,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 6ef0e83de..37be4b91d 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, # changed from None ) add_meta_data( @@ -122,7 +122,7 @@ }, units='lbm', desc='mass of anti-icing system (auxiliary gear)', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -163,7 +163,7 @@ }, units='lbm', desc='mass of auxiliary power unit', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -204,7 +204,7 @@ }, units='lbm', desc='avionics mass', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -493,7 +493,7 @@ }, units='lbm', desc='mass of canards', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -519,7 +519,7 @@ }, units='unitless', desc='canard theoretical taper ratio', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -645,6 +645,7 @@ }, units='lbm', desc='mass of passenger baggage', + default_value=0.0, # added ) add_meta_data( @@ -677,7 +678,7 @@ }, units='lbm', desc='mass of cargo containers', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -708,6 +709,7 @@ }, units='lbm', desc='total mass of cargo', + default_value=0.0, # added ) add_meta_data( @@ -799,7 +801,7 @@ }, units='lbm', desc='total mass of the flight crew and their baggage', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -859,7 +861,7 @@ }, units='lbm', desc='total mass of the non-flight crew and their baggage', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -1006,6 +1008,7 @@ }, units='lbm', desc='TBD: total mass of all passengers without their baggage', + default_value=0.0, # added ) add_meta_data( @@ -1029,6 +1032,7 @@ }, units='lbm', desc='mass of passenger payload, including passengers, passenger baggage', + default_value=0.0, # added ) add_meta_data( @@ -1047,7 +1051,7 @@ }, units='lbm', desc='mass of passenger service equipment', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -1241,7 +1245,7 @@ }, units='lbm', desc='empty mass margin', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -1256,7 +1260,7 @@ }, units='unitless', desc='empty mass margin scaler', - default_value=0.0, + default_value=0.0, # Note: not 1.0 here ) add_meta_data( @@ -1269,6 +1273,7 @@ meta_data=_MetaData, units='lbm', desc='total mass of all user-defined external subsystems', + default_value=0.0, # added ) add_meta_data( @@ -1347,7 +1352,7 @@ }, units='unitless', desc='ratio of maximum landing mass to maximum takeoff mass', - default_value=0.9, + default_value=0.0, ) add_meta_data( @@ -1413,6 +1418,7 @@ }, units='lbm', desc='operating mass empty of the aircraft', + default_value=0.0, # added ) add_meta_data( @@ -1489,6 +1495,7 @@ }, units='lbm', desc='Total structural group mass', + default_value=0.0, # added ) add_meta_data( @@ -1539,6 +1546,7 @@ }, units='lbm', desc='Total systems & equipment group mass', + default_value=0.0, # added ) add_meta_data( @@ -1550,6 +1558,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, # added ) add_meta_data( @@ -1574,6 +1583,7 @@ }, units='ft**2', desc='total aircraft wetted area', + default_value=0.0, # added ) add_meta_data( @@ -1595,7 +1605,7 @@ }, units='lbm', desc='design landing mass', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -1656,6 +1666,7 @@ }, units='lbm', desc='zero fuel mass', + default_value=0.0, # added ) add_meta_data( @@ -1715,7 +1726,7 @@ }, units='lbm', desc='mass of the electrical system', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -2558,7 +2569,7 @@ }, units='lbm', desc='mass of vertical fins', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -2599,7 +2610,7 @@ }, units='unitless', desc='vertical fin theoretical taper ratio', - default_value=None, + default_value=0.0, # changed from None ) # ______ _ @@ -2620,7 +2631,7 @@ }, units='lbm', desc='fuel capacity of the auxiliary tank', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -2641,7 +2652,7 @@ }, units='unitless', desc='fuel capacity factor', - default_value=23.0, + default_value=1.0, # changed from 23.0 ) add_meta_data( @@ -2695,7 +2706,7 @@ }, units='lbm', desc='fuel system mass', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -2734,7 +2745,7 @@ }, units='lbm', desc='fuel capacity of the fuselage', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -2767,7 +2778,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, # changed from None ) add_meta_data( @@ -2785,6 +2796,7 @@ }, units='galUS', # need to check this desc='Total fuel volume', + default_value=0.0, # added ) add_meta_data( @@ -2803,7 +2815,7 @@ }, units='lbm', desc='unusable fuel mass', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -2839,7 +2851,7 @@ }, units='lbm', desc='fuel capacity of the auxiliary tank', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -2968,7 +2980,7 @@ }, units='lbm', desc='Total furnishings system mass', - default_value=None, + default_value=0.0, # changed form None ) add_meta_data( @@ -2977,6 +2989,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, # added ) add_meta_data( @@ -3025,6 +3038,7 @@ }, units='ft', desc='average fuselage diameter', + default_value=0.0, # added ) add_meta_data( @@ -3187,7 +3201,7 @@ }, units='lbm', desc='mass of the fuselage structure', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -3222,6 +3236,7 @@ }, units='ft', desc='maximum fuselage height', + default_value=0.0, # added ) add_meta_data( @@ -3351,6 +3366,7 @@ }, units='ft**2', desc='fuselage planform area', + default_value=0.0, # added ) add_meta_data( @@ -3408,7 +3424,7 @@ }, units='ft**2', desc='fuselage wetted area', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -3551,7 +3567,7 @@ }, units='lbm', desc='mass of horizontal tail', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -3691,7 +3707,7 @@ }, units='ft**2', desc='horizontal tail wetted area', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -3751,7 +3767,7 @@ }, units='lbm', desc='mass of hydraulic system', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -3778,7 +3794,7 @@ }, units='psi', desc='hydraulic system pressure', - default_value=3000.0, + default_value=0.0, ) # @@ -3806,7 +3822,7 @@ }, units='lbm', desc='instrument group mass', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3907,6 +3923,7 @@ }, units='lbm', desc='mass of main landing gear', + default_value=0, # added ) add_meta_data( @@ -3968,7 +3985,7 @@ }, units='lbm', desc='mass of nose landing gear', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -4046,6 +4063,7 @@ }, units='ft', desc='Average diameter of engine nacelles for each engine model', + default_value=0.0, # added ) add_meta_data( @@ -4060,6 +4078,7 @@ }, units='ft', desc='Average length of nacelles for each engine model', + default_value=0.0, # added ) add_meta_data( @@ -4161,7 +4180,7 @@ }, units='lbm', desc='estimated mass of the nacelles for each engine model', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -4256,6 +4275,7 @@ }, units='lbm', desc='mass of paint for all wetted area', + default_value=0.0, # added ) add_meta_data( @@ -4310,6 +4330,7 @@ }, units='lbm', desc='Total propulsion group mass', + default_value=0.0, # added ) # TODO clash with per-engine scaling, need to resolve w/ heterogeneous engine @@ -4334,6 +4355,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, # added ) add_meta_data( @@ -4342,6 +4364,7 @@ historical_name={"GASP": 'INGASP.WEP', "FLOPS": None, "LEAPS1": None}, units='lbm', desc='total mass of all engines on aircraft', + default_value=0.0, # added ) add_meta_data( @@ -4360,7 +4383,7 @@ }, units='lbm', desc='engine oil mass', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -4380,7 +4403,7 @@ units='lbm', desc='sum of engine control, starter, and additional mass for all engines ' 'on aircraft', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -4452,7 +4475,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, # changed from None ) # _____ _ _ @@ -4716,7 +4739,7 @@ }, units='lbm', desc='mass of vertical tail', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -4813,7 +4836,7 @@ }, units='unitless', desc='vertical tail theoretical taper ratio', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -4984,6 +5007,7 @@ }, units='unitless', desc='Reference aspect ratio, used for detailed wing bending.', + default_value=0.0, # added ) add_meta_data( @@ -5004,6 +5028,7 @@ }, units='unitless', desc='wing bending factor', + default_value=0.0, # added ) add_meta_data( @@ -5018,7 +5043,7 @@ }, units='lbm', desc='wing mass breakdown term 1', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -5046,7 +5071,7 @@ }, units='lbm', desc='wing mass breakdown term 4', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -5118,7 +5143,7 @@ units='unitless', desc='chord lengths as fractions of semispan at station locations; ' 'overwrites station_chord_lengths', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -5153,6 +5178,7 @@ }, units='ft**2', desc='area of wing control surfaces', + default_value=0.0, # added ) add_meta_data( @@ -5167,7 +5193,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, # changed from 0.333 ) add_meta_data( @@ -5208,6 +5234,7 @@ }, units='unitless', desc='engine inertia relief factor', + default_value=0.0, # added ) add_meta_data( @@ -5523,7 +5550,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, # changed from None ) add_meta_data( @@ -5565,7 +5592,7 @@ }, units='lbm', desc='wing total mass', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -5674,7 +5701,7 @@ }, units='lbm', desc='wing mass breakdown term 3', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -5766,7 +5793,7 @@ }, units='lbm', desc='wing mass breakdown term 2', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -5893,7 +5920,7 @@ }, units='lbm', desc='mass of surface controls', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -6005,7 +6032,7 @@ }, units='unitless', desc='the thickeness-chord ratios at station locations', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data( @@ -6703,6 +6730,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, # added ) add_meta_data( @@ -6733,7 +6761,7 @@ }, units='lbm', desc='design gross mass of the aircraft', - default_value=None, + default_value=0.0, # changed from None ) add_meta_data(