From b9dae4b1378377ca3179368346681010ac077164 Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Tue, 29 Oct 2024 08:17:18 -0700 Subject: [PATCH 01/23] Set Aircraft.HorizontalTail.ASPECT_RATIO to 4.75 --- .../subsystems/geometry/flops_based/characteristic_lengths.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aviary/subsystems/geometry/flops_based/characteristic_lengths.py b/aviary/subsystems/geometry/flops_based/characteristic_lengths.py index 92148f338..474fa7381 100644 --- a/aviary/subsystems/geometry/flops_based/characteristic_lengths.py +++ b/aviary/subsystems/geometry/flops_based/characteristic_lengths.py @@ -36,7 +36,7 @@ def setup(self): add_aviary_input(self, Aircraft.Fuselage.LENGTH, 0.0) add_aviary_input(self, Aircraft.HorizontalTail.AREA, 0.0) - add_aviary_input(self, Aircraft.HorizontalTail.ASPECT_RATIO, 0.0) + add_aviary_input(self, Aircraft.HorizontalTail.ASPECT_RATIO, 4.75) # 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) From ae226914f940d31793929d117d0c6cb7e11d6c6c Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Tue, 29 Oct 2024 08:19:08 -0700 Subject: [PATCH 02/23] set Aircraft.HorizontalTail.ASPECT_RATIO = 0.352 and set Aircraft.HorizontalTail.ASPECT_RATIO = 4.75 to be consistent with GASP. --- aviary/subsystems/geometry/flops_based/prep_geom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aviary/subsystems/geometry/flops_based/prep_geom.py b/aviary/subsystems/geometry/flops_based/prep_geom.py index 89b68b36f..2c3d93e9e 100644 --- a/aviary/subsystems/geometry/flops_based/prep_geom.py +++ b/aviary/subsystems/geometry/flops_based/prep_geom.py @@ -128,8 +128,8 @@ def setup(self): 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, 0.0) - add_aviary_input(self, Aircraft.HorizontalTail.TAPER_RATIO, 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) From c248b6f8bccd68ba892acd2172c33a9e7c0f054d Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Tue, 29 Oct 2024 08:20:56 -0700 Subject: [PATCH 03/23] exclude __dict__ from params list because of mappingproxy error --- aviary/subsystems/geometry/geometry_builder.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/aviary/subsystems/geometry/geometry_builder.py b/aviary/subsystems/geometry/geometry_builder.py index 04f87d4b9..93c2352bb 100644 --- a/aviary/subsystems/geometry/geometry_builder.py +++ b/aviary/subsystems/geometry/geometry_builder.py @@ -111,10 +111,11 @@ def get_parameters(self, aviary_inputs=None, phase_info=None): params = {} for entry in Aircraft.Nacelle.__dict__: - var = getattr(Aircraft.Nacelle, entry) - if var in aviary_inputs: - if 'total' not in var: - params[var] = {'shape': (num_engine_type), 'static_target': True} + if entry != "__dict__": # cannot get attribute from mappingproxy + var = getattr(Aircraft.Nacelle, entry) + if var in aviary_inputs: + if 'total' not in var: + params[var] = {'shape': (num_engine_type), 'static_target': True} return params From 3e9e8e1187710f64c06fc9e83b50e37c658a30ad Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Tue, 29 Oct 2024 20:51:31 -0700 Subject: [PATCH 04/23] change Aircraft.Wing.FOLDED_SPAN to 25 --- .../geometry/gasp_based/non_dimensional_conversion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aviary/subsystems/geometry/gasp_based/non_dimensional_conversion.py b/aviary/subsystems/geometry/gasp_based/non_dimensional_conversion.py index bfd3fad10..0fd18fdc9 100644 --- a/aviary/subsystems/geometry/gasp_based/non_dimensional_conversion.py +++ b/aviary/subsystems/geometry/gasp_based/non_dimensional_conversion.py @@ -79,7 +79,7 @@ def setup(self): add_aviary_input(self, Aircraft.Wing.SPAN, val=0) if self.options["aviary_options"].get_val(Aircraft.Wing.FOLD_DIMENSIONAL_LOCATION_SPECIFIED, units='unitless'): - add_aviary_input(self, Aircraft.Wing.FOLDED_SPAN, val=0) + add_aviary_input(self, Aircraft.Wing.FOLDED_SPAN, val=25) add_aviary_output(self, Aircraft.Wing.FOLDED_SPAN_DIMENSIONLESS, val=0) else: add_aviary_input(self, Aircraft.Wing.FOLDED_SPAN_DIMENSIONLESS, val=0) From dfbe7a5135d9e77791b5ef5a3956d8b11584a802 Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Tue, 29 Oct 2024 20:52:17 -0700 Subject: [PATCH 05/23] add test of geom builders --- .../geometry/test_flops_geom_builder.py | 67 ++++++++++++++++++ .../geometry/test_gasp_geom_builder.py | 68 +++++++++++++++++++ 2 files changed, 135 insertions(+) create mode 100644 aviary/subsystems/geometry/test_flops_geom_builder.py create mode 100644 aviary/subsystems/geometry/test_gasp_geom_builder.py diff --git a/aviary/subsystems/geometry/test_flops_geom_builder.py b/aviary/subsystems/geometry/test_flops_geom_builder.py new file mode 100644 index 000000000..34c57817e --- /dev/null +++ b/aviary/subsystems/geometry/test_flops_geom_builder.py @@ -0,0 +1,67 @@ +import unittest + +import numpy as np +import openmdao.api as om + +from openmdao.utils.assert_utils import assert_check_partials, assert_near_equal + +from aviary.subsystems.geometry.geometry_builder import CoreGeometryBuilder +from aviary.variable_info.enums import LegacyCode +from aviary.variable_info.variables import Aircraft +from aviary.variable_info.variable_meta_data import _MetaData as BaseMetaData +import aviary.api as av + +FLOPS = LegacyCode.FLOPS + +class TestAeroBuilder(av.TestSubsystemBuilderBase): + """ + That class inherits from TestSubsystemBuilder. So all the test functions are + within that inherited class. The setUp() method prepares the class and is run + before the test methods; then the test methods are run. + """ + + def setUp(self): + self.subsystem_builder = CoreGeometryBuilder('core_geometry', + BaseMetaData, + use_both_geometries=True, + code_origin_to_prioritize=FLOPS) + self.aviary_values = av.AviaryValues() + self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') + self.aviary_values.set_val(Aircraft.Electrical.HAS_HYBRID_SYSTEM, False, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.HAS_FOLD, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.HAS_STRUT, True, units='unitless') + self.aviary_values.set_val(Aircraft.Design.COMPUTE_HTAIL_VOLUME_COEFF, True, units='unitless') + self.aviary_values.set_val(Aircraft.Design.COMPUTE_VTAIL_VOLUME_COEFF, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.SPAN_EFFICIENCY_REDUCTION, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.CHOOSE_FOLD_LOCATION, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.FOLD_DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') + self.aviary_values.set_val(Aircraft.Strut.DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') + + +class TestAeroBuilderHybrid(av.TestSubsystemBuilderBase): + """ + That class inherits from TestSubsystemBuilder. So all the test functions are + within that inherited class. The setUp() method prepares the class and is run + before the test methods; then the test methods are run. + """ + + def setUp(self): + self.subsystem_builder = CoreGeometryBuilder('core_geometry', + BaseMetaData, + use_both_geometries=True, + code_origin_to_prioritize=FLOPS) + self.aviary_values = av.AviaryValues() + self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') + self.aviary_values.set_val(Aircraft.Electrical.HAS_HYBRID_SYSTEM, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.HAS_FOLD, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.HAS_STRUT, True, units='unitless') + self.aviary_values.set_val(Aircraft.Design.COMPUTE_HTAIL_VOLUME_COEFF, True, units='unitless') + self.aviary_values.set_val(Aircraft.Design.COMPUTE_VTAIL_VOLUME_COEFF, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.SPAN_EFFICIENCY_REDUCTION, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.CHOOSE_FOLD_LOCATION, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.FOLD_DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') + self.aviary_values.set_val(Aircraft.Strut.DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') + + +if __name__ == '__main__': + unittest.main() diff --git a/aviary/subsystems/geometry/test_gasp_geom_builder.py b/aviary/subsystems/geometry/test_gasp_geom_builder.py new file mode 100644 index 000000000..aef1b2d59 --- /dev/null +++ b/aviary/subsystems/geometry/test_gasp_geom_builder.py @@ -0,0 +1,68 @@ +import unittest + +import numpy as np +import openmdao.api as om + +from openmdao.utils.assert_utils import assert_check_partials, assert_near_equal + +from aviary.subsystems.geometry.geometry_builder import CoreGeometryBuilder +from aviary.variable_info.enums import LegacyCode +from aviary.variable_info.variables import Aircraft +from aviary.variable_info.variable_meta_data import _MetaData as BaseMetaData +import aviary.api as av + +GASP = LegacyCode.GASP + +class TestAeroBuilder(av.TestSubsystemBuilderBase): + """ + That class inherits from TestSubsystemBuilder. So all the test functions are + within that inherited class. The setUp() method prepares the class and is run + before the test methods; then the test methods are run. + """ + + def setUp(self): + self.subsystem_builder = CoreGeometryBuilder('core_geometry', + BaseMetaData, + use_both_geometries=True, + code_origin_to_prioritize=GASP) + self.aviary_values = av.AviaryValues() + self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') + self.aviary_values.set_val(Aircraft.Electrical.HAS_HYBRID_SYSTEM, False, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.HAS_FOLD, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.HAS_STRUT, True, units='unitless') + self.aviary_values.set_val(Aircraft.Design.COMPUTE_HTAIL_VOLUME_COEFF, True, units='unitless') + self.aviary_values.set_val(Aircraft.Design.COMPUTE_VTAIL_VOLUME_COEFF, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.SPAN_EFFICIENCY_REDUCTION, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.CHOOSE_FOLD_LOCATION, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.FOLD_DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') + self.aviary_values.set_val(Aircraft.Strut.DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') + + +class TestAeroBuilderHybrid(av.TestSubsystemBuilderBase): + """ + That class inherits from TestSubsystemBuilder. So all the test functions are + within that inherited class. The setUp() method prepares the class and is run + before the test methods; then the test methods are run. + """ + + def setUp(self): + self.subsystem_builder = CoreGeometryBuilder('core_geometry', + BaseMetaData, + use_both_geometries=True, + code_origin_to_prioritize=GASP) + self.aviary_values = av.AviaryValues() + self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') + self.aviary_values.set_val(Aircraft.Electrical.HAS_HYBRID_SYSTEM, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.HAS_FOLD, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.HAS_STRUT, True, units='unitless') + self.aviary_values.set_val(Aircraft.Design.COMPUTE_HTAIL_VOLUME_COEFF, True, units='unitless') + self.aviary_values.set_val(Aircraft.Design.COMPUTE_VTAIL_VOLUME_COEFF, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.SPAN_EFFICIENCY_REDUCTION, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.CHOOSE_FOLD_LOCATION, True, units='unitless') + self.aviary_values.set_val(Aircraft.Wing.FOLD_DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') + self.aviary_values.set_val(Aircraft.Strut.DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') + self.aviary_values.set_val(Aircraft.Propulsion.TOTAL_NUM_WING_ENGINES, 2, units='unitless') + + +if __name__ == '__main__': + unittest.main() From 50b35a425729c14c9b5955f70cfb0d7e4d7bd4fc Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Mon, 4 Nov 2024 08:49:17 -0800 Subject: [PATCH 06/23] move two test files to test folder --- aviary/subsystems/geometry/{ => test}/test_flops_geom_builder.py | 0 aviary/subsystems/geometry/{ => test}/test_gasp_geom_builder.py | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename aviary/subsystems/geometry/{ => test}/test_flops_geom_builder.py (100%) rename aviary/subsystems/geometry/{ => test}/test_gasp_geom_builder.py (100%) diff --git a/aviary/subsystems/geometry/test_flops_geom_builder.py b/aviary/subsystems/geometry/test/test_flops_geom_builder.py similarity index 100% rename from aviary/subsystems/geometry/test_flops_geom_builder.py rename to aviary/subsystems/geometry/test/test_flops_geom_builder.py diff --git a/aviary/subsystems/geometry/test_gasp_geom_builder.py b/aviary/subsystems/geometry/test/test_gasp_geom_builder.py similarity index 100% rename from aviary/subsystems/geometry/test_gasp_geom_builder.py rename to aviary/subsystems/geometry/test/test_gasp_geom_builder.py From 37ed24dc8f7fca5f60d4cbc4d9b70e2c876469bc Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Mon, 4 Nov 2024 08:57:25 -0800 Subject: [PATCH 07/23] autopep8 update --- .../geometry/test/test_flops_geom_builder.py | 62 +++++++++++------- .../geometry/test/test_gasp_geom_builder.py | 65 ++++++++++++------- 2 files changed, 80 insertions(+), 47 deletions(-) diff --git a/aviary/subsystems/geometry/test/test_flops_geom_builder.py b/aviary/subsystems/geometry/test/test_flops_geom_builder.py index 34c57817e..550323186 100644 --- a/aviary/subsystems/geometry/test/test_flops_geom_builder.py +++ b/aviary/subsystems/geometry/test/test_flops_geom_builder.py @@ -13,7 +13,7 @@ FLOPS = LegacyCode.FLOPS -class TestAeroBuilder(av.TestSubsystemBuilderBase): +class TestFLOPSGeomBuilder(av.TestSubsystemBuilderBase): """ That class inherits from TestSubsystemBuilder. So all the test functions are within that inherited class. The setUp() method prepares the class and is run @@ -21,21 +21,29 @@ class TestAeroBuilder(av.TestSubsystemBuilderBase): """ def setUp(self): - self.subsystem_builder = CoreGeometryBuilder('core_geometry', - BaseMetaData, - use_both_geometries=True, - code_origin_to_prioritize=FLOPS) + self.subsystem_builder = CoreGeometryBuilder( + 'core_geometry', + BaseMetaData, + use_both_geometries=True, + code_origin_to_prioritize=FLOPS) self.aviary_values = av.AviaryValues() self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') - self.aviary_values.set_val(Aircraft.Electrical.HAS_HYBRID_SYSTEM, False, units='unitless') + self.aviary_values.set_val( + Aircraft.Electrical.HAS_HYBRID_SYSTEM, False, units='unitless') self.aviary_values.set_val(Aircraft.Wing.HAS_FOLD, True, units='unitless') self.aviary_values.set_val(Aircraft.Wing.HAS_STRUT, True, units='unitless') - self.aviary_values.set_val(Aircraft.Design.COMPUTE_HTAIL_VOLUME_COEFF, True, units='unitless') - self.aviary_values.set_val(Aircraft.Design.COMPUTE_VTAIL_VOLUME_COEFF, True, units='unitless') - self.aviary_values.set_val(Aircraft.Wing.SPAN_EFFICIENCY_REDUCTION, True, units='unitless') - self.aviary_values.set_val(Aircraft.Wing.CHOOSE_FOLD_LOCATION, True, units='unitless') - self.aviary_values.set_val(Aircraft.Wing.FOLD_DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') - self.aviary_values.set_val(Aircraft.Strut.DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Design.COMPUTE_HTAIL_VOLUME_COEFF, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Design.COMPUTE_VTAIL_VOLUME_COEFF, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Wing.SPAN_EFFICIENCY_REDUCTION, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Wing.CHOOSE_FOLD_LOCATION, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Wing.FOLD_DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Strut.DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') class TestAeroBuilderHybrid(av.TestSubsystemBuilderBase): @@ -46,21 +54,29 @@ class TestAeroBuilderHybrid(av.TestSubsystemBuilderBase): """ def setUp(self): - self.subsystem_builder = CoreGeometryBuilder('core_geometry', - BaseMetaData, - use_both_geometries=True, - code_origin_to_prioritize=FLOPS) + self.subsystem_builder = CoreGeometryBuilder( + 'core_geometry', + BaseMetaData, + use_both_geometries=True, + code_origin_to_prioritize=FLOPS) self.aviary_values = av.AviaryValues() self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') - self.aviary_values.set_val(Aircraft.Electrical.HAS_HYBRID_SYSTEM, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Electrical.HAS_HYBRID_SYSTEM, True, units='unitless') self.aviary_values.set_val(Aircraft.Wing.HAS_FOLD, True, units='unitless') self.aviary_values.set_val(Aircraft.Wing.HAS_STRUT, True, units='unitless') - self.aviary_values.set_val(Aircraft.Design.COMPUTE_HTAIL_VOLUME_COEFF, True, units='unitless') - self.aviary_values.set_val(Aircraft.Design.COMPUTE_VTAIL_VOLUME_COEFF, True, units='unitless') - self.aviary_values.set_val(Aircraft.Wing.SPAN_EFFICIENCY_REDUCTION, True, units='unitless') - self.aviary_values.set_val(Aircraft.Wing.CHOOSE_FOLD_LOCATION, True, units='unitless') - self.aviary_values.set_val(Aircraft.Wing.FOLD_DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') - self.aviary_values.set_val(Aircraft.Strut.DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Design.COMPUTE_HTAIL_VOLUME_COEFF, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Design.COMPUTE_VTAIL_VOLUME_COEFF, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Wing.SPAN_EFFICIENCY_REDUCTION, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Wing.CHOOSE_FOLD_LOCATION, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Wing.FOLD_DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Strut.DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') if __name__ == '__main__': diff --git a/aviary/subsystems/geometry/test/test_gasp_geom_builder.py b/aviary/subsystems/geometry/test/test_gasp_geom_builder.py index aef1b2d59..30a8aaec6 100644 --- a/aviary/subsystems/geometry/test/test_gasp_geom_builder.py +++ b/aviary/subsystems/geometry/test/test_gasp_geom_builder.py @@ -13,7 +13,7 @@ GASP = LegacyCode.GASP -class TestAeroBuilder(av.TestSubsystemBuilderBase): +class TestGASPGeomuilder(av.TestSubsystemBuilderBase): """ That class inherits from TestSubsystemBuilder. So all the test functions are within that inherited class. The setUp() method prepares the class and is run @@ -21,21 +21,29 @@ class TestAeroBuilder(av.TestSubsystemBuilderBase): """ def setUp(self): - self.subsystem_builder = CoreGeometryBuilder('core_geometry', - BaseMetaData, - use_both_geometries=True, - code_origin_to_prioritize=GASP) + self.subsystem_builder = CoreGeometryBuilder( + 'core_geometry', + BaseMetaData, + use_both_geometries=True, + code_origin_to_prioritize=GASP) self.aviary_values = av.AviaryValues() self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') - self.aviary_values.set_val(Aircraft.Electrical.HAS_HYBRID_SYSTEM, False, units='unitless') + self.aviary_values.set_val( + Aircraft.Electrical.HAS_HYBRID_SYSTEM, False, units='unitless') self.aviary_values.set_val(Aircraft.Wing.HAS_FOLD, True, units='unitless') self.aviary_values.set_val(Aircraft.Wing.HAS_STRUT, True, units='unitless') - self.aviary_values.set_val(Aircraft.Design.COMPUTE_HTAIL_VOLUME_COEFF, True, units='unitless') - self.aviary_values.set_val(Aircraft.Design.COMPUTE_VTAIL_VOLUME_COEFF, True, units='unitless') - self.aviary_values.set_val(Aircraft.Wing.SPAN_EFFICIENCY_REDUCTION, True, units='unitless') - self.aviary_values.set_val(Aircraft.Wing.CHOOSE_FOLD_LOCATION, True, units='unitless') - self.aviary_values.set_val(Aircraft.Wing.FOLD_DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') - self.aviary_values.set_val(Aircraft.Strut.DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Design.COMPUTE_HTAIL_VOLUME_COEFF, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Design.COMPUTE_VTAIL_VOLUME_COEFF, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Wing.SPAN_EFFICIENCY_REDUCTION, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Wing.CHOOSE_FOLD_LOCATION, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Wing.FOLD_DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Strut.DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') class TestAeroBuilderHybrid(av.TestSubsystemBuilderBase): @@ -46,22 +54,31 @@ class TestAeroBuilderHybrid(av.TestSubsystemBuilderBase): """ def setUp(self): - self.subsystem_builder = CoreGeometryBuilder('core_geometry', - BaseMetaData, - use_both_geometries=True, - code_origin_to_prioritize=GASP) + self.subsystem_builder = CoreGeometryBuilder( + 'core_geometry', + BaseMetaData, + use_both_geometries=True, + code_origin_to_prioritize=GASP) self.aviary_values = av.AviaryValues() self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') - self.aviary_values.set_val(Aircraft.Electrical.HAS_HYBRID_SYSTEM, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Electrical.HAS_HYBRID_SYSTEM, True, units='unitless') self.aviary_values.set_val(Aircraft.Wing.HAS_FOLD, True, units='unitless') self.aviary_values.set_val(Aircraft.Wing.HAS_STRUT, True, units='unitless') - self.aviary_values.set_val(Aircraft.Design.COMPUTE_HTAIL_VOLUME_COEFF, True, units='unitless') - self.aviary_values.set_val(Aircraft.Design.COMPUTE_VTAIL_VOLUME_COEFF, True, units='unitless') - self.aviary_values.set_val(Aircraft.Wing.SPAN_EFFICIENCY_REDUCTION, True, units='unitless') - self.aviary_values.set_val(Aircraft.Wing.CHOOSE_FOLD_LOCATION, True, units='unitless') - self.aviary_values.set_val(Aircraft.Wing.FOLD_DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') - self.aviary_values.set_val(Aircraft.Strut.DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') - self.aviary_values.set_val(Aircraft.Propulsion.TOTAL_NUM_WING_ENGINES, 2, units='unitless') + self.aviary_values.set_val( + Aircraft.Design.COMPUTE_HTAIL_VOLUME_COEFF, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Design.COMPUTE_VTAIL_VOLUME_COEFF, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Wing.SPAN_EFFICIENCY_REDUCTION, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Wing.CHOOSE_FOLD_LOCATION, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Wing.FOLD_DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Strut.DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Propulsion.TOTAL_NUM_WING_ENGINES, 2, units='unitless') if __name__ == '__main__': From 2402061148d4aee6288bc7cc6e52ffdaba9b833d Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Mon, 4 Nov 2024 09:00:57 -0800 Subject: [PATCH 08/23] autopep8 update --- aviary/subsystems/geometry/flops_based/prep_geom.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aviary/subsystems/geometry/flops_based/prep_geom.py b/aviary/subsystems/geometry/flops_based/prep_geom.py index 2c3d93e9e..2d54dab22 100644 --- a/aviary/subsystems/geometry/flops_based/prep_geom.py +++ b/aviary/subsystems/geometry/flops_based/prep_geom.py @@ -128,8 +128,10 @@ def setup(self): 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.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) From 21bbfb4ca0157d319b54aee6be96d505383d16d4 Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Mon, 4 Nov 2024 09:01:13 -0800 Subject: [PATCH 09/23] minor update --- aviary/subsystems/geometry/test/test_flops_geom_builder.py | 2 +- aviary/subsystems/geometry/test/test_gasp_geom_builder.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aviary/subsystems/geometry/test/test_flops_geom_builder.py b/aviary/subsystems/geometry/test/test_flops_geom_builder.py index 550323186..c1e529c31 100644 --- a/aviary/subsystems/geometry/test/test_flops_geom_builder.py +++ b/aviary/subsystems/geometry/test/test_flops_geom_builder.py @@ -46,7 +46,7 @@ def setUp(self): Aircraft.Strut.DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') -class TestAeroBuilderHybrid(av.TestSubsystemBuilderBase): +class TestFLOPSGeomBuilderHybrid(av.TestSubsystemBuilderBase): """ That class inherits from TestSubsystemBuilder. So all the test functions are within that inherited class. The setUp() method prepares the class and is run diff --git a/aviary/subsystems/geometry/test/test_gasp_geom_builder.py b/aviary/subsystems/geometry/test/test_gasp_geom_builder.py index 30a8aaec6..bdf29fb36 100644 --- a/aviary/subsystems/geometry/test/test_gasp_geom_builder.py +++ b/aviary/subsystems/geometry/test/test_gasp_geom_builder.py @@ -13,7 +13,7 @@ GASP = LegacyCode.GASP -class TestGASPGeomuilder(av.TestSubsystemBuilderBase): +class TestGASPGeomBuilder(av.TestSubsystemBuilderBase): """ That class inherits from TestSubsystemBuilder. So all the test functions are within that inherited class. The setUp() method prepares the class and is run @@ -46,7 +46,7 @@ def setUp(self): Aircraft.Strut.DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') -class TestAeroBuilderHybrid(av.TestSubsystemBuilderBase): +class TestGASPGeomBuilderHybrid(av.TestSubsystemBuilderBase): """ That class inherits from TestSubsystemBuilder. So all the test functions are within that inherited class. The setUp() method prepares the class and is run From 056b7ef68803517aaaeb9231b1e48546f87d2b4f Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Mon, 4 Nov 2024 09:13:06 -0800 Subject: [PATCH 10/23] autopep8 minor update --- aviary/subsystems/geometry/test/test_flops_geom_builder.py | 1 + aviary/subsystems/geometry/test/test_gasp_geom_builder.py | 1 + 2 files changed, 2 insertions(+) diff --git a/aviary/subsystems/geometry/test/test_flops_geom_builder.py b/aviary/subsystems/geometry/test/test_flops_geom_builder.py index c1e529c31..47597864b 100644 --- a/aviary/subsystems/geometry/test/test_flops_geom_builder.py +++ b/aviary/subsystems/geometry/test/test_flops_geom_builder.py @@ -13,6 +13,7 @@ FLOPS = LegacyCode.FLOPS + class TestFLOPSGeomBuilder(av.TestSubsystemBuilderBase): """ That class inherits from TestSubsystemBuilder. So all the test functions are diff --git a/aviary/subsystems/geometry/test/test_gasp_geom_builder.py b/aviary/subsystems/geometry/test/test_gasp_geom_builder.py index bdf29fb36..9bedeabbe 100644 --- a/aviary/subsystems/geometry/test/test_gasp_geom_builder.py +++ b/aviary/subsystems/geometry/test/test_gasp_geom_builder.py @@ -13,6 +13,7 @@ GASP = LegacyCode.GASP + class TestGASPGeomBuilder(av.TestSubsystemBuilderBase): """ That class inherits from TestSubsystemBuilder. So all the test functions are From a7903f41af3c4434b1332ad0c79530fac14d405a Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Mon, 4 Nov 2024 11:57:57 -0800 Subject: [PATCH 11/23] set Aircraft.HorizontalTail.TAPER_RATIO to 0.352 in HorizontalTailMass class --- aviary/subsystems/mass/flops_based/horizontal_tail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aviary/subsystems/mass/flops_based/horizontal_tail.py b/aviary/subsystems/mass/flops_based/horizontal_tail.py index c775a52b8..3c182a5b2 100644 --- a/aviary/subsystems/mass/flops_based/horizontal_tail.py +++ b/aviary/subsystems/mass/flops_based/horizontal_tail.py @@ -20,7 +20,7 @@ def initialize(self): def setup(self): add_aviary_input(self, Aircraft.HorizontalTail.AREA, val=0.0) - add_aviary_input(self, Aircraft.HorizontalTail.TAPER_RATIO, val=0.0) + add_aviary_input(self, Aircraft.HorizontalTail.TAPER_RATIO, val=0.352) add_aviary_input(self, Mission.Design.GROSS_MASS, val=0.0) From e403cafd9dfe0f9093af47550f4664bcd0c2175e Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Mon, 4 Nov 2024 12:58:42 -0800 Subject: [PATCH 12/23] add Aircraft.Propulsion.TOTAL_NUM_WING_ENGINES to TestFLOPSGeomBuilderHybrid class --- aviary/subsystems/geometry/test/test_flops_geom_builder.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aviary/subsystems/geometry/test/test_flops_geom_builder.py b/aviary/subsystems/geometry/test/test_flops_geom_builder.py index 47597864b..ccdedb37d 100644 --- a/aviary/subsystems/geometry/test/test_flops_geom_builder.py +++ b/aviary/subsystems/geometry/test/test_flops_geom_builder.py @@ -78,6 +78,8 @@ def setUp(self): Aircraft.Wing.FOLD_DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') self.aviary_values.set_val( Aircraft.Strut.DIMENSIONAL_LOCATION_SPECIFIED, True, units='unitless') + self.aviary_values.set_val( + Aircraft.Propulsion.TOTAL_NUM_WING_ENGINES, 2, units='unitless') if __name__ == '__main__': From 178bf35c2ead3f0381592b7564d3ca9b531aebe6 Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Tue, 5 Nov 2024 14:42:45 -0800 Subject: [PATCH 13/23] set Aircraft.HorizontalTail.ASPECT_RATIO = 0.0 in characteristic_lengths.py --- .../subsystems/geometry/flops_based/characteristic_lengths.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aviary/subsystems/geometry/flops_based/characteristic_lengths.py b/aviary/subsystems/geometry/flops_based/characteristic_lengths.py index 474fa7381..92148f338 100644 --- a/aviary/subsystems/geometry/flops_based/characteristic_lengths.py +++ b/aviary/subsystems/geometry/flops_based/characteristic_lengths.py @@ -36,7 +36,7 @@ def setup(self): add_aviary_input(self, Aircraft.Fuselage.LENGTH, 0.0) 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.ASPECT_RATIO, 0.0) # 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) From 3ab0e66e2ff829e2a602b88d2b957f4ab9d4525c Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Tue, 5 Nov 2024 14:43:46 -0800 Subject: [PATCH 14/23] set Aircraft.HorizontalTail.ASPECT_RATIO = 0.0, Aircraft.HorizontalTail.TAPER_RATIO = 0.0 in prep_geom.py --- aviary/subsystems/geometry/flops_based/prep_geom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aviary/subsystems/geometry/flops_based/prep_geom.py b/aviary/subsystems/geometry/flops_based/prep_geom.py index 2d54dab22..e686f7f74 100644 --- a/aviary/subsystems/geometry/flops_based/prep_geom.py +++ b/aviary/subsystems/geometry/flops_based/prep_geom.py @@ -129,9 +129,9 @@ def setup(self): add_aviary_input(self, Aircraft.HorizontalTail.AREA, 0.0) add_aviary_input(self, Aircraft.HorizontalTail.ASPECT_RATIO, - 4.75, units="unitless") + 0.0, units="unitless") add_aviary_input(self, Aircraft.HorizontalTail.TAPER_RATIO, - 0.352, units="unitless") + 0.0, units="unitless") add_aviary_input(self, Aircraft.HorizontalTail.THICKNESS_TO_CHORD, 0.0) add_aviary_input(self, Aircraft.VerticalTail.AREA, 0.0) From 3a24e90adec2dc99e4e776377d4583f0a4860689 Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Tue, 5 Nov 2024 14:44:26 -0800 Subject: [PATCH 15/23] set Aircraft.HorizontalTail.ASPECT_RATIO = 0.0, Aircraft.HorizontalTail.TAPER_RATIO = 0.0 in empennage.py --- aviary/subsystems/geometry/gasp_based/empennage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aviary/subsystems/geometry/gasp_based/empennage.py b/aviary/subsystems/geometry/gasp_based/empennage.py index c0133bc54..85b38b032 100644 --- a/aviary/subsystems/geometry/gasp_based/empennage.py +++ b/aviary/subsystems/geometry/gasp_based/empennage.py @@ -130,9 +130,9 @@ def setup(self): ), ) self.add_input( - "ar", 4.75, units="unitless", desc="ARHT | ARVT: Tail aspect ratio.") + "ar", 0.0, units="unitless", desc="ARHT | ARVT: Tail aspect ratio.") self.add_input( - "tr", 0.352, units="unitless", desc="SLMH | SLMV: Tail taper ratio.") + "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") From b74e698856c75ae4fb7eb3b5d47979b67b69f1c0 Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Tue, 5 Nov 2024 15:07:06 -0800 Subject: [PATCH 16/23] set Aircraft.HorizontalTail.TAPER_RATIO = 0 in horizontal_tail.py --- aviary/subsystems/mass/flops_based/horizontal_tail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aviary/subsystems/mass/flops_based/horizontal_tail.py b/aviary/subsystems/mass/flops_based/horizontal_tail.py index 3c182a5b2..c775a52b8 100644 --- a/aviary/subsystems/mass/flops_based/horizontal_tail.py +++ b/aviary/subsystems/mass/flops_based/horizontal_tail.py @@ -20,7 +20,7 @@ def initialize(self): def setup(self): add_aviary_input(self, Aircraft.HorizontalTail.AREA, val=0.0) - add_aviary_input(self, Aircraft.HorizontalTail.TAPER_RATIO, val=0.352) + add_aviary_input(self, Aircraft.HorizontalTail.TAPER_RATIO, val=0.0) add_aviary_input(self, Mission.Design.GROSS_MASS, val=0.0) From 1ea807b709370b2ebe42c3d9d639d1fd64c3bd67 Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Tue, 5 Nov 2024 16:13:23 -0800 Subject: [PATCH 17/23] Restoring old source code --- .../subsystems/geometry/flops_based/characteristic_lengths.py | 2 +- aviary/subsystems/geometry/flops_based/prep_geom.py | 4 ++-- aviary/subsystems/geometry/gasp_based/empennage.py | 4 ++-- aviary/subsystems/mass/flops_based/horizontal_tail.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/aviary/subsystems/geometry/flops_based/characteristic_lengths.py b/aviary/subsystems/geometry/flops_based/characteristic_lengths.py index 92148f338..474fa7381 100644 --- a/aviary/subsystems/geometry/flops_based/characteristic_lengths.py +++ b/aviary/subsystems/geometry/flops_based/characteristic_lengths.py @@ -36,7 +36,7 @@ def setup(self): add_aviary_input(self, Aircraft.Fuselage.LENGTH, 0.0) add_aviary_input(self, Aircraft.HorizontalTail.AREA, 0.0) - add_aviary_input(self, Aircraft.HorizontalTail.ASPECT_RATIO, 0.0) + add_aviary_input(self, Aircraft.HorizontalTail.ASPECT_RATIO, 4.75) # 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) diff --git a/aviary/subsystems/geometry/flops_based/prep_geom.py b/aviary/subsystems/geometry/flops_based/prep_geom.py index e686f7f74..2d54dab22 100644 --- a/aviary/subsystems/geometry/flops_based/prep_geom.py +++ b/aviary/subsystems/geometry/flops_based/prep_geom.py @@ -129,9 +129,9 @@ def setup(self): add_aviary_input(self, Aircraft.HorizontalTail.AREA, 0.0) add_aviary_input(self, Aircraft.HorizontalTail.ASPECT_RATIO, - 0.0, units="unitless") + 4.75, units="unitless") add_aviary_input(self, Aircraft.HorizontalTail.TAPER_RATIO, - 0.0, units="unitless") + 0.352, units="unitless") add_aviary_input(self, Aircraft.HorizontalTail.THICKNESS_TO_CHORD, 0.0) add_aviary_input(self, Aircraft.VerticalTail.AREA, 0.0) diff --git a/aviary/subsystems/geometry/gasp_based/empennage.py b/aviary/subsystems/geometry/gasp_based/empennage.py index 85b38b032..c0133bc54 100644 --- a/aviary/subsystems/geometry/gasp_based/empennage.py +++ b/aviary/subsystems/geometry/gasp_based/empennage.py @@ -130,9 +130,9 @@ def setup(self): ), ) self.add_input( - "ar", 0.0, units="unitless", desc="ARHT | ARVT: Tail aspect ratio.") + "ar", 4.75, units="unitless", desc="ARHT | ARVT: Tail aspect ratio.") self.add_input( - "tr", 0.0, units="unitless", desc="SLMH | SLMV: Tail taper ratio.") + "tr", 0.352, 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") diff --git a/aviary/subsystems/mass/flops_based/horizontal_tail.py b/aviary/subsystems/mass/flops_based/horizontal_tail.py index c775a52b8..3c182a5b2 100644 --- a/aviary/subsystems/mass/flops_based/horizontal_tail.py +++ b/aviary/subsystems/mass/flops_based/horizontal_tail.py @@ -20,7 +20,7 @@ def initialize(self): def setup(self): add_aviary_input(self, Aircraft.HorizontalTail.AREA, val=0.0) - add_aviary_input(self, Aircraft.HorizontalTail.TAPER_RATIO, val=0.0) + add_aviary_input(self, Aircraft.HorizontalTail.TAPER_RATIO, val=0.352) add_aviary_input(self, Mission.Design.GROSS_MASS, val=0.0) From bc069183310e6f47ee848b8e68da5ae4cc02f7a8 Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Fri, 8 Nov 2024 13:18:25 -0800 Subject: [PATCH 18/23] set use_both_geometries=False --- aviary/subsystems/geometry/test/test_flops_geom_builder.py | 4 ++-- aviary/subsystems/geometry/test/test_gasp_geom_builder.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aviary/subsystems/geometry/test/test_flops_geom_builder.py b/aviary/subsystems/geometry/test/test_flops_geom_builder.py index ccdedb37d..7451275fa 100644 --- a/aviary/subsystems/geometry/test/test_flops_geom_builder.py +++ b/aviary/subsystems/geometry/test/test_flops_geom_builder.py @@ -25,7 +25,7 @@ def setUp(self): self.subsystem_builder = CoreGeometryBuilder( 'core_geometry', BaseMetaData, - use_both_geometries=True, + use_both_geometries=False, code_origin_to_prioritize=FLOPS) self.aviary_values = av.AviaryValues() self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') @@ -58,7 +58,7 @@ def setUp(self): self.subsystem_builder = CoreGeometryBuilder( 'core_geometry', BaseMetaData, - use_both_geometries=True, + use_both_geometries=False, code_origin_to_prioritize=FLOPS) self.aviary_values = av.AviaryValues() self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') diff --git a/aviary/subsystems/geometry/test/test_gasp_geom_builder.py b/aviary/subsystems/geometry/test/test_gasp_geom_builder.py index 9bedeabbe..2f7757947 100644 --- a/aviary/subsystems/geometry/test/test_gasp_geom_builder.py +++ b/aviary/subsystems/geometry/test/test_gasp_geom_builder.py @@ -25,7 +25,7 @@ def setUp(self): self.subsystem_builder = CoreGeometryBuilder( 'core_geometry', BaseMetaData, - use_both_geometries=True, + use_both_geometries=False, code_origin_to_prioritize=GASP) self.aviary_values = av.AviaryValues() self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') @@ -58,7 +58,7 @@ def setUp(self): self.subsystem_builder = CoreGeometryBuilder( 'core_geometry', BaseMetaData, - use_both_geometries=True, + use_both_geometries=False, code_origin_to_prioritize=GASP) self.aviary_values = av.AviaryValues() self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') From 83c51082ba38c37cf82dd3fa64d0724cc90de89b Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Fri, 8 Nov 2024 14:02:24 -0800 Subject: [PATCH 19/23] switch back to use_both_geometries=True in TestFLOPSGeomBuilder because unit tests fail. --- aviary/subsystems/geometry/test/test_flops_geom_builder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aviary/subsystems/geometry/test/test_flops_geom_builder.py b/aviary/subsystems/geometry/test/test_flops_geom_builder.py index 7451275fa..ccdedb37d 100644 --- a/aviary/subsystems/geometry/test/test_flops_geom_builder.py +++ b/aviary/subsystems/geometry/test/test_flops_geom_builder.py @@ -25,7 +25,7 @@ def setUp(self): self.subsystem_builder = CoreGeometryBuilder( 'core_geometry', BaseMetaData, - use_both_geometries=False, + use_both_geometries=True, code_origin_to_prioritize=FLOPS) self.aviary_values = av.AviaryValues() self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') @@ -58,7 +58,7 @@ def setUp(self): self.subsystem_builder = CoreGeometryBuilder( 'core_geometry', BaseMetaData, - use_both_geometries=False, + use_both_geometries=True, code_origin_to_prioritize=FLOPS) self.aviary_values = av.AviaryValues() self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') From 8d72194e3389354fb3bf89713951e7edb780c38e Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Fri, 8 Nov 2024 14:41:23 -0800 Subject: [PATCH 20/23] switch back to use_both_geometries=True in TestGASPGeomBuilder because unit tests fail. --- aviary/subsystems/geometry/test/test_gasp_geom_builder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aviary/subsystems/geometry/test/test_gasp_geom_builder.py b/aviary/subsystems/geometry/test/test_gasp_geom_builder.py index 2f7757947..9bedeabbe 100644 --- a/aviary/subsystems/geometry/test/test_gasp_geom_builder.py +++ b/aviary/subsystems/geometry/test/test_gasp_geom_builder.py @@ -25,7 +25,7 @@ def setUp(self): self.subsystem_builder = CoreGeometryBuilder( 'core_geometry', BaseMetaData, - use_both_geometries=False, + use_both_geometries=True, code_origin_to_prioritize=GASP) self.aviary_values = av.AviaryValues() self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') @@ -58,7 +58,7 @@ def setUp(self): self.subsystem_builder = CoreGeometryBuilder( 'core_geometry', BaseMetaData, - use_both_geometries=False, + use_both_geometries=True, code_origin_to_prioritize=GASP) self.aviary_values = av.AviaryValues() self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') From 611e7ae918ea786e03f12c6fa56d833ee91bb498 Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Tue, 12 Nov 2024 17:05:57 -0800 Subject: [PATCH 21/23] Update aviary/subsystems/geometry/test/test_flops_geom_builder.py Set use+both+geometries=False and add code_origin=FLOPS. Give it a try. Co-authored-by: crecine <51181861+crecine@users.noreply.github.com> --- aviary/subsystems/geometry/test/test_flops_geom_builder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aviary/subsystems/geometry/test/test_flops_geom_builder.py b/aviary/subsystems/geometry/test/test_flops_geom_builder.py index ccdedb37d..fa2fd4bb4 100644 --- a/aviary/subsystems/geometry/test/test_flops_geom_builder.py +++ b/aviary/subsystems/geometry/test/test_flops_geom_builder.py @@ -25,7 +25,8 @@ def setUp(self): self.subsystem_builder = CoreGeometryBuilder( 'core_geometry', BaseMetaData, - use_both_geometries=True, + use_both_geometries=False, + code_origin=FLOPS, code_origin_to_prioritize=FLOPS) self.aviary_values = av.AviaryValues() self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') From 42efacb2ccc91301c54ddf682e8ae7f7b1e62b41 Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Tue, 12 Nov 2024 18:04:08 -0800 Subject: [PATCH 22/23] Update test_flops_geom_builder.py Some change as earlier. --- aviary/subsystems/geometry/test/test_flops_geom_builder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aviary/subsystems/geometry/test/test_flops_geom_builder.py b/aviary/subsystems/geometry/test/test_flops_geom_builder.py index fa2fd4bb4..fb8e44cde 100644 --- a/aviary/subsystems/geometry/test/test_flops_geom_builder.py +++ b/aviary/subsystems/geometry/test/test_flops_geom_builder.py @@ -59,7 +59,8 @@ def setUp(self): self.subsystem_builder = CoreGeometryBuilder( 'core_geometry', BaseMetaData, - use_both_geometries=True, + use_both_geometries=False, + code_origin=FLOPS, code_origin_to_prioritize=FLOPS) self.aviary_values = av.AviaryValues() self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') From 449f79ae4108c5143933ba616401445f210d2523 Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Tue, 12 Nov 2024 18:05:13 -0800 Subject: [PATCH 23/23] Update test_gasp_geom_builder.py same as earlier update. --- aviary/subsystems/geometry/test/test_gasp_geom_builder.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aviary/subsystems/geometry/test/test_gasp_geom_builder.py b/aviary/subsystems/geometry/test/test_gasp_geom_builder.py index 9bedeabbe..9443845bd 100644 --- a/aviary/subsystems/geometry/test/test_gasp_geom_builder.py +++ b/aviary/subsystems/geometry/test/test_gasp_geom_builder.py @@ -25,7 +25,8 @@ def setUp(self): self.subsystem_builder = CoreGeometryBuilder( 'core_geometry', BaseMetaData, - use_both_geometries=True, + use_both_geometries=False, + code_origin=GASP, code_origin_to_prioritize=GASP) self.aviary_values = av.AviaryValues() self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless') @@ -58,7 +59,8 @@ def setUp(self): self.subsystem_builder = CoreGeometryBuilder( 'core_geometry', BaseMetaData, - use_both_geometries=True, + use_both_geometries=False, + code_origin=GASP, code_origin_to_prioritize=GASP) self.aviary_values = av.AviaryValues() self.aviary_values.set_val(Aircraft.Engine.NUM_ENGINES, [1], units='unitless')