From 0b55d984377ef86829e521ee8884130492f307a2 Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Mon, 13 Jan 2025 11:36:59 -0800 Subject: [PATCH] rename Aircraft.Wing.MOUNTING_TYPE to Aircraft.Wing.MOUNT_LOCATION because it is wing location on fuselage between 0 and 1. --- .../large_single_aisle_1_GwGm.csv | 2 +- .../large_turboprop_freighter.csv | 2 +- .../small_single_aisle/small_single_aisle_GwGm.csv | 2 +- .../models/test_aircraft/aircraft_for_bench_FwGm.csv | 2 +- .../models/test_aircraft/aircraft_for_bench_GwFm.csv | 2 +- .../models/test_aircraft/aircraft_for_bench_GwGm.csv | 2 +- .../test_aircraft/aircraft_for_bench_GwGm_lbm_s.csv | 2 +- .../converter_configuration_test_data_GwGm.csv | 2 +- .../subsystems/aerodynamics/aerodynamics_builder.py | 2 +- .../subsystems/aerodynamics/gasp_based/gaspaero.py | 4 ++-- .../aerodynamics/gasp_based/interference.py | 4 ++-- .../aerodynamics/gasp_based/test/test_gaspaero.py | 2 +- .../gasp_based/test/test_interference.py | 4 ++-- aviary/subsystems/mass/gasp_based/fixed.py | 6 +++--- aviary/subsystems/mass/gasp_based/test/test_fixed.py | 8 ++++---- .../mass/gasp_based/test/test_mass_summation.py | 4 ++-- aviary/variable_info/variable_meta_data.py | 3 ++- aviary/variable_info/variables.py | 2 +- aviary/visualization/aircraft_3d_model.py | 12 ++++++------ 19 files changed, 34 insertions(+), 33 deletions(-) diff --git a/aviary/models/large_single_aisle_1/large_single_aisle_1_GwGm.csv b/aviary/models/large_single_aisle_1/large_single_aisle_1_GwGm.csv index 09894b55c..fae81fc61 100644 --- a/aviary/models/large_single_aisle_1/large_single_aisle_1_GwGm.csv +++ b/aviary/models/large_single_aisle_1/large_single_aisle_1_GwGm.csv @@ -126,7 +126,7 @@ aircraft:wing:max_slat_deflection_landing,10,deg aircraft:wing:max_slat_deflection_takeoff,10,deg aircraft:wing:max_thickness_location,0.4,unitless aircraft:wing:min_pressure_location,0.3,unitless -aircraft:wing:mounting_type,0,unitless +aircraft:wing:mount_location,0,unitless aircraft:wing:num_flap_segments,2,unitless aircraft:wing:optimum_flap_deflection,55,deg aircraft:wing:optimum_slat_deflection,20,deg diff --git a/aviary/models/large_turboprop_freighter/large_turboprop_freighter.csv b/aviary/models/large_turboprop_freighter/large_turboprop_freighter.csv index 2fc5ebf5f..a3c028db8 100644 --- a/aviary/models/large_turboprop_freighter/large_turboprop_freighter.csv +++ b/aviary/models/large_turboprop_freighter/large_turboprop_freighter.csv @@ -160,7 +160,7 @@ aircraft:wing:max_slat_deflection_landing, 0, deg aircraft:wing:max_slat_deflection_takeoff, 0, deg aircraft:wing:max_thickness_location, 0.35, unitless aircraft:wing:min_pressure_location, 0.3, unitless -aircraft:wing:mounting_type, 1, unitless +aircraft:wing:mount_location, 1, unitless aircraft:wing:num_flap_segments, 2, unitless aircraft:wing:optimum_flap_deflection, 55, deg aircraft:wing:optimum_slat_deflection, 45, deg diff --git a/aviary/models/small_single_aisle/small_single_aisle_GwGm.csv b/aviary/models/small_single_aisle/small_single_aisle_GwGm.csv index 0d7afc190..385f1fbda 100644 --- a/aviary/models/small_single_aisle/small_single_aisle_GwGm.csv +++ b/aviary/models/small_single_aisle/small_single_aisle_GwGm.csv @@ -125,7 +125,7 @@ aircraft:wing:max_slat_deflection_landing,10,deg aircraft:wing:max_slat_deflection_takeoff,10,deg aircraft:wing:max_thickness_location,0.35,unitless aircraft:wing:min_pressure_location,0.3,unitless -aircraft:wing:mounting_type,0,unitless +aircraft:wing:mount_location,0,unitless aircraft:wing:num_flap_segments,2,unitless aircraft:wing:optimum_flap_deflection,20,deg aircraft:wing:optimum_slat_deflection,20,deg diff --git a/aviary/models/test_aircraft/aircraft_for_bench_FwGm.csv b/aviary/models/test_aircraft/aircraft_for_bench_FwGm.csv index 8d97f49aa..1a31d5680 100644 --- a/aviary/models/test_aircraft/aircraft_for_bench_FwGm.csv +++ b/aviary/models/test_aircraft/aircraft_for_bench_FwGm.csv @@ -126,7 +126,7 @@ aircraft:wing:max_slat_deflection_landing,10,deg aircraft:wing:max_slat_deflection_takeoff,10,deg aircraft:wing:max_thickness_location,0.4,unitless aircraft:wing:min_pressure_location,0.3,unitless -aircraft:wing:mounting_type,0,unitless +aircraft:wing:mount_location,0,unitless aircraft:wing:num_flap_segments,2,unitless aircraft:wing:optimum_flap_deflection,55,deg aircraft:wing:optimum_slat_deflection,20,deg diff --git a/aviary/models/test_aircraft/aircraft_for_bench_GwFm.csv b/aviary/models/test_aircraft/aircraft_for_bench_GwFm.csv index 84956f3f6..b50b4a888 100644 --- a/aviary/models/test_aircraft/aircraft_for_bench_GwFm.csv +++ b/aviary/models/test_aircraft/aircraft_for_bench_GwFm.csv @@ -236,7 +236,7 @@ aircraft:wing:max_camber_at_70_semispan,0.0,unitless aircraft:wing:max_thickness_location,0.4,unitless aircraft:wing:min_pressure_location,0.3,unitless aircraft:wing:misc_mass_scaler,1.0,unitless -aircraft:wing:mounting_type,0,unitless +aircraft:wing:mount_location,0,unitless aircraft:wing:num_integration_stations,50,unitless aircraft:wing:shear_control_mass_scaler,1.0,unitless aircraft:wing:span_efficiency_reduction,False,unitless diff --git a/aviary/models/test_aircraft/aircraft_for_bench_GwGm.csv b/aviary/models/test_aircraft/aircraft_for_bench_GwGm.csv index 3a052eca2..c884f14d6 100644 --- a/aviary/models/test_aircraft/aircraft_for_bench_GwGm.csv +++ b/aviary/models/test_aircraft/aircraft_for_bench_GwGm.csv @@ -125,7 +125,7 @@ aircraft:wing:max_slat_deflection_landing,10,deg aircraft:wing:max_slat_deflection_takeoff,10,deg aircraft:wing:max_thickness_location,0.4,unitless aircraft:wing:min_pressure_location,0.3,unitless -aircraft:wing:mounting_type,0,unitless +aircraft:wing:mount_location,0,unitless aircraft:wing:num_flap_segments,2,unitless aircraft:wing:optimum_flap_deflection,55,deg aircraft:wing:optimum_slat_deflection,20,deg diff --git a/aviary/models/test_aircraft/aircraft_for_bench_GwGm_lbm_s.csv b/aviary/models/test_aircraft/aircraft_for_bench_GwGm_lbm_s.csv index 59605ee88..f0bf304fb 100644 --- a/aviary/models/test_aircraft/aircraft_for_bench_GwGm_lbm_s.csv +++ b/aviary/models/test_aircraft/aircraft_for_bench_GwGm_lbm_s.csv @@ -126,7 +126,7 @@ aircraft:wing:max_slat_deflection_landing,10,deg aircraft:wing:max_slat_deflection_takeoff,10,deg aircraft:wing:max_thickness_location,0.4,unitless aircraft:wing:min_pressure_location,0.3,unitless -aircraft:wing:mounting_type,0,unitless +aircraft:wing:mount_location,0,unitless aircraft:wing:num_flap_segments,2,unitless aircraft:wing:optimum_flap_deflection,55,deg aircraft:wing:optimum_slat_deflection,20,deg diff --git a/aviary/models/test_aircraft/converter_configuration_test_data_GwGm.csv b/aviary/models/test_aircraft/converter_configuration_test_data_GwGm.csv index 7b23f37b1..8b465590e 100644 --- a/aviary/models/test_aircraft/converter_configuration_test_data_GwGm.csv +++ b/aviary/models/test_aircraft/converter_configuration_test_data_GwGm.csv @@ -124,7 +124,7 @@ aircraft:wing:max_slat_deflection_landing,10,deg aircraft:wing:max_slat_deflection_takeoff,10,deg aircraft:wing:max_thickness_location,0.35,unitless aircraft:wing:min_pressure_location,0.3,unitless -aircraft:wing:mounting_type,1,unitless +aircraft:wing:mount_location,1,unitless aircraft:wing:num_flap_segments,2,unitless aircraft:wing:optimum_flap_deflection,55,deg aircraft:wing:optimum_slat_deflection,20,deg diff --git a/aviary/subsystems/aerodynamics/aerodynamics_builder.py b/aviary/subsystems/aerodynamics/aerodynamics_builder.py index 0dd98dfd8..797aeaee7 100644 --- a/aviary/subsystems/aerodynamics/aerodynamics_builder.py +++ b/aviary/subsystems/aerodynamics/aerodynamics_builder.py @@ -598,7 +598,7 @@ def report(self, prob, reports_folder, **kwargs): Aircraft.Wing.FUSELAGE_INTERFERENCE_FACTOR, Aircraft.Wing.MAX_THICKNESS_LOCATION, Aircraft.Wing.MIN_PRESSURE_LOCATION, - Aircraft.Wing.MOUNTING_TYPE, + Aircraft.Wing.MOUNT_LOCATION, Aircraft.Wing.SPAN, Aircraft.Wing.SWEEP, Aircraft.Wing.TAPER_RATIO, diff --git a/aviary/subsystems/aerodynamics/gasp_based/gaspaero.py b/aviary/subsystems/aerodynamics/gasp_based/gaspaero.py index cd45e5a5c..664a87363 100644 --- a/aviary/subsystems/aerodynamics/gasp_based/gaspaero.py +++ b/aviary/subsystems/aerodynamics/gasp_based/gaspaero.py @@ -165,7 +165,7 @@ def setup(self): add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD_ROOT, val=0.15) - add_aviary_input(self, Aircraft.Wing.MOUNTING_TYPE, val=0.0) + add_aviary_input(self, Aircraft.Wing.MOUNT_LOCATION, val=0.0) add_aviary_input(self, Aircraft.HorizontalTail.VERTICAL_TAIL_FRACTION, val=0.0) @@ -202,7 +202,7 @@ def setup_partials(self): Aircraft.HorizontalTail.VERTICAL_TAIL_FRACTION, Aircraft.VerticalTail.SPAN, Aircraft.Fuselage.AVG_DIAMETER, - Aircraft.Wing.MOUNTING_TYPE, + Aircraft.Wing.MOUNT_LOCATION, Aircraft.Wing.THICKNESS_TO_CHORD_ROOT, Aircraft.Wing.AREA, Aircraft.Wing.SPAN, diff --git a/aviary/subsystems/aerodynamics/gasp_based/interference.py b/aviary/subsystems/aerodynamics/gasp_based/interference.py index 4169849f5..268a0407e 100644 --- a/aviary/subsystems/aerodynamics/gasp_based/interference.py +++ b/aviary/subsystems/aerodynamics/gasp_based/interference.py @@ -51,7 +51,7 @@ class CommonVariables(om.ExplicitComponent): def setup(self): self.add_input('CROOT') - add_aviary_input(self, Aircraft.Wing.MOUNTING_TYPE) + add_aviary_input(self, Aircraft.Wing.MOUNT_LOCATION) add_aviary_input(self, Aircraft.Wing.THICKNESS_TO_CHORD_ROOT) add_aviary_input(self, Aircraft.Fuselage.AVG_DIAMETER) @@ -65,7 +65,7 @@ def compute(self, inputs, outputs): outputs['wtofd'] = TCR*CROOT/SWF # wing_thickness_over_fuselage_diameter def setup_partials(self): - self.declare_partials('ZW_RF', [Aircraft.Wing.MOUNTING_TYPE], val=2) + self.declare_partials('ZW_RF', [Aircraft.Wing.MOUNT_LOCATION], val=2) self.declare_partials( 'wtofd', [ Aircraft.Wing.THICKNESS_TO_CHORD_ROOT, diff --git a/aviary/subsystems/aerodynamics/gasp_based/test/test_gaspaero.py b/aviary/subsystems/aerodynamics/gasp_based/test/test_gaspaero.py index ed962e8ed..9be6b7c15 100644 --- a/aviary/subsystems/aerodynamics/gasp_based/test/test_gaspaero.py +++ b/aviary/subsystems/aerodynamics/gasp_based/test/test_gaspaero.py @@ -172,7 +172,7 @@ def _init_geom(prob): prob.set_val(Aircraft.Wing.AVERAGE_CHORD, setup_data["cbarw"]) prob.set_val(Aircraft.Wing.TAPER_RATIO, setup_data["slm"]) prob.set_val(Aircraft.Wing.THICKNESS_TO_CHORD_ROOT, setup_data["tcr"]) - prob.set_val(Aircraft.Wing.MOUNTING_TYPE, setup_data["hwing"]) + prob.set_val(Aircraft.Wing.MOUNT_LOCATION, setup_data["hwing"]) prob.set_val(Aircraft.HorizontalTail.VERTICAL_TAIL_FRACTION, setup_data["sah"]) prob.set_val(Aircraft.HorizontalTail.SPAN, setup_data["bht"]) prob.set_val(Aircraft.VerticalTail.SPAN, setup_data["bvt"]) diff --git a/aviary/subsystems/aerodynamics/gasp_based/test/test_interference.py b/aviary/subsystems/aerodynamics/gasp_based/test/test_interference.py index e301f8524..b67a9a23a 100644 --- a/aviary/subsystems/aerodynamics/gasp_based/test/test_interference.py +++ b/aviary/subsystems/aerodynamics/gasp_based/test/test_interference.py @@ -36,7 +36,7 @@ def test_common_vars(self): prob.setup(force_alloc_complex=True) prob.set_val('CROOT', 12) - prob.set_val(Aircraft.Wing.MOUNTING_TYPE, .1) + prob.set_val(Aircraft.Wing.MOUNT_LOCATION, .1) prob.set_val(Aircraft.Wing.THICKNESS_TO_CHORD_ROOT, .12) prob.set_val(Aircraft.Fuselage.AVG_DIAMETER, 10) @@ -121,7 +121,7 @@ def test_complete_group(self): prob.set_val(Aircraft.Wing.AREA, 1400) prob.set_val(Aircraft.Wing.SPAN, 118) prob.set_val(Aircraft.Wing.TAPER_RATIO, .9) - prob.set_val(Aircraft.Wing.MOUNTING_TYPE, .1) + prob.set_val(Aircraft.Wing.MOUNT_LOCATION, .1) prob.set_val(Aircraft.Wing.THICKNESS_TO_CHORD_ROOT, .12) prob.set_val(Aircraft.Wing.THICKNESS_TO_CHORD_TIP, .1) prob.set_val(Aircraft.Fuselage.AVG_DIAMETER, 12) diff --git a/aviary/subsystems/mass/gasp_based/fixed.py b/aviary/subsystems/mass/gasp_based/fixed.py index 84fd865a0..c136b7fc3 100644 --- a/aviary/subsystems/mass/gasp_based/fixed.py +++ b/aviary/subsystems/mass/gasp_based/fixed.py @@ -2270,7 +2270,7 @@ def initialize(self): def setup(self): num_engine_type = len(self.options[Aircraft.Engine.NUM_ENGINES]) - add_aviary_input(self, Aircraft.Wing.MOUNTING_TYPE, val=0) + add_aviary_input(self, Aircraft.Wing.MOUNT_LOCATION, val=0) add_aviary_input(self, Aircraft.LandingGear.MASS_COEFFICIENT, val=0.04) add_aviary_input(self, Mission.Design.GROSS_MASS, val=152000) add_aviary_input(self, Aircraft.LandingGear.MAIN_GEAR_MASS_COEFFICIENT, val=0.85) @@ -2291,7 +2291,7 @@ def setup(self): self.declare_partials(Aircraft.LandingGear.MAIN_GEAR_MASS, "*") def compute(self, inputs, outputs): - wing_loc = inputs[Aircraft.Wing.MOUNTING_TYPE] + wing_loc = inputs[Aircraft.Wing.MOUNT_LOCATION] c_gear_mass = inputs[Aircraft.LandingGear.MASS_COEFFICIENT] gross_wt_initial = inputs[Mission.Design.GROSS_MASS] * GRAV_ENGLISH_LBM c_main_gear = inputs[Aircraft.LandingGear.MAIN_GEAR_MASS_COEFFICIENT] @@ -2331,7 +2331,7 @@ def compute_partials(self, inputs, J): c_gear_mass = inputs[Aircraft.LandingGear.MASS_COEFFICIENT] gross_wt_initial = inputs[Mission.Design.GROSS_MASS] * GRAV_ENGLISH_LBM c_main_gear = inputs[Aircraft.LandingGear.MAIN_GEAR_MASS_COEFFICIENT] - wing_loc = inputs[Aircraft.Wing.MOUNTING_TYPE] + wing_loc = inputs[Aircraft.Wing.MOUNT_LOCATION] clearance_ratio = inputs[Aircraft.Nacelle.CLEARANCE_RATIO] nacelle_diam = inputs[Aircraft.Nacelle.AVG_DIAMETER] diff --git a/aviary/subsystems/mass/gasp_based/test/test_fixed.py b/aviary/subsystems/mass/gasp_based/test/test_fixed.py index 8a95ece97..1969df4fa 100644 --- a/aviary/subsystems/mass/gasp_based/test/test_fixed.py +++ b/aviary/subsystems/mass/gasp_based/test/test_fixed.py @@ -888,7 +888,7 @@ def setUp(self): Aircraft.Nacelle.AVG_DIAMETER, val=7.35, units="ft" ) # bug fixed value and original value self.prob.model.set_input_defaults( - Aircraft.Wing.MOUNTING_TYPE, val=0, units="unitless") + Aircraft.Wing.MOUNT_LOCATION, val=0, units="unitless") self.prob.setup(check=False, force_alloc_complex=True) @@ -927,7 +927,7 @@ def setUp(self): Aircraft.LandingGear.MAIN_GEAR_MASS_COEFFICIENT, val=0.85, units="unitless" ) # bug fixed value and original value self.prob.model.set_input_defaults( - Aircraft.Wing.MOUNTING_TYPE, val=0.1, units="unitless") + Aircraft.Wing.MOUNT_LOCATION, val=0.1, units="unitless") setup_model_options(self.prob, options) @@ -1261,7 +1261,7 @@ def setUp(self): Aircraft.Wing.SPAN, val=117.8, units="ft" ) # original GASP value self.prob.model.set_input_defaults( - Aircraft.Wing.MOUNTING_TYPE, val=.1, units="unitless") + Aircraft.Wing.MOUNT_LOCATION, val=.1, units="unitless") self.prob.model.set_input_defaults( Mission.Design.GROSS_MASS, val=175400, units="lbm" ) # bug fixed value and original value @@ -1600,7 +1600,7 @@ def test_case1(self): Aircraft.Engine.HAS_PROPELLERS: ([False], 'unitless'), Aircraft.Wing.FLAP_TYPE: ('plain', 'unitless'), Aircraft.Wing.SWEEP: (30.0, 'deg'), - Aircraft.Wing.MOUNTING_TYPE: (0, 'unitless'), + Aircraft.Wing.MOUNT_LOCATION: (0, 'unitless'), Aircraft.Wing.TAPER_RATIO: (0.25, 'unitless'), Aircraft.Wing.ASPECT_RATIO: (11.0, 'unitless'), Aircraft.Wing.SPAN: (100.0, 'ft'), diff --git a/aviary/subsystems/mass/gasp_based/test/test_mass_summation.py b/aviary/subsystems/mass/gasp_based/test/test_mass_summation.py index 94a671914..2382b7908 100644 --- a/aviary/subsystems/mass/gasp_based/test/test_mass_summation.py +++ b/aviary/subsystems/mass/gasp_based/test/test_mass_summation.py @@ -2601,7 +2601,7 @@ def setUp(self): ) self.prob.model.set_input_defaults(Aircraft.Wing.SWEEP, val=22.47, units="deg") self.prob.model.set_input_defaults( - Aircraft.Wing.MOUNTING_TYPE, val=.1, units="unitless") + Aircraft.Wing.MOUNT_LOCATION, val=.1, units="unitless") self.prob.model.set_input_defaults( Aircraft.Wing.ASPECT_RATIO, val=19.565, units="unitless" ) @@ -2995,7 +2995,7 @@ def setUp(self): ) self.prob.model.set_input_defaults(Aircraft.Wing.SWEEP, val=22.47, units="deg") self.prob.model.set_input_defaults( - Aircraft.Wing.MOUNTING_TYPE, val=.1, units="unitless") + Aircraft.Wing.MOUNT_LOCATION, val=.1, units="unitless") self.prob.model.set_input_defaults( Aircraft.Wing.ASPECT_RATIO, val=19.565, units="unitless" ) diff --git a/aviary/variable_info/variable_meta_data.py b/aviary/variable_info/variable_meta_data.py index ce0953edf..fdb62b00a 100644 --- a/aviary/variable_info/variable_meta_data.py +++ b/aviary/variable_info/variable_meta_data.py @@ -5720,11 +5720,12 @@ ) add_meta_data( - Aircraft.Wing.MOUNTING_TYPE, + Aircraft.Wing.MOUNT_LOCATION, meta_data=_MetaData, historical_name={"GASP": 'INGASP.HWING', "FLOPS": None, "LEAPS1": None}, units='unitless', desc='wing location on fuselage (0 = low wing, 1 = high wing)', + default_value=0.0, ) add_meta_data( diff --git a/aviary/variable_info/variables.py b/aviary/variable_info/variables.py index 9e8b2a709..e97803ae3 100644 --- a/aviary/variable_info/variables.py +++ b/aviary/variable_info/variables.py @@ -572,7 +572,7 @@ class Wing: MIN_PRESSURE_LOCATION = 'aircraft:wing:min_pressure_location' MISC_MASS = 'aircraft:wing:misc_mass' MISC_MASS_SCALER = 'aircraft:wing:misc_mass_scaler' - MOUNTING_TYPE = 'aircraft:wing:mounting_type' + MOUNT_LOCATION = 'aircraft:wing:mount_location' NUM_FLAP_SEGMENTS = 'aircraft:wing:num_flap_segments' NUM_INTEGRATION_STATIONS = 'aircraft:wing:num_integration_stations' OPTIMUM_FLAP_DEFLECTION = 'aircraft:wing:optimum_flap_deflection' diff --git a/aviary/visualization/aircraft_3d_model.py b/aviary/visualization/aircraft_3d_model.py index 2adbf26fb..cd1d68a11 100644 --- a/aviary/visualization/aircraft_3d_model.py +++ b/aviary/visualization/aircraft_3d_model.py @@ -539,7 +539,7 @@ class HorizontalWing(object): Chord at the top of the wing. _position_along_fuselage : float Position of the wing along the fuselage. - _mounting_type : float + _mount_location : float wing location on fuselage (0 = low wing, 1 = high wing, can be fractions). _fuselage : Fuselage The Fuselage object used to represent the fuselage of the aircraft. @@ -556,7 +556,7 @@ def __init__(self, reader, fuselage, wing_type): self._sweep_angle = None self._chord_tip = None self._position_along_fuselage = None - self._mounting_type = None + self._mount_location = None self._fuselage = fuselage self._wing_type = wing_type @@ -601,13 +601,13 @@ def read_variables(self): self._chord_tip = self._chord * taper_ratio if self._wing_type == WingType.WING: try: - mounting_type = self._reader.get_variable_from_case( - "aircraft:wing:mounting_type" + mount_location = self._reader.get_variable_from_case( + "aircraft:wing:mount_location" ) except AircraftModelReaderError: - mounting_type = 0.0 + mount_location = 0.0 self._vertical_position = ( - 2.0 * (mounting_type - 0.5) * self._fuselage.radius + 2.0 * (mount_location - 0.5) * self._fuselage.radius ) self._position_along_fuselage = 0.0 elif self._wing_type == WingType.HORIZONTAL_TAIL: