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 50533e307..b336982d3 100644 --- a/aviary/__init__.py +++ b/aviary/__init__.py @@ -1 +1 @@ -__version__ = "0.9.6" +__version__ = "0.9.7-dev" diff --git a/aviary/subsystems/geometry/flops_based/canard.py b/aviary/subsystems/geometry/flops_based/canard.py index b9ca8d92a..0542dc5fa 100644 --- a/aviary/subsystems/geometry/flops_based/canard.py +++ b/aviary/subsystems/geometry/flops_based/canard.py @@ -18,11 +18,11 @@ def initialize(self): desc='collection of Aircraft/Mission specific options') def setup(self): - add_aviary_input(self, Aircraft.Canard.AREA, 0.0) - add_aviary_input(self, Aircraft.Canard.THICKNESS_TO_CHORD, 0.0) - add_aviary_input(self, Aircraft.Canard.WETTED_AREA_SCALER, 1.0) + add_aviary_input(self, Aircraft.Canard.AREA) + add_aviary_input(self, Aircraft.Canard.THICKNESS_TO_CHORD) + add_aviary_input(self, Aircraft.Canard.WETTED_AREA_SCALER) - add_aviary_output(self, Aircraft.Canard.WETTED_AREA, 0.0) + add_aviary_output(self, Aircraft.Canard.WETTED_AREA) def setup_partials(self): self.declare_partials( diff --git a/aviary/subsystems/geometry/flops_based/characteristic_lengths.py b/aviary/subsystems/geometry/flops_based/characteristic_lengths.py index ef9ce92dc..14396c9d8 100644 --- a/aviary/subsystems/geometry/flops_based/characteristic_lengths.py +++ b/aviary/subsystems/geometry/flops_based/characteristic_lengths.py @@ -21,66 +21,60 @@ def setup(self): self.add_input(Names.CROOT, 0.0, units='unitless') - add_aviary_input(self, Aircraft.Canard.AREA, 0.0) - add_aviary_input(self, Aircraft.Canard.ASPECT_RATIO, 0.0) + add_aviary_input(self, Aircraft.Canard.AREA) + add_aviary_input(self, Aircraft.Canard.ASPECT_RATIO) # add_aviary_input(self, Aircraft.Canard.LAMINAR_FLOW_LOWER, 0.0) # add_aviary_input(self, Aircraft.Canard.LAMINAR_FLOW_UPPER, 0.0) - add_aviary_input(self, Aircraft.Canard.THICKNESS_TO_CHORD, 0.0) + add_aviary_input(self, Aircraft.Canard.THICKNESS_TO_CHORD) - add_aviary_input(self, Aircraft.Fuselage.AVG_DIAMETER, 0.0) + add_aviary_input(self, Aircraft.Fuselage.AVG_DIAMETER) # add_aviary_input(self, Aircraft.Fuselage.LAMINAR_FLOW_LOWER, 0.0) # add_aviary_input(self, Aircraft.Fuselage.LAMINAR_FLOW_UPPER, 0.0) - add_aviary_input(self, Aircraft.Fuselage.LENGTH, 0.0) + add_aviary_input(self, Aircraft.Fuselage.LENGTH) - add_aviary_input(self, Aircraft.HorizontalTail.AREA, 0.0) - add_aviary_input(self, Aircraft.HorizontalTail.ASPECT_RATIO, 4.75) + add_aviary_input(self, Aircraft.HorizontalTail.AREA) + add_aviary_input(self, Aircraft.HorizontalTail.ASPECT_RATIO) # add_aviary_input(self, Aircraft.HorizontalTail.LAMINAR_FLOW_LOWER, 0.0) # add_aviary_input(self, Aircraft.HorizontalTail.LAMINAR_FLOW_UPPER, 0.0) - add_aviary_input(self, Aircraft.HorizontalTail.THICKNESS_TO_CHORD, 0.0) + add_aviary_input(self, Aircraft.HorizontalTail.THICKNESS_TO_CHORD) - add_aviary_input(self, Aircraft.Nacelle.AVG_DIAMETER, np.zeros(num_engine_type)) - add_aviary_input(self, Aircraft.Nacelle.AVG_LENGTH, 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.LAMINAR_FLOW_LOWER, 0.0) # add_aviary_input(self, Aircraft.Nacelle.LAMINAR_FLOW_UPPER, 0.0) - add_aviary_input(self, Aircraft.VerticalTail.AREA, 0.0) - add_aviary_input(self, Aircraft.VerticalTail.ASPECT_RATIO, 0.0) + add_aviary_input(self, Aircraft.VerticalTail.AREA) + add_aviary_input(self, Aircraft.VerticalTail.ASPECT_RATIO) # add_aviary_input(self, Aircraft.VerticalTail.LAMINAR_FLOW_LOWER, 0.0) # add_aviary_input(self, Aircraft.VerticalTail.LAMINAR_FLOW_UPPER, 0.0) - add_aviary_input(self, Aircraft.VerticalTail.THICKNESS_TO_CHORD, 0.0) + add_aviary_input(self, Aircraft.VerticalTail.THICKNESS_TO_CHORD) - add_aviary_input(self, Aircraft.Wing.AREA, 0.0) - add_aviary_input(self, Aircraft.Wing.ASPECT_RATIO, 0.0) - add_aviary_input(self, Aircraft.Wing.GLOVE_AND_BAT, 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_input(self, Aircraft.Wing.AREA) + add_aviary_input(self, Aircraft.Wing.ASPECT_RATIO) + add_aviary_input(self, Aircraft.Wing.GLOVE_AND_BAT) + add_aviary_input(self, Aircraft.Wing.TAPER_RATIO) + add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD) # add_aviary_input(self, Aircraft.Wing.LAMINAR_FLOW_LOWER, 0.0) # add_aviary_input(self, Aircraft.Wing.LAMINAR_FLOW_UPPER, 0.0) - add_aviary_output(self, Aircraft.Canard.CHARACTERISTIC_LENGTH, 0.0) - add_aviary_output(self, Aircraft.Canard.FINENESS, 0.0) + add_aviary_output(self, Aircraft.Canard.CHARACTERISTIC_LENGTH) + add_aviary_output(self, Aircraft.Canard.FINENESS) - add_aviary_output(self, Aircraft.Fuselage.CHARACTERISTIC_LENGTH, 0.0) - add_aviary_output(self, Aircraft.Fuselage.FINENESS, 0.0) + add_aviary_output(self, Aircraft.Fuselage.CHARACTERISTIC_LENGTH) + add_aviary_output(self, Aircraft.Fuselage.FINENESS) - add_aviary_output( - self, Aircraft.HorizontalTail.CHARACTERISTIC_LENGTH, 0.0 - ) - - add_aviary_output(self, Aircraft.HorizontalTail.FINENESS, 0.0) + add_aviary_output(self, Aircraft.HorizontalTail.CHARACTERISTIC_LENGTH) + add_aviary_output(self, Aircraft.HorizontalTail.FINENESS) add_aviary_output(self, Aircraft.Nacelle.CHARACTERISTIC_LENGTH, - np.zeros(num_engine_type)) - add_aviary_output(self, Aircraft.Nacelle.FINENESS, np.zeros(num_engine_type)) - - add_aviary_output( - self, Aircraft.VerticalTail.CHARACTERISTIC_LENGTH, 0.0 - ) + shape=num_engine_type) + add_aviary_output(self, Aircraft.Nacelle.FINENESS, shape=num_engine_type) - add_aviary_output(self, Aircraft.VerticalTail.FINENESS, 0.0) + add_aviary_output(self, Aircraft.VerticalTail.CHARACTERISTIC_LENGTH) + add_aviary_output(self, Aircraft.VerticalTail.FINENESS) - add_aviary_output(self, Aircraft.Wing.CHARACTERISTIC_LENGTH, 0.0) - add_aviary_output(self, Aircraft.Wing.FINENESS, 0.0) + add_aviary_output(self, Aircraft.Wing.CHARACTERISTIC_LENGTH) + add_aviary_output(self, Aircraft.Wing.FINENESS) def setup_partials(self): self._setup_partials_wing() diff --git a/aviary/subsystems/geometry/flops_based/fuselage.py b/aviary/subsystems/geometry/flops_based/fuselage.py index 2b73da704..ca87a6266 100644 --- a/aviary/subsystems/geometry/flops_based/fuselage.py +++ b/aviary/subsystems/geometry/flops_based/fuselage.py @@ -16,12 +16,12 @@ class FuselagePrelim(om.ExplicitComponent): """ def setup(self): - add_aviary_input(self, Aircraft.Fuselage.LENGTH, val=0.0) - add_aviary_input(self, Aircraft.Fuselage.MAX_HEIGHT, val=0.0) - add_aviary_input(self, Aircraft.Fuselage.MAX_WIDTH, val=0.0) + add_aviary_input(self, Aircraft.Fuselage.LENGTH) + add_aviary_input(self, Aircraft.Fuselage.MAX_HEIGHT) + add_aviary_input(self, Aircraft.Fuselage.MAX_WIDTH) - add_aviary_output(self, Aircraft.Fuselage.AVG_DIAMETER, val=0.0) - add_aviary_output(self, Aircraft.Fuselage.PLANFORM_AREA, val=0.0) + add_aviary_output(self, Aircraft.Fuselage.AVG_DIAMETER) + add_aviary_output(self, Aircraft.Fuselage.PLANFORM_AREA) def setup_partials(self): self.declare_partials(of=[Aircraft.Fuselage.AVG_DIAMETER], diff --git a/aviary/subsystems/geometry/flops_based/nacelle.py b/aviary/subsystems/geometry/flops_based/nacelle.py index c8c9adf97..4b2c5fab7 100644 --- a/aviary/subsystems/geometry/flops_based/nacelle.py +++ b/aviary/subsystems/geometry/flops_based/nacelle.py @@ -18,16 +18,13 @@ 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_LENGTH, - 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.WETTED_AREA_SCALER, - val=np.zeros(num_engine_type)) + shape=num_engine_type) - add_aviary_output(self, Aircraft.Nacelle.TOTAL_WETTED_AREA, 0.0) - add_aviary_output(self, Aircraft.Nacelle.WETTED_AREA, - val=np.zeros(num_engine_type)) + add_aviary_output(self, Aircraft.Nacelle.TOTAL_WETTED_AREA) + add_aviary_output(self, Aircraft.Nacelle.WETTED_AREA, shape=num_engine_type) def setup_partials(self): # derivatives w.r.t vectorized engine inputs have known sparsity pattern diff --git a/aviary/subsystems/geometry/flops_based/prep_geom.py b/aviary/subsystems/geometry/flops_based/prep_geom.py index 37cf27e1b..49ac2ed27 100644 --- a/aviary/subsystems/geometry/flops_based/prep_geom.py +++ b/aviary/subsystems/geometry/flops_based/prep_geom.py @@ -116,27 +116,25 @@ def initialize(self): add_aviary_option(self, Aircraft.Wing.SPAN_EFFICIENCY_REDUCTION) def setup(self): - add_aviary_input(self, Aircraft.Fuselage.AVG_DIAMETER, 0.0) - add_aviary_input(self, Aircraft.Fuselage.MAX_WIDTH, 0.0) - - add_aviary_input(self, Aircraft.HorizontalTail.AREA, 0.0) - add_aviary_input(self, Aircraft.HorizontalTail.ASPECT_RATIO, - 4.75, units="unitless") - add_aviary_input(self, Aircraft.HorizontalTail.TAPER_RATIO, - 0.352, units="unitless") - add_aviary_input(self, Aircraft.HorizontalTail.THICKNESS_TO_CHORD, 0.0) - - add_aviary_input(self, Aircraft.VerticalTail.AREA, 0.0) - add_aviary_input(self, Aircraft.VerticalTail.ASPECT_RATIO, 0.0) - add_aviary_input(self, Aircraft.VerticalTail.TAPER_RATIO, 0.0) - add_aviary_input(self, Aircraft.VerticalTail.THICKNESS_TO_CHORD, 0.0) - - add_aviary_input(self, Aircraft.Wing.AREA, 0.0) - add_aviary_input(self, Aircraft.Wing.GLOVE_AND_BAT, 0.0) + add_aviary_input(self, Aircraft.Fuselage.AVG_DIAMETER) + add_aviary_input(self, Aircraft.Fuselage.MAX_WIDTH) + + add_aviary_input(self, Aircraft.HorizontalTail.AREA) + add_aviary_input(self, Aircraft.HorizontalTail.ASPECT_RATIO) + add_aviary_input(self, Aircraft.HorizontalTail.TAPER_RATIO) + add_aviary_input(self, Aircraft.HorizontalTail.THICKNESS_TO_CHORD) + + add_aviary_input(self, Aircraft.VerticalTail.AREA) + add_aviary_input(self, Aircraft.VerticalTail.ASPECT_RATIO) + add_aviary_input(self, Aircraft.VerticalTail.TAPER_RATIO) + add_aviary_input(self, Aircraft.VerticalTail.THICKNESS_TO_CHORD) + + add_aviary_input(self, Aircraft.Wing.AREA) + add_aviary_input(self, Aircraft.Wing.GLOVE_AND_BAT) # NOTE: FLOPS/aviary1 calculate span locally - 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_input(self, Aircraft.Wing.SPAN) + add_aviary_input(self, Aircraft.Wing.TAPER_RATIO) + add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD) self.add_output(Names.CROOT, 1.0, units='unitless') self.add_output(Names.CROOTB, 1.0, units='unitless') @@ -492,10 +490,10 @@ def setup(self): self.add_input(Names.XDX, 0.0, units='unitless') self.add_input(Names.XMULT, 0.0, units='unitless') - add_aviary_input(self, Aircraft.Wing.AREA, 0.0) - add_aviary_input(self, Aircraft.Wing.WETTED_AREA_SCALER, 1.0) + add_aviary_input(self, Aircraft.Wing.AREA) + add_aviary_input(self, Aircraft.Wing.WETTED_AREA_SCALER) - add_aviary_output(self, Aircraft.Wing.WETTED_AREA, 0.0) + add_aviary_output(self, Aircraft.Wing.WETTED_AREA) def setup_partials(self): self.declare_partials( @@ -567,19 +565,17 @@ def setup(self): self.add_input(Names.XMULTH, 0.0, units='unitless') self.add_input(Names.XMULTV, 0.0, units='unitless') - add_aviary_input(self, Aircraft.HorizontalTail.AREA, 0.0) + add_aviary_input(self, Aircraft.HorizontalTail.AREA) - add_aviary_input( - self, Aircraft.HorizontalTail.VERTICAL_TAIL_FRACTION, 0.0 - ) + add_aviary_input(self, Aircraft.HorizontalTail.VERTICAL_TAIL_FRACTION) - add_aviary_input(self, Aircraft.HorizontalTail.WETTED_AREA_SCALER, 1.0) + add_aviary_input(self, Aircraft.HorizontalTail.WETTED_AREA_SCALER) - add_aviary_input(self, Aircraft.VerticalTail.AREA, 0.0) - add_aviary_input(self, Aircraft.VerticalTail.WETTED_AREA_SCALER, 1.0) + add_aviary_input(self, Aircraft.VerticalTail.AREA) + add_aviary_input(self, Aircraft.VerticalTail.WETTED_AREA_SCALER) - add_aviary_output(self, Aircraft.HorizontalTail.WETTED_AREA, 0.0) - add_aviary_output(self, Aircraft.VerticalTail.WETTED_AREA, 0.0) + add_aviary_output(self, Aircraft.HorizontalTail.WETTED_AREA) + add_aviary_output(self, Aircraft.VerticalTail.WETTED_AREA) def setup_partials(self): self.declare_partials( @@ -727,27 +723,24 @@ def setup(self): self.add_input(Names.CROTVT, 0.0, units='unitless') self.add_input(Names.CRTHTB, 0.0, units='unitless') - add_aviary_input(self, Aircraft.Fuselage.AVG_DIAMETER, 0.0) - add_aviary_input(self, Aircraft.Fuselage.LENGTH, 0.0) - add_aviary_input(self, Aircraft.Fuselage.WETTED_AREA_SCALER, 1.0) - - add_aviary_input(self, Aircraft.HorizontalTail.THICKNESS_TO_CHORD, 0.0) + add_aviary_input(self, Aircraft.Fuselage.AVG_DIAMETER) + add_aviary_input(self, Aircraft.Fuselage.LENGTH) + add_aviary_input(self, Aircraft.Fuselage.WETTED_AREA_SCALER) - add_aviary_input( - self, Aircraft.HorizontalTail.VERTICAL_TAIL_FRACTION, 0.0 - ) + add_aviary_input(self, Aircraft.HorizontalTail.THICKNESS_TO_CHORD) + add_aviary_input(self, Aircraft.HorizontalTail.VERTICAL_TAIL_FRACTION) - add_aviary_input(self, Aircraft.VerticalTail.THICKNESS_TO_CHORD, 0.0) + add_aviary_input(self, Aircraft.VerticalTail.THICKNESS_TO_CHORD) - add_aviary_input(self, Aircraft.Wing.AREA, 0.0) - add_aviary_input(self, Aircraft.Wing.ASPECT_RATIO, 0.0) - add_aviary_input(self, Aircraft.Wing.GLOVE_AND_BAT, 0.0) - add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD, 0.0) + add_aviary_input(self, Aircraft.Wing.AREA) + add_aviary_input(self, Aircraft.Wing.ASPECT_RATIO) + add_aviary_input(self, Aircraft.Wing.GLOVE_AND_BAT) + add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD) - add_aviary_output(self, Aircraft.Fuselage.CROSS_SECTION, 0.0) - add_aviary_output(self, Aircraft.Fuselage.DIAMETER_TO_WING_SPAN, 0.0) - add_aviary_output(self, Aircraft.Fuselage.LENGTH_TO_DIAMETER, 0.0) - add_aviary_output(self, Aircraft.Fuselage.WETTED_AREA, 0.0) + add_aviary_output(self, Aircraft.Fuselage.CROSS_SECTION) + add_aviary_output(self, Aircraft.Fuselage.DIAMETER_TO_WING_SPAN) + add_aviary_output(self, Aircraft.Fuselage.LENGTH_TO_DIAMETER) + add_aviary_output(self, Aircraft.Fuselage.WETTED_AREA) def setup_partials(self): self.declare_partials( diff --git a/aviary/subsystems/geometry/flops_based/wetted_area_total.py b/aviary/subsystems/geometry/flops_based/wetted_area_total.py index 63b2a4fab..f787fb4a6 100644 --- a/aviary/subsystems/geometry/flops_based/wetted_area_total.py +++ b/aviary/subsystems/geometry/flops_based/wetted_area_total.py @@ -11,14 +11,14 @@ class TotalWettedArea(om.ExplicitComponent): """ def setup(self): - add_aviary_input(self, Aircraft.Canard.WETTED_AREA, 0.0) - add_aviary_input(self, Aircraft.Fuselage.WETTED_AREA, 0.0) - add_aviary_input(self, Aircraft.HorizontalTail.WETTED_AREA, 0.0) - add_aviary_input(self, Aircraft.Nacelle.TOTAL_WETTED_AREA, 0.0) - add_aviary_input(self, Aircraft.VerticalTail.WETTED_AREA, 0.0) - add_aviary_input(self, Aircraft.Wing.WETTED_AREA, 0.0) + add_aviary_input(self, Aircraft.Canard.WETTED_AREA) + add_aviary_input(self, Aircraft.Fuselage.WETTED_AREA) + add_aviary_input(self, Aircraft.HorizontalTail.WETTED_AREA) + add_aviary_input(self, Aircraft.Nacelle.TOTAL_WETTED_AREA) + add_aviary_input(self, Aircraft.VerticalTail.WETTED_AREA) + add_aviary_input(self, Aircraft.Wing.WETTED_AREA) - add_aviary_output(self, Aircraft.Design.TOTAL_WETTED_AREA, 0.0) + add_aviary_output(self, Aircraft.Design.TOTAL_WETTED_AREA) def setup_partials(self): self.declare_partials('*', '*', val=1.0) diff --git a/aviary/subsystems/geometry/flops_based/wing.py b/aviary/subsystems/geometry/flops_based/wing.py index f6c7c09e2..4f945ff49 100644 --- a/aviary/subsystems/geometry/flops_based/wing.py +++ b/aviary/subsystems/geometry/flops_based/wing.py @@ -14,11 +14,11 @@ class WingPrelim(om.ExplicitComponent): """ def setup(self): - add_aviary_input(self, Aircraft.Wing.AREA, val=0.0) - add_aviary_input(self, Aircraft.Wing.GLOVE_AND_BAT, val=0.0) - add_aviary_input(self, Aircraft.Wing.SPAN, val=0.0) + add_aviary_input(self, Aircraft.Wing.AREA) + add_aviary_input(self, Aircraft.Wing.GLOVE_AND_BAT) + add_aviary_input(self, Aircraft.Wing.SPAN) - add_aviary_output(self, Aircraft.Wing.ASPECT_RATIO, val=0.0) + add_aviary_output(self, Aircraft.Wing.ASPECT_RATIO) def setup_partials(self): self.declare_partials('*', '*') diff --git a/aviary/subsystems/geometry/gasp_based/electric.py b/aviary/subsystems/geometry/gasp_based/electric.py index 07d423edd..ac58a4a0b 100644 --- a/aviary/subsystems/geometry/gasp_based/electric.py +++ b/aviary/subsystems/geometry/gasp_based/electric.py @@ -17,13 +17,11 @@ def setup(self): total_num_wing_engines = self.options[Aircraft.Propulsion.TOTAL_NUM_WING_ENGINES] add_aviary_input(self, Aircraft.Engine.WING_LOCATIONS, - val=np.full(int(total_num_wing_engines/2), 0.35)) + shape=int(total_num_wing_engines/2)) + add_aviary_input(self, Aircraft.Wing.SPAN) + add_aviary_input(self, Aircraft.Fuselage.AVG_DIAMETER) - add_aviary_input(self, Aircraft.Wing.SPAN, val=128) - - add_aviary_input(self, Aircraft.Fuselage.AVG_DIAMETER, val=10) - - add_aviary_output(self, Aircraft.Electrical.HYBRID_CABLE_LENGTH, val=0) + add_aviary_output(self, Aircraft.Electrical.HYBRID_CABLE_LENGTH) self.declare_partials( Aircraft.Electrical.HYBRID_CABLE_LENGTH, diff --git a/aviary/subsystems/geometry/gasp_based/empennage.py b/aviary/subsystems/geometry/gasp_based/empennage.py index 5cdb6aa03..c1446c86b 100644 --- a/aviary/subsystems/geometry/gasp_based/empennage.py +++ b/aviary/subsystems/geometry/gasp_based/empennage.py @@ -33,23 +33,19 @@ def setup(self): else: self.k = [0.43, 0.38, 0.85] - add_aviary_input(self, Aircraft.HorizontalTail.VERTICAL_TAIL_FRACTION, val=0) + add_aviary_input(self, Aircraft.HorizontalTail.VERTICAL_TAIL_FRACTION) - add_aviary_input(self, Aircraft.Fuselage.LENGTH, val=129.4) + add_aviary_input(self, Aircraft.Fuselage.LENGTH) self.add_input("cab_w", 13.1, units="ft", desc="SWF: Cabin width") - add_aviary_input(self, Aircraft.Wing.AREA, val=1370) + add_aviary_input(self, Aircraft.Wing.AREA) - self.add_input( - "wing_ref", - 12.615, - units="ft", - desc=( - "CBARW | B: Wing reference parameter. Wing chord for a " - "horizontal tail. Wing span for a vertical tail." - ), - ) + self.add_input("wing_ref", 12.615, units="ft", + desc=( + "CBARW | B: Wing reference parameter. Wing chord for a " + "horizontal tail. Wing span for a vertical tail.") + ) self.add_output( "vol_coef", units="unitless", desc="VBARH | VBARV: Tail volume coefficient") @@ -90,37 +86,28 @@ class TailSize(om.ExplicitComponent): def setup(self): # defaults here for Large Single Aisle 1 horizontal tail - self.add_input( - "vol_coef", 1.189, units="unitless", - desc="VBARH | VBARV: Horizontal tail volume coefficient" - ) - - add_aviary_input(self, Aircraft.Wing.AREA, val=1370) - - self.add_input( - "r_arm", - 0.2307, - units="unitless", - desc=( - "COELTH | BOELTV: For a horizontal tail, the ratio of " - "wing chord to tail moment arm. For a vertical tail, the " - "ratio of wing span to vertical tail moment arm." - ), - ) - self.add_input( - "wing_ref", - 12.615, - units="ft", - desc=( - "CBARW | B: Reference wing parameter for tail moment arm. " - "For a horizontal tail, the mean wing chord. For a " - "vertical tail, the wing span." - ), - ) - self.add_input( - "ar", 4.75, units="unitless", desc="ARHT | ARVT: Tail aspect ratio.") - self.add_input( - "tr", 0.352, units="unitless", desc="SLMH | SLMV: Tail taper ratio.") + self.add_input("vol_coef", 1.189, units="unitless", + desc="VBARH | VBARV: Horizontal tail volume coefficient" + ) + + add_aviary_input(self, Aircraft.Wing.AREA) + + self.add_input("r_arm", 0.2307, units="unitless", + desc=( + "COELTH | BOELTV: For a horizontal tail, the ratio of " + "wing chord to tail moment arm. For a vertical tail, the " + "ratio of wing span to vertical tail moment arm.") + ) + self.add_input("wing_ref", 12.615, units="ft", + desc=( + "CBARW | B: Reference wing parameter for tail moment arm. " + "For a horizontal tail, the mean wing chord. For a " + "vertical tail, the wing span.") + ) + self.add_input("ar", 0.0, units="unitless", + desc="ARHT | ARVT: Tail aspect ratio.") + self.add_input("tr", 0.0, units="unitless", + desc="SLMH | SLMV: Tail taper ratio.") self.add_output("area", units="ft**2", desc="SHT | SVT: Tail area") self.add_output("span", units="ft", desc="BHT | BVT: Tail span") @@ -307,11 +294,6 @@ def setup(self): promotes_outputs=higher_level_outputs_vtail + rename_outputs_vtail, ) - self.set_input_defaults(Aircraft.Wing.AVERAGE_CHORD, 12.615, units="ft") - self.set_input_defaults(Aircraft.Wing.SPAN, 117.8054, units="ft") - - # override horizontal tail defaults - self.set_input_defaults(Aircraft.VerticalTail.VOLUME_COEFFICIENT, 0.145) - self.set_input_defaults(Aircraft.VerticalTail.MOMENT_RATIO, 2.362) - self.set_input_defaults(Aircraft.VerticalTail.ASPECT_RATIO, 1.67) - self.set_input_defaults(Aircraft.VerticalTail.TAPER_RATIO, 0.801) + # override vertical tail defaults + self.set_input_defaults(Aircraft.VerticalTail.ASPECT_RATIO, 0.0) + self.set_input_defaults(Aircraft.VerticalTail.TAPER_RATIO, 0.0) diff --git a/aviary/subsystems/geometry/gasp_based/engine.py b/aviary/subsystems/geometry/gasp_based/engine.py index 545427ac7..2c9657ca0 100644 --- a/aviary/subsystems/geometry/gasp_based/engine.py +++ b/aviary/subsystems/geometry/gasp_based/engine.py @@ -18,18 +18,18 @@ def setup(self): num_engine_type = len(self.options[Aircraft.Engine.NUM_ENGINES]) add_aviary_input(self, Aircraft.Engine.REFERENCE_DIAMETER, - np.full(num_engine_type, 5.8)) - add_aviary_input(self, Aircraft.Engine.SCALE_FACTOR, np.ones(num_engine_type)) + shape=num_engine_type) + add_aviary_input(self, Aircraft.Engine.SCALE_FACTOR, shape=num_engine_type) add_aviary_input(self, Aircraft.Nacelle.CORE_DIAMETER_RATIO, - np.full(num_engine_type, 1.25)) - add_aviary_input(self, Aircraft.Nacelle.FINENESS, np.full(num_engine_type, 2)) + shape=num_engine_type) + add_aviary_input(self, Aircraft.Nacelle.FINENESS, shape=num_engine_type) add_aviary_output(self, Aircraft.Nacelle.AVG_DIAMETER, - val=np.zeros(num_engine_type)) + shape=num_engine_type) add_aviary_output(self, Aircraft.Nacelle.AVG_LENGTH, - val=np.zeros(num_engine_type)) + shape=num_engine_type) add_aviary_output(self, Aircraft.Nacelle.SURFACE_AREA, - val=np.zeros(num_engine_type)) + shape=num_engine_type) def setup_partials(self): # derivatives w.r.t vectorized engine inputs have known sparsity pattern diff --git a/aviary/subsystems/geometry/gasp_based/fuselage.py b/aviary/subsystems/geometry/gasp_based/fuselage.py index f525118f1..ce1b1e241 100644 --- a/aviary/subsystems/geometry/gasp_based/fuselage.py +++ b/aviary/subsystems/geometry/gasp_based/fuselage.py @@ -34,10 +34,10 @@ def initialize(self): def setup(self): - add_aviary_input(self, Aircraft.Fuselage.DELTA_DIAMETER, val=4.5) - add_aviary_input(self, Aircraft.Fuselage.PILOT_COMPARTMENT_LENGTH, val=9.5) + add_aviary_input(self, Aircraft.Fuselage.DELTA_DIAMETER) + add_aviary_input(self, Aircraft.Fuselage.PILOT_COMPARTMENT_LENGTH) - add_aviary_output(self, Aircraft.Fuselage.AVG_DIAMETER, val=0, units='inch') + add_aviary_output(self, Aircraft.Fuselage.AVG_DIAMETER, units='inch') self.add_output("cabin_height", val=0, units="ft", desc="HC: height of cabin") self.add_output("cabin_len", val=0, units="ft", desc="LC: length of cabin") self.add_output("nose_height", val=0, units="ft", desc="HN: height of nose") @@ -112,19 +112,17 @@ class FuselageSize(om.ExplicitComponent): """ def setup(self): - - add_aviary_input(self, Aircraft.Fuselage.NOSE_FINENESS, val=1) + add_aviary_input(self, Aircraft.Fuselage.NOSE_FINENESS) self.add_input("nose_height", val=0, units="ft", desc="HN: height of nose") - add_aviary_input(self, Aircraft.Fuselage.PILOT_COMPARTMENT_LENGTH, val=9.5) + add_aviary_input(self, Aircraft.Fuselage.PILOT_COMPARTMENT_LENGTH) self.add_input("cabin_len", val=0, units="ft", desc="LC: length of cabin") - add_aviary_input(self, Aircraft.Fuselage.TAIL_FINENESS, val=3) + add_aviary_input(self, Aircraft.Fuselage.TAIL_FINENESS) self.add_input("cabin_height", val=0, units="ft", desc="HC: height of cabin") - add_aviary_input(self, Aircraft.Fuselage.WETTED_AREA_SCALER, - val=1, units="unitless") + add_aviary_input(self, Aircraft.Fuselage.WETTED_AREA_SCALER) - add_aviary_output(self, Aircraft.Fuselage.LENGTH, val=0) - add_aviary_output(self, Aircraft.Fuselage.WETTED_AREA, val=0) - add_aviary_output(self, Aircraft.TailBoom.LENGTH, val=0) + add_aviary_output(self, Aircraft.Fuselage.LENGTH) + add_aviary_output(self, Aircraft.Fuselage.WETTED_AREA) + add_aviary_output(self, Aircraft.TailBoom.LENGTH) self.declare_partials( Aircraft.Fuselage.LENGTH, @@ -267,6 +265,3 @@ def setup(self): promotes_inputs=connected_input_outputs + ["aircraft:*"], promotes_outputs=["aircraft:*"], ) - - self.set_input_defaults( - Aircraft.Fuselage.PILOT_COMPARTMENT_LENGTH, val=9.5, units="ft") diff --git a/aviary/subsystems/geometry/gasp_based/non_dimensional_conversion.py b/aviary/subsystems/geometry/gasp_based/non_dimensional_conversion.py index c8da2494b..bdb03ae32 100644 --- a/aviary/subsystems/geometry/gasp_based/non_dimensional_conversion.py +++ b/aviary/subsystems/geometry/gasp_based/non_dimensional_conversion.py @@ -14,16 +14,16 @@ def initialize(self): add_aviary_option(self, Aircraft.Wing.HAS_STRUT) def setup(self): - add_aviary_input(self, Aircraft.Wing.SPAN, val=0) + add_aviary_input(self, Aircraft.Wing.SPAN) if self.options[Aircraft.Strut.DIMENSIONAL_LOCATION_SPECIFIED]: - add_aviary_input(self, Aircraft.Strut.ATTACHMENT_LOCATION, val=0) + add_aviary_input(self, Aircraft.Strut.ATTACHMENT_LOCATION) add_aviary_output( - self, Aircraft.Strut.ATTACHMENT_LOCATION_DIMENSIONLESS, val=0) + self, Aircraft.Strut.ATTACHMENT_LOCATION_DIMENSIONLESS) else: add_aviary_input( - self, Aircraft.Strut.ATTACHMENT_LOCATION_DIMENSIONLESS, val=0) - add_aviary_output(self, Aircraft.Strut.ATTACHMENT_LOCATION, val=0) + self, Aircraft.Strut.ATTACHMENT_LOCATION_DIMENSIONLESS) + add_aviary_output(self, Aircraft.Strut.ATTACHMENT_LOCATION) def setup_partials(self): @@ -70,14 +70,14 @@ def initialize(self): add_aviary_option(self, Aircraft.Wing.FOLD_DIMENSIONAL_LOCATION_SPECIFIED) def setup(self): - add_aviary_input(self, Aircraft.Wing.SPAN, val=0) + add_aviary_input(self, Aircraft.Wing.SPAN) if self.options[Aircraft.Wing.FOLD_DIMENSIONAL_LOCATION_SPECIFIED]: - add_aviary_input(self, Aircraft.Wing.FOLDED_SPAN, val=25) - add_aviary_output(self, Aircraft.Wing.FOLDED_SPAN_DIMENSIONLESS, val=0) + add_aviary_input(self, Aircraft.Wing.FOLDED_SPAN) + add_aviary_output(self, Aircraft.Wing.FOLDED_SPAN_DIMENSIONLESS) else: - add_aviary_input(self, Aircraft.Wing.FOLDED_SPAN_DIMENSIONLESS, val=0) - add_aviary_output(self, Aircraft.Wing.FOLDED_SPAN, val=0) + add_aviary_input(self, Aircraft.Wing.FOLDED_SPAN_DIMENSIONLESS) + add_aviary_output(self, Aircraft.Wing.FOLDED_SPAN) def setup_partials(self): diff --git a/aviary/subsystems/geometry/gasp_based/strut.py b/aviary/subsystems/geometry/gasp_based/strut.py index 2c3fd83f0..8e80f290f 100644 --- a/aviary/subsystems/geometry/gasp_based/strut.py +++ b/aviary/subsystems/geometry/gasp_based/strut.py @@ -13,20 +13,17 @@ class StrutGeom(om.ExplicitComponent): """ def setup(self): - - add_aviary_input(self, Aircraft.Wing.AREA, val=150) - add_aviary_input(self, Aircraft.Strut.AREA_RATIO, val=.2) - - add_aviary_input(self, Aircraft.Strut.ATTACHMENT_LOCATION, val=0, units="ft") - - add_aviary_input(self, Aircraft.Fuselage.AVG_DIAMETER, val=10.0) + add_aviary_input(self, Aircraft.Wing.AREA) + add_aviary_input(self, Aircraft.Strut.AREA_RATIO) + add_aviary_input(self, Aircraft.Strut.ATTACHMENT_LOCATION) + add_aviary_input(self, Aircraft.Fuselage.AVG_DIAMETER) self.add_output( "strut_y", val=30, units="ft", desc="YSTRUT: attachment location of strut" ) - add_aviary_output(self, Aircraft.Strut.LENGTH, val=1.0) - add_aviary_output(self, Aircraft.Strut.AREA, val=30) - add_aviary_output(self, Aircraft.Strut.CHORD, val=1.0) + add_aviary_output(self, Aircraft.Strut.LENGTH) + add_aviary_output(self, Aircraft.Strut.AREA) + add_aviary_output(self, Aircraft.Strut.CHORD) def setup_partials(self): diff --git a/aviary/subsystems/geometry/gasp_based/test/test_empennage.py b/aviary/subsystems/geometry/gasp_based/test/test_empennage.py index aa77dbeab..6cb29add1 100644 --- a/aviary/subsystems/geometry/gasp_based/test/test_empennage.py +++ b/aviary/subsystems/geometry/gasp_based/test/test_empennage.py @@ -49,9 +49,6 @@ def setUp(self): Aircraft.HorizontalTail.VERTICAL_TAIL_FRACTION, val=0, units="unitless" ) self.prob.model.set_input_defaults("vvc.cab_w", val=13.1, units="ft") - self.prob.model.set_input_defaults( - Aircraft.Wing.AREA, val=1370.3, units="ft**2" - ) self.prob.model.set_input_defaults("vvc.wing_ref", 117.8054, units="ft") self.prob.setup(check=False, force_alloc_complex=True) @@ -75,7 +72,6 @@ class TestTailComp( def setUp(self): self.prob = om.Problem() self.prob.model.add_subsystem("tail", TailSize(), promotes=["*"]) - self.prob.setup(check=False, force_alloc_complex=True) # values for horizontal tail self.prob.model.set_input_defaults("vol_coef", val=1.189, units="unitless") @@ -86,6 +82,7 @@ def setUp(self): self.prob.model.set_input_defaults("wing_ref", val=12.615, units="ft") self.prob.model.set_input_defaults("ar", val=4.75, units="unitless") self.prob.model.set_input_defaults("tr", val=0.352, units="unitless") + self.prob.setup(check=False, force_alloc_complex=True) def test_large_sinle_aisle_1_htail(self): self.prob.run_model() @@ -101,7 +98,6 @@ def test_large_sinle_aisle_1_htail(self): def test_large_sinle_aisle_1_vtail(self): # override horizontal tail defaults for vertical tail self.prob.set_val("vol_coef", 0.145, units="unitless") - self.prob.set_val(Aircraft.Wing.AREA, 1370.3, units="ft**2") self.prob.set_val("r_arm", 2.362, units="unitless") self.prob.set_val("wing_ref", 117.8, units="ft") self.prob.set_val("ar", 1.67, units="unitless") diff --git a/aviary/subsystems/geometry/gasp_based/test/test_size_group.py b/aviary/subsystems/geometry/gasp_based/test/test_size_group.py index 90ad3170a..4c2849d73 100644 --- a/aviary/subsystems/geometry/gasp_based/test/test_size_group.py +++ b/aviary/subsystems/geometry/gasp_based/test/test_size_group.py @@ -242,6 +242,9 @@ def setUp(self): self.prob.model.set_input_defaults( Aircraft.HorizontalTail.MOMENT_RATIO, val=0.2307, units="unitless" ) + self.prob.model.set_input_defaults( + Aircraft.HorizontalTail.TAPER_RATIO, val=0.352, units="unitless" + ) self.prob.model.set_input_defaults( Aircraft.VerticalTail.MOMENT_RATIO, 2.362, units="unitless") self.prob.model.set_input_defaults( diff --git a/aviary/subsystems/geometry/gasp_based/test/test_wing.py b/aviary/subsystems/geometry/gasp_based/test/test_wing.py index 5cb91f101..dd2f74811 100644 --- a/aviary/subsystems/geometry/gasp_based/test/test_wing.py +++ b/aviary/subsystems/geometry/gasp_based/test/test_wing.py @@ -59,6 +59,15 @@ def tearDown(self): def test_case1(self): self.prob = om.Problem() self.prob.model.add_subsystem("size", WingSize(), promotes=["*"]) + self.prob.model.set_input_defaults( + Mission.Design.GROSS_MASS, 175400, units="lbm" + ) + self.prob.model.set_input_defaults( + Aircraft.Wing.LOADING, 128, units="lbf/ft**2" + ) + self.prob.model.set_input_defaults( + Aircraft.Wing.ASPECT_RATIO, 10.13, units="unitless" + ) self.prob.setup(check=False, force_alloc_complex=True) partial_data = self.prob.check_partials(out_stream=None, method="cs") @@ -580,6 +589,32 @@ def setUp(self): self.prob.model.set_input_defaults( Aircraft.Strut.ATTACHMENT_LOCATION, val=0, units="ft" ) + self.prob.model.set_input_defaults( + Aircraft.Strut.AREA_RATIO, val=.2, units='unitless' + ) + self.prob.model.set_input_defaults( + Aircraft.Fuselage.AVG_DIAMETER, val=10.0, units='ft' + ) + self.prob.model.set_input_defaults( + Mission.Design.GROSS_MASS, val=152000.0, units='lbm' + ) + self.prob.model.set_input_defaults( + Aircraft.Wing.LOADING, 128, units="lbf/ft**2" + ) + self.prob.model.set_input_defaults( + Aircraft.Fuel.WING_FUEL_FRACTION, val=.6, units='unitless' + ) + + self.prob.model.set_input_defaults( + Aircraft.Wing.ASPECT_RATIO, val=10.13, units="unitless") + self.prob.model.set_input_defaults( + Aircraft.Wing.TAPER_RATIO, val=0.33, units="unitless") + self.prob.model.set_input_defaults( + Aircraft.Wing.THICKNESS_TO_CHORD_ROOT, val=0.11, units="unitless" + ) + self.prob.model.set_input_defaults( + Aircraft.Wing.THICKNESS_TO_CHORD_TIP, val=0.1, units="unitless" + ) setup_model_options(self.prob, options) diff --git a/aviary/subsystems/geometry/gasp_based/wing.py b/aviary/subsystems/geometry/gasp_based/wing.py index 85ce6cf1b..bd7e759ad 100644 --- a/aviary/subsystems/geometry/gasp_based/wing.py +++ b/aviary/subsystems/geometry/gasp_based/wing.py @@ -17,12 +17,12 @@ class WingSize(om.ExplicitComponent): def setup(self): - add_aviary_input(self, Mission.Design.GROSS_MASS, val=152000) - add_aviary_input(self, Aircraft.Wing.LOADING, val=128) - add_aviary_input(self, Aircraft.Wing.ASPECT_RATIO, val=10.13) + add_aviary_input(self, Mission.Design.GROSS_MASS) + add_aviary_input(self, Aircraft.Wing.LOADING) + add_aviary_input(self, Aircraft.Wing.ASPECT_RATIO) - add_aviary_output(self, Aircraft.Wing.AREA, val=0) - add_aviary_output(self, Aircraft.Wing.SPAN, val=0) + add_aviary_output(self, Aircraft.Wing.AREA) + add_aviary_output(self, Aircraft.Wing.SPAN) self.declare_partials( Aircraft.Wing.AREA, [Mission.Design.GROSS_MASS, Aircraft.Wing.LOADING] @@ -83,19 +83,19 @@ def initialize(self): def setup(self): - add_aviary_input(self, Aircraft.Wing.AREA, val=2) - add_aviary_input(self, Aircraft.Wing.SPAN, val=2) - add_aviary_input(self, Aircraft.Wing.ASPECT_RATIO, val=10.13) - add_aviary_input(self, Aircraft.Wing.TAPER_RATIO, val=0.33) - add_aviary_input(self, Aircraft.Wing.SWEEP, val=25) - add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD_ROOT, val=0.11) - add_aviary_input(self, Aircraft.Fuselage.AVG_DIAMETER, val=10) - add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD_TIP, val=0.1) + add_aviary_input(self, Aircraft.Wing.AREA) + add_aviary_input(self, Aircraft.Wing.SPAN) + add_aviary_input(self, Aircraft.Wing.ASPECT_RATIO) + add_aviary_input(self, Aircraft.Wing.TAPER_RATIO) + add_aviary_input(self, Aircraft.Wing.SWEEP) + add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD_ROOT) + add_aviary_input(self, Aircraft.Fuselage.AVG_DIAMETER) + add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD_TIP) if not self.options[Aircraft.Wing.HAS_FOLD]: - add_aviary_input(self, Aircraft.Fuel.WING_FUEL_FRACTION, val=0.6) - add_aviary_output(self, Aircraft.Fuel.WING_VOLUME_GEOMETRIC_MAX, val=0) + add_aviary_input(self, Aircraft.Fuel.WING_FUEL_FRACTION) + add_aviary_output(self, Aircraft.Fuel.WING_VOLUME_GEOMETRIC_MAX) self.declare_partials( Aircraft.Fuel.WING_VOLUME_GEOMETRIC_MAX, @@ -111,12 +111,11 @@ def setup(self): ], ) - add_aviary_output(self, Aircraft.Wing.CENTER_CHORD, val=0) - add_aviary_output(self, Aircraft.Wing.AVERAGE_CHORD, val=0) - add_aviary_output(self, Aircraft.Wing.ROOT_CHORD, val=0) - add_aviary_output(self, Aircraft.Wing.THICKNESS_TO_CHORD_UNWEIGHTED, val=0) - add_aviary_output(self, Aircraft.Wing.LEADING_EDGE_SWEEP, - val=0.4763948, units="rad") + add_aviary_output(self, Aircraft.Wing.CENTER_CHORD) + add_aviary_output(self, Aircraft.Wing.AVERAGE_CHORD) + add_aviary_output(self, Aircraft.Wing.ROOT_CHORD) + add_aviary_output(self, Aircraft.Wing.THICKNESS_TO_CHORD_UNWEIGHTED) + add_aviary_output(self, Aircraft.Wing.LEADING_EDGE_SWEEP) self.declare_partials( Aircraft.Wing.CENTER_CHORD, @@ -517,12 +516,8 @@ def initialize(self): def setup(self): if not self.options[Aircraft.Wing.CHOOSE_FOLD_LOCATION]: - self.add_input( - "strut_y", - val=25, - units="ft", - desc="YSTRUT: attachment location of strut", - ) + self.add_input("strut_y", val=25, units="ft", + desc="YSTRUT: attachment location of strut") self.declare_partials("nonfolded_taper_ratio", "strut_y") self.declare_partials(Aircraft.Wing.FOLDING_AREA, "strut_y") @@ -540,44 +535,32 @@ def setup(self): self.declare_partials(Aircraft.Fuel.WING_VOLUME_GEOMETRIC_MAX, Aircraft.Wing.FOLDED_SPAN) - add_aviary_input(self, Aircraft.Wing.FOLDED_SPAN, val=25, units='ft') + add_aviary_input(self, Aircraft.Wing.FOLDED_SPAN) - add_aviary_input(self, Aircraft.Wing.AREA, val=200) - add_aviary_input(self, Aircraft.Wing.SPAN, val=118) - add_aviary_input(self, Aircraft.Wing.TAPER_RATIO, val=0.33) - add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD_ROOT, val=0.11) - add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD_TIP, val=0.1) - add_aviary_input(self, Aircraft.Fuel.WING_FUEL_FRACTION, val=0.6) + 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_ROOT) + add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD_TIP) + add_aviary_input(self, Aircraft.Fuel.WING_FUEL_FRACTION) - self.add_output( - "nonfolded_taper_ratio", - val=0.1, - units="unitless", - desc="SLM_NF: taper ratio between wing root and fold location", - ) + self.add_output("nonfolded_taper_ratio", val=0.1, units="unitless", + desc="SLM_NF: taper ratio between wing root and fold location", + ) - add_aviary_output(self, Aircraft.Wing.FOLDING_AREA, val=50) + add_aviary_output(self, Aircraft.Wing.FOLDING_AREA) - self.add_output( - "nonfolded_wing_area", - val=150, - units="ft**2", - desc="SW_NF: wing area of part of wings that does not fold", - ) - self.add_output( - "tc_ratio_mean_folded", - val=0.12, - units="unitless", - desc="TCM: mean value of thickess to chord ratio between root and fold", - ) - self.add_output( - "nonfolded_AR", - val=10, - units="unitless", - desc="AR_NF: aspect ratio of non-folding part of wing", - ) + self.add_output("nonfolded_wing_area", val=150, units="ft**2", + desc="SW_NF: wing area of part of wings that does not fold", + ) + self.add_output("tc_ratio_mean_folded", val=0.12, units="unitless", + desc="TCM: mean value of thickess to chord ratio between root and fold", + ) + self.add_output("nonfolded_AR", val=10, units="unitless", + desc="AR_NF: aspect ratio of non-folding part of wing", + ) - add_aviary_output(self, Aircraft.Fuel.WING_VOLUME_GEOMETRIC_MAX, val=0) + add_aviary_output(self, Aircraft.Fuel.WING_VOLUME_GEOMETRIC_MAX) self.declare_partials( "nonfolded_taper_ratio", @@ -1008,12 +991,3 @@ def setup(self): check_fold_location_definition(choose_fold_location, has_strut) self.promotes("strut", outputs=["strut_y"]) self.promotes("fold", inputs=["strut_y"]) - - self.set_input_defaults(Aircraft.Wing.ASPECT_RATIO, val=10.13, units="unitless") - self.set_input_defaults(Aircraft.Wing.TAPER_RATIO, val=0.33, units="unitless") - self.set_input_defaults( - Aircraft.Wing.THICKNESS_TO_CHORD_ROOT, val=0.11, units="unitless" - ) - self.set_input_defaults( - Aircraft.Wing.THICKNESS_TO_CHORD_TIP, val=0.1, units="unitless" - ) 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..91f7125db 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) + add_aviary_input(self, Mission.Design.GROSS_MASS) + add_aviary_input(self, Aircraft.HorizontalTail.MASS_SCALER) - add_aviary_input(self, Aircraft.HorizontalTail.TAPER_RATIO, val=0.352) - - 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 f645f812a..00e468c42 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/subsystems/mass/gasp_based/design_load.py b/aviary/subsystems/mass/gasp_based/design_load.py index dac622bc0..6cf418340 100644 --- a/aviary/subsystems/mass/gasp_based/design_load.py +++ b/aviary/subsystems/mass/gasp_based/design_load.py @@ -39,25 +39,16 @@ def setup(self): add_aviary_input(self, Aircraft.Wing.LOADING, val=128) - self.add_output( - "max_airspeed", - val=0, - units="kn", - desc="VM0: maximum operating equivalent airspeed", - ) - self.add_output( - "vel_c", - val=0, - units="kn", - desc="VGC: Velocity used in Gust Load Factor calculation at cruise conditions.\ - This is Minimum Design Cruise Speed for Part 23 aircraft and VM0 for Part 25 aircraft", - ) - self.add_output( - "max_maneuver_factor", - val=0, - units="unitless", - desc="EMLF: maximum maneuver load factor, units are in g`s", - ) + self.add_output("max_airspeed", val=0, units="kn", + desc="VM0: maximum operating equivalent airspeed", + ) + self.add_output("vel_c", val=0, units="kn", + desc="VGC: Velocity used in Gust Load Factor calculation at cruise conditions.\ + This is Minimum Design Cruise Speed for Part 23 aircraft and VM0 for Part 25 aircraft", + ) + self.add_output("max_maneuver_factor", val=0, units="unitless", + desc="EMLF: maximum maneuver load factor, units are in g`s", + ) self.add_output("min_dive_vel", val=0, units="kn", desc="VDMIN: dive velocity") self.declare_partials("*", "*") diff --git a/aviary/subsystems/mass/gasp_based/fixed.py b/aviary/subsystems/mass/gasp_based/fixed.py index 8bf15c09d..9def994dc 100644 --- a/aviary/subsystems/mass/gasp_based/fixed.py +++ b/aviary/subsystems/mass/gasp_based/fixed.py @@ -959,7 +959,7 @@ def setup(self): add_aviary_input(self, Aircraft.Fuselage.LENGTH, val=200) add_aviary_input(self, Aircraft.HorizontalTail.SPAN, val=7) add_aviary_input(self, Aircraft.LandingGear.TAIL_HOOK_MASS_SCALER, val=1) - add_aviary_input(self, Aircraft.HorizontalTail.TAPER_RATIO, val=0.352) + add_aviary_input(self, Aircraft.HorizontalTail.TAPER_RATIO) add_aviary_input(self, Aircraft.VerticalTail.MASS_COEFFICIENT, val=0.289) add_aviary_input(self, Aircraft.Wing.SPAN, val=118) add_aviary_input(self, Aircraft.HorizontalTail.AREA, val=15) diff --git a/aviary/subsystems/mass/gasp_based/fuel.py b/aviary/subsystems/mass/gasp_based/fuel.py index 8a202aece..4092e3bb3 100644 --- a/aviary/subsystems/mass/gasp_based/fuel.py +++ b/aviary/subsystems/mass/gasp_based/fuel.py @@ -55,12 +55,12 @@ def setup(self): add_aviary_input(self, Mission.Design.FUEL_MASS, val=3000) add_aviary_input(self, Aircraft.Design.OPERATING_MASS, val=94417) - self.add_output( - Aircraft.Fuel.AUXILIARY_FUEL_CAPACITY, - val=0, - units="lbm", - desc="WFXTRA: extra amount of fuel that is required but does not fit in wings", - ) + add_aviary_output(self, Aircraft.Fuel.AUXILIARY_FUEL_CAPACITY, val=0, + desc="WFXTRA: extra amount of fuel that is required but does not fit in wings") + # self.add_output( + # Aircraft.Fuel.AUXILIARY_FUEL_CAPACITY, val=0, units="lbm", + # desc="WFXTRA: extra amount of fuel that is required but does not fit in wings", + # ) self.add_output( "extra_fuel_volume", val=0, diff --git a/aviary/variable_info/functions.py b/aviary/variable_info/functions.py index 9961ae891..fa385de2a 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 @@ -91,6 +100,8 @@ def add_aviary_output(comp, varname, val, units=None, desc=None, shape_by_conn=F meta_data: dict (Optional) Aviary metadata dictionary. If unspecified, the built-in metadata will be used. + shape: tuple + (Optional) shape for this input. """ meta = meta_data[varname] if units: @@ -104,6 +115,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 22862daa9..ad23851d1 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( @@ -418,7 +418,7 @@ }, units='unitless', desc='canard theoretical aspect ratio', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -434,6 +434,7 @@ }, units='ft', desc='Reynolds characteristic length for the canard', + default_value=0.0, ) add_meta_data( @@ -449,6 +450,7 @@ }, units='unitless', desc='canard fineness ratio', + default_value=0.0, ) add_meta_data( @@ -493,7 +495,7 @@ }, units='lbm', desc='mass of canards', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -519,7 +521,7 @@ }, units='unitless', desc='canard theoretical taper ratio', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -553,7 +555,7 @@ }, units='ft**2', desc='canard wetted area', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -645,6 +647,7 @@ }, units='lbm', desc='mass of passenger baggage', + default_value=0.0, ) add_meta_data( @@ -677,7 +680,7 @@ }, units='lbm', desc='mass of cargo containers', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -708,6 +711,7 @@ }, units='lbm', desc='total mass of cargo', + default_value=0.0, ) add_meta_data( @@ -803,7 +807,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 +867,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 +1014,7 @@ }, units='lbm', desc='TBD: total mass of all passengers without their baggage', + default_value=0.0, ) add_meta_data( @@ -1030,6 +1035,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 +1054,7 @@ }, units='lbm', desc='mass of passenger service equipment', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -1242,7 +1248,7 @@ }, units='lbm', desc='empty mass margin', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -1270,6 +1276,7 @@ meta_data=_MetaData, units='lbm', desc='total mass of all user-defined external subsystems', + default_value=0.0, ) add_meta_data( @@ -1350,7 +1357,7 @@ }, units='unitless', desc='ratio of maximum landing mass to maximum takeoff mass', - default_value=0.9, + default_value=0.0, ) add_meta_data( @@ -1418,6 +1425,7 @@ desc='operating mass of the aircraft, or aircraft mass without mission fuel, or ' 'passengers. Includes crew, unusable fuel, oil, and operational items like ' 'cargo containers and passenger service mass.', + default_value=0.0, ) add_meta_data( @@ -1497,6 +1505,7 @@ }, units='lbm', desc='Total structural group mass', + default_value=0.0, ) add_meta_data( @@ -1547,6 +1556,7 @@ }, units='lbm', desc='Total systems & equipment group mass', + default_value=0.0, ) # TODO intermediate calculated values with no uses by other systems may not belong in the @@ -1560,6 +1570,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( @@ -1584,6 +1595,7 @@ }, units='ft**2', desc='total aircraft wetted area', + default_value=0.0, ) add_meta_data( @@ -1605,7 +1617,7 @@ }, units='lbm', desc='design landing mass', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -1666,6 +1678,7 @@ }, units='lbm', desc='zero fuel mass', + default_value=0.0, ) add_meta_data( @@ -1707,6 +1720,7 @@ historical_name={"GASP": 'INGASP.LCABLE', "FLOPS": None, "LEAPS1": None}, units='ft', desc='length of cable for hybrid electric augmented system', + default_value=0.0, ) add_meta_data( @@ -1725,7 +1739,7 @@ }, units='lbm', desc='mass of the electrical system', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -1775,8 +1789,8 @@ units='unitless', option=True, desc='fraction of (scaled) engine mass used to calculate additional propulsion ' - 'system mass added to engine control and starter mass, or used to ' - 'calculate engine installation mass', + 'system mass added to engine control and starter mass, or used to ' + 'calculate engine installation mass', types=(float, int, np.ndarray), multivalue=True, default_value=0.0, @@ -2069,7 +2083,7 @@ types=(np.ndarray, int), multivalue=True, option=True, - default_value=[2] + default_value=[2], ) add_meta_data( @@ -2085,7 +2099,7 @@ option=True, types=(np.ndarray, int), multivalue=True, - default_value=0 + default_value=0, ) add_meta_data( @@ -2102,7 +2116,7 @@ option=True, types=(np.ndarray, int), multivalue=True, - default_value=[0] + default_value=[0], ) add_meta_data( @@ -2507,7 +2521,7 @@ option=True, types=(int, np.ndarray), multivalue=True, - default_value=0 + default_value=0, ) add_meta_data( @@ -2587,7 +2601,7 @@ }, units='lbm', desc='mass of vertical fins', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -2628,7 +2642,7 @@ }, units='unitless', desc='vertical fin theoretical taper ratio', - default_value=None, + default_value=0.0, ) # ______ _ @@ -2649,7 +2663,7 @@ }, units='lbm', desc='fuel capacity of the auxiliary tank', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -2670,7 +2684,7 @@ }, units='unitless', desc='fuel capacity factor', - default_value=23.0, + default_value=1.0, ) add_meta_data( @@ -2724,7 +2738,7 @@ }, units='lbm', desc='fuel system mass', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -2763,7 +2777,7 @@ }, units='lbm', desc='fuel capacity of the fuselage', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -2796,7 +2810,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( @@ -2814,6 +2828,7 @@ }, units='galUS', # need to check this desc='Total fuel volume', + default_value=0.0, ) add_meta_data( @@ -2832,7 +2847,7 @@ }, units='lbm', desc='unusable fuel mass', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -2868,7 +2883,7 @@ }, units='lbm', desc='fuel capacity of the auxiliary tank', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -2877,6 +2892,7 @@ historical_name={"GASP": 'INGASP.SKWF', "FLOPS": None, "LEAPS1": None}, units='unitless', desc='fraction of total theoretical wing volume used for wing fuel', + default_value=0.0, ) add_meta_data( @@ -2959,6 +2975,7 @@ historical_name={"GASP": 'INGASP.FVOLW_GEOM', "FLOPS": None, "LEAPS1": None}, units='ft**3', desc='wing tank fuel volume based on geometry', + default_value=0.0, ) add_meta_data( @@ -2997,7 +3014,7 @@ }, units='lbm', desc='Total furnishings system mass', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3006,6 +3023,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( @@ -3054,6 +3072,7 @@ }, units='ft', desc='average fuselage diameter', + default_value=0.0, ) add_meta_data( @@ -3069,6 +3088,7 @@ }, units='ft', desc='Reynolds characteristic length for the fuselage', + default_value=0.0, ) add_meta_data( @@ -3089,7 +3109,7 @@ historical_name={"GASP": 'INGASP.HCK', "FLOPS": None, "LEAPS1": None}, units='ft', desc='mean fuselage cabin diameter minus mean fuselage nose diameter', - default_value=4.5, + default_value=0.0, ) add_meta_data( @@ -3102,6 +3122,7 @@ }, units='unitless', desc='fuselage diameter to wing span ratio', + default_value=0.0, ) add_meta_data( @@ -3117,6 +3138,7 @@ }, units='unitless', desc='fuselage fineness ratio', + default_value=0.0, ) add_meta_data( @@ -3198,6 +3220,7 @@ }, units='unitless', desc='fuselage length to diameter ratio', + default_value=0.0, ) add_meta_data( @@ -3216,7 +3239,7 @@ }, units='lbm', desc='mass of the fuselage structure', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3251,6 +3274,7 @@ }, units='ft', desc='maximum fuselage height', + default_value=0.0, ) add_meta_data( @@ -3368,6 +3392,7 @@ historical_name={"GASP": 'INGASP.ELPC', "FLOPS": None, "LEAPS1": None}, units='ft', desc='length of the pilot compartment', + default_value=0.0, ) add_meta_data( @@ -3380,6 +3405,7 @@ }, units='ft**2', desc='fuselage planform area', + default_value=0.0, ) add_meta_data( @@ -3437,7 +3463,7 @@ }, units='ft**2', desc='fuselage wetted area', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3488,7 +3514,7 @@ }, units='unitless', desc='horizontal tail theoretical aspect ratio', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3512,6 +3538,7 @@ }, units='ft', desc='Reynolds characteristic length for the horizontal tail', + default_value=0.0, ) add_meta_data( @@ -3527,6 +3554,7 @@ }, units='unitless', desc='horizontal tail fineness ratio', + default_value=0.0, ) add_meta_data( @@ -3580,7 +3608,7 @@ }, units='lbm', desc='mass of horizontal tail', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3662,7 +3690,7 @@ }, units='unitless', desc='horizontal tail theoretical taper ratio', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3692,7 +3720,7 @@ 'tail is mounted. Defaults: 0.0 == for body mounted (default for ' 'transport with all engines on wing); 1.0 == for T tail ' '(default for transport with multiple engines on fuselage)', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3720,7 +3748,7 @@ }, units='ft**2', desc='horizontal tail wetted area', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3780,7 +3808,7 @@ }, units='lbm', desc='mass of hydraulic system', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3807,7 +3835,7 @@ }, units='psi', desc='hydraulic system pressure', - default_value=3000.0, + default_value=0.0, ) # @@ -3835,7 +3863,7 @@ }, units='lbm', desc='instrument group mass', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -3936,6 +3964,7 @@ }, units='lbm', desc='mass of main landing gear', + default_value=0, ) add_meta_data( @@ -3997,7 +4026,7 @@ }, units='lbm', desc='mass of nose landing gear', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -4075,6 +4104,7 @@ }, units='ft', desc='Average diameter of engine nacelles for each engine model', + default_value=0.0, ) add_meta_data( @@ -4089,6 +4119,7 @@ }, units='ft', desc='Average length of nacelles for each engine model', + default_value=0.0, ) add_meta_data( @@ -4104,6 +4135,7 @@ }, units='ft', desc='Reynolds characteristic length for nacelle for each engine model', + default_value=0.0, ) add_meta_data( @@ -4137,6 +4169,7 @@ }, units='unitless', desc='nacelle fineness ratio', + default_value=0.0, ) add_meta_data( @@ -4190,7 +4223,7 @@ }, units='lbm', desc='estimated mass of the nacelles for each engine model', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -4234,6 +4267,7 @@ }, units='ft**2', desc='total nacelles wetted area', + default_value=0.0, ) add_meta_data( @@ -4249,6 +4283,7 @@ }, units='ft**2', desc='wetted area of a single nacelle for each engine model', + default_value=0.0, ) add_meta_data( @@ -4285,6 +4320,7 @@ }, units='lbm', desc='mass of paint for all wetted area', + default_value=0.0, ) add_meta_data( @@ -4339,6 +4375,7 @@ }, units='lbm', desc='Total propulsion group mass', + default_value=0.0, ) # TODO clash with per-engine scaling, need to resolve w/ heterogeneous engine @@ -4363,6 +4400,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( @@ -4371,6 +4409,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( @@ -4389,7 +4428,7 @@ }, units='lbm', desc='engine oil mass', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -4409,7 +4448,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( @@ -4481,7 +4520,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, ) # _____ _ _ @@ -4507,6 +4546,7 @@ historical_name={"GASP": 'INGASP.SSTQSW', "FLOPS": None, "LEAPS1": None}, units='unitless', desc='ratio of strut area to wing area', + default_value=0.0, ) add_meta_data( @@ -4519,6 +4559,7 @@ }, units='ft', desc='attachment location of strut the full attachment-to-attachment span', + default_value=0.0, ) # related to Aircraft.Strut.ATTACHMENT_LOCATION @@ -4528,6 +4569,7 @@ historical_name={"GASP": None, "FLOPS": None, "LEAPS1": None}, units='unitless', desc='attachment location of strut as fraction of the half-span', + default_value=0.0, ) add_meta_data( @@ -4536,6 +4578,7 @@ historical_name={"GASP": 'INGASP.STRTCHD', "FLOPS": None, "LEAPS1": None}, units='ft', desc='chord of the strut', + default_value=0.0, ) add_meta_data( @@ -4653,7 +4696,7 @@ }, units='unitless', desc='vertical tail theoretical aspect ratio', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -4677,6 +4720,7 @@ }, units='ft', desc='Reynolds characteristic length for the vertical tail', + default_value=0.0, ) add_meta_data( @@ -4692,6 +4736,7 @@ }, units='unitless', desc='vertical tail fineness ratio', + default_value=0.0, ) add_meta_data( @@ -4745,7 +4790,7 @@ }, units='lbm', desc='mass of vertical tail', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -4842,7 +4887,7 @@ }, units='unitless', desc='vertical tail theoretical taper ratio', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -4885,7 +4930,7 @@ }, units='ft**2', desc='vertical tails wetted area', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -5014,6 +5059,7 @@ }, units='unitless', desc='Reference aspect ratio, used for detailed wing mass estimation.', + default_value=0.0, ) add_meta_data( @@ -5022,6 +5068,7 @@ historical_name={"GASP": 'INGASP.CBARW', "FLOPS": None, "LEAPS1": None}, units='ft', desc='mean aerodynamic chord of the wing', + default_value=0.0, ) add_meta_data( @@ -5035,6 +5082,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( @@ -5049,7 +5097,7 @@ }, units='lbm', desc='wing mass breakdown term 1', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -5077,7 +5125,7 @@ }, units='lbm', desc='wing mass breakdown term 4', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -5099,6 +5147,7 @@ historical_name={"GASP": 'INGASP.CRCLW', "FLOPS": None, "LEAPS1": None}, units='ft', desc='wing chord at fuselage centerline', + default_value=0.0, ) add_meta_data( @@ -5123,6 +5172,7 @@ }, units='ft', desc='Reynolds characteristic length for the wing', + default_value=0.0, ) add_meta_data( @@ -5149,7 +5199,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( @@ -5184,6 +5234,7 @@ }, units='ft**2', desc='area of wing control surfaces', + default_value=0.0, ) add_meta_data( @@ -5198,7 +5249,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( @@ -5240,6 +5291,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( @@ -5255,6 +5307,7 @@ }, units='unitless', desc='wing fineness ratio', + default_value=0.0, ) add_meta_data( @@ -5356,7 +5409,7 @@ historical_name={"GASP": 'INGASP.YWFOLD', "FLOPS": None, "LEAPS1": None}, units='ft', desc='folded wingspan', - default_value=118, + default_value=0, ) add_meta_data( @@ -5515,6 +5568,7 @@ historical_name={"GASP": 'INGASP.SWPLE', "FLOPS": None, "LEAPS1": None}, units='rad', desc='sweep angle at leading edge of wing', + default_value=0.0, ) add_meta_data( @@ -5556,7 +5610,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( @@ -5569,6 +5623,7 @@ }, units='lbf/ft**2', desc='wing loading', + default_value=0.0, ) add_meta_data( @@ -5598,7 +5653,7 @@ }, units='lbm', desc='wing total mass', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -5707,7 +5762,7 @@ }, units='lbm', desc='wing mass breakdown term 3', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -5785,6 +5840,7 @@ }, units='ft', desc='wing chord length at wing root', + default_value=0.0, ) add_meta_data( @@ -5799,7 +5855,7 @@ }, units='lbm', desc='wing mass breakdown term 2', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -5926,7 +5982,7 @@ }, units='lbm', desc='mass of surface controls', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -5974,7 +6030,7 @@ }, units='deg', desc='quarter-chord sweep angle of the wing', - default_value=0.0, # TODO required + default_value=0.0, # TODO required. ) add_meta_data( @@ -5999,7 +6055,7 @@ }, units='unitless', desc='taper ratio of the wing', - default_value=0.0, # TODO required + default_value=0.0, # TODO required. ) add_meta_data( @@ -6038,7 +6094,7 @@ }, units='unitless', desc='the thickeness-chord ratios at station locations', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -6060,6 +6116,7 @@ historical_name={"GASP": 'INGASP.TCR', "FLOPS": None, "LEAPS1": None}, units='unitless', desc='thickness-to-chord ratio at the root of the wing', + default_value=0.0, ) add_meta_data( @@ -6068,6 +6125,7 @@ historical_name={"GASP": 'INGASP.TCT', "FLOPS": None, "LEAPS1": None}, units='unitless', desc='thickness-to-chord ratio at the tip of the wing', + default_value=0.0, ) add_meta_data( @@ -6076,6 +6134,7 @@ historical_name={"GASP": 'INGASP.TC', "FLOPS": None, "LEAPS1": None}, units='unitless', desc='wing thickness-chord ratio at the wing station of the mean aerodynamic chord', + default_value=0.0, ) add_meta_data( @@ -6123,7 +6182,7 @@ }, units='ft**2', desc='wing wetted area', - default_value=None, + default_value=0.0, ) add_meta_data( @@ -6727,6 +6786,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( @@ -6757,7 +6817,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', - ] - } + ], + }, )