From e6884c3431394ce02259c223189bfd914c66c460 Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Tue, 10 Dec 2024 14:27:58 -0500 Subject: [PATCH 01/21] moved example propellers into models/engines --- aviary/models/{ => engines}/propellers/PropFan.map | 0 aviary/models/{ => engines}/propellers/PropFan.prop | 0 aviary/models/{ => engines}/propellers/general_aviation.map | 0 aviary/models/{ => engines}/propellers/general_aviation.prop | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename aviary/models/{ => engines}/propellers/PropFan.map (100%) rename aviary/models/{ => engines}/propellers/PropFan.prop (100%) rename aviary/models/{ => engines}/propellers/general_aviation.map (100%) rename aviary/models/{ => engines}/propellers/general_aviation.prop (100%) diff --git a/aviary/models/propellers/PropFan.map b/aviary/models/engines/propellers/PropFan.map similarity index 100% rename from aviary/models/propellers/PropFan.map rename to aviary/models/engines/propellers/PropFan.map diff --git a/aviary/models/propellers/PropFan.prop b/aviary/models/engines/propellers/PropFan.prop similarity index 100% rename from aviary/models/propellers/PropFan.prop rename to aviary/models/engines/propellers/PropFan.prop diff --git a/aviary/models/propellers/general_aviation.map b/aviary/models/engines/propellers/general_aviation.map similarity index 100% rename from aviary/models/propellers/general_aviation.map rename to aviary/models/engines/propellers/general_aviation.map diff --git a/aviary/models/propellers/general_aviation.prop b/aviary/models/engines/propellers/general_aviation.prop similarity index 100% rename from aviary/models/propellers/general_aviation.prop rename to aviary/models/engines/propellers/general_aviation.prop From a23ba000680a5fda02e21cfa06b43c09a64cd560 Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Tue, 10 Dec 2024 15:19:23 -0500 Subject: [PATCH 02/21] updated fortran_to_aviary cleaned up GASP files to original status --- .../large_single_aisle_1_GwGm.dat | 1 - .../small_single_aisle_GwGm.dat | 6 - ...converter_configuration_test_data_GwGm.dat | 3 - aviary/utils/fortran_to_aviary.py | 296 ++++++++++++------ .../utils/legacy_code_data/deprecated_vars.py | 18 -- .../legacy_code_data/flops_default_values.txt | 18 -- .../utils/legacy_code_data/flops_defaults.py | 32 ++ .../legacy_code_data/gasp_default_values.dat | 157 ---------- .../utils/legacy_code_data/gasp_defaults.py | 169 ++++++++++ aviary/utils/test/test_fortran_to_aviary.py | 7 +- 10 files changed, 401 insertions(+), 306 deletions(-) delete mode 100644 aviary/utils/legacy_code_data/deprecated_vars.py delete mode 100644 aviary/utils/legacy_code_data/flops_default_values.txt create mode 100644 aviary/utils/legacy_code_data/flops_defaults.py delete mode 100644 aviary/utils/legacy_code_data/gasp_default_values.dat create mode 100644 aviary/utils/legacy_code_data/gasp_defaults.py diff --git a/aviary/models/large_single_aisle_1/large_single_aisle_1_GwGm.dat b/aviary/models/large_single_aisle_1/large_single_aisle_1_GwGm.dat index 9869b5068..4cc3b3097 100644 --- a/aviary/models/large_single_aisle_1/large_single_aisle_1_GwGm.dat +++ b/aviary/models/large_single_aisle_1/large_single_aisle_1_GwGm.dat @@ -1,5 +1,4 @@ LARGE SINGLE AISLE 1 / 23k SLS thrust turbofan -1 -1 -aircraft:engine:data_file=models/engines/turbofan_23k_1.deck $INGASP XCTCMX=.4 STATIC=.03 diff --git a/aviary/models/small_single_aisle/small_single_aisle_GwGm.dat b/aviary/models/small_single_aisle/small_single_aisle_GwGm.dat index a46cb52fd..253b395b0 100644 --- a/aviary/models/small_single_aisle/small_single_aisle_GwGm.dat +++ b/aviary/models/small_single_aisle/small_single_aisle_GwGm.dat @@ -1,11 +1,5 @@ Small Single Aisle / turbofan_24k_2 -1 - aircraft:engine:data_file=models/engines/turbofan_24k_2.deck - aircraft:engine:data_file=models/engines/turbofan_23k_1.deck !temporary - mission:summary:gross_mass=124780 - aircraft:engine:reference_diameter=6.04 - - $INGASP AS=1., ! Number of aisles in the cabin AR=11.03, ! Wing aspect ratio diff --git a/aviary/models/test_aircraft/converter_configuration_test_data_GwGm.dat b/aviary/models/test_aircraft/converter_configuration_test_data_GwGm.dat index d2c81517f..f122a074b 100644 --- a/aviary/models/test_aircraft/converter_configuration_test_data_GwGm.dat +++ b/aviary/models/test_aircraft/converter_configuration_test_data_GwGm.dat @@ -1,7 +1,4 @@ Baseline new configuration Mach 0.80 / 23k SLS thrust turbofan -1 -1 - -aircraft:engine:reference_diameter = 6.15, -aircraft:engine:data_file=models/engines/turbofan_23k_1.deck $INGASP AS=1., ! Number of aisles in the cabin diff --git a/aviary/utils/fortran_to_aviary.py b/aviary/utils/fortran_to_aviary.py index 11fdcc240..2553c68e0 100644 --- a/aviary/utils/fortran_to_aviary.py +++ b/aviary/utils/fortran_to_aviary.py @@ -1,5 +1,5 @@ """ -Fortran_to_Aviary.py is used to read in Fortran based vehicle decks and convert them to Aviary decks. +fortran_to_aviary.py is used to read in Fortran based vehicle decks and convert them to Aviary decks. FLOPS, GASP, or Aviary names can be used for variables (Ex WG or Mission:Design:GROSS_MASS) When specifying variables from FORTRAN, they should be in the appropriate NAMELIST. @@ -30,14 +30,26 @@ from aviary.variable_info.variables import Aircraft, Mission, Settings from aviary.variable_info.enums import LegacyCode, Verbosity, ProblemType from aviary.utils.functions import get_path -from aviary.utils.legacy_code_data.deprecated_vars import flops_deprecated_vars, gasp_deprecated_vars +from aviary.utils.legacy_code_data.flops_defaults import ( + flops_default_values, + flops_deprecated_vars, +) +from aviary.utils.legacy_code_data.gasp_defaults import ( + gasp_default_values, + gasp_deprecated_vars, +) FLOPS = LegacyCode.FLOPS GASP = LegacyCode.GASP -def create_aviary_deck(fortran_deck: str, legacy_code=None, defaults_deck=None, - out_file=None, force=False, verbosity=Verbosity.BRIEF): +def fortran_to_aviary( + fortran_deck: str, + legacy_code=None, + out_file=None, + force=False, + verbosity=Verbosity.BRIEF, +): ''' Create an Aviary CSV file from a Fortran input deck Required input is the filepath to the input deck and legacy code. Optionally, a @@ -51,8 +63,11 @@ def create_aviary_deck(fortran_deck: str, legacy_code=None, defaults_deck=None, # TODO generate both an Aviary input file and a phase_info file - vehicle_data = {'input_values': NamedValues(), 'unused_values': NamedValues(), - 'initialization_guesses': initialization_guesses, 'verbosity': verbosity} + vehicle_data = { + 'input_values': NamedValues(), + 'unused_values': NamedValues(), + 'initialization_guesses': initialization_guesses, + } fortran_deck: Path = get_path(fortran_deck, verbose=False) @@ -72,33 +87,62 @@ def create_aviary_deck(fortran_deck: str, legacy_code=None, defaults_deck=None, name = fortran_deck.stem out_file: Path = fortran_deck.parent.resolve().joinpath(name + '_converted.csv') + # create dictionary to convert legacy code variables to Aviary variables + # key: variable name, value: either None or relevant historical_name + aviary_variable_dict = generate_aviary_names(legacy_code.value) + + # Get legacy-code based depreciated variable list and set vehicle data to defaults if legacy_code is GASP: - default_extension = '.dat' + default_values = gasp_default_values deprecated_vars = gasp_deprecated_vars elif legacy_code is FLOPS: - default_extension = '.txt' + default_values = flops_default_values deprecated_vars = flops_deprecated_vars - if not defaults_deck: - defaults_filename = legacy_code.value.lower() + '_default_values' + default_extension - defaults_deck = Path(__file__).parent.resolve().joinpath( - 'legacy_code_data', defaults_filename) - - # create dictionary to convert legacy code variables to Aviary variables - # key: variable name, value: either None or relevant historical_name - aviary_variable_dict = generate_aviary_names([legacy_code.value]) - - if defaults_deck: # If defaults are specified, initialize the vehicle with them - vehicle_data = input_parser(defaults_deck, vehicle_data, - aviary_variable_dict, deprecated_vars, legacy_code) + # Convert default data to Aviary names, add to vehicle_data + for item in default_values: + name = item[0].split('.') + val = str(item[1][0]) + vehicle_data = process_and_store_data( + data=val, + var_name=name[1], + legacy_code=legacy_code, + current_namelist=name[0], + alternate_names=aviary_variable_dict, + default_values=default_values, + vehicle_data=vehicle_data, + unused_vars=deprecated_vars, + verbosity=verbosity, + ) + + # read in and convert input file + vehicle_data = parse_input_file( + fortran_deck, + vehicle_data, + aviary_variable_dict, + default_values, + deprecated_vars, + legacy_code, + verbosity, + ) - vehicle_data = input_parser(fortran_deck, vehicle_data, - aviary_variable_dict, deprecated_vars, legacy_code) + # Postprocessing step to handle special cases for conversion (not 1-to-1 match), + # per legacy code. if legacy_code is GASP: vehicle_data = update_gasp_options(vehicle_data) elif legacy_code is FLOPS: vehicle_data = update_flops_options(vehicle_data) + # Add settings + if legacy_code is FLOPS: + eom = ['height_energy'] + mass = ['FLOPS'] + if legacy_code is GASP: + eom = ['2DOF'] + mass = ['GASP'] + vehicle_data['input_values'].set_val(Settings.EQUATIONS_OF_MOTION, eom) + vehicle_data['input_values'].set_val(Settings.MASS_METHOD, mass) + if not out_file.is_file(): # default outputted file to be in same directory as input out_file = fortran_deck.parent / out_file @@ -129,16 +173,6 @@ def create_aviary_deck(fortran_deck: str, legacy_code=None, defaults_deck=None, for var, (val, units) in sorted(vehicle_data['input_values']): writer.writerow([var] + val + [units]) - # TODO these should just get directly added to vehicle_data - if legacy_code is FLOPS: - EOM = 'height_energy' - mass = 'FLOPS' - if legacy_code is GASP: - EOM = '2DOF' - mass = 'GASP' - writer.writerow(['settings:equations_of_motion'] + [EOM]) - writer.writerow(['settings:mass_method'] + [mass]) - if legacy_code is GASP: # Values used in initial guessing of the trajectory writer.writerow([]) @@ -154,14 +188,23 @@ def create_aviary_deck(fortran_deck: str, legacy_code=None, defaults_deck=None, writer.writerow([var] + val) -def input_parser(fortran_deck, vehicle_data, alternate_names, unused_vars, legacy_code): +def parse_input_file( + fortran_deck, + vehicle_data, + alternate_names, + default_values, + unused_vars, + legacy_code, + verbosity=Verbosity.BRIEF, +): ''' - input_parser will modify the values in the vehicle_data dictionary using the data in the - fortran_deck. + parse_input_file reads the data in fortran_deck and adds it to vehicle_data. + Lines are read one by one, comments are removed, and namelists are tracked. - Lines with multiple variable-data pairs are supported, but the last value per variable must - be followed by a trailing comma. + Lines with multiple variable-data pairs are supported, but the last value per + variable must be followed by a trailing comma. ''' + input_data = NamedValues() with open(fortran_deck, 'r') as f_in: current_namelist = current_tag = '' for line in f_in: @@ -178,7 +221,7 @@ def input_parser(fortran_deck, vehicle_data, alternate_names, unused_vars, legac # Track when namelists are opened and closed if (line.lstrip()[0] in ['$', '&']) and current_tag == '': current_tag = line.lstrip()[0] - current_namelist = line.split(current_tag)[1].split()[0] + '.' + current_namelist = line.split(current_tag)[1].split()[0] elif (line.lstrip()[0] == current_tag) or (line.rstrip()[-1] == '/'): line = line.replace('/', '') terminate_namelist = True @@ -191,12 +234,24 @@ def input_parser(fortran_deck, vehicle_data, alternate_names, unused_vars, legac data = line.split('=')[1] try: vehicle_data = process_and_store_data( - data, var_name, legacy_code, current_namelist, alternate_names, vehicle_data, unused_vars, comment) + data, + var_name, + legacy_code, + current_namelist, + alternate_names, + default_values, + vehicle_data, + unused_vars, + comment, + verbosity, + ) except Exception as err: if current_namelist == '': - raise RuntimeError(line + ' could not be parsed successfully.' - '\nIf this was intended as a comment, ' - 'add an "!" at the beginning of the line.') from err + raise RuntimeError( + line + ' could not be parsed successfully.' + '\nIf this was intended as a comment, ' + 'add an "!" at the beginning of the line.' + ) from err else: raise err elif number_of_variables > 1: @@ -217,7 +272,17 @@ def input_parser(fortran_deck, vehicle_data, alternate_names, unused_vars, legac data = ','.join(sub_list) try: vehicle_data = process_and_store_data( - data, var_name, legacy_code, current_namelist, alternate_names, vehicle_data, unused_vars, comment) + data, + var_name, + legacy_code, + current_namelist, + alternate_names, + default_values, + vehicle_data, + unused_vars, + comment, + verbosity, + ) except Exception as err: if current_namelist == '': raise RuntimeError(line + ' could not be parsed successfully.' @@ -233,7 +298,18 @@ def input_parser(fortran_deck, vehicle_data, alternate_names, unused_vars, legac return vehicle_data -def process_and_store_data(data, var_name, legacy_code, current_namelist, alternate_names, vehicle_data, unused_vars, comment=''): +def process_and_store_data( + data, + var_name, + legacy_code, + current_namelist, + alternate_names, + default_values, + vehicle_data, + unused_vars, + comment='', + verbosity=Verbosity.BRIEF, +): ''' process_and_store_data takes in a string that contains the data, the current variable's name and namelist, the dictionary of alternate names, and the current vehicle data. @@ -246,7 +322,9 @@ def process_and_store_data(data, var_name, legacy_code, current_namelist, altern var_ind = data_units = None skip_variable = False # skip any variables that shouldn't get converted - if re.search(current_namelist + var_name + '\\Z', str(unused_vars), re.IGNORECASE): + if re.search( + current_namelist + '.' + var_name + '\\Z', str(unused_vars), re.IGNORECASE + ): return vehicle_data # remove any elements that are empty (caused by trailing commas or extra commas) data_list = [dat for dat in data.split(',') if dat != ''] @@ -260,19 +338,14 @@ def process_and_store_data(data, var_name, legacy_code, current_namelist, altern var_values = [] list_of_equivalent_aviary_names, var_ind = update_name( - alternate_names, current_namelist+var_name, vehicle_data['verbosity']) + alternate_names, current_namelist + '.' + var_name, verbosity + ) # Fortran uses 1 indexing, Python uses 0 indexing fortran_offset = 1 if current_namelist else 0 if var_ind is not None: var_ind -= fortran_offset - # Aviary has a reduction gearbox which is 1/gear ratio of GASP gearbox - if current_namelist+var_name == 'INPROP.GR': - var_values = [1/var for var in var_values] - vehicle_data['input_values'] = set_value(Aircraft.Engine.Gearbox.GEAR_RATIO, var_values, - vehicle_data['input_values'], var_id=var_ind, units=data_units) - for name in list_of_equivalent_aviary_names: if not skip_variable: if name in guess_names and legacy_code is GASP: @@ -281,19 +354,37 @@ def process_and_store_data(data, var_name, legacy_code, current_namelist, altern continue elif name in _MetaData: - vehicle_data['input_values'] = set_value(name, var_values, vehicle_data['input_values'], - var_ind=var_ind, units=data_units) + if current_namelist + '.' + var_name in default_values: + data_units = default_values.get_item( + current_namelist + '.' + var_name + )[1] + else: + data_units = None + vehicle_data['input_values'] = set_value( + name, + var_values, + data_units, + vehicle_data['input_values'], + var_ind=var_ind, + ) continue - vehicle_data['unused_values'] = set_value(name, var_values, vehicle_data['unused_values'], - var_ind=var_ind, units=data_units) - if vehicle_data['verbosity'].value >= Verbosity.VERBOSE: + vehicle_data['unused_values'] = set_value( + name, + var_values, + data_units, + vehicle_data['unused_values'], + var_ind=var_ind, + ) + if verbosity >= Verbosity.VERBOSE: print('Unused:', name, var_values, comment) return vehicle_data -def set_value(var_name, var_value, value_dict: NamedValues, var_ind=None, units=None): +def set_value( + var_name, var_value, units=None, value_dict: NamedValues = None, var_ind=None +): ''' set_value will update the current value of a variable in a value dictionary that contains a value and it's associated units. @@ -307,9 +398,8 @@ def set_value(var_name, var_value, value_dict: NamedValues, var_ind=None, units= else: current_value = None if var_name in _MetaData: - units = _MetaData[var_name]['units'] - else: - units = 'unitless' + if not units: + units = _MetaData[var_name]['units'] if not units: units = 'unitless' @@ -336,23 +426,20 @@ def set_value(var_name, var_value, value_dict: NamedValues, var_ind=None, units= return value_dict -def generate_aviary_names(code_bases): +def generate_aviary_names(legacy_code): ''' - Create a dictionary for each of the specified Fortran code bases to map to the Aviary - variable names. Each dictionary of Aviary names will have a list of Fortran names for - each variable + Create a dictionary that maps the specified Fortran code to Aviary variable names. + Each Aviary variable will have a list of matching Fortran names ''' alternate_names = {} - for code_base in code_bases: - alternate_names[code_base] = {} - for key in _MetaData.keys(): - historical_dict = _MetaData[key]['historical_name'] - if historical_dict and code_base in historical_dict: - alt_name = _MetaData[key]['historical_name'][code_base] - if isinstance(alt_name, str): - alt_name = [alt_name] - alternate_names[code_base][key] = alt_name + for key in _MetaData.keys(): + historical_dict = _MetaData[key]['historical_name'] + if historical_dict and legacy_code in historical_dict: + alt_name = _MetaData[key]['historical_name'][legacy_code] + if isinstance(alt_name, str): + alt_name = [alt_name] + alternate_names[key] = alt_name return alternate_names @@ -367,20 +454,19 @@ def update_name(alternate_names, var_name, verbosity=Verbosity.BRIEF): var_ind = None all_equivalent_names = [] - for code_base in alternate_names.keys(): - for key, list_of_names in alternate_names[code_base].items(): - if list_of_names is not None: - for altname in list_of_names: - altname = altname.lower() - if altname.endswith(var_name.lower()): - all_equivalent_names.append(key) - continue - elif var_ind is not None and altname.endswith( - f'{var_name.lower()}({var_ind})' - ): - all_equivalent_names.append(key) - var_ind = None - continue + for key, list_of_names in alternate_names.items(): + if list_of_names is not None: + for altname in list_of_names: + altname = altname.lower() + if altname.endswith(var_name.lower()): + all_equivalent_names.append(key) + continue + elif var_ind is not None and altname.endswith( + f'{var_name.lower()}({var_ind})' + ): + all_equivalent_names.append(key) + var_ind = None + continue # if there are no equivalent variable names, return the original name if len(all_equivalent_names) == 0: @@ -491,12 +577,17 @@ def update_gasp_options(vehicle_data): input_values.set_val(Aircraft.Wing.FLAP_DRAG_INCREMENT_OPTIMUM, [[.12, .23, .13, .23, .23, .1, .15][flap_ind]]) - res = input_values.get_val(Aircraft.Design.RESERVE_FUEL_ADDITIONAL, units='lbm')[0] - if res <= 0: + reserve_fuel_additional = input_values.get_val( + Aircraft.Design.RESERVE_FUEL_ADDITIONAL, units='lbm' + )[0] + if reserve_fuel_additional <= 0: input_values.set_val(Aircraft.Design.RESERVE_FUEL_ADDITIONAL, [0], units='lbm') - input_values.set_val(Aircraft.Design.RESERVE_FUEL_FRACTION, - [-res], units='unitless') - elif res >= 10: + input_values.set_val( + Aircraft.Design.RESERVE_FUEL_FRACTION, + [-reserve_fuel_additional], + units='unitless', + ) + elif reserve_fuel_additional >= 10: input_values.set_val(Aircraft.Design.RESERVE_FUEL_FRACTION, [0], units='unitless') else: @@ -517,6 +608,15 @@ def update_gasp_options(vehicle_data): if input_values.get_val(Aircraft.Strut.FUSELAGE_INTERFERENCE_FACTOR)[0] < 0: input_values.delete(Aircraft.Strut.FUSELAGE_INTERFERENCE_FACTOR) + # GEARBOX + # Aviary has a reduction gearbox which is 1/gear ratio of GASP gearbox + if Aircraft.Engine.Gearbox.GEAR_RATIO in input_values: + ratios = input_values.get_val(Aircraft.Engine.Gearbox.GEAR_RATIO) + ratios = [1 / val for val in ratios] + input_values.set_val( + Aircraft.Engine.Gearbox.GEAR_RATIO, ratios, units='unitless' + ) + vehicle_data['input_values'] = input_values return vehicle_data @@ -536,7 +636,6 @@ def update_flops_options(vehicle_data): input_values.delete(Aircraft.Design.THRUST_TO_WEIGHT_RATIO) # WSR - # Additional mass fraction scaler set to zero to not add mass twice if Aircraft.Engine.ADDITIONAL_MASS_FRACTION in input_values: if input_values.get_val(Aircraft.Engine.ADDITIONAL_MASS_FRACTION)[0] >= 1: @@ -699,12 +798,6 @@ def _setup_F2A_parser(parser): choices=set(LegacyCode), required=True ) - parser.add_argument( - "-d", - "--defaults_deck", - default=None, - help="Deck of default values for unspecified variables" - ) parser.add_argument( "--force", action="store_true", @@ -729,5 +822,4 @@ def _exec_F2A(args, user_args): # convert verbosity from int to enum verbosity = Verbosity(args.verbosity) - create_aviary_deck(filepath, args.legacy_code, args.defaults_deck, - args.out_file, args.force, verbosity) + fortran_to_aviary(filepath, args.legacy_code, args.out_file, args.force, verbosity) diff --git a/aviary/utils/legacy_code_data/deprecated_vars.py b/aviary/utils/legacy_code_data/deprecated_vars.py deleted file mode 100644 index 7c71e8728..000000000 --- a/aviary/utils/legacy_code_data/deprecated_vars.py +++ /dev/null @@ -1,18 +0,0 @@ -## Depreciated Variables ## -# FLOPS -flops_deprecated_vars = [ - 'AERIN.MODARO', - 'ENGDIN.IGENEN', - 'ENGDIN.BOOST', - 'ENGDIN.EXTFAC', - 'ENGDIN.IXTRAP', - 'ENGDIN.NPCODE', - 'ENGDIN.PCODE', - 'ENGDIN.NOX', - 'OPTION.IOPT', - 'OPTION.IPOLP', - 'OPTION.NOISE' -] - -# GASP -gasp_deprecated_vars = [] diff --git a/aviary/utils/legacy_code_data/flops_default_values.txt b/aviary/utils/legacy_code_data/flops_default_values.txt deleted file mode 100644 index a2ce69a57..000000000 --- a/aviary/utils/legacy_code_data/flops_default_values.txt +++ /dev/null @@ -1,18 +0,0 @@ -Default Values from FLOPS - - &WTIN - EEXP=1.15,unitless - IALTWT=False,unitless - CARGF=False,unitless - CARBAS=False,unitless - \ - &ENGDIN - IDLE=False,unitless - IGEO=False,unitless - NONEG=False,unitless - \ - &AERIN - MIKE=False,unitless - SWETF=1,unitless - SWETV=1,unitless - \ \ No newline at end of file diff --git a/aviary/utils/legacy_code_data/flops_defaults.py b/aviary/utils/legacy_code_data/flops_defaults.py new file mode 100644 index 000000000..121b5bf34 --- /dev/null +++ b/aviary/utils/legacy_code_data/flops_defaults.py @@ -0,0 +1,32 @@ +from aviary.utils.named_values import NamedValues + +## Defaults ## +flops_default_values = NamedValues( + { + 'WTIN.EEXP': (1.15, 'unitless'), + 'WTIN.IALTWT': (False, 'unitless'), + 'WTIN.CARGF': (False, 'unitless'), + 'WTIN.CARBAS': (False, 'unitless'), + 'ENGDIN.IDLE': (False, 'unitless'), + 'ENGDIN.IGEO': (False, 'unitless'), + 'ENGDIN.NONEG': (False, 'unitless'), + 'AERIN.MIKE': (False, 'unitless'), + 'AERIN.SWETF': (1, 'unitless'), + 'AERIN.SWETV': (1, 'unitless'), + } +) + +## Depreciated Variables ## +flops_deprecated_vars = [ + 'AERIN.MODARO', + 'ENGDIN.IGENEN', + 'ENGDIN.BOOST', + 'ENGDIN.EXTFAC', + 'ENGDIN.IXTRAP', + 'ENGDIN.NPCODE', + 'ENGDIN.PCODE', + 'ENGDIN.NOX', + 'OPTION.IOPT', + 'OPTION.IPOLP', + 'OPTION.NOISE', +] diff --git a/aviary/utils/legacy_code_data/gasp_default_values.dat b/aviary/utils/legacy_code_data/gasp_default_values.dat deleted file mode 100644 index ea6fe30f3..000000000 --- a/aviary/utils/legacy_code_data/gasp_default_values.dat +++ /dev/null @@ -1,157 +0,0 @@ -Default Values from GASP - $INGASP -ALPHL0=-1.2,deg -ALTLND=0,ft -AR=10,unitless -ARHT=4.75,unitless -ARNGE(1)=0,NM -ARNGE(3)=0,NM -ARVT=1.67,unitless -AS=1,unitless -BLEOB=0.9,unitless -BOELTV=0,unitless -BTEOB=0.75,unitless -CATD=3,unitless -CFOC=0.3,unitless -CK10=1,unitless -CK11=1,unitless -CK12=1,unitless -CK14=1,unitless -CK15=1,unitless -CK18=1,unitless -CK19=1,unitless -CK21=1,unitless -CK5=1,unitless -CK7=1,unitless -CK8=1,unitless -CK9=1,unitless -CKF=1,unitless -CKFF=1,unitless -CKHT=1,unitless -CKI=0,unitless -CKN=1,unitless -CKSTRT=0,unitless -CKVT=1,unitless -CKW=1,unitless -CLEARqDN=0.2,unitless -CLEOC=0,unitless -COELTH=0,unitless -CRALT=37500,ft -CRMACH=0.8,unitless -CW(1)=0,lbm -CW(10)=1,lbm -CW(11)=0,lbm -CW(12)=0.7,lbm -CW(13)=6,unitless -CW(2)=0.0862,unitless -CW(3)=0.1,unitless -CW(4)=0.16,unitless -CW(5)=0,lbm -CW(6)=1,unitless -CW(7)=0,lbm -CW(8)=0,lbm -CW(9)=2,lbm -DCDOTE=0,unitless -DCLMLE=0.93,unitless -DCLMTE=0,unitless -DELCD=0.0015,unitless -DELCG=0.25,unitless -DELFE=0.25,ft**2 -DELLED=0,deg -DELLED=0,deg -DELLEO=45,deg -DELP=7.5,psi -DELTEO=0,deg -DELTT=0.1677,h -DELWFC=0,lbm -DELWST=0,lbm -DFLPLD=40,deg -DFLPTO=10,deg -DIAM_REF=5.8,ft -DLMC4=25,deg -DNQDE=1,unitless -DV1=5,kn -DVR=5,kn -DWPQCH=25,deg -DWPQCV=35,deg -ELODN=2,unitless -ELODT=3.2,unitless -ELPC=4.44,ft -ENP=2,unitless -EYEW=1.5,deg -FLAPN=1,unitless -FN_REF=28690,lbf -FPYL=0.7,unitless -FRESF=4998,lbm -FUELD=6.687,lbm/galUS -FVOL_MRG=0,unitless -HAPP=50,ft -HCK=2.47,ft -HPORT=0,ft -HTG=3,ft -HWING=0,unitless -IGEAR=False,unitless -JENGSZ=4,unitless -JFLTYP=single_slotted,unitless -NTYE=7,unitless -PAX=180,unitless -PS=29,inch -ROCTOC=300,ft/min -RCLMAX=1,unitless -RSMX=1000,ft/min -SAB=6,unitless -SAH=0,unitless -SCFAC=0,unitless -SF_FAC=1,unitless -SHT=0,ft**2 -SINKTD=3,ft/s -SKB=136,unitless -SKCC=11,unitless -SKFS=0.0195,unitless -SKFW=0.404,unitless -SKLG=0.0318,unitless -SKMG=0.8,unitless -SKPEI=0.135,unitless -SKSAS=0,lbm -SKSTRUT=0,unitless -SKTL=1,unitless -SKWF=0.43,unitless -SKWFOLD=0,unitless -SKWW=133.4,unitless -SKY=0.18,unitless -SKZ=0.22,unitless -SLM=0.33,unitless -SLMH=0.352,unitless -SLMV=0.801,unitless -SSTQSW=0,unitless -STATIC=0.05,unitless -STRUT=0 -SVT=0,ft**2 -SWSLS=0,lbm/lbf -TCHT=0.12,unitless -TCR=0.15,unitless -TCT=0.12,unitless -TCVT=0.12,unitless -TDELAY=1,s -THIN=0,lbf -UWNAC=3,lbm/ft**2 -UWPAX=200,lbm -VBARHX=0,unitless -VBARVX=0,unitless -VMLFSL=402.5,mi/h -VRATT=1.3,unitless -WAS=24,inch -WCARGO=0,lbm -WCFLAP=0,unitless -WG=150000,lbm -WGS=1,lbf/ft**2 -WS=20.2,inch -XCPS=0.3,unitless -XCTCMX=0.35,unitless -XLFMX=1.2,unitless -XLQDE=3.5,unitless -XWQLF=0.4,unitless -YMG=0.15,unitless -YP=0.35,unitless -YWFOLD=0,ft - $END diff --git a/aviary/utils/legacy_code_data/gasp_defaults.py b/aviary/utils/legacy_code_data/gasp_defaults.py new file mode 100644 index 000000000..0f242dff2 --- /dev/null +++ b/aviary/utils/legacy_code_data/gasp_defaults.py @@ -0,0 +1,169 @@ +from aviary.utils.named_values import NamedValues + +## Defaults ## +gasp_default_values = NamedValues( + { + 'INGASP.ALPHL0': (-1.2, 'deg'), + 'INGASP.ALTLND': (0, 'ft'), + 'INGASP.AR': (10, 'unitless'), + 'INGASP.ARHT': (4.75, 'unitless'), + 'INGASP.ARNGE(1)': (0, 'NM'), + 'INGASP.ARNGE(3)': (0, 'NM'), + 'INGASP.ARVT': (1.67, 'unitless'), + 'INGASP.AS': (1, 'unitless'), + 'INGASP.BLEOB': (0.9, 'unitless'), + 'INGASP.BOELTV': (0, 'unitless'), + 'INGASP.BTEOB': (0.75, 'unitless'), + 'INGASP.CATD': (3, 'unitless'), + 'INGASP.CFOC': (0.3, 'unitless'), + 'INGASP.CK5': (1, 'unitless'), + 'INGASP.CK7': (1, 'unitless'), + 'INGASP.CK8': (1, 'unitless'), + 'INGASP.CK9': (1, 'unitless'), + 'INGASP.CK10': (1, 'unitless'), + 'INGASP.CK11': (1, 'unitless'), + 'INGASP.CK12': (1, 'unitless'), + 'INGASP.CK14': (1, 'unitless'), + 'INGASP.CK15': (1, 'unitless'), + 'INGASP.CK18': (1, 'unitless'), + 'INGASP.CK19': (1, 'unitless'), + 'INGASP.CK21': (1, 'unitless'), + 'INGASP.CKF': (1, 'unitless'), + 'INGASP.CKFF': (1, 'unitless'), + 'INGASP.CKHT': (1, 'unitless'), + 'INGASP.CKI': (0, 'unitless'), + 'INGASP.CKN': (1, 'unitless'), + 'INGASP.CKSTRT': (0, 'unitless'), + 'INGASP.CKVT': (1, 'unitless'), + 'INGASP.CKW': (1, 'unitless'), + 'INGASP.CLEARqDN': (0.2, 'unitless'), + 'INGASP.CLEOC': (0, 'unitless'), + 'INGASP.COELTH': (0, 'unitless'), + 'INGASP.CRALT': (37500, 'ft'), + 'INGASP.CRMACH': (0.8, 'unitless'), + 'INGASP.CW(1)': (0, 'unitless'), + 'INGASP.CW(2)': (0.0862, 'unitless'), + 'INGASP.CW(3)': (0.1, 'unitless'), + 'INGASP.CW(4)': (0.16, 'unitless'), + 'INGASP.CW(5)': (0, 'unitless'), + 'INGASP.CW(6)': (1, 'unitless'), + 'INGASP.CW(7)': (0, 'unitless'), + 'INGASP.CW(8)': (0, 'unitless'), + 'INGASP.CW(9)': (2, 'unitless'), + 'INGASP.CW(10)': (1, 'unitless'), + 'INGASP.CW(11)': (0, 'unitless'), + 'INGASP.CW(12)': (0.7, 'unitless'), + 'INGASP.CW(13)': (6, 'unitless'), + 'INGASP.DCDOTE': (0, 'unitless'), + 'INGASP.DCLMLE': (0.93, 'unitless'), + 'INGASP.DCLMTE': (0, 'unitless'), + 'INGASP.DELCD': (0.0015, 'unitless'), + 'INGASP.DELCG': (0.25, 'unitless'), + 'INGASP.DELFE': (0.25, 'ft**2'), + 'INGASP.DELLED': (0, 'deg'), + 'INGASP.DELLEO': (45, 'deg'), + 'INGASP.DELP': (7.5, 'psi'), + 'INGASP.DELTEO': (55, 'deg'), + 'INGASP.DELTT': (0.1677, 'h'), + 'INGASP.DELWFC': (0, 'lbm'), + 'INGASP.DELWST': (0, 'lbm'), + 'INGASP.DFLPLD': (40, 'deg'), + 'INGASP.DFLPTO': (10, 'deg'), + 'INGASP.DIAM_REF': (5.8, 'ft'), + 'INGASP.DLMC4': (25, 'deg'), + 'INGASP.DNQDE': (1, 'unitless'), + 'INGASP.DV1': (5, 'kn'), + 'INGASP.DVR': (5, 'kn'), + 'INGASP.DWPQCH': (25, 'deg'), + 'INGASP.DWPQCV': (35, 'deg'), + 'INGASP.ELODN': (2, 'unitless'), + 'INGASP.ELODT': (3.2, 'unitless'), + 'INGASP.ELPC': (4.44, 'ft'), + 'INGASP.ENP': (2, 'unitless'), + 'INGASP.EYEW': (1.5, 'deg'), + 'INGASP.FLAPN': (1, 'unitless'), + 'INGASP.FN_REF': (28690, 'lbf'), + 'INGASP.FPYL': (0.7, 'unitless'), + 'INGASP.FRESF': (4998, 'lbm'), + 'INGASP.FUELD': (6.687, 'lbm/galUS'), + 'INGASP.FVOL_MRG': (0, 'unitless'), + 'INGASP.HAPP': (50, 'ft'), + 'INGASP.HCK': (2.47, 'unitless'), + 'INGASP.HPORT': (0, 'ft'), + 'INGASP.HTG': (3, 'ft'), + 'INGASP.HWING': (0, 'unitless'), + 'INGASP.IGEAR': (False, 'unitless'), + 'INGASP.JENGSZ': (4, 'unitless'), + 'INGASP.JFLTYP': ('single_slotted', 'unitless'), + 'INGASP.NTYE': (7, 'unitless'), + 'INGASP.PAX': (180, 'unitless'), + 'INGASP.PS': (29, 'inch'), + 'INGASP.ROCTOC': (300, 'ft/min'), + 'INGASP.RCLMAX': (1, 'unitless'), + 'INGASP.RSMX': (1000, 'ft/min'), + 'INGASP.SAB': (6, 'unitless'), + 'INGASP.SAH': (0, 'unitless'), + 'INGASP.SCFAC': (0, 'unitless'), + 'INGASP.SF_FAC': (1, 'unitless'), + 'INGASP.SHT': (0, 'ft**2'), + 'INGASP.SINKTD': (3, 'ft/s'), + 'INGASP.SKB': (136, 'unitless'), + 'INGASP.SKCC': (11, 'unitless'), + 'INGASP.SKFS': (0.0195, 'unitless'), + 'INGASP.SKFW': (0.404, 'unitless'), + 'INGASP.SKLG': (0.0318, 'unitless'), + 'INGASP.SKMG': (0.8, 'unitless'), + 'INGASP.SKPEI': (0.135, 'unitless'), + 'INGASP.SKSAS': (0, 'lbm'), + 'INGASP.SKSTRUT': (0, 'unitless'), + 'INGASP.SKTL': (1, 'unitless'), + 'INGASP.SKWF': (0.43, 'unitless'), + 'INGASP.SKWFOLD': (0, 'unitless'), + 'INGASP.SKWW': (133.4, 'unitless'), + 'INGASP.SKY': (0.18, 'unitless'), + 'INGASP.SKZ': (0.22, 'unitless'), + 'INGASP.SLM': (0.33, 'unitless'), + 'INGASP.SLMH': (0.352, 'unitless'), + 'INGASP.SLMV': (0.801, 'unitless'), + 'INGASP.SSTQSW': (0, 'unitless'), + 'INGASP.STATIC': (0.05, 'unitless'), + 'INGASP.STRUT': (0, 'ft'), + 'INGASP.SVT': (0, 'ft**2'), + 'INGASP.SWSLS': (0, 'lbm/lbf'), + 'INGASP.TCHT': (0.12, 'unitless'), + 'INGASP.TCR': (0.15, 'unitless'), + 'INGASP.TCT': (0.12, 'unitless'), + 'INGASP.TCVT': (0.12, 'unitless'), + 'INGASP.TDELAY': (1, 's'), + 'INGASP.THIN': (0, 'lbf'), + 'INGASP.UWNAC': (3, 'lbm/ft**2'), + 'INGASP.UWPAX': (200, 'lbm'), + 'INGASP.VBARHX': (0, 'unitless'), + 'INGASP.VBARVX': (0, 'unitless'), + 'INGASP.VMLFSL': (402.5, 'mi/h'), + 'INGASP.VRATT': (1.3, 'unitless'), + 'INGASP.WAS': (24, 'in'), + 'INGASP.WCARGO': (0, 'lbm'), + 'INGASP.WCFLAP': (0, 'unitless'), + 'INGASP.WG': (150000, 'lbm'), + 'INGASP.WGS': (1, 'lbf/ft**2'), + 'INGASP.WS': (20.2, 'inch'), + 'INGASP.XCPS': (0.3, 'unitless'), + 'INGASP.XCTCMX': (0.35, 'unitless'), + 'INGASP.XLFMX': (1.2, 'unitless'), + 'INGASP.XLQDE': (3.5, 'unitless'), + 'INGASP.XWQLF': (0.4, 'unitless'), + 'INGASP.YMG': (0.15, 'unitless'), + 'INGASP.YP': (0.35, 'unitless'), + 'INGASP.YWFOLD': (0, 'ft'), + } +) +# Commented out from old GASP defaults list +# $INGASP +# B=117.8,ft +# CBARW=12.615,ft +# CLALPH=7.1765,1/rad +# ELF=0,ft + +## Depreciated Variables ## +gasp_deprecated_vars = [] diff --git a/aviary/utils/test/test_fortran_to_aviary.py b/aviary/utils/test/test_fortran_to_aviary.py index ba46066af..8c1455574 100644 --- a/aviary/utils/test/test_fortran_to_aviary.py +++ b/aviary/utils/test/test_fortran_to_aviary.py @@ -4,8 +4,10 @@ from openmdao.utils.testing_utils import use_tempdirs +from aviary.variable_info.enums import LegacyCode + from aviary.utils.functions import get_path -from aviary.utils.fortran_to_aviary import LegacyCode, _exec_F2A +from aviary.utils.fortran_to_aviary import _exec_F2A class DummyArgs(object): @@ -108,3 +110,6 @@ def test_N3CC(self): if __name__ == "__main__": unittest.main() + + # test = TestFortranToAviary() + # test.test_small_single_aisle() From 5ce970c2ef1bbd1edb7ad16e06cc2bbe19e34b49 Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Tue, 10 Dec 2024 16:11:06 -0500 Subject: [PATCH 03/21] updating test file configuration_test --- .../utils/legacy_code_data/gasp_defaults.py | 47 +++++++++---------- ...converter_configuration_test_data_GwGm.csv | 16 +++---- ...converter_configuration_test_data_GwGm.dat | 0 aviary/utils/test/test_fortran_to_aviary.py | 34 +++++--------- 4 files changed, 41 insertions(+), 56 deletions(-) rename aviary/{models/test_aircraft => utils/test/data}/converter_configuration_test_data_GwGm.csv (96%) rename aviary/{models/test_aircraft => utils/test/data}/converter_configuration_test_data_GwGm.dat (100%) diff --git a/aviary/utils/legacy_code_data/gasp_defaults.py b/aviary/utils/legacy_code_data/gasp_defaults.py index 0f242dff2..aefa8ec9e 100644 --- a/aviary/utils/legacy_code_data/gasp_defaults.py +++ b/aviary/utils/legacy_code_data/gasp_defaults.py @@ -1,6 +1,7 @@ from aviary.utils.named_values import NamedValues ## Defaults ## +# commented out values were not in metadata at the time gasp_default_values = NamedValues( { 'INGASP.ALPHL0': (-1.2, 'deg'), @@ -11,21 +12,23 @@ 'INGASP.ARNGE(3)': (0, 'NM'), 'INGASP.ARVT': (1.67, 'unitless'), 'INGASP.AS': (1, 'unitless'), + 'INGASP.B': (117.8, 'ft'), # needs verification 'INGASP.BLEOB': (0.9, 'unitless'), 'INGASP.BOELTV': (0, 'unitless'), 'INGASP.BTEOB': (0.75, 'unitless'), 'INGASP.CATD': (3, 'unitless'), + 'INGASP.CBARW': (12.615, 'ft'), # needs verification 'INGASP.CFOC': (0.3, 'unitless'), 'INGASP.CK5': (1, 'unitless'), - 'INGASP.CK7': (1, 'unitless'), - 'INGASP.CK8': (1, 'unitless'), - 'INGASP.CK9': (1, 'unitless'), - 'INGASP.CK10': (1, 'unitless'), - 'INGASP.CK11': (1, 'unitless'), + # 'INGASP.CK7': (1, 'unitless'), + # 'INGASP.CK8': (1, 'unitless'), + # 'INGASP.CK9': (1, 'unitless'), + # 'INGASP.CK10': (1, 'unitless'), + # 'INGASP.CK11': (1, 'unitless'), 'INGASP.CK12': (1, 'unitless'), 'INGASP.CK14': (1, 'unitless'), 'INGASP.CK15': (1, 'unitless'), - 'INGASP.CK18': (1, 'unitless'), + # 'INGASP.CK18': (1, 'unitless'), 'INGASP.CK19': (1, 'unitless'), 'INGASP.CK21': (1, 'unitless'), 'INGASP.CKF': (1, 'unitless'), @@ -36,23 +39,24 @@ 'INGASP.CKSTRT': (0, 'unitless'), 'INGASP.CKVT': (1, 'unitless'), 'INGASP.CKW': (1, 'unitless'), + 'INGASP.CLALPH': (7.1765, '1/rad'), # needs verification 'INGASP.CLEARqDN': (0.2, 'unitless'), 'INGASP.CLEOC': (0, 'unitless'), 'INGASP.COELTH': (0, 'unitless'), 'INGASP.CRALT': (37500, 'ft'), 'INGASP.CRMACH': (0.8, 'unitless'), - 'INGASP.CW(1)': (0, 'unitless'), + 'INGASP.CW(1)': (0, 'lbm'), 'INGASP.CW(2)': (0.0862, 'unitless'), 'INGASP.CW(3)': (0.1, 'unitless'), 'INGASP.CW(4)': (0.16, 'unitless'), - 'INGASP.CW(5)': (0, 'unitless'), + 'INGASP.CW(5)': (0, 'lbm'), 'INGASP.CW(6)': (1, 'unitless'), - 'INGASP.CW(7)': (0, 'unitless'), - 'INGASP.CW(8)': (0, 'unitless'), - 'INGASP.CW(9)': (2, 'unitless'), - 'INGASP.CW(10)': (1, 'unitless'), - 'INGASP.CW(11)': (0, 'unitless'), - 'INGASP.CW(12)': (0.7, 'unitless'), + 'INGASP.CW(7)': (0, 'lbm'), + 'INGASP.CW(8)': (0, 'lbm'), + 'INGASP.CW(9)': (2, 'lbm'), + 'INGASP.CW(10)': (1, 'lbm'), + 'INGASP.CW(11)': (0, 'lbm'), + 'INGASP.CW(12)': (0.7, 'lbm'), 'INGASP.CW(13)': (6, 'unitless'), 'INGASP.DCDOTE': (0, 'unitless'), 'INGASP.DCLMLE': (0.93, 'unitless'), @@ -76,6 +80,7 @@ 'INGASP.DVR': (5, 'kn'), 'INGASP.DWPQCH': (25, 'deg'), 'INGASP.DWPQCV': (35, 'deg'), + 'INGASP.ELF': (0, 'ft'), # needs verification 'INGASP.ELODN': (2, 'unitless'), 'INGASP.ELODT': (3.2, 'unitless'), 'INGASP.ELPC': (4.44, 'ft'), @@ -88,12 +93,12 @@ 'INGASP.FUELD': (6.687, 'lbm/galUS'), 'INGASP.FVOL_MRG': (0, 'unitless'), 'INGASP.HAPP': (50, 'ft'), - 'INGASP.HCK': (2.47, 'unitless'), - 'INGASP.HPORT': (0, 'ft'), + 'INGASP.HCK': (2.47, 'ft'), + # 'INGASP.HPORT': (0, 'ft'), 'INGASP.HTG': (3, 'ft'), 'INGASP.HWING': (0, 'unitless'), 'INGASP.IGEAR': (False, 'unitless'), - 'INGASP.JENGSZ': (4, 'unitless'), + # 'INGASP.JENGSZ': (4, 'unitless'), 'INGASP.JFLTYP': ('single_slotted', 'unitless'), 'INGASP.NTYE': (7, 'unitless'), 'INGASP.PAX': (180, 'unitless'), @@ -142,7 +147,7 @@ 'INGASP.VBARVX': (0, 'unitless'), 'INGASP.VMLFSL': (402.5, 'mi/h'), 'INGASP.VRATT': (1.3, 'unitless'), - 'INGASP.WAS': (24, 'in'), + 'INGASP.WAS': (24, 'inch'), 'INGASP.WCARGO': (0, 'lbm'), 'INGASP.WCFLAP': (0, 'unitless'), 'INGASP.WG': (150000, 'lbm'), @@ -158,12 +163,6 @@ 'INGASP.YWFOLD': (0, 'ft'), } ) -# Commented out from old GASP defaults list -# $INGASP -# B=117.8,ft -# CBARW=12.615,ft -# CLALPH=7.1765,1/rad -# ELF=0,ft ## Depreciated Variables ## gasp_deprecated_vars = [] diff --git a/aviary/models/test_aircraft/converter_configuration_test_data_GwGm.csv b/aviary/utils/test/data/converter_configuration_test_data_GwGm.csv similarity index 96% rename from aviary/models/test_aircraft/converter_configuration_test_data_GwGm.csv rename to aviary/utils/test/data/converter_configuration_test_data_GwGm.csv index 71e5cea39..e2405d662 100644 --- a/aviary/models/test_aircraft/converter_configuration_test_data_GwGm.csv +++ b/aviary/utils/test/data/converter_configuration_test_data_GwGm.csv @@ -1,3 +1,5 @@ +# GASP-derived aircraft input deck converted from converter_configuration_test_data_GwGm.dat + # Input Values aircraft:air_conditioning:mass_coefficient,1.65,unitless aircraft:anti_icing:mass,126,lbm @@ -17,6 +19,7 @@ aircraft:design:cg_delta,0.25,unitless aircraft:design:cockpit_control_mass_coefficient,30,unitless aircraft:design:drag_increment,0.0014,unitless aircraft:design:emergency_equipment_mass,0,lbm +aircraft:design:lift_curve_slope,7.1765,1/rad aircraft:design:max_structural_speed,440,mi/h aircraft:design:part25_structural_category,3,unitless aircraft:design:reserve_fuel_additional,0,lbm @@ -25,13 +28,12 @@ aircraft:design:static_margin,0.05,unitless aircraft:design:structural_mass_increment,0,lbm aircraft:design:supercritical_drag_shift,0.033,unitless aircraft:engine:additional_mass_fraction,0.165,unitless -aircraft:engine:data_file,models/engines/turbofan_23k_1.deck,unitless aircraft:engine:mass_scaler,1,unitless aircraft:engine:mass_specific,0.21366,lbm/lbf aircraft:engine:num_engines,2,unitless aircraft:engine:pod_mass_scaler,1,unitless aircraft:engine:pylon_factor,1.25,unitless -aircraft:engine:reference_diameter,6.15,ft +aircraft:engine:reference_diameter,5.8,ft aircraft:engine:reference_sls_thrust,28690,lbf aircraft:engine:scaled_sls_thrust,21162,lbf aircraft:engine:type,7,unitless @@ -47,6 +49,7 @@ aircraft:fuselage:aisle_width,24,inch aircraft:fuselage:delta_diameter,4.5,ft aircraft:fuselage:flat_plate_area_increment,0.25,ft**2 aircraft:fuselage:form_factor,1.146,unitless +aircraft:fuselage:length,0,ft aircraft:fuselage:mass_coefficient,102.82,unitless aircraft:fuselage:nose_fineness,1,unitless aircraft:fuselage:num_aisles,1,unitless @@ -97,6 +100,7 @@ aircraft:vertical_tail:taper_ratio,0.801,unitless aircraft:vertical_tail:thickness_to_chord,0.1,unitless aircraft:vertical_tail:volume_coefficient,0.066,unitless aircraft:wing:aspect_ratio,19.565,unitless +aircraft:wing:average_chord,12.615,ft aircraft:wing:center_distance,0.463,unitless aircraft:wing:choose_fold_location,False,unitless aircraft:wing:flap_chord_ratio,0.25,unitless @@ -129,6 +133,7 @@ aircraft:wing:optimum_slat_deflection,20,deg aircraft:wing:slat_chord_ratio,0.1,unitless aircraft:wing:slat_lift_increment_optimum,0.93,unitless aircraft:wing:slat_span_ratio,0.9,unitless +aircraft:wing:span,117.8,ft aircraft:wing:surface_ctrl_mass_coefficient,0.5936,unitless aircraft:wing:sweep,22.47,deg aircraft:wing:taper_ratio,0.346,unitless @@ -168,12 +173,6 @@ time_to_climb,0 INGASP.ALR,1.11 INGASP.BENGOB,0.05 INGASP.CINP,0.11 -INGASP.CK10,1 -INGASP.CK11,1 -INGASP.CK18,1 -INGASP.CK7,1 -INGASP.CK8,1 -INGASP.CK9,1 INGASP.CLIAB,1984 INGASP.CMF,15 INGASP.CMV,0.15 @@ -185,7 +184,6 @@ INGASP.FCSF,2.5 INGASP.HBTP,0.472 INGASP.HIR,0.015 INGASP.HNCRU,36000 -INGASP.HPORT,0 INGASP.HRI,2500 INGASP.HSCREQ,25000 INGASP.ICLM,3 diff --git a/aviary/models/test_aircraft/converter_configuration_test_data_GwGm.dat b/aviary/utils/test/data/converter_configuration_test_data_GwGm.dat similarity index 100% rename from aviary/models/test_aircraft/converter_configuration_test_data_GwGm.dat rename to aviary/utils/test/data/converter_configuration_test_data_GwGm.dat diff --git a/aviary/utils/test/test_fortran_to_aviary.py b/aviary/utils/test/test_fortran_to_aviary.py index 8c1455574..c63fb0678 100644 --- a/aviary/utils/test/test_fortran_to_aviary.py +++ b/aviary/utils/test/test_fortran_to_aviary.py @@ -7,17 +7,7 @@ from aviary.variable_info.enums import LegacyCode from aviary.utils.functions import get_path -from aviary.utils.fortran_to_aviary import _exec_F2A - - -class DummyArgs(object): - def __init__(self): - self.input_deck = None - self.out_file = None - self.legacy_code = None - self.defaults_deck = False - self.force = False - self.verbosity = 0 +from aviary.utils.fortran_to_aviary import fortran_to_aviary @use_tempdirs @@ -27,21 +17,19 @@ class TestFortranToAviary(unittest.TestCase): """ def prepare_and_run(self, filepath, out_file=None, legacy_code=LegacyCode.GASP): - args = DummyArgs() - # Specify the input file and the legacy code - args.input_deck = filepath + input_deck = filepath # Specify the output file filename = filepath.split('.')[0]+'.csv' if not out_file: - args.out_file = Path.cwd() / Path('TEST_'+filename) + out_file = Path.cwd() / Path('TEST_' + filename) else: - args.out_file = Path(out_file) - args.legacy_code = legacy_code + out_file = Path(out_file) + legacy_code = legacy_code # Execute the conversion - _exec_F2A(args, None) + fortran_to_aviary(filepath, legacy_code, out_file, force=True, verbosity=0) def compare_files(self, filepath, skip_list=['# created ']): """ @@ -59,7 +47,7 @@ def compare_files(self, filepath, skip_list=['# created ']): with open('TEST_'+filename, 'r') as f_in, open(validation_data, 'r') as expected: for line in f_in: if any(s in line for s in skip_list): - break + continue # Remove whitespace and compare expected_line = ''.join(expected.readline().split()) @@ -90,7 +78,7 @@ def test_small_single_aisle(self): self.compare_files(filepath) def test_diff_configuration(self): - filepath = 'models/test_aircraft/converter_configuration_test_data_GwGm.dat' + filepath = 'utils/test/data/converter_configuration_test_data_GwGm.dat' self.prepare_and_run(filepath) self.compare_files(filepath) @@ -109,7 +97,7 @@ def test_N3CC(self): if __name__ == "__main__": - unittest.main() + # unittest.main() - # test = TestFortranToAviary() - # test.test_small_single_aisle() + test = TestFortranToAviary() + test.test_diff_configuration() From 19aece5663a2c5c4788d1b4adea0d728e4aa2b34 Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Tue, 10 Dec 2024 16:16:14 -0500 Subject: [PATCH 04/21] enforced consistent naming across example models --- ...{N3CC_generic_low_speed_polars_FLOPSinp.csv => N3CC_FLOPS.csv} | 0 ...olars_FLOPSinp.txt => N3CC_generic_low_speed_polars_FLOPS.txt} | 0 ...arge_single_aisle_1_GwGm.csv => large_single_aisle_1_GASP.csv} | 0 ...arge_single_aisle_1_GwGm.dat => large_single_aisle_1_GASP.dat} | 0 ...turboprop_freighter.csv => large_turboprop_freighter_GASP.csv} | 0 ...turboprop_freighter.dat => large_turboprop_freighter_GASP.dat} | 0 .../{small_single_aisle_GwGm.csv => small_single_aisle_GASP.csv} | 0 .../{small_single_aisle_GwGm.dat => small_single_aisle_GASP.dat} | 0 ...r_configuration_test_data_GwGm.csv => converter_test_GwGm.csv} | 0 ...r_configuration_test_data_GwGm.dat => converter_test_GwGm.dat} | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename aviary/models/N3CC/{N3CC_generic_low_speed_polars_FLOPSinp.csv => N3CC_FLOPS.csv} (100%) rename aviary/models/N3CC/{N3CC_generic_low_speed_polars_FLOPSinp.txt => N3CC_generic_low_speed_polars_FLOPS.txt} (100%) rename aviary/models/large_single_aisle_1/{large_single_aisle_1_GwGm.csv => large_single_aisle_1_GASP.csv} (100%) rename aviary/models/large_single_aisle_1/{large_single_aisle_1_GwGm.dat => large_single_aisle_1_GASP.dat} (100%) rename aviary/models/large_turboprop_freighter/{large_turboprop_freighter.csv => large_turboprop_freighter_GASP.csv} (100%) rename aviary/models/large_turboprop_freighter/{large_turboprop_freighter.dat => large_turboprop_freighter_GASP.dat} (100%) rename aviary/models/small_single_aisle/{small_single_aisle_GwGm.csv => small_single_aisle_GASP.csv} (100%) rename aviary/models/small_single_aisle/{small_single_aisle_GwGm.dat => small_single_aisle_GASP.dat} (100%) rename aviary/utils/test/data/{converter_configuration_test_data_GwGm.csv => converter_test_GwGm.csv} (100%) rename aviary/utils/test/data/{converter_configuration_test_data_GwGm.dat => converter_test_GwGm.dat} (100%) diff --git a/aviary/models/N3CC/N3CC_generic_low_speed_polars_FLOPSinp.csv b/aviary/models/N3CC/N3CC_FLOPS.csv similarity index 100% rename from aviary/models/N3CC/N3CC_generic_low_speed_polars_FLOPSinp.csv rename to aviary/models/N3CC/N3CC_FLOPS.csv diff --git a/aviary/models/N3CC/N3CC_generic_low_speed_polars_FLOPSinp.txt b/aviary/models/N3CC/N3CC_generic_low_speed_polars_FLOPS.txt similarity index 100% rename from aviary/models/N3CC/N3CC_generic_low_speed_polars_FLOPSinp.txt rename to aviary/models/N3CC/N3CC_generic_low_speed_polars_FLOPS.txt 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_GASP.csv similarity index 100% rename from aviary/models/large_single_aisle_1/large_single_aisle_1_GwGm.csv rename to aviary/models/large_single_aisle_1/large_single_aisle_1_GASP.csv diff --git a/aviary/models/large_single_aisle_1/large_single_aisle_1_GwGm.dat b/aviary/models/large_single_aisle_1/large_single_aisle_1_GASP.dat similarity index 100% rename from aviary/models/large_single_aisle_1/large_single_aisle_1_GwGm.dat rename to aviary/models/large_single_aisle_1/large_single_aisle_1_GASP.dat diff --git a/aviary/models/large_turboprop_freighter/large_turboprop_freighter.csv b/aviary/models/large_turboprop_freighter/large_turboprop_freighter_GASP.csv similarity index 100% rename from aviary/models/large_turboprop_freighter/large_turboprop_freighter.csv rename to aviary/models/large_turboprop_freighter/large_turboprop_freighter_GASP.csv diff --git a/aviary/models/large_turboprop_freighter/large_turboprop_freighter.dat b/aviary/models/large_turboprop_freighter/large_turboprop_freighter_GASP.dat similarity index 100% rename from aviary/models/large_turboprop_freighter/large_turboprop_freighter.dat rename to aviary/models/large_turboprop_freighter/large_turboprop_freighter_GASP.dat diff --git a/aviary/models/small_single_aisle/small_single_aisle_GwGm.csv b/aviary/models/small_single_aisle/small_single_aisle_GASP.csv similarity index 100% rename from aviary/models/small_single_aisle/small_single_aisle_GwGm.csv rename to aviary/models/small_single_aisle/small_single_aisle_GASP.csv diff --git a/aviary/models/small_single_aisle/small_single_aisle_GwGm.dat b/aviary/models/small_single_aisle/small_single_aisle_GASP.dat similarity index 100% rename from aviary/models/small_single_aisle/small_single_aisle_GwGm.dat rename to aviary/models/small_single_aisle/small_single_aisle_GASP.dat diff --git a/aviary/utils/test/data/converter_configuration_test_data_GwGm.csv b/aviary/utils/test/data/converter_test_GwGm.csv similarity index 100% rename from aviary/utils/test/data/converter_configuration_test_data_GwGm.csv rename to aviary/utils/test/data/converter_test_GwGm.csv diff --git a/aviary/utils/test/data/converter_configuration_test_data_GwGm.dat b/aviary/utils/test/data/converter_test_GwGm.dat similarity index 100% rename from aviary/utils/test/data/converter_configuration_test_data_GwGm.dat rename to aviary/utils/test/data/converter_test_GwGm.dat From 11e2b8db3b2c38f2f59c2ab7cc022dd724a98d01 Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Tue, 10 Dec 2024 16:43:13 -0500 Subject: [PATCH 05/21] moved more files to utils/test/data --- ..._GwGm.csv => converter_test_data_GASP.csv} | 0 ..._GwGm.dat => converter_test_data_GASP.dat} | 0 .../data/converter_test_data_N3CC_FLOPS.csv | 454 ++++++++++++++++++ ...er_test_data_large_single_aisle_1_GASP.csv | 226 +++++++++ ...LOPS_turbofan_22k.txt => turbofan_22k.txt} | 0 ..._turbofan_23k_1.eng => turbofan_23k_1.eng} | 2 +- .../test/data}/turboshaft_4465hp.eng | 0 .../utils/test/test_engine_deck_conversion.py | 51 +- aviary/utils/test/test_fortran_to_aviary.py | 26 +- 9 files changed, 722 insertions(+), 37 deletions(-) rename aviary/utils/test/data/{converter_test_GwGm.csv => converter_test_data_GASP.csv} (100%) rename aviary/utils/test/data/{converter_test_GwGm.dat => converter_test_data_GASP.dat} (100%) create mode 100644 aviary/utils/test/data/converter_test_data_N3CC_FLOPS.csv create mode 100644 aviary/utils/test/data/converter_test_data_large_single_aisle_1_GASP.csv rename aviary/utils/test/data/{FLOPS_turbofan_22k.txt => turbofan_22k.txt} (100%) rename aviary/utils/test/data/{GASP_turbofan_23k_1.eng => turbofan_23k_1.eng} (99%) rename aviary/{models/engines => utils/test/data}/turboshaft_4465hp.eng (100%) diff --git a/aviary/utils/test/data/converter_test_GwGm.csv b/aviary/utils/test/data/converter_test_data_GASP.csv similarity index 100% rename from aviary/utils/test/data/converter_test_GwGm.csv rename to aviary/utils/test/data/converter_test_data_GASP.csv diff --git a/aviary/utils/test/data/converter_test_GwGm.dat b/aviary/utils/test/data/converter_test_data_GASP.dat similarity index 100% rename from aviary/utils/test/data/converter_test_GwGm.dat rename to aviary/utils/test/data/converter_test_data_GASP.dat diff --git a/aviary/utils/test/data/converter_test_data_N3CC_FLOPS.csv b/aviary/utils/test/data/converter_test_data_N3CC_FLOPS.csv new file mode 100644 index 000000000..98cf16cf5 --- /dev/null +++ b/aviary/utils/test/data/converter_test_data_N3CC_FLOPS.csv @@ -0,0 +1,454 @@ +# created unknown date +# FLOPS-derived aircraft input deck converted from N3CC_generic_low_speed_polars_FLOPSinp.txt + +# Input Values +aircraft:air_conditioning:mass_scaler,0.98094,unitless +aircraft:anti_icing:mass_scaler,0.53202,unitless +aircraft:apu:mass_scaler,1.02321,unitless +aircraft:avionics:mass_scaler,1.123226,unitless +aircraft:canard:laminar_flow_lower,0,unitless +aircraft:canard:laminar_flow_upper,0,unitless +aircraft:canard:mass_scaler,1,unitless +aircraft:crew_and_payload:baggage_mass_per_passenger,35,lbm +aircraft:crew_and_payload:design:num_business_class,20,unitless +aircraft:crew_and_payload:design:num_first_class,16,unitless +aircraft:crew_and_payload:design:num_tourist_class,118,unitless +aircraft:crew_and_payload:flight_crew_mass_scaler,1,unitless +aircraft:crew_and_payload:mass_per_passenger,165,lbm +aircraft:crew_and_payload:misc_cargo,0,lbm +aircraft:crew_and_payload:non_flight_crew_mass_scaler,1,unitless +aircraft:crew_and_payload:num_flight_attendants,-1,unitless +aircraft:crew_and_payload:num_flight_crew,-1,unitless +aircraft:crew_and_payload:num_galley_crew,-1,unitless +aircraft:crew_and_payload:passenger_service_mass_scaler,1,unitless +aircraft:crew_and_payload:wing_cargo,0,lbm +aircraft:design:base_area,0,ft**2 +aircraft:design:empty_mass_margin_scaler,0.01498,unitless +aircraft:design:landing_to_takeoff_mass_ratio,0.84,unitless +aircraft:design:lift_dependent_drag_coeff_factor,0.93,unitless +aircraft:design:subsonic_drag_coeff_factor,0.95,unitless +aircraft:design:supersonic_drag_coeff_factor,1,unitless +aircraft:design:touchdown_mass,0,lbm +aircraft:design:use_alt_mass,False,unitless +aircraft:design:zero_lift_drag_coeff_factor,0.96,unitless +aircraft:electrical:mass_scaler,1.1976,unitless +aircraft:engine:additional_mass_fraction,0,unitless +aircraft:engine:constant_fuel_consumption,0,lbm/h +aircraft:engine:flight_idle_max_fraction,1,unitless +aircraft:engine:flight_idle_min_fraction,0.08,unitless +aircraft:engine:fuel_flow_scaler_constant_term,0,unitless +aircraft:engine:fuel_flow_scaler_linear_term,0,unitless +aircraft:engine:generate_flight_idle,True,unitless +aircraft:engine:geopotential_alt,False,unitless +aircraft:engine:ignore_negative_thrust,False,unitless +aircraft:engine:mass_scaler,1.15,unitless +aircraft:engine:num_fuselage_engines,0,unitless +aircraft:engine:num_wing_engines,2,unitless +aircraft:engine:reference_mass,6293.8,lbm +aircraft:engine:reference_sls_thrust,22200.5,lbf +aircraft:engine:scaled_sls_thrust,22200,0,0,0,0,0,lbf +aircraft:engine:subsonic_fuel_flow_scaler,1,unitless +aircraft:engine:supersonic_fuel_flow_scaler,1,unitless +aircraft:engine:wing_locations,0.289682918,unitless +aircraft:fins:area,0,ft**2 +aircraft:fins:mass_scaler,1,unitless +aircraft:fins:num_fins,0,unitless +aircraft:fins:taper_ratio,-10,unitless +aircraft:fuel:auxiliary_fuel_capacity,0,lbm +aircraft:fuel:density_ratio,1,unitless +aircraft:fuel:fuel_system_mass_scaler,0.93202,unitless +aircraft:fuel:fuselage_fuel_capacity,0,lbm +aircraft:fuel:num_tanks,7,unitless +aircraft:fuel:total_capacity,0,lbm +aircraft:fuel:unusable_fuel_mass_scaler,1,unitless +aircraft:fuel:wing_fuel_capacity,25.903,lbm +aircraft:furnishings:mass_scaler,0.81859,unitless +aircraft:fuselage:laminar_flow_lower,0,unitless +aircraft:fuselage:laminar_flow_upper,0,unitless +aircraft:fuselage:length,125,ft +aircraft:fuselage:mass_scaler,0.69981,unitless +aircraft:fuselage:max_height,13,ft +aircraft:fuselage:max_width,12.3,ft +aircraft:fuselage:military_cargo_floor,False,unitless +aircraft:fuselage:num_fuselages,1,unitless +aircraft:fuselage:passenger_compartment_length,97.5,ft +aircraft:fuselage:wetted_area,4235.082096,ft**2 +aircraft:horizontal_tail:area,349.522730527158,ft**2 +aircraft:horizontal_tail:aspect_ratio,5.22699386503068,unitless +aircraft:horizontal_tail:laminar_flow_lower,0,unitless +aircraft:horizontal_tail:laminar_flow_upper,29,unitless +aircraft:horizontal_tail:mass_scaler,1.42225,unitless +aircraft:horizontal_tail:sweep,30.5853213018973,deg +aircraft:horizontal_tail:taper_ratio,0.2734375,unitless +aircraft:horizontal_tail:thickness_to_chord,0.115,unitless +aircraft:horizontal_tail:vertical_tail_fraction,0,unitless +aircraft:horizontal_tail:wetted_area,576.571192,ft**2 +aircraft:hydraulics:mass_scaler,0.95543,unitless +aircraft:hydraulics:system_pressure,5000,psi +aircraft:instruments:mass_scaler,1.66955,unitless +aircraft:landing_gear:carrier_based,False,unitless +aircraft:landing_gear:drag_coefficient,0.024,unitless +aircraft:landing_gear:main_gear_mass_scaler,0.8846,unitless +aircraft:landing_gear:main_gear_oleo_length,0,inch +aircraft:landing_gear:nose_gear_mass_scaler,0.8846,unitless +aircraft:landing_gear:nose_gear_oleo_length,0,inch +aircraft:nacelle:avg_diameter,7.2,ft +aircraft:nacelle:avg_length,35,ft +aircraft:nacelle:laminar_flow_lower,0,unitless +aircraft:nacelle:laminar_flow_upper,0,unitless +aircraft:nacelle:wetted_area,244.468282,ft**2 +aircraft:paint:mass_per_unit_area,0,lbm/ft**2 +aircraft:propulsion:engine_oil_mass_scaler,1,unitless +aircraft:propulsion:misc_mass_scaler,0,unitless +aircraft:vertical_tail:area,227.184358191707,ft**2 +aircraft:vertical_tail:aspect_ratio,1.77777777777778,unitless +aircraft:vertical_tail:laminar_flow_lower,29,unitless +aircraft:vertical_tail:laminar_flow_upper,29,unitless +aircraft:vertical_tail:mass_scaler,1.42225,unitless +aircraft:vertical_tail:num_tails,1,unitless +aircraft:vertical_tail:sweep,39.735053245438,deg +aircraft:vertical_tail:taper_ratio,0.25,unitless +aircraft:vertical_tail:thickness_to_chord,0.1,unitless +aircraft:vertical_tail:wetted_area,445.645658,ft**2 +aircraft:wing:aeroelastic_tailoring_factor,0.33333,unitless +aircraft:wing:airfoil_technology,1.6,unitless +aircraft:wing:area,1220,1,0,0,0,0,ft**2 +aircraft:wing:aspect_ratio,11.5587605382765,1,0,0,0,0,unitless +aircraft:wing:aspect_ratio_reference,11.5587605382765,unitless +aircraft:wing:bending_mass_scaler,1,unitless +aircraft:wing:bwb_aft_body_mass_scaler,1,unitless +aircraft:wing:chord_per_semispan,0.273522534166506,0.204274849507037,0.0888152947868224,0.0725353313595661,unitless +aircraft:wing:composite_fraction,0.33333,unitless +aircraft:wing:control_surface_area_ratio,0.333,unitless +aircraft:wing:dihedral,6,deg +aircraft:wing:glove_and_bat,0,ft**2 +aircraft:wing:input_station_dist,0,0.34453777998,0.919,1,unitless +aircraft:wing:laminar_flow_lower,0,unitless +aircraft:wing:laminar_flow_upper,58,unitless +aircraft:wing:load_distribution_control,2,unitless +aircraft:wing:load_fraction,1,unitless +aircraft:wing:load_path_sweep_dist,0,23.6286942529271,23.6286942529271,deg +aircraft:wing:mass_scaler,0.7412,unitless +aircraft:wing:max_camber_at_70_semispan,0.015,unitless +aircraft:wing:misc_mass_scaler,1.7,unitless +aircraft:wing:num_integration_stations,100,unitless +aircraft:wing:shear_control_mass_scaler,0.749,unitless +aircraft:wing:span,118.7505278165,ft +aircraft:wing:span_efficiency_factor,0.95,unitless +aircraft:wing:span_efficiency_reduction,False,unitless +aircraft:wing:strut_bracing_factor,0,unitless +aircraft:wing:surface_ctrl_mass_scaler,1.77696,unitless +aircraft:wing:sweep,23.6286942529271,0,0,0,0,0,deg +aircraft:wing:taper_ratio,0.265189599754917,0,0,0,0,0,unitless +aircraft:wing:thickness_to_chord,0.12233,0,0,0,0,0,unitless +aircraft:wing:thickness_to_chord_dist,0.14233,0.12233,0.1108,0.1058,unitless +aircraft:wing:thickness_to_chord_reference,0.116565,unitless +aircraft:wing:ultimate_load_factor,3.75,unitless +aircraft:wing:var_sweep_mass_penalty,0,unitless +aircraft:wing:wetted_area,2210.280228,ft**2 +mission:constraints:max_mach,0.785,unitless +mission:design:gross_mass,1,lbm +mission:design:lift_coefficient,-1,unitless +mission:design:mach,-1,unitless +mission:design:range,3500,NM +mission:design:thrust_takeoff_per_eng,0,lbf +mission:landing:flare_rate,2.2,deg/s +mission:landing:initial_velocity,145,ft/s +mission:landing:lift_coefficient_max,2.5,unitless +mission:summary:cruise_mach,0.785,0,0,0,0,0,unitless +mission:summary:fuel_flow_scaler,1,unitless +mission:takeoff:angle_of_attack_runway,0,deg +mission:takeoff:braking_friction_coefficient,0.35,unitless +mission:takeoff:final_altitude,35,ft +mission:takeoff:fuel_simple,0,lbm +mission:takeoff:lift_coefficient_max,2,unitless +mission:takeoff:rolling_friction_coefficient,0.0175,unitless +mission:takeoff:spoiler_drag_coefficient,0.085,unitless +mission:takeoff:spoiler_lift_coefficient,-0.81,unitless +mission:takeoff:thrust_incidence,0,deg +settings:equations_of_motion,height_energy +settings:mass_method,FLOPS + +# Unconverted Values +AERIN.clapp,2 +AERIN.dratio,1 +AERIN.elodma,0 +AERIN.elodss,0 +AERIN.flldg,8190 +AERIN.flto,8190 +AERIN.modaro,0 +AERIN.thrma,0 +AERIN.thrss,0 +AERIN.xllam,1 +CONFIN.ch,43000,0,0,0,0,0 +CONFIN.fixful,0 +CONFIN.fixspn,0 +CONFIN.gw,180000,1,0,0,0,0 +CONFIN.htvc,1 +CONFIN.pglov,0 +CONFIN.plr,0,0,0,0,0,0 +CONFIN.rotvel,0,0,0,0,0,0 +CONFIN.varth,0,0,0,0,0,0 +CONFIN.vtvc,1 +CONFIN.wsr,0 +ENGDIN.boost,0 +ENGDIN.extfac,1 +ENGDIN.ifill,2 +ENGDIN.igenen,-1 +ENGDIN.ixtrap,1 +ENGDIN.maxcr,1 +ENGDIN.ngprt,1 +ENGDIN.nox,1 +MISSIN.NPCON,0 +MISSIN.altran,200 +MISSIN.appfff,2 +MISSIN.apprtm,4 +MISSIN.cdfeth,0 +MISSIN.clamax,10000,43000 +MISSIN.clamin,0,10000 +MISSIN.cldcd,0,0 +MISSIN.clmmax,0.45222,0.785 +MISSIN.clmmin,0.3,0.45222 +MISSIN.cralt,43000 +MISSIN.crclmx,1 +MISSIN.crdcd,0 +MISSIN.crmach,0.785 +MISSIN.crmmin,0.45222 +MISSIN.dcwt,1 +MISSIN.deamax,43000 +MISSIN.deamin,0 +MISSIN.decl,0.74 +MISSIN.dedcd,0 +MISSIN.demmax,0.785 +MISSIN.demmin,0.3 +MISSIN.divlim,0 +MISSIN.dtc,0 +MISSIN.dwt,1 +MISSIN.erealt,10000 +MISSIN.eremch,0.45222 +MISSIN.faprfl,0 +MISSIN.feathf,0.5 +MISSIN.ffuel,1 +MISSIN.flrcr,1 +MISSIN.fnox,0 +MISSIN.ftxifl,0 +MISSIN.ftxofl,0 +MISSIN.fwf,-1,-1 +MISSIN.holdtm,20 +MISSIN.hpmin,15000 +MISSIN.iata,0 +MISSIN.icron,0 +MISSIN.idoq,0 +MISSIN.ifaacl,2 +MISSIN.ifaade,-1 +MISSIN.ifeath,0 +MISSIN.iflag,2 +MISSIN.ihopos,2 +MISSIN.indr,0 +MISSIN.ioc,1 +MISSIN.ippcl,1,1 +MISSIN.irs,1 +MISSIN.irw,1 +MISSIN.iskal,1 +MISSIN.ittff,1 +MISSIN.ivs,2 +MISSIN.keasvc,0 +MISSIN.keasvd,0 +MISSIN.maxcl,1,1 +MISSIN.msumpt,1 +MISSIN.mywts,0 +MISSIN.nclimb,2 +MISSIN.nclres,1 +MISSIN.ncrcl,1,1 +MISSIN.ncrhol,1 +MISSIN.ncrres,1 +MISSIN.ncrth,1 +MISSIN.ncruse,1 +MISSIN.nhold,0 +MISSIN.nincl,3,30 +MISSIN.ninde,18 +MISSIN.nodive,1 +MISSIN.npcon,1 +MISSIN.nql,2 +MISSIN.owfact,1 +MISSIN.qlalt,1500,10000 +MISSIN.qlim,425 +MISSIN.rcin,300 +MISSIN.rdlim,-3000 +MISSIN.resrfu,0 +MISSIN.restrp,0.03 +MISSIN.rtol,0.001 +MISSIN.spdlim,288.69 +MISSIN.srealt,1500 +MISSIN.sremch,0.3 +MISSIN.takoff,0 +MISSIN.takotm,2 +MISSIN.taxitm,5 +MISSIN.taxotm,9 +MISSIN.thold,0 +MISSIN.timmap,2 +MISSIN.tlwind,0 +MISSIN.txfufl,0 +MISSIN.vqlm,260,320 +OPTION.ianal,3 +OPTION.icost,0 +OPTION.ifite,0 +OPTION.iland,1 +OPTION.ineng,0 +OPTION.iopt,1 +OPTION.iplths,0 +OPTION.ipltth,2 +OPTION.ipolp,1 +OPTION.itakof,1 +OPTION.ixfl,1 +OPTION.lpfile,0 +OPTION.mprint,1 +OPTION.nmach,3 +OPTION.noise,0 +OPTION.nopro,1 +OPTION.npfile,1 +OPTION.pmach,0.3,0.45222,0.785 +OPTION.polalt,39000 +PCONIN.conalt,43000 +PCONIN.conaux,2 +PCONIN.confm,1 +PCONIN.conlim,300 +PCONIN.conmch,0.785 +PCONIN.connz,1 +PCONIN.conpc,1 +PCONIN.conwt,0 +PCONIN.conwta,0 +PCONIN.iconsg,2 +PCONIN.icontp,5 +PCONIN.icstdg,0 +PCONIN.neo,2 +PROIN.alpmin,0 +PROIN.gamlim,0 +PROIN.ipcmax,1 +PROIN.npol,0 +PROIN.ntime,1 +PROIN.txf,-1 +RERUN.desrng,900 +RERUN.iland,0 +RERUN.iplrng,-1 +RERUN.itakof,0 +RERUN.mywts,1 +SEGIN.dstop,23000 +SEGIN.hstop,10000 +SEGIN.key,'LAST' +SEGIN.nflap,1 +SEGIN.vfix,10 +SEGIN.vstop,288.69 +TOLIN.acclim,16 +TOLIN.almxld,12 +TOLIN.almxto,15 +TOLIN.alpld,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 +TOLIN.alprot,8.8 +TOLIN.alpto,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 +TOLIN.apa,0 +TOLIN.aprang,-3 +TOLIN.aprhgt,100 +TOLIN.argef,1 +TOLIN.cdeout,0.0046077279938182 +TOLIN.cdld,0.1,0.1,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.2,0.22,0.24,0.26,0.3,0.32,0.34 +TOLIN.cdmld,0.045 +TOLIN.cdmto,0.05 +TOLIN.cdrev,0 +TOLIN.cdto,0.0674,0.065,0.065,0.07,0.072,0.076,0.084,0.09,0.1,0.11,0.12,0.13,0.15,0.16,0.18,0.2 +TOLIN.clld,0.7,0.9,1.05,1.15,1.25,1.4,1.5,1.6,1.7,1.8,1.9,2,2.1,2.2,2.3,2.4 +TOLIN.clldm,2.4 +TOLIN.clrev,0 +TOLIN.clto,0.5178,0.6,0.75,0.85,0.95,1.05,1.15,1.25,1.35,1.5,1.6,1.7,1.8,1.85,1.9,1.95 +TOLIN.cltom,2 +TOLIN.deldfl,2 +TOLIN.delhap,2 +TOLIN.deltcl,0.2 +TOLIN.deltrn,0.25 +TOLIN.deltro,0.2 +TOLIN.delvto,4 +TOLIN.dtct,10 +TOLIN.fcdmld,0.3 +TOLIN.fcdmto,0.3 +TOLIN.fldcd,1 +TOLIN.fldcl,1 +TOLIN.ftocd,1 +TOLIN.ftocl,1 +TOLIN.ibal,2 +TOLIN.igobs,0 +TOLIN.incgef,1 +TOLIN.inthld,2 +TOLIN.inthrv,2 +TOLIN.inthto,2 +TOLIN.irev,0 +TOLIN.ispol,1 +TOLIN.itime,1 +TOLIN.itxout,0 +TOLIN.magrup,1 +TOLIN.noflar,0 +TOLIN.obsld,50 +TOLIN.pilott,1 +TOLIN.revcut,-1000 +TOLIN.rvfact,0 +TOLIN.tdelg,3 +TOLIN.tdsink,8 +TOLIN.thfact,1 +TOLIN.thrld +TOLIN.tibra,0 +TOLIN.tibrak,1.46 +TOLIN.ticut,1.46 +TOLIN.tigear,8 +TOLIN.tirva,0 +TOLIN.tirvrs,2 +TOLIN.tispa,0 +TOLIN.tispol,1.46 +TOLIN.vangl,6 +TOLIN.vrotat,1.05 +TOLIN.whgt,8.6 +WTIN.arfin,-10 +WTIN.cgacon,0 +WTIN.cgais,0 +WTIN.cgammo,0 +WTIN.cgap,0 +WTIN.cgarm,0 +WTIN.cgav,0 +WTIN.cgaxg,0 +WTIN.cgaxt,0 +WTIN.cgcan,0 +WTIN.cgcf,0 +WTIN.cgcr,0 +WTIN.cgcw,0 +WTIN.cgea,0 +WTIN.cgef,0 +WTIN.cgf,0 +WTIN.cgfin,0 +WTIN.cgfwf,0 +WTIN.cght,0 +WTIN.cglgm,0 +WTIN.cglgn,0 +WTIN.cgmis,0 +WTIN.cgp,0 +WTIN.cgrefl,0 +WTIN.cgrefx,0 +WTIN.cgvt,0 +WTIN.cgw,0 +WTIN.cgzwf,0 +WTIN.dldwt,0 +WTIN.einl,1 +WTIN.enoz,1 +WTIN.ifufu,0 +WTIN.ispowe,0 +WTIN.mldwt,0 +WTIN.mywts,0 +WTIN.netaw,4 +WTIN.nwref,39 +WTIN.paylmx,52000 +WTIN.spwcon,38584 +WTIN.spwgw,0.104087 +WTIN.spwsw,9.5 +WTIN.spwth,2.2344 +WTIN.swpfin,-10 +WTIN.tcfin,0 +WTIN.warm,0 +WTIN.wauxt,1 +WTIN.winl,0 +WTIN.wnoz,0 diff --git a/aviary/utils/test/data/converter_test_data_large_single_aisle_1_GASP.csv b/aviary/utils/test/data/converter_test_data_large_single_aisle_1_GASP.csv new file mode 100644 index 000000000..7a0a23fd2 --- /dev/null +++ b/aviary/utils/test/data/converter_test_data_large_single_aisle_1_GASP.csv @@ -0,0 +1,226 @@ +# Input Values +aircraft:air_conditioning:mass_coefficient,1.65,unitless +aircraft:anti_icing:mass,551,lbm +aircraft:apu:mass,928,lbm +aircraft:avionics:mass,1959,lbm +aircraft:controls:cockpit_control_mass_scaler,1,unitless +aircraft:controls:control_mass_increment,0,lbm +aircraft:controls:stability_augmentation_system_mass,0,lbm +aircraft:controls:stability_augmentation_system_mass_scaler,1,unitless +aircraft:crew_and_payload:cargo_mass,10040,lbm +aircraft:crew_and_payload:catering_items_mass_per_passenger,7.6,lbm +aircraft:crew_and_payload:design:num_passengers,180,unitless +aircraft:crew_and_payload:passenger_mass_with_bags,200,lbm +aircraft:crew_and_payload:passenger_service_mass_per_passenger,5,lbm +aircraft:crew_and_payload:water_mass_per_occupant,3,lbm +aircraft:design:cg_delta,0.25,unitless +aircraft:design:cockpit_control_mass_coefficient,16.5,unitless +aircraft:design:drag_increment,0.00175,unitless +aircraft:design:emergency_equipment_mass,50,lbm +aircraft:design:max_structural_speed,402.5,mi/h +aircraft:design:part25_structural_category,3,unitless +aircraft:design:reserve_fuel_additional,4998,lbm +aircraft:design:reserve_fuel_fraction,0,unitless +aircraft:design:static_margin,0.03,unitless +aircraft:design:structural_mass_increment,0,lbm +aircraft:design:supercritical_drag_shift,0.033,unitless +aircraft:engine:additional_mass_fraction,0.14,unitless +aircraft:engine:data_file,models/engines/turbofan_23k_1.deck,unitless +aircraft:engine:mass_scaler,1,unitless +aircraft:engine:mass_specific,0.21366,lbm/lbf +aircraft:engine:num_engines,2,unitless +aircraft:engine:pod_mass_scaler,1,unitless +aircraft:engine:pylon_factor,1.25,unitless +aircraft:engine:reference_diameter,5.8,ft +aircraft:engine:reference_sls_thrust,28690,lbf +aircraft:engine:scaled_sls_thrust,28690,lbf +aircraft:engine:type,7,unitless +aircraft:engine:wing_locations,0.35,unitless +aircraft:fuel:density,6.687,lbm/galUS +aircraft:fuel:fuel_margin,0,unitless +aircraft:fuel:fuel_system_mass_coefficient,0.041,unitless +aircraft:fuel:fuel_system_mass_scaler,1,unitless +aircraft:fuel:unusable_fuel_mass_coefficient,12,unitless +aircraft:fuel:wing_fuel_fraction,0.6,unitless +aircraft:furnishings:mass,11192,lbm +aircraft:fuselage:aisle_width,24,inch +aircraft:fuselage:delta_diameter,4.5,ft +aircraft:fuselage:flat_plate_area_increment,0.25,ft**2 +aircraft:fuselage:form_factor,1.25,unitless +aircraft:fuselage:mass_coefficient,128,unitless +aircraft:fuselage:nose_fineness,1,unitless +aircraft:fuselage:num_aisles,1,unitless +aircraft:fuselage:num_seats_abreast,6,unitless +aircraft:fuselage:pilot_compartment_length,9.5,ft +aircraft:fuselage:pressure_differential,7.5,psi +aircraft:fuselage:seat_pitch,29,inch +aircraft:fuselage:seat_width,20.2,inch +aircraft:fuselage:tail_fineness,3,unitless +aircraft:fuselage:wetted_area,4000,ft**2 +aircraft:horizontal_tail:area,0,ft**2 +aircraft:horizontal_tail:aspect_ratio,4.75,unitless +aircraft:horizontal_tail:form_factor,1.25,unitless +aircraft:horizontal_tail:mass_coefficient,0.232,unitless +aircraft:horizontal_tail:moment_ratio,0.2307,unitless +aircraft:horizontal_tail:sweep,25,deg +aircraft:horizontal_tail:taper_ratio,0.352,unitless +aircraft:horizontal_tail:thickness_to_chord,0.12,unitless +aircraft:horizontal_tail:vertical_tail_fraction,0,unitless +aircraft:horizontal_tail:volume_coefficient,1.189,unitless +aircraft:hydraulics:flight_control_mass_coefficient,0.112,unitless +aircraft:hydraulics:gear_mass_coefficient,0.14,unitless +aircraft:instruments:mass_coefficient,0.0736,unitless +aircraft:landing_gear:fixed_gear,False,unitless +aircraft:landing_gear:main_gear_location,0.15,unitless +aircraft:landing_gear:main_gear_mass_coefficient,0.85,unitless +aircraft:landing_gear:mass_coefficient,0.04,unitless +aircraft:landing_gear:tail_hook_mass_scaler,1,unitless +aircraft:landing_gear:total_mass_scaler,1,unitless +aircraft:nacelle:clearance_ratio,0.2,unitless +aircraft:nacelle:core_diameter_ratio,1.25,unitless +aircraft:nacelle:fineness,2,unitless +aircraft:nacelle:form_factor,1.5,unitless +aircraft:nacelle:mass_specific,3,lbm/ft**2 +aircraft:strut:area_ratio,0,unitless +aircraft:strut:attachment_location,0,ft +aircraft:strut:attachment_location_dimensionless,0,unitless +aircraft:strut:dimensional_location_specified,False,unitless +aircraft:strut:fuselage_interference_factor,0,unitless +aircraft:strut:mass_coefficient,0,unitless +aircraft:strut:thickness_to_chord,0,unitless +aircraft:vertical_tail:area,0,ft**2 +aircraft:vertical_tail:aspect_ratio,1.67,unitless +aircraft:vertical_tail:form_factor,1.25,unitless +aircraft:vertical_tail:mass_coefficient,0.289,unitless +aircraft:vertical_tail:moment_ratio,2.362,unitless +aircraft:vertical_tail:sweep,35,deg +aircraft:vertical_tail:taper_ratio,0.801,unitless +aircraft:vertical_tail:thickness_to_chord,0.12,unitless +aircraft:vertical_tail:volume_coefficient,0.145,unitless +aircraft:wing:aspect_ratio,10.13,unitless +aircraft:wing:center_distance,0.463,unitless +aircraft:wing:choose_fold_location,True,unitless +aircraft:wing:flap_chord_ratio,0.3,unitless +aircraft:wing:flap_deflection_landing,40,deg +aircraft:wing:flap_deflection_takeoff,10,deg +aircraft:wing:flap_drag_increment_optimum,0.1,unitless +aircraft:wing:flap_lift_increment_optimum,1.5,unitless +aircraft:wing:flap_span_ratio,0.65,unitless +aircraft:wing:flap_type,double_slotted,unitless +aircraft:wing:fold_dimensional_location_specified,False,unitless +aircraft:wing:fold_mass_coefficient,0,unitless +aircraft:wing:folded_span,0,ft +aircraft:wing:form_factor,1.25,unitless +aircraft:wing:fuselage_interference_factor,1.1,unitless +aircraft:wing:has_fold,False,unitless +aircraft:wing:has_strut,False,unitless +aircraft:wing:height,8,ft +aircraft:wing:high_lift_mass_coefficient,1.9,unitless +aircraft:wing:incidence,1.5,deg +aircraft:wing:loading,128,lbf/ft**2 +aircraft:wing:mass_coefficient,102.5,unitless +aircraft:wing:max_lift_ref,1.15,unitless +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:num_flap_segments,2,unitless +aircraft:wing:optimum_flap_deflection,55,deg +aircraft:wing:optimum_slat_deflection,20,deg +aircraft:wing:slat_chord_ratio,0.15,unitless +aircraft:wing:slat_lift_increment_optimum,0.93,unitless +aircraft:wing:slat_span_ratio,0.9,unitless +aircraft:wing:surface_ctrl_mass_coefficient,0.95,unitless +aircraft:wing:sweep,25,deg +aircraft:wing:taper_ratio,0.33,unitless +aircraft:wing:thickness_to_chord_root,0.15,unitless +aircraft:wing:thickness_to_chord_tip,0.12,unitless +aircraft:wing:zero_lift_angle,-1.2,deg +mission:design:cruise_altitude,37500,ft +mission:design:gross_mass,175400,lbm +mission:design:mach,0.8,unitless +mission:design:range,3675,NM +mission:design:rate_of_climb_at_top_of_climb,300,ft/min +mission:landing:airport_altitude,0,ft +mission:landing:braking_delay,1,s +mission:landing:glide_to_stall_ratio,1.3,unitless +mission:landing:maximum_flare_load_factor,1.15,unitless +mission:landing:maximum_sink_rate,900,ft/min +mission:landing:obstacle_height,50,ft +mission:landing:touchdown_sink_rate,5,ft/s +mission:summary:fuel_flow_scaler,1,unitless +mission:takeoff:decision_speed_increment,10,kn +mission:takeoff:rotation_speed_increment,5,kn +mission:taxi:duration,0.1677,h +settings:equations_of_motion,2DOF +settings:mass_method,GASP + +# Initialization Guesses +actual_takeoff_mass,0 +climb_range,0 +cruise_mass_final,0 +flight_duration,0 +fuel_burn_per_passenger_mile,0 +reserves,0 +rotation_mass,0 +time_to_climb,0 + +# Unconverted Values +INGASP.ALR,1.11 +INGASP.BENGOB,0.05 +INGASP.CINP,0.11 +INGASP.CK10,1 +INGASP.CK11,1 +INGASP.CK18,1 +INGASP.CK7,1 +INGASP.CK8,1 +INGASP.CK9,1 +INGASP.CLIAB,1984 +INGASP.CMF,15 +INGASP.CMV,0.15 +INGASP.CRWOH,15 +INGASP.DCDSE,-1 +INGASP.DYR,12 +INGASP.EMCRU,0.8 +INGASP.FCSF,2.5 +INGASP.FPYLND,1 +INGASP.HBTP,0.333 +INGASP.HIR,0.015 +INGASP.HNCRU,37500 +INGASP.HPORT,0 +INGASP.HRI,2500 +INGASP.HSCREQ,20000 +INGASP.ICLM,3 +INGASP.ICRUS,0 +INGASP.IWLD,2 +INGASP.JENGSZ,4 +INGASP.KNAC,1 +INGASP.KODEAC,7 +INGASP.KODECL,7 +INGASP.KODETO,5 +INGASP.KODETR,6 +INGASP.MX,0 +INGASP.NFAIL,0 +INGASP.OFALT,0 +INGASP.OFEM,0.78 +INGASP.OHR,350 +INGASP.PRV,0.15 +INGASP.RELP,0 +INGASP.RELR,0.4524 +INGASP.RF,0.05,125,20000,25000 +INGASP.RI,0.8 +INGASP.ROSCAB,9999 +INGASP.RWCRTX,0.985 +INGASP.SKPES,0.258 +INGASP.SM1D,0.625 +INGASP.SRPM,18000 +INGASP.TBO,3500 +INGASP.TR,1 +INGASP.VCLMB,270 +INGASP.WENG,6130 +INGASP.WLPCT,0.9423 +INGASP.WNAC,0 +INGASP.WPLX,0 +INGASP.WPYLON,0 +INGASP.XTORQ,8000 diff --git a/aviary/utils/test/data/FLOPS_turbofan_22k.txt b/aviary/utils/test/data/turbofan_22k.txt similarity index 100% rename from aviary/utils/test/data/FLOPS_turbofan_22k.txt rename to aviary/utils/test/data/turbofan_22k.txt diff --git a/aviary/utils/test/data/GASP_turbofan_23k_1.eng b/aviary/utils/test/data/turbofan_23k_1.eng similarity index 99% rename from aviary/utils/test/data/GASP_turbofan_23k_1.eng rename to aviary/utils/test/data/turbofan_23k_1.eng index 7f161d0cb..11092fba4 100644 --- a/aviary/utils/test/data/GASP_turbofan_23k_1.eng +++ b/aviary/utils/test/data/turbofan_23k_1.eng @@ -1,5 +1,5 @@ 1 0 994.36 3342. 3196. 3108. 1.25 -Georgia Tech Tube&Wing 2017 Turbofan Engine Model: Corrected Thrust +Turbofan Engine Model: Corrected Thrust 15 8 11 0.0000 diff --git a/aviary/models/engines/turboshaft_4465hp.eng b/aviary/utils/test/data/turboshaft_4465hp.eng similarity index 100% rename from aviary/models/engines/turboshaft_4465hp.eng rename to aviary/utils/test/data/turboshaft_4465hp.eng diff --git a/aviary/utils/test/test_engine_deck_conversion.py b/aviary/utils/test/test_engine_deck_conversion.py index a728abad6..fffcb3bab 100644 --- a/aviary/utils/test/test_engine_deck_conversion.py +++ b/aviary/utils/test/test_engine_deck_conversion.py @@ -3,44 +3,33 @@ from openmdao.utils.testing_utils import use_tempdirs -from aviary.utils.engine_deck_conversion import EngineDeckType, _exec_EDC +from aviary.utils.engine_deck_conversion import EngineDeckType, EngineDeckConverter from aviary.utils.functions import get_path -class DummyArgs(object): - def __init__(self): - self.input_file = None - self.output_file = None - self.data_format = None - - @use_tempdirs class TestEngineDeckConversion(unittest.TestCase): """ Test engine deck conversion utility by comparing against previously converted engine deck files """ - def prepare_and_run(self, filename, output_file=None, data_format=EngineDeckType.GASP): - args = DummyArgs() - + def prepare_and_run( + self, filename, output_file=None, data_format=EngineDeckType.GASP + ): # Specify the input file - args.input_file = filepath = get_path('models/engines/'+filename) + input_file = get_path('utils/test/data/' + filename) # Specify the output file if not output_file: - filename = filepath.stem+'.deck' - args.output_file = Path.cwd() / Path('TEST_'+filename) + filename = input_file.stem + '.deck' + output_file = Path.cwd() / Path('TEST_' + filename) else: - args.output_file = str(Path(output_file)) - - # Specify the legacy code and engine type - args.data_format = data_format + output_file = str(Path(output_file)) # Execute the conversion - _exec_EDC(args, None) - return args + EngineDeckConverter(input_file, output_file, data_format) - def compare_files(self, filepath, skip_list=[]): + def compare_files(self, filepath, skip_list=['# created']): """ Compares the converted file with a validation file. @@ -73,16 +62,26 @@ def compare_files(self, filepath, skip_list=[]): ) raise Exception(exc_string) - # TODO currently untested!! - # def test_TF_conversion(self): - # return + def test_TF_conversion_FLOPS(self): + filename = 'turbofan_22k.txt' + + self.prepare_and_run(filename, data_format=EngineDeckType.FLOPS) + self.compare_files(filename) + + def test_TF_conversion_GASP(self): + filename = 'turbofan_23k_1.eng' + + self.prepare_and_run(filename, data_format=EngineDeckType.GASP) + self.compare_files(filename) def test_TP_conversion(self): filename = 'turboshaft_4465hp.eng' - args = self.prepare_and_run(filename, data_format=EngineDeckType.GASP_TS) - self.compare_files(filename, skip_list=['# created']) + self.prepare_and_run(filename, data_format=EngineDeckType.GASP_TS) + self.compare_files(filename) if __name__ == "__main__": unittest.main() + # test = TestEngineDeckConversion() + # test.test_TP_conversion() diff --git a/aviary/utils/test/test_fortran_to_aviary.py b/aviary/utils/test/test_fortran_to_aviary.py index c63fb0678..8761657fb 100644 --- a/aviary/utils/test/test_fortran_to_aviary.py +++ b/aviary/utils/test/test_fortran_to_aviary.py @@ -66,22 +66,29 @@ def compare_files(self, filepath, skip_list=['# created ']): raise Exception(exc_string) def test_large_single_aisle(self): - filepath = 'models/large_single_aisle_1/large_single_aisle_1_GwGm.dat' + filepath = 'models/large_single_aisle_1/large_single_aisle_1_GASP.dat' + comparison_filepath = ( + 'utils/test/data/converter_test_data_large_single_aisle_1_GASP.csv' + ) self.prepare_and_run(filepath) - self.compare_files(filepath) + self.compare_files(comparison_filepath) def test_small_single_aisle(self): - filepath = 'models/small_single_aisle/small_single_aisle_GwGm.dat' + filepath = 'models/small_single_aisle_1/small_single_aisle_1_GASP.dat' + comparison_filepath = ( + 'utils/test/data/converter_test_data_small_single_aisle_1_GASP.csv' + ) self.prepare_and_run(filepath) - self.compare_files(filepath) + self.compare_files(comparison_filepath) def test_diff_configuration(self): - filepath = 'utils/test/data/converter_configuration_test_data_GwGm.dat' + filepath = 'utils/test/data/converter_test_data_GASP.dat' + comparison_filepath = 'utils/test/data/converter_test_data_GASP.csv' self.prepare_and_run(filepath) - self.compare_files(filepath) + self.compare_files(comparison_filepath) def test_N3CC(self): # Note: The csv comparison file N3CC_generic_low_speed_polars_FLOPSinp.csv was generated using the fortran-to-Aviary converter @@ -89,11 +96,10 @@ def test_N3CC(self): # test. filepath = 'models/N3CC/N3CC_generic_low_speed_polars_FLOPSinp.txt' - out_file = Path.cwd() / 'TEST_models/N3CC/N3CC_generic_low_speed_polars_FLOPSinp.csv' + comparison_filepath = 'utils/test/data/converter_test_data_N3CC_FLOPS.csv' - self.prepare_and_run(filepath, out_file=out_file, legacy_code=LegacyCode.FLOPS) - self.compare_files( - 'models/N3CC/N3CC_generic_low_speed_polars_FLOPSinp.csv') + self.prepare_and_run(filepath, legacy_code=LegacyCode.FLOPS) + self.compare_files(comparison_filepath) if __name__ == "__main__": From f17ca3eb0f009550eb72ebbdced74c982629b1e8 Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Tue, 10 Dec 2024 17:28:33 -0500 Subject: [PATCH 06/21] fixed other conversion tests --- .../test/data/converter_test_data_GASP.csv | 2 +- .../data/converter_test_data_N3CC_FLOPS.csv | 3 +- ...er_test_data_large_single_aisle_1_GASP.csv | 14 +- ...rter_test_data_small_single_aisle_GASP.csv | 228 ++++++++++++++++++ aviary/utils/test/test_fortran_to_aviary.py | 31 +-- 5 files changed, 253 insertions(+), 25 deletions(-) create mode 100644 aviary/utils/test/data/converter_test_data_small_single_aisle_GASP.csv diff --git a/aviary/utils/test/data/converter_test_data_GASP.csv b/aviary/utils/test/data/converter_test_data_GASP.csv index e2405d662..5980964e9 100644 --- a/aviary/utils/test/data/converter_test_data_GASP.csv +++ b/aviary/utils/test/data/converter_test_data_GASP.csv @@ -1,4 +1,4 @@ -# GASP-derived aircraft input deck converted from converter_configuration_test_data_GwGm.dat +# GASP-derived aircraft input deck converted from converter_test_data_GASP.dat # Input Values aircraft:air_conditioning:mass_coefficient,1.65,unitless diff --git a/aviary/utils/test/data/converter_test_data_N3CC_FLOPS.csv b/aviary/utils/test/data/converter_test_data_N3CC_FLOPS.csv index 98cf16cf5..cfb3e9514 100644 --- a/aviary/utils/test/data/converter_test_data_N3CC_FLOPS.csv +++ b/aviary/utils/test/data/converter_test_data_N3CC_FLOPS.csv @@ -1,5 +1,4 @@ -# created unknown date -# FLOPS-derived aircraft input deck converted from N3CC_generic_low_speed_polars_FLOPSinp.txt +# FLOPS-derived aircraft input deck converted from N3CC_generic_low_speed_polars_FLOPS.txt # Input Values aircraft:air_conditioning:mass_scaler,0.98094,unitless diff --git a/aviary/utils/test/data/converter_test_data_large_single_aisle_1_GASP.csv b/aviary/utils/test/data/converter_test_data_large_single_aisle_1_GASP.csv index 7a0a23fd2..d74211a19 100644 --- a/aviary/utils/test/data/converter_test_data_large_single_aisle_1_GASP.csv +++ b/aviary/utils/test/data/converter_test_data_large_single_aisle_1_GASP.csv @@ -1,3 +1,5 @@ +# GASP-derived aircraft input deck converted from large_single_aisle_1_GASP.dat + # Input Values aircraft:air_conditioning:mass_coefficient,1.65,unitless aircraft:anti_icing:mass,551,lbm @@ -17,6 +19,7 @@ aircraft:design:cg_delta,0.25,unitless aircraft:design:cockpit_control_mass_coefficient,16.5,unitless aircraft:design:drag_increment,0.00175,unitless aircraft:design:emergency_equipment_mass,50,lbm +aircraft:design:lift_curve_slope,7.1765,1/rad aircraft:design:max_structural_speed,402.5,mi/h aircraft:design:part25_structural_category,3,unitless aircraft:design:reserve_fuel_additional,4998,lbm @@ -25,7 +28,6 @@ aircraft:design:static_margin,0.03,unitless aircraft:design:structural_mass_increment,0,lbm aircraft:design:supercritical_drag_shift,0.033,unitless aircraft:engine:additional_mass_fraction,0.14,unitless -aircraft:engine:data_file,models/engines/turbofan_23k_1.deck,unitless aircraft:engine:mass_scaler,1,unitless aircraft:engine:mass_specific,0.21366,lbm/lbf aircraft:engine:num_engines,2,unitless @@ -47,6 +49,7 @@ aircraft:fuselage:aisle_width,24,inch aircraft:fuselage:delta_diameter,4.5,ft aircraft:fuselage:flat_plate_area_increment,0.25,ft**2 aircraft:fuselage:form_factor,1.25,unitless +aircraft:fuselage:length,0,ft aircraft:fuselage:mass_coefficient,128,unitless aircraft:fuselage:nose_fineness,1,unitless aircraft:fuselage:num_aisles,1,unitless @@ -98,6 +101,7 @@ aircraft:vertical_tail:taper_ratio,0.801,unitless aircraft:vertical_tail:thickness_to_chord,0.12,unitless aircraft:vertical_tail:volume_coefficient,0.145,unitless aircraft:wing:aspect_ratio,10.13,unitless +aircraft:wing:average_chord,12.615,ft aircraft:wing:center_distance,0.463,unitless aircraft:wing:choose_fold_location,True,unitless aircraft:wing:flap_chord_ratio,0.3,unitless @@ -131,6 +135,7 @@ aircraft:wing:optimum_slat_deflection,20,deg aircraft:wing:slat_chord_ratio,0.15,unitless aircraft:wing:slat_lift_increment_optimum,0.93,unitless aircraft:wing:slat_span_ratio,0.9,unitless +aircraft:wing:span,117.8,ft aircraft:wing:surface_ctrl_mass_coefficient,0.95,unitless aircraft:wing:sweep,25,deg aircraft:wing:taper_ratio,0.33,unitless @@ -170,12 +175,6 @@ time_to_climb,0 INGASP.ALR,1.11 INGASP.BENGOB,0.05 INGASP.CINP,0.11 -INGASP.CK10,1 -INGASP.CK11,1 -INGASP.CK18,1 -INGASP.CK7,1 -INGASP.CK8,1 -INGASP.CK9,1 INGASP.CLIAB,1984 INGASP.CMF,15 INGASP.CMV,0.15 @@ -188,7 +187,6 @@ INGASP.FPYLND,1 INGASP.HBTP,0.333 INGASP.HIR,0.015 INGASP.HNCRU,37500 -INGASP.HPORT,0 INGASP.HRI,2500 INGASP.HSCREQ,20000 INGASP.ICLM,3 diff --git a/aviary/utils/test/data/converter_test_data_small_single_aisle_GASP.csv b/aviary/utils/test/data/converter_test_data_small_single_aisle_GASP.csv new file mode 100644 index 000000000..0e3c22ec0 --- /dev/null +++ b/aviary/utils/test/data/converter_test_data_small_single_aisle_GASP.csv @@ -0,0 +1,228 @@ +# GASP-derived aircraft input deck converted from small_single_aisle_GASP.dat + +# Input Values +aircraft:air_conditioning:mass_coefficient,1.65,unitless +aircraft:anti_icing:mass,397,lbm +aircraft:apu:mass,778,lbm +aircraft:avionics:mass,1349,lbm +aircraft:controls:cockpit_control_mass_scaler,1,unitless +aircraft:controls:control_mass_increment,0,lbm +aircraft:controls:stability_augmentation_system_mass,0,lbm +aircraft:controls:stability_augmentation_system_mass_scaler,1,unitless +aircraft:crew_and_payload:cargo_mass,8598,lbm +aircraft:crew_and_payload:catering_items_mass_per_passenger,6,lbm +aircraft:crew_and_payload:design:num_passengers,96,unitless +aircraft:crew_and_payload:passenger_mass_with_bags,210,lbm +aircraft:crew_and_payload:passenger_service_mass_per_passenger,7.6,lbm +aircraft:crew_and_payload:water_mass_per_occupant,3,lbm +aircraft:design:cg_delta,0.25,unitless +aircraft:design:cockpit_control_mass_coefficient,16.5,unitless +aircraft:design:drag_increment,0.0018,unitless +aircraft:design:emergency_equipment_mass,50,lbm +aircraft:design:lift_curve_slope,7.1765,1/rad +aircraft:design:max_structural_speed,402.5,mi/h +aircraft:design:part25_structural_category,3,unitless +aircraft:design:reserve_fuel_additional,0,lbm +aircraft:design:reserve_fuel_fraction,0.125,unitless +aircraft:design:static_margin,0.05,unitless +aircraft:design:structural_mass_increment,0,lbm +aircraft:design:supercritical_drag_shift,0.025,unitless +aircraft:engine:additional_mass_fraction,0.14,unitless +aircraft:engine:mass_scaler,1,unitless +aircraft:engine:mass_specific,0.2153,lbm/lbf +aircraft:engine:num_engines,2,unitless +aircraft:engine:pod_mass_scaler,1,unitless +aircraft:engine:pylon_factor,0.6,unitless +aircraft:engine:reference_diameter,5.8,ft +aircraft:engine:reference_sls_thrust,28690,lbf +aircraft:engine:scaled_sls_thrust,23800,lbf +aircraft:engine:type,7,unitless +aircraft:engine:wing_locations,0.272,unitless +aircraft:fuel:density,6.687,lbm/galUS +aircraft:fuel:fuel_margin,0,unitless +aircraft:fuel:fuel_system_mass_coefficient,0.0333,unitless +aircraft:fuel:fuel_system_mass_scaler,1,unitless +aircraft:fuel:unusable_fuel_mass_coefficient,12,unitless +aircraft:fuel:wing_fuel_fraction,0.6,unitless +aircraft:furnishings:mass,9071,lbm +aircraft:fuselage:aisle_width,19,inch +aircraft:fuselage:delta_diameter,4.25,ft +aircraft:fuselage:flat_plate_area_increment,0.25,ft**2 +aircraft:fuselage:form_factor,1.55,unitless +aircraft:fuselage:length,0,ft +aircraft:fuselage:mass_coefficient,121.2,unitless +aircraft:fuselage:nose_fineness,0.845,unitless +aircraft:fuselage:num_aisles,1,unitless +aircraft:fuselage:num_seats_abreast,4,unitless +aircraft:fuselage:pilot_compartment_length,11.7,ft +aircraft:fuselage:pressure_differential,7.5,psi +aircraft:fuselage:seat_pitch,31,inch +aircraft:fuselage:seat_width,24,inch +aircraft:fuselage:tail_fineness,3.368,unitless +aircraft:fuselage:wetted_area_scaler,1,unitless +aircraft:horizontal_tail:area,0,ft**2 +aircraft:horizontal_tail:aspect_ratio,4.26,unitless +aircraft:horizontal_tail:form_factor,1.55,unitless +aircraft:horizontal_tail:mass_coefficient,0.325,unitless +aircraft:horizontal_tail:moment_ratio,0.1844,unitless +aircraft:horizontal_tail:sweep,34.7,deg +aircraft:horizontal_tail:taper_ratio,0.381,unitless +aircraft:horizontal_tail:thickness_to_chord,0.107,unitless +aircraft:horizontal_tail:vertical_tail_fraction,0,unitless +aircraft:horizontal_tail:volume_coefficient,1.2266,unitless +aircraft:hydraulics:flight_control_mass_coefficient,0.112,unitless +aircraft:hydraulics:gear_mass_coefficient,0.14,unitless +aircraft:instruments:mass_coefficient,0.06,unitless +aircraft:landing_gear:fixed_gear,False,unitless +aircraft:landing_gear:main_gear_location,0.199,unitless +aircraft:landing_gear:main_gear_mass_coefficient,0.85,unitless +aircraft:landing_gear:mass_coefficient,0.036,unitless +aircraft:landing_gear:tail_hook_mass_scaler,1,unitless +aircraft:landing_gear:total_mass_scaler,1,unitless +aircraft:nacelle:clearance_ratio,0.2,unitless +aircraft:nacelle:core_diameter_ratio,1.265,unitless +aircraft:nacelle:fineness,1.505,unitless +aircraft:nacelle:form_factor,1.5,unitless +aircraft:nacelle:mass_specific,3,lbm/ft**2 +aircraft:strut:area_ratio,0,unitless +aircraft:strut:attachment_location,0,ft +aircraft:strut:attachment_location_dimensionless,0,unitless +aircraft:strut:dimensional_location_specified,False,unitless +aircraft:strut:fuselage_interference_factor,0,unitless +aircraft:strut:mass_coefficient,0,unitless +aircraft:vertical_tail:area,0,ft**2 +aircraft:vertical_tail:aspect_ratio,1.84,unitless +aircraft:vertical_tail:form_factor,1.55,unitless +aircraft:vertical_tail:mass_coefficient,0.425,unitless +aircraft:vertical_tail:moment_ratio,1.9409,unitless +aircraft:vertical_tail:sweep,29.95,deg +aircraft:vertical_tail:taper_ratio,0.267,unitless +aircraft:vertical_tail:thickness_to_chord,0.13,unitless +aircraft:vertical_tail:volume_coefficient,0.08105,unitless +aircraft:wing:aspect_ratio,11.03,unitless +aircraft:wing:average_chord,12.615,ft +aircraft:wing:center_distance,0.463,unitless +aircraft:wing:choose_fold_location,True,unitless +aircraft:wing:flap_chord_ratio,0.15,unitless +aircraft:wing:flap_deflection_landing,40,deg +aircraft:wing:flap_deflection_takeoff,5,deg +aircraft:wing:flap_drag_increment_optimum,0.1,unitless +aircraft:wing:flap_lift_increment_optimum,1.5,unitless +aircraft:wing:flap_span_ratio,0.863,unitless +aircraft:wing:flap_type,single_slotted,unitless +aircraft:wing:fold_dimensional_location_specified,False,unitless +aircraft:wing:fold_mass_coefficient,0,unitless +aircraft:wing:folded_span,0,ft +aircraft:wing:form_factor,1.55,unitless +aircraft:wing:fuselage_interference_factor,1.25,unitless +aircraft:wing:has_fold,False,unitless +aircraft:wing:has_strut,False,unitless +aircraft:wing:height,6.5,ft +aircraft:wing:high_lift_mass_coefficient,1.9,unitless +aircraft:wing:incidence,1.5,deg +aircraft:wing:loading,112.6,lbf/ft**2 +aircraft:wing:mass_coefficient,108.75,unitless +aircraft:wing:max_lift_ref,1.4,unitless +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:num_flap_segments,2,unitless +aircraft:wing:optimum_flap_deflection,20,deg +aircraft:wing:optimum_slat_deflection,20,deg +aircraft:wing:slat_chord_ratio,0.1,unitless +aircraft:wing:slat_lift_increment_optimum,0.93,unitless +aircraft:wing:slat_span_ratio,0.9,unitless +aircraft:wing:span,117.8,ft +aircraft:wing:surface_ctrl_mass_coefficient,0.845,unitless +aircraft:wing:sweep,26.34,deg +aircraft:wing:taper_ratio,0.301,unitless +aircraft:wing:thickness_to_chord_root,0.1125,unitless +aircraft:wing:thickness_to_chord_tip,0.12,unitless +aircraft:wing:zero_lift_angle,-1.2,deg +mission:design:cruise_altitude,37000,ft +mission:design:gross_mass,124780,lbm +mission:design:mach,0.78,unitless +mission:design:range,3480,NM +mission:design:rate_of_climb_at_top_of_climb,300,ft/min +mission:landing:airport_altitude,0,ft +mission:landing:braking_delay,1,s +mission:landing:glide_to_stall_ratio,1.3,unitless +mission:landing:maximum_flare_load_factor,1.15,unitless +mission:landing:maximum_sink_rate,900,ft/min +mission:landing:obstacle_height,50,ft +mission:landing:touchdown_sink_rate,5,ft/s +mission:summary:fuel_flow_scaler,1,unitless +mission:takeoff:decision_speed_increment,10,kn +mission:takeoff:rotation_speed_increment,5,kn +mission:taxi:duration,0.3333,h +settings:equations_of_motion,2DOF +settings:mass_method,GASP + +# Initialization Guesses +actual_takeoff_mass,0 +climb_range,0 +cruise_mass_final,0 +flight_duration,0 +fuel_burn_per_passenger_mile,0 +reserves,0 +rotation_mass,0 +time_to_climb,0 + +# Unconverted Values +INGASP.ALR,1.11 +INGASP.BENGOB,0 +INGASP.CINP,0.11 +INGASP.CLIAB,2021 +INGASP.CMF,15 +INGASP.CMV,0.15 +INGASP.CRWOH,15 +INGASP.DCDSE,0 +INGASP.DYR,12 +INGASP.EMCRU,0.78 +INGASP.FCSF,4.66 +INGASP.HBTP,0.45 +INGASP.HIR,0.015 +INGASP.HNCRU,37000 +INGASP.HQBWGLT,0 +INGASP.HRI,5000000 +INGASP.HSCREQ,0 +INGASP.HTMAX,1500 +INGASP.ICLM,3 +INGASP.ICRUS,10 +INGASP.IFERRY,0 +INGASP.ISWING,0 +INGASP.IWLD,2 +INGASP.JENGSZ,4 +INGASP.KNAC,1 +INGASP.KODEAC,7 +INGASP.KODECL,7 +INGASP.KODETO,5 +INGASP.KODETR,6 +INGASP.MX,0 +INGASP.NFAIL,0 +INGASP.OFALT,0 +INGASP.OFEM,0.78 +INGASP.OHR,350 +INGASP.PRV,0.15 +INGASP.RELP,0 +INGASP.RF,2,100,26400,1500 +INGASP.RI,0.8 +INGASP.ROSCAB,9999 +INGASP.RWCRTX,0.985 +INGASP.SKPES,0.258 +INGASP.SLMWGLT,0 +INGASP.SM1D,0.575 +INGASP.SRPM,18000 +INGASP.TBO,0 +INGASP.TDELLD,0 +INGASP.TDELTO,27 +INGASP.TDELTX,0 +INGASP.TR,1 +INGASP.UWTWGLT,7.5 +INGASP.VCLMB,265 +INGASP.WLPCT,0.9423 +INGASP.WPLX,0 +INGASP.XLFMAX,1.1 +INGASP.XTORQ,8000 diff --git a/aviary/utils/test/test_fortran_to_aviary.py b/aviary/utils/test/test_fortran_to_aviary.py index 8761657fb..5d81ee68d 100644 --- a/aviary/utils/test/test_fortran_to_aviary.py +++ b/aviary/utils/test/test_fortran_to_aviary.py @@ -17,9 +17,6 @@ class TestFortranToAviary(unittest.TestCase): """ def prepare_and_run(self, filepath, out_file=None, legacy_code=LegacyCode.GASP): - # Specify the input file and the legacy code - input_deck = filepath - # Specify the output file filename = filepath.split('.')[0]+'.csv' if not out_file: @@ -71,16 +68,22 @@ def test_large_single_aisle(self): 'utils/test/data/converter_test_data_large_single_aisle_1_GASP.csv' ) - self.prepare_and_run(filepath) + self.prepare_and_run( + filepath, + out_file=Path.cwd() / Path('TEST_' + comparison_filepath), + ) self.compare_files(comparison_filepath) def test_small_single_aisle(self): - filepath = 'models/small_single_aisle_1/small_single_aisle_1_GASP.dat' + filepath = 'models/small_single_aisle/small_single_aisle_GASP.dat' comparison_filepath = ( - 'utils/test/data/converter_test_data_small_single_aisle_1_GASP.csv' + 'utils/test/data/converter_test_data_small_single_aisle_GASP.csv' ) - self.prepare_and_run(filepath) + self.prepare_and_run( + filepath, + out_file=Path.cwd() / Path('TEST_' + comparison_filepath), + ) self.compare_files(comparison_filepath) def test_diff_configuration(self): @@ -95,15 +98,15 @@ def test_N3CC(self): # and was not evaluated for comparison to the original. Thus, until this file is evaluated, this test is purely a regression # test. - filepath = 'models/N3CC/N3CC_generic_low_speed_polars_FLOPSinp.txt' + filepath = 'models/N3CC/N3CC_generic_low_speed_polars_FLOPS.txt' comparison_filepath = 'utils/test/data/converter_test_data_N3CC_FLOPS.csv' - - self.prepare_and_run(filepath, legacy_code=LegacyCode.FLOPS) + self.prepare_and_run( + filepath, + out_file=Path.cwd() / Path('TEST_' + comparison_filepath), + legacy_code=LegacyCode.FLOPS, + ) self.compare_files(comparison_filepath) if __name__ == "__main__": - # unittest.main() - - test = TestFortranToAviary() - test.test_diff_configuration() + unittest.main() From 0f88346a9cbd314fed15c1cf2f6b6c7e87f46d31 Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Tue, 10 Dec 2024 17:47:06 -0500 Subject: [PATCH 07/21] fixed bug with depreciated variables not being removed from unconverted list --- aviary/utils/fortran_to_aviary.py | 4 +--- .../utils/test/data/converter_test_data_N3CC_FLOPS.csv | 9 --------- aviary/utils/test/test_fortran_to_aviary.py | 3 +++ 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/aviary/utils/fortran_to_aviary.py b/aviary/utils/fortran_to_aviary.py index 2553c68e0..e53eb67bd 100644 --- a/aviary/utils/fortran_to_aviary.py +++ b/aviary/utils/fortran_to_aviary.py @@ -322,9 +322,7 @@ def process_and_store_data( var_ind = data_units = None skip_variable = False # skip any variables that shouldn't get converted - if re.search( - current_namelist + '.' + var_name + '\\Z', str(unused_vars), re.IGNORECASE - ): + if re.search(current_namelist + '.' + var_name, str(unused_vars), re.IGNORECASE): return vehicle_data # remove any elements that are empty (caused by trailing commas or extra commas) data_list = [dat for dat in data.split(',') if dat != ''] diff --git a/aviary/utils/test/data/converter_test_data_N3CC_FLOPS.csv b/aviary/utils/test/data/converter_test_data_N3CC_FLOPS.csv index cfb3e9514..67db9490b 100644 --- a/aviary/utils/test/data/converter_test_data_N3CC_FLOPS.csv +++ b/aviary/utils/test/data/converter_test_data_N3CC_FLOPS.csv @@ -175,7 +175,6 @@ AERIN.elodma,0 AERIN.elodss,0 AERIN.flldg,8190 AERIN.flto,8190 -AERIN.modaro,0 AERIN.thrma,0 AERIN.thrss,0 AERIN.xllam,1 @@ -190,14 +189,9 @@ CONFIN.rotvel,0,0,0,0,0,0 CONFIN.varth,0,0,0,0,0,0 CONFIN.vtvc,1 CONFIN.wsr,0 -ENGDIN.boost,0 -ENGDIN.extfac,1 ENGDIN.ifill,2 -ENGDIN.igenen,-1 -ENGDIN.ixtrap,1 ENGDIN.maxcr,1 ENGDIN.ngprt,1 -ENGDIN.nox,1 MISSIN.NPCON,0 MISSIN.altran,200 MISSIN.appfff,2 @@ -294,16 +288,13 @@ OPTION.icost,0 OPTION.ifite,0 OPTION.iland,1 OPTION.ineng,0 -OPTION.iopt,1 OPTION.iplths,0 OPTION.ipltth,2 -OPTION.ipolp,1 OPTION.itakof,1 OPTION.ixfl,1 OPTION.lpfile,0 OPTION.mprint,1 OPTION.nmach,3 -OPTION.noise,0 OPTION.nopro,1 OPTION.npfile,1 OPTION.pmach,0.3,0.45222,0.785 diff --git a/aviary/utils/test/test_fortran_to_aviary.py b/aviary/utils/test/test_fortran_to_aviary.py index 5d81ee68d..e4ccfe3ea 100644 --- a/aviary/utils/test/test_fortran_to_aviary.py +++ b/aviary/utils/test/test_fortran_to_aviary.py @@ -110,3 +110,6 @@ def test_N3CC(self): if __name__ == "__main__": unittest.main() + + # test = TestFortranToAviary() + # test.test_N3CC() From bfc7684d252a6a438d81a5429288c9ab2ca748b4 Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Wed, 11 Dec 2024 13:18:48 -0500 Subject: [PATCH 08/21] docs update --- .gitignore | 1 + aviary/api.py | 2 +- aviary/docs/examples/modified_aircraft.csv | 8 ++-- aviary/docs/examples/outputted_phase_info.py | 23 ++++++++- aviary/docs/examples/reserve_missions.ipynb | 4 +- .../getting_started/onboarding_level1.ipynb | 4 +- aviary/docs/user_guide/aviary_commands.ipynb | 48 ++++++++----------- aviary/examples/level2_shooting_traj.py | 2 +- .../test/test_level2_shooting_traj.py | 2 +- .../interface/test/test_cmd_entry_points.py | 7 +-- aviary/interface/test/test_download_models.py | 4 +- aviary/interface/test/test_phase_info.py | 2 +- aviary/interface/test/test_reserve_support.py | 2 +- .../test/test_idle_descent_estimation.py | 2 +- 14 files changed, 63 insertions(+), 48 deletions(-) diff --git a/.gitignore b/.gitignore index 824371144..f89cd81b7 100644 --- a/.gitignore +++ b/.gitignore @@ -76,6 +76,7 @@ target/ # Jupyter Notebook .ipynb_checkpoints +.db-journal # IPython profile_default/ diff --git a/aviary/api.py b/aviary/api.py index c0b6b026a..9a9b9559e 100644 --- a/aviary/api.py +++ b/aviary/api.py @@ -40,7 +40,7 @@ from aviary.interface.methods_for_level2 import AviaryProblem from aviary.interface.utils.check_phase_info import check_phase_info from aviary.utils.engine_deck_conversion import EngineDeckConverter -from aviary.utils.fortran_to_aviary import create_aviary_deck +from aviary.utils.fortran_to_aviary import fortran_to_aviary from aviary.utils.functions import set_aviary_input_defaults, set_aviary_initial_values, get_path from aviary.utils.options import list_options from aviary.constants import GRAV_METRIC_GASP, GRAV_ENGLISH_GASP, GRAV_METRIC_FLOPS, GRAV_ENGLISH_FLOPS, GRAV_ENGLISH_LBM, RHO_SEA_LEVEL_ENGLISH, RHO_SEA_LEVEL_METRIC, MU_TAKEOFF, MU_LANDING, PSLS_PSF, TSLS_DEGR, RADIUS_EARTH_METRIC diff --git a/aviary/docs/examples/modified_aircraft.csv b/aviary/docs/examples/modified_aircraft.csv index b2ab642a3..d354187a8 100644 --- a/aviary/docs/examples/modified_aircraft.csv +++ b/aviary/docs/examples/modified_aircraft.csv @@ -7,17 +7,17 @@ aircraft:canard:aspect_ratio,0.0,unitless aircraft:canard:thickness_to_chord,0.0,unitless aircraft:crew_and_payload:baggage_mass_per_passenger,45.0,lbm aircraft:crew_and_payload:cargo_container_mass_scaler,1.0,unitless +aircraft:crew_and_payload:design:num_business_class,0,unitless +aircraft:crew_and_payload:design:num_first_class,11,unitless +aircraft:crew_and_payload:design:num_passengers,169,unitless +aircraft:crew_and_payload:design:num_tourist_class,158,unitless aircraft:crew_and_payload:flight_crew_mass_scaler,1.0,unitless aircraft:crew_and_payload:mass_per_passenger,180.0,lbm aircraft:crew_and_payload:misc_cargo,0.0,lbm aircraft:crew_and_payload:non_flight_crew_mass_scaler,1.0,unitless -aircraft:crew_and_payload:num_business_class,0,unitless -aircraft:crew_and_payload:num_first_class,11,unitless aircraft:crew_and_payload:num_flight_attendants,3,unitless aircraft:crew_and_payload:num_flight_crew,2,unitless aircraft:crew_and_payload:num_galley_crew,0,unitless -aircraft:crew_and_payload:num_passengers,169,unitless -aircraft:crew_and_payload:num_tourist_class,158,unitless aircraft:crew_and_payload:passenger_service_mass_scaler,1.0,unitless aircraft:crew_and_payload:wing_cargo,0.0,lbm aircraft:design:base_area,0.0,ft**2 diff --git a/aviary/docs/examples/outputted_phase_info.py b/aviary/docs/examples/outputted_phase_info.py index daf97400c..0737bef2c 100644 --- a/aviary/docs/examples/outputted_phase_info.py +++ b/aviary/docs/examples/outputted_phase_info.py @@ -1,2 +1,21 @@ -phase_info = {'pre_mission': {'include_takeoff': True, 'optimize_mass': True}, 'climb_1': {'subsystem_options': {'core_aerodynamics': {'method': 'computed'}}, 'user_options': {'optimize_mach': True, 'optimize_altitude': True, 'polynomial_control_order': [1, 2], 'use_polynomial_control': True, 'num_segments': [1], 'order': 1, 'solve_for_distance': True, 'initial_mach': (1, None), 'final_mach': (2, None), 'mach_bounds': ( - (0.98, 2.02), None), 'initial_altitude': (1, None), 'final_altitude': (2, None), 'altitude_bounds': ((0.0, 502), None), 'throttle_enforcement': 'path_constraint', 'fix_initial': True, 'constrain_final': True, 'fix_duration': False, 'initial_bounds': ((0.0, 0.0), None), 'duration_bounds': ((0.5, 1.5), None)}, 'initial_guesses': {'time': ([1, 1], None)}}, 'post_mission': {'include_landing': True, 'constrain_range': True, 'target_range': (514.5, None)}} +phase_info = { + 'pre_mission': { + 'include_takeoff': True, 'optimize_mass': True}, 'climb_1': { + 'subsystem_options': { + 'core_aerodynamics': { + 'method': 'computed'}}, 'user_options': { + 'optimize_mach': True, 'optimize_altitude': True, 'polynomial_control_order': [ + 1, 2], 'use_polynomial_control': True, 'num_segments': [1], 'order': 1, 'solve_for_distance': True, 'initial_mach': ( + 1, None), 'final_mach': ( + 2, None), 'mach_bounds': ( + (0.98, 2.02), None), 'initial_altitude': ( + 1, None), 'final_altitude': ( + 2, None), 'altitude_bounds': ( + (0.0, 502), None), 'throttle_enforcement': 'path_constraint', 'fix_initial': True, 'constrain_final': True, 'fix_duration': False, 'initial_bounds': ( + (0.0, 0.0), None), 'duration_bounds': ( + (0.5, 1.5), None)}, 'initial_guesses': { + 'time': ( + [ + 1, 1], None)}}, 'post_mission': { + 'include_landing': True, 'constrain_range': True, 'target_range': ( + 514.5, None)}} diff --git a/aviary/docs/examples/reserve_missions.ipynb b/aviary/docs/examples/reserve_missions.ipynb index 15b3b0e7c..f0887e094 100644 --- a/aviary/docs/examples/reserve_missions.ipynb +++ b/aviary/docs/examples/reserve_missions.ipynb @@ -186,7 +186,7 @@ ], "metadata": { "kernelspec": { - "display_name": "latest_env", + "display_name": "aviary", "language": "python", "name": "python3" }, @@ -200,7 +200,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.13" + "version": "3.12.3" } }, "nbformat": 4, diff --git a/aviary/docs/getting_started/onboarding_level1.ipynb b/aviary/docs/getting_started/onboarding_level1.ipynb index c6afb1456..b2ea3b4e8 100644 --- a/aviary/docs/getting_started/onboarding_level1.ipynb +++ b/aviary/docs/getting_started/onboarding_level1.ipynb @@ -764,7 +764,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "aviary", "language": "python", "name": "python3" }, @@ -778,7 +778,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.13" + "version": "3.12.3" } }, "nbformat": 4, diff --git a/aviary/docs/user_guide/aviary_commands.ipynb b/aviary/docs/user_guide/aviary_commands.ipynb index 853d6ec5e..7b4d17346 100644 --- a/aviary/docs/user_guide/aviary_commands.ipynb +++ b/aviary/docs/user_guide/aviary_commands.ipynb @@ -4,7 +4,7 @@ "attachments": {}, "cell_type": "markdown", "metadata": {}, - "source": [ + "ssmall_single_aisle_GASPsmall_single_aisle_GASP "# Command Line Tools\n", "\n", "Aviary has a number of command line tools that are available via the `aviary`\n", @@ -88,7 +88,7 @@ "\n", "`run_mission` is a command line interface that will run an analysis on a given csv input file.\n", "\n", - "To use small_single_aisle_GwGm.csv run the command `aviary run_mission models/small_single_aisle/small_single_aisle_GwGm.csv`
\n", + "To use small_single_aisle_GASP.csv run the command `aviary run_mission models/small_single_aisle/small_single_aisle_GASP.csv`
\n", "\n", "SNOPT is the default optimizer, but IPOPT is available as well." ] @@ -105,7 +105,7 @@ "source": [ "# Testing Cell\n", "import subprocess\n", - "command = 'aviary run_mission models/small_single_aisle/small_single_aisle_GwGm.csv'\n", + "command = 'aviary run_mission models/small_single_aisle/small_single_aisle_GASP.csv'\n", "command += ' --max_iter 0 --optimizer IPOPT' # max_iter to limit build time, IPOPT to run on CI\n", "subprocess.run(command.split()).check_returncode();\n" ] @@ -141,10 +141,10 @@ "`-o` or `--outdir` is the directory to write outputs. The default is current directory.\n", "`--optimizer` is the name of the optimizer. The default is `SNOPT`.\n", "`--shooting` indicates that the integration method is shooting method instead of collocation scheme. The default is collocation.\n", - "`--phase_info` is the path to phase info file. If it is missing, it depends on the integration method (collocation or shooting) and on the mission method (settings:equations+of_motion with value of `2DOF` or `height_energy`) which is defined in the .csv input file.\n", + "`--phase_info` is the path to phase info file. If it is missing, it depends on the integration method (collocation or shooting) and on the mission method (`settings:equations_of_motion` with value of `2DOF` or `height_energy`) which is defined in the .csv input file.\n", "`--max_iter` is the maximum number of iterations. The default is 50.\n", "\n", - "More detailed discussions can be found in [onboarding_level1](../getting_started/onboarding_level1.ipynb)." + "More detailed information and examples can be found in the [Level 1 interface](../getting_started/onboarding_level1.ipynb)." ] }, { @@ -157,9 +157,7 @@ "\n", "The `aviary fortran_to_aviary` command will convert a Fortran input deck to an Aviary csv.\n", "\n", - "The only two required inputs are `-l` (for `--legacy_code` with options `FLOPS` and `GASP`) and the filepath to the input deck. \n", - "Optionally, a deck of default values can be specified via the option `-d` (for `--defaults_deck`) and a default deck file, this is useful if an input deck assumes certain values for any unspecified variables.\n", - "When this command is run, a brief message is printed. To print more messages, one can set verbosity level higher. For example, `-v 3` will result in debug messages being printed. See [Controlling Display Levels](../developer_guide/coding_standards.ipynb) for more details.\n", + "The only two required inputs are the filepath to the input deck and `-l` (for `--legacy_code` with options `FLOPS` and `GASP`). When this command is run, a brief message is printed. To print more messages, one can set verbosity level higher. For example, `-v 3` will result in debug messages being printed. See [Controlling Display Levels](../developer_guide/coding_standards.ipynb) for more details.\n", "If an invalid filepath is given, pre-packaged resources will be checked for input decks with a matching name.\n", "If the output file name is not specified, a detault name is assumed to be the trunk of the input file name with `csv` as file extension. For example, an input file `sample.dat` will result in `sample_converted.csv`.\n", "If the output file exists, the command will not run unless the user specifies `--force` to force the overwritten action.\n", @@ -167,27 +165,23 @@ "Here, pre-packaged resources are absolute path, relative path, and Aviary based path.\n", "\n", "Notes for input decks:\n", - "- FLOPS, GASP, or Aviary names can be used for variables (Ex WG or Mission:Design:GROSS_MASS)\n", - "- When specifying variables from FORTRAN, they should be in the appropriate NAMELIST.\n", - "- Aviary variable names should be specified outside any NAMELISTS.\n", - "- Names are not case-sensitive.\n", - "- Units can be specified using any of the openMDAO valid units.\n", - "- Comments can be added using !\n", - "- Lists can be entered by separating values with commas.\n", - "- Individual list elements can be specified by adding an index after the variable name.\n", - "- (NOTE: 1 indexing is used inside NAMELISTS, while 0 indexing is used outside NAMELISTS)\n", - "\n", - "Example inputs:\n", + "- When specifying variables from FORTRAN, they should be in the appropriate NAMELIST\n", + "- Names are not case-sensitive\n", + "- Comments can be added using \"!\"\n", + "- Lists can be entered by separating values with commas on the same line\n", + "- For GASP variables where required, individual list elements can be specified by adding an index after the variable name\n", + " - (NOTE: 1 indexing is used inside NAMELISTS, while 0 indexing is used outside NAMELISTS)\n", + "\n", + "Example inputs (GASP-style file):\n", "```\n", - "aircraft:fuselage:pressure_differential = .5, atm !DELP in GASP, but using atmospheres instead of psi\n", - "ARNGE(1) = 3600 !target range in nautical miles\n", - "pyc_phases = taxi, groundroll, rotation, landing\n", + "$INGASP\n", + "DELP = 7.34797 ! typical GASP input\n", + "ARNGE(1) = 3600 ! variable with specified index\n", + "ACLS = 0.0,0.40,0.60,0.80,1.00,1.20, 1.40,1.60,1.80, ! values given as array\n", "```\n", "\n", "Example usage:\n", - "```\n", - "`aviary fortran_to_aviary --legacy_code GASP --force GASP_test.dat` Convert the GASP input deck to Aviary (even if an output exists).\n", - "```\n" + "`aviary fortran_to_aviary --legacy_code GASP --force GASP_test.dat` Convert the GASP input deck to Aviary (even if a file with the name GASP_test.dat already exists)." ] }, { @@ -558,7 +552,7 @@ "metadata": { "celltoolbar": "Tags", "kernelspec": { - "display_name": "latest_env", + "display_name": "aviary", "language": "python", "name": "python3" }, @@ -572,7 +566,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.13" + "version": "3.12.3" } }, "nbformat": 4, diff --git a/aviary/examples/level2_shooting_traj.py b/aviary/examples/level2_shooting_traj.py index e51261736..33489a26b 100644 --- a/aviary/examples/level2_shooting_traj.py +++ b/aviary/examples/level2_shooting_traj.py @@ -127,6 +127,6 @@ def custom_run_aviary(aircraft_filename, optimizer=None, if __name__ == "__main__": - input_deck = 'models/large_single_aisle_1/large_single_aisle_1_GwGm.csv' + input_deck = 'models/large_single_aisle_1/large_single_aisle_1_GASP.csv' custom_run_aviary( input_deck, analysis_scheme=AnalysisScheme.SHOOTING, run_driver=False) diff --git a/aviary/examples/test/test_level2_shooting_traj.py b/aviary/examples/test/test_level2_shooting_traj.py index 9fb3a5155..4ce85d394 100644 --- a/aviary/examples/test/test_level2_shooting_traj.py +++ b/aviary/examples/test/test_level2_shooting_traj.py @@ -12,7 +12,7 @@ class CustomTrajTestCase(unittest.TestCase): @require_pyoptsparse(optimizer='IPOPT') def test_run_aviary(self): - input_deck = 'models/large_single_aisle_1/large_single_aisle_1_GwGm.csv' + input_deck = 'models/large_single_aisle_1/large_single_aisle_1_GASP.csv' custom_run_aviary( input_deck, analysis_scheme=AnalysisScheme.SHOOTING, run_driver=False) diff --git a/aviary/interface/test/test_cmd_entry_points.py b/aviary/interface/test/test_cmd_entry_points.py index c255fe9a2..f2ee515c0 100644 --- a/aviary/interface/test/test_cmd_entry_points.py +++ b/aviary/interface/test/test_cmd_entry_points.py @@ -58,7 +58,8 @@ def test_diff_configuration_conversion(self): def test_small_single_aisle_conversion(self): filepath = get_aviary_resource_path( - 'models/small_single_aisle/small_single_aisle_GwGm.dat') + 'models/small_single_aisle/small_single_aisle_GASP.dat' + ) outfile = Path.cwd() / 'small_single_aisle' / 'output.dat' cmd = f'aviary fortran_to_aviary {filepath} -o {outfile} -l GASP' self.run_and_test_cmd(cmd) @@ -96,12 +97,12 @@ def test_copy_n3cc_data(self): self.run_and_test_cmd(cmd) def test_copy_multiple(self): - cmd = f'aviary hangar small_single_aisle_GwGm.dat small_single_aisle_GwGm.csv' + cmd = f'aviary hangar small_single_aisle_GASP.dat small_single_aisle_GASP.csv' self.run_and_test_cmd(cmd) def test_copy_to(self): outfile = Path.cwd() / 'example_files' - cmd = f'aviary hangar small_single_aisle_GwGm.dat -o {outfile}' + cmd = f'aviary hangar small_single_aisle_GASP.dat -o {outfile}' self.run_and_test_cmd(cmd) diff --git a/aviary/interface/test/test_download_models.py b/aviary/interface/test/test_download_models.py index 26b629ca1..d9fcb601e 100644 --- a/aviary/interface/test/test_download_models.py +++ b/aviary/interface/test/test_download_models.py @@ -40,7 +40,7 @@ def test_single_file_with_path(self): self.run_and_test_hangar(filename) def test_multiple_files(self): - filenames = ['small_single_aisle_GwGm.dat', 'small_single_aisle_GwGm.csv'] + filenames = ['small_single_aisle_GASP.dat', 'small_single_aisle_GASP.csv'] self.run_and_test_hangar(filenames) def test_folder(self): @@ -48,7 +48,7 @@ def test_folder(self): self.run_and_test_hangar(filename) def test_single_file_custom_outdir(self): - filename = 'small_single_aisle_GwGm.csv' + filename = 'small_single_aisle_GASP.csv' out_dir = '~/test_hangar' self.run_and_test_hangar(filename, out_dir) shutil.rmtree(out_dir) diff --git a/aviary/interface/test/test_phase_info.py b/aviary/interface/test/test_phase_info.py index 9d4c0aca9..7345fbc60 100644 --- a/aviary/interface/test/test_phase_info.py +++ b/aviary/interface/test/test_phase_info.py @@ -87,7 +87,7 @@ def test_phase_info_parameterization_two_dof(self): prob = AviaryProblem() - csv_path = "models/small_single_aisle/small_single_aisle_GwGm.csv" + csv_path = "models/small_single_aisle/small_single_aisle_GASP.csv" prob.load_inputs(csv_path, phase_info) prob.check_and_preprocess_inputs() diff --git a/aviary/interface/test/test_reserve_support.py b/aviary/interface/test/test_reserve_support.py index 8219c7a6a..87105127f 100644 --- a/aviary/interface/test/test_reserve_support.py +++ b/aviary/interface/test/test_reserve_support.py @@ -50,7 +50,7 @@ def test_gasp_relative_reserve(self): prob = AviaryProblem() - csv_path = "models/small_single_aisle/small_single_aisle_GwGm.csv" + csv_path = "models/small_single_aisle/small_single_aisle_GASP.csv" prob.load_inputs(csv_path, phase_info) prob.check_and_preprocess_inputs() diff --git a/aviary/mission/gasp_based/test/test_idle_descent_estimation.py b/aviary/mission/gasp_based/test/test_idle_descent_estimation.py index be6910d58..9aba0779b 100644 --- a/aviary/mission/gasp_based/test/test_idle_descent_estimation.py +++ b/aviary/mission/gasp_based/test/test_idle_descent_estimation.py @@ -23,7 +23,7 @@ class IdleDescentTestCase(unittest.TestCase): """ def setUp(self): - input_deck = 'models/large_single_aisle_1/large_single_aisle_1_GwGm.csv' + input_deck = 'models/large_single_aisle_1/large_single_aisle_1_GASP.csv' aviary_inputs, _ = create_vehicle(input_deck) aviary_inputs.set_val(Settings.VERBOSITY, 0) aviary_inputs.set_val(Aircraft.Engine.SCALED_SLS_THRUST, val=28690, units="lbf") From 7c3c093d45be8ec2290ce931f262bd39ff96531f Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Wed, 11 Dec 2024 14:53:56 -0500 Subject: [PATCH 09/21] round of test fixes created separate copy of configuration test data for models vs. conversion utility test --- .../interface/test/test_cmd_entry_points.py | 14 +- aviary/interface/test/test_download_models.py | 5 +- .../test_aircraft/configuration_test_GASP.csv | 226 ++++++++++++++ .../geometry/gasp_based/test/test_override.py | 3 +- .../propulsion/test/test_propeller_map.py | 6 +- .../test/data/converter_test_data_GASP.dat | 234 -------------- aviary/utils/test/{ => data}/csv_test.csv | 0 .../test/{ => data}/flops_test_polar.txt | 0 .../test/{ => data}/test_drag_polar_data.csv | 290 +++++++++--------- 9 files changed, 388 insertions(+), 390 deletions(-) create mode 100644 aviary/models/test_aircraft/configuration_test_GASP.csv delete mode 100644 aviary/utils/test/data/converter_test_data_GASP.dat rename aviary/utils/test/{ => data}/csv_test.csv (100%) rename aviary/utils/test/{ => data}/flops_test_polar.txt (100%) rename aviary/utils/test/{ => data}/test_drag_polar_data.csv (97%) diff --git a/aviary/interface/test/test_cmd_entry_points.py b/aviary/interface/test/test_cmd_entry_points.py index f2ee515c0..baa070267 100644 --- a/aviary/interface/test/test_cmd_entry_points.py +++ b/aviary/interface/test/test_cmd_entry_points.py @@ -51,8 +51,9 @@ def bench_test_phase_info_cmd(self): class fortran_to_aviaryTestCases(CommandEntryPointsTestCases): def test_diff_configuration_conversion(self): filepath = get_aviary_resource_path( - 'models/test_aircraft/converter_configuration_test_data_GwGm.dat') - outfile = Path.cwd() / 'test_aircraft/converter_configuration_test_data_GwGm' / 'output.dat' + 'utils/test/data/converter_test_data_GASP.dat' + ) + outfile = Path.cwd() / 'test_aircraft/converter_test_data_GASP' / 'output.dat' cmd = f'aviary fortran_to_aviary {filepath} -o {outfile} -l GASP' self.run_and_test_cmd(cmd) @@ -66,19 +67,22 @@ def test_small_single_aisle_conversion(self): def test_FLOPS_conversion(self): filepath = get_aviary_resource_path( - 'models/N3CC/N3CC_generic_low_speed_polars_FLOPSinp.txt') + 'models/N3CC/N3CC_generic_low_speed_polars_FLOPS.txt' + ) outfile = Path.cwd() / 'N3CC' / 'output.dat' cmd = f'aviary fortran_to_aviary {filepath} -o {outfile} -l FLOPS' self.run_and_test_cmd(cmd) def test_force_conversion(self): filepath = get_aviary_resource_path( - 'models/test_aircraft/converter_configuration_test_data_GwGm.dat') + 'models/small_single_aisle/small_single_aisle_GASP.dat' + ) outfile = Path.cwd() / 'output.dat' cmd1 = f'aviary fortran_to_aviary {filepath} -o {outfile} -l GASP' self.run_and_test_cmd(cmd1) filepath = get_aviary_resource_path( - 'models/test_aircraft/converter_configuration_test_data_GwGm.dat') + 'models/small_single_aisle/small_single_aisle_GASP.dat' + ) cmd2 = f'aviary fortran_to_aviary {filepath} -o {outfile} --force -l GASP' self.run_and_test_cmd(cmd2) diff --git a/aviary/interface/test/test_download_models.py b/aviary/interface/test/test_download_models.py index d9fcb601e..58f415cbc 100644 --- a/aviary/interface/test/test_download_models.py +++ b/aviary/interface/test/test_download_models.py @@ -54,10 +54,11 @@ def test_single_file_custom_outdir(self): shutil.rmtree(out_dir) def test_expected_path(self): - aviary_path = get_model('converter_configuration_test_data_GwGm.dat') + aviary_path = get_model('large_single_aisle_1_GASP.dat') expected_path = get_aviary_resource_path( - 'models/test_aircraft/converter_configuration_test_data_GwGm.dat') + 'models/large_single_aisle_1/large_single_aisle_1_GASP.dat' + ) self.assertTrue(str(aviary_path) == str(expected_path)) diff --git a/aviary/models/test_aircraft/configuration_test_GASP.csv b/aviary/models/test_aircraft/configuration_test_GASP.csv new file mode 100644 index 000000000..292bba977 --- /dev/null +++ b/aviary/models/test_aircraft/configuration_test_GASP.csv @@ -0,0 +1,226 @@ +# Input Values +aircraft:air_conditioning:mass_coefficient,1.65,unitless +aircraft:anti_icing:mass,126,lbm +aircraft:apu:mass,1014,lbm +aircraft:avionics:mass,1504,lbm +aircraft:controls:cockpit_control_mass_scaler,1,unitless +aircraft:controls:control_mass_increment,0,lbm +aircraft:controls:stability_augmentation_system_mass,0,lbm +aircraft:controls:stability_augmentation_system_mass_scaler,1,unitless +aircraft:crew_and_payload:cargo_mass,15970,lbm +aircraft:crew_and_payload:catering_items_mass_per_passenger,10,lbm +aircraft:crew_and_payload:design:num_passengers,154,unitless +aircraft:crew_and_payload:passenger_mass_with_bags,200,lbm +aircraft:crew_and_payload:passenger_service_mass_per_passenger,5,lbm +aircraft:crew_and_payload:water_mass_per_occupant,3,lbm +aircraft:design:cg_delta,0.25,unitless +aircraft:design:cockpit_control_mass_coefficient,30,unitless +aircraft:design:drag_increment,0.0014,unitless +aircraft:design:emergency_equipment_mass,0,lbm +aircraft:design:max_structural_speed,440,mi/h +aircraft:design:part25_structural_category,3,unitless +aircraft:design:reserve_fuel_additional,0,lbm +aircraft:design:reserve_fuel_fraction,0.15,unitless +aircraft:design:static_margin,0.05,unitless +aircraft:design:structural_mass_increment,0,lbm +aircraft:design:supercritical_drag_shift,0.033,unitless +aircraft:engine:additional_mass_fraction,0.165,unitless +aircraft:engine:data_file,models/engines/turbofan_23k_1.deck,unitless +aircraft:engine:mass_scaler,1,unitless +aircraft:engine:mass_specific,0.21366,lbm/lbf +aircraft:engine:num_engines,2,unitless +aircraft:engine:pod_mass_scaler,1,unitless +aircraft:engine:pylon_factor,1.25,unitless +aircraft:engine:reference_diameter,6.15,ft +aircraft:engine:reference_sls_thrust,28690,lbf +aircraft:engine:scaled_sls_thrust,21162,lbf +aircraft:engine:type,7,unitless +aircraft:engine:wing_locations,0.2143,unitless +aircraft:fuel:density,6.687,lbm/galUS +aircraft:fuel:fuel_margin,0,unitless +aircraft:fuel:fuel_system_mass_coefficient,0.06,unitless +aircraft:fuel:fuel_system_mass_scaler,1,unitless +aircraft:fuel:unusable_fuel_mass_coefficient,12,unitless +aircraft:fuel:wing_fuel_fraction,0.5625,unitless +aircraft:furnishings:mass,9114,lbm +aircraft:fuselage:aisle_width,24,inch +aircraft:fuselage:delta_diameter,4.5,ft +aircraft:fuselage:flat_plate_area_increment,0.25,ft**2 +aircraft:fuselage:form_factor,1.146,unitless +aircraft:fuselage:mass_coefficient,102.82,unitless +aircraft:fuselage:nose_fineness,1,unitless +aircraft:fuselage:num_aisles,1,unitless +aircraft:fuselage:num_seats_abreast,6,unitless +aircraft:fuselage:pilot_compartment_length,6.85,ft +aircraft:fuselage:pressure_differential,7.5,psi +aircraft:fuselage:seat_pitch,44.2,inch +aircraft:fuselage:seat_width,20.2,inch +aircraft:fuselage:tail_fineness,1.18,unitless +aircraft:fuselage:wetted_area_scaler,1,unitless +aircraft:horizontal_tail:area,0,ft**2 +aircraft:horizontal_tail:aspect_ratio,4.025,unitless +aircraft:horizontal_tail:form_factor,1.7,unitless +aircraft:horizontal_tail:mass_coefficient,0.2076,unitless +aircraft:horizontal_tail:moment_ratio,0.13067,unitless +aircraft:horizontal_tail:sweep,43.5,deg +aircraft:horizontal_tail:taper_ratio,0.352,unitless +aircraft:horizontal_tail:thickness_to_chord,0.11,unitless +aircraft:horizontal_tail:vertical_tail_fraction,1,unitless +aircraft:horizontal_tail:volume_coefficient,1.43,unitless +aircraft:hydraulics:flight_control_mass_coefficient,0.085,unitless +aircraft:hydraulics:gear_mass_coefficient,0.105,unitless +aircraft:instruments:mass_coefficient,0.0736,unitless +aircraft:landing_gear:fixed_gear,False,unitless +aircraft:landing_gear:main_gear_location,0,unitless +aircraft:landing_gear:main_gear_mass_coefficient,0.85,unitless +aircraft:landing_gear:mass_coefficient,0.0339,unitless +aircraft:landing_gear:tail_hook_mass_scaler,1,unitless +aircraft:landing_gear:total_mass_scaler,1,unitless +aircraft:nacelle:clearance_ratio,0.2,unitless +aircraft:nacelle:core_diameter_ratio,1.2095,unitless +aircraft:nacelle:fineness,1.715,unitless +aircraft:nacelle:form_factor,1.5,unitless +aircraft:nacelle:mass_specific,2.5,lbm/ft**2 +aircraft:strut:area_ratio,0.32,unitless +aircraft:strut:attachment_location,118,ft +aircraft:strut:dimensional_location_specified,True,unitless +aircraft:strut:fuselage_interference_factor,1.125,unitless +aircraft:strut:mass_coefficient,0.238,unitless +aircraft:strut:thickness_to_chord,0.1,unitless +aircraft:vertical_tail:area,0,ft**2 +aircraft:vertical_tail:aspect_ratio,0.825,unitless +aircraft:vertical_tail:form_factor,2,unitless +aircraft:vertical_tail:mass_coefficient,0.2587,unitless +aircraft:vertical_tail:moment_ratio,3.0496,unitless +aircraft:vertical_tail:sweep,35,deg +aircraft:vertical_tail:taper_ratio,0.801,unitless +aircraft:vertical_tail:thickness_to_chord,0.1,unitless +aircraft:vertical_tail:volume_coefficient,0.066,unitless +aircraft:wing:aspect_ratio,19.565,unitless +aircraft:wing:center_distance,0.463,unitless +aircraft:wing:choose_fold_location,False,unitless +aircraft:wing:flap_chord_ratio,0.25,unitless +aircraft:wing:flap_deflection_landing,40,deg +aircraft:wing:flap_deflection_takeoff,10,deg +aircraft:wing:flap_drag_increment_optimum,0.1,unitless +aircraft:wing:flap_lift_increment_optimum,1,unitless +aircraft:wing:flap_span_ratio,0.88,unitless +aircraft:wing:flap_type,double_slotted,unitless +aircraft:wing:fold_dimensional_location_specified,True,unitless +aircraft:wing:fold_mass_coefficient,0.2,unitless +aircraft:wing:folded_span,0,ft +aircraft:wing:fuselage_interference_factor,1.21,unitless +aircraft:wing:has_fold,True,unitless +aircraft:wing:has_strut,True,unitless +aircraft:wing:height,15.2,ft +aircraft:wing:high_lift_mass_coefficient,1.9,unitless +aircraft:wing:incidence,1.5,deg +aircraft:wing:loading,93.1,lbf/ft**2 +aircraft:wing:mass_coefficient,106.28,unitless +aircraft:wing:max_lift_ref,1.15,unitless +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:num_flap_segments,2,unitless +aircraft:wing:optimum_flap_deflection,55,deg +aircraft:wing:optimum_slat_deflection,20,deg +aircraft:wing:slat_chord_ratio,0.1,unitless +aircraft:wing:slat_lift_increment_optimum,0.93,unitless +aircraft:wing:slat_span_ratio,0.9,unitless +aircraft:wing:surface_ctrl_mass_coefficient,0.5936,unitless +aircraft:wing:sweep,22.47,deg +aircraft:wing:taper_ratio,0.346,unitless +aircraft:wing:thickness_to_chord_root,0.11,unitless +aircraft:wing:thickness_to_chord_tip,0.1,unitless +aircraft:wing:zero_lift_angle,-1.2,deg +mission:design:cruise_altitude,36000,ft +mission:design:gross_mass,160000,lbm +mission:design:mach,0.8,unitless +mission:design:range,3500,NM +mission:design:rate_of_climb_at_top_of_climb,300,ft/min +mission:landing:airport_altitude,0,ft +mission:landing:braking_delay,1,s +mission:landing:glide_to_stall_ratio,1.3,unitless +mission:landing:maximum_flare_load_factor,1.15,unitless +mission:landing:maximum_sink_rate,900,ft/min +mission:landing:obstacle_height,50,ft +mission:landing:touchdown_sink_rate,5,ft/s +mission:summary:fuel_flow_scaler,1,unitless +mission:takeoff:decision_speed_increment,10,kn +mission:takeoff:rotation_speed_increment,5,kn +mission:taxi:duration,0.1677,h +settings:equations_of_motion,2DOF +settings:mass_method,GASP + +# Initialization Guesses +actual_takeoff_mass,0 +climb_range,0 +cruise_mass_final,0 +flight_duration,0 +fuel_burn_per_passenger_mile,0 +reserves,0 +rotation_mass,0 +time_to_climb,0 + +# Unconverted Values +INGASP.ALR,1.11 +INGASP.BENGOB,0.05 +INGASP.CINP,0.11 +INGASP.CK10,1 +INGASP.CK11,1 +INGASP.CK18,1 +INGASP.CK7,1 +INGASP.CK8,1 +INGASP.CK9,1 +INGASP.CLIAB,1984 +INGASP.CMF,15 +INGASP.CMV,0.15 +INGASP.CRWOH,15 +INGASP.DCDSE,-1 +INGASP.DYR,12 +INGASP.EMCRU,0.8 +INGASP.FCSF,2.5 +INGASP.HBTP,0.472 +INGASP.HIR,0.015 +INGASP.HNCRU,36000 +INGASP.HPORT,0 +INGASP.HRI,2500 +INGASP.HSCREQ,25000 +INGASP.ICLM,3 +INGASP.ICRUS,0 +INGASP.IWLD,2 +INGASP.JENGSZ,4 +INGASP.KNAC,1 +INGASP.KODEAC,7 +INGASP.KODECL,7 +INGASP.KODETO,5 +INGASP.KODETR,6 +INGASP.MX,0 +INGASP.NFAIL,0 +INGASP.OFALT,0 +INGASP.OFEM,0.78 +INGASP.OHR,350 +INGASP.PRV,0.15 +INGASP.RCCRU,100 +INGASP.RELP,0 +INGASP.RELR,0.4524 +INGASP.RF,0.05,125,20000,25000 +INGASP.RI,0.8 +INGASP.ROSCAB,9999 +INGASP.RWCRTX,0.985 +INGASP.SKPES,0.258 +INGASP.SM1D,0.625 +INGASP.SRPM,18000 +INGASP.TBO,3500 +INGASP.TDELLD,27 +INGASP.TDELTO,27 +INGASP.TR,1 +INGASP.VCLMB,270 +INGASP.WENG,4218 +INGASP.WLPCT,0.9423 +INGASP.WNAC,1240 +INGASP.WPLX,0 +INGASP.WPYLON,0 +INGASP.XTORQ,8000 \ No newline at end of file diff --git a/aviary/subsystems/geometry/gasp_based/test/test_override.py b/aviary/subsystems/geometry/gasp_based/test/test_override.py index 2b7973093..bf4d6f6d1 100644 --- a/aviary/subsystems/geometry/gasp_based/test/test_override.py +++ b/aviary/subsystems/geometry/gasp_based/test/test_override.py @@ -19,7 +19,8 @@ class GASPOverrideTestCase(unittest.TestCase): def setUp(self): aviary_inputs, initial_guesses = create_vehicle( - 'models/test_aircraft/converter_configuration_test_data_GwGm.csv') + 'models/test_aircraft/configuration_test_GASP.csv' + ) engines = build_engine_deck(aviary_inputs) diff --git a/aviary/subsystems/propulsion/test/test_propeller_map.py b/aviary/subsystems/propulsion/test/test_propeller_map.py index f3b2ce3a4..8994a715b 100644 --- a/aviary/subsystems/propulsion/test/test_propeller_map.py +++ b/aviary/subsystems/propulsion/test/test_propeller_map.py @@ -21,7 +21,7 @@ def test_general_aviation(self): # The case when prop_type is helical_mach. tol = 0.005 aviary_options = get_option_defaults() - prop_file_path = 'models/propellers/general_aviation.prop' + prop_file_path = 'models/engines/propellers/general_aviation.prop' aviary_options.set_val( Aircraft.Engine.PROPELLER_DATA_FILE, val=prop_file_path, units='unitless') aviary_options.set_val( @@ -46,7 +46,7 @@ def test_propfan(self): # The case when prop_type is mach. tol = 0.005 aviary_options = get_option_defaults() - prop_file_path = 'models/propellers/PropFan.prop' + prop_file_path = 'models/engines/propellers/PropFan.prop' aviary_options.set_val( Aircraft.Engine.PROPELLER_DATA_FILE, val=prop_file_path, units='unitless') aviary_options.set_val( @@ -70,7 +70,7 @@ def test_propfan(self): def test_mach_type(self): # Test reading prop_type from .prop file. aviary_options = get_option_defaults() - prop_file_path = 'models/propellers/general_aviation.prop' + prop_file_path = 'models/engines/propellers/general_aviation.prop' aviary_options.set_val( Aircraft.Engine.PROPELLER_DATA_FILE, val=prop_file_path, units='unitless') aviary_options.set_val( diff --git a/aviary/utils/test/data/converter_test_data_GASP.dat b/aviary/utils/test/data/converter_test_data_GASP.dat deleted file mode 100644 index f122a074b..000000000 --- a/aviary/utils/test/data/converter_test_data_GASP.dat +++ /dev/null @@ -1,234 +0,0 @@ - Baseline new configuration Mach 0.80 / 23k SLS thrust turbofan -1 -1 - - $INGASP - AS=1., ! Number of aisles in the cabin - AR=19.565, ! Wing aspect ratio - ARHT=4.025, ! Horizontal tail aspect ratio - ARVT=0.825, ! Vertical tail aspect ratio - BOELTV=3.0496, ! wing span/vertical tail moment arm (if VBARVX is input) - COELTH=.13067, ! wing chord/horizontal tail moment arm (if VBARHX is input) - DLMC4=22.47, ! sweep of wing quarter chord, degrees - DWPQCH=43.50, ! vertical tail quarter chord sweep in degrees if LCWING <> 0 - ELPC=6.85, ! length of pilot compartment in feet (4.44) - ELODN=1.00, ! length to diameter ratio of nose cone of fuselage (2) - ELODT=1.18, ! length to diameter ratio of tail cone of fuselage (3.2) - HCK=4.5, ! mean fuselage cabin diameter minus mean fuselage nose diameter in feet (2.47) - HTG=15.2, ! wing height about ground during ground run in feet (3.0) - HWING=1.0, ! wing location on fuselage =0, low wing; =1 high wing - PAX=154., ! number of passenger seats excluding crew - PS=44.2, ! seat pitch in inches (old GASP) - !PS=41.5, ! seat pitch in inches (GASP One) - RELR=0.4524, ! cg of fuselage and contents, fraction fuselage(.4) if LCWING <> 0 - SAB=6., ! seats abreast in fuselage - SAH=1., ! horizontal tail location on vertical tail: 0: low tail, 1: T-tail - SCFAC=0.033, ! shift in drag divergence Mach number due to supercritical design (0.) - SF_FAC = 1.0, ! Fuselage Wetted Area Adjustment factor (1.); if SF_FAC > 10., input as Fuselage Wetted area (ft^2) - SLM=.346, ! wing taper ratio - SLMH=.352, ! taper ratio of horizontal tail - SLMV=0.801, ! taper ratio of vertical tail - STRUT=-118.0, ! attachment location of strut as fraction of half-span - SSTQSW=0.320, ! strut area divided by wing area - TCHT=.11, ! horizontal tail root thickness to chord ratio - TCR=.11, ! wing root thickness to chord ratio - TCSTRT = 0.10, ! strut thickness to chord ratio - TCT=.10, ! wing tip thickness to chord ratio - TCVT=.10, ! Vertical tail root thickness to chord rati - VBARHX=1.43, ! Hz tail volume coefficient (default function of fus length and diameter) - VBARVX=.066, ! vertical tail volume coefficient (default function of fuselage length and diameter) - WAS=24., ! aisle width, in. - WS=20.2, ! seat width, in - YMG=0., ! span fraction location of main gear on wing 0: on fuselage 1: at tip - YP=.2143, ! span fraction location of engines on wing 0: on fuselage 1: at tip - XLQDE=1.715, ! nacelle length to diameter ratio, KNAC=0 or 1 - XWQLF=0.463, ! Distance from Nose to Wing Aerodynamic Center over Fuselage Length (0.40 - ALPHL0=-1.2, ! zero lift angle of attack in degrees - CKF=1.10, ! fuselage drag form factor (numerical function of fuselage fineness ratio) - CKF=1.146, ! fuselage drag form factor (derated for non-advanced) - CKW=1.60, ! wing form factor (numerical function of TCR and TCT) - CKW=1.667, ! wing form factor (derated for non-advanced) - CKW=-1, ! Testing fortran_to_aviary - CKI=1.10, ! Wing/Fuselage Interference Factor (0.0, i.e No interference drag) - CKI=1.21, ! Wing/Fuselage Interference Factor (derated for non-advanced) - CKN=1.25, ! nacelle form factor (numerical function of nacelle fineness ratio) - CKN=1.50, ! nacelle form factor (derated for non-advanced) - CKVT=2.0, ! vertical tail form factor (numerical function of TCVT) - CKVT=2.0, ! vertical tail form factor (derated for non-advanced) - CKHT=1.7, ! horizontal tail form factor (numerical function of TCHT and SAH) - CKHT=1.7, ! horizontal tail form factor (derated for non-advanced) - CKSTRT=1.125, ! Strut/Fuselage Interference Factor (0.0, i.e No interference drag) - DELCD=0.0014, ! increment in CD (.0015) - EYEW=1.5, ! wing incidence to fuselage horizontal reference in degrees - ! KNAC determines nacelle drag bookkeeping - ! 0: nacelle drag computed as penalty to engine performance (turbofans only) - ! 1: nacelle drag part of aircraft drag; nacelle sized by engine size - ! 2: same as 1, except uses nacelle size inputs DRARN, ELN - KNAC=1, - BENGOB=0.05, ! fraction of flap-free wing span due to engines - BTEOB=0.88, ! ratio of flap span to wing span - CFOC=0.250, ! flap chord to wing chord ratio - CLEOC=.10, ! ratio of leading edge device chord to wing chord (0 for no LED) - DCDOTE=0.10, ! drag coeff increment due to optimally deflected TE flaps - DELLEO=20., ! optimal deflection for leading edge device degrees (45) - DFLPTO=10., ! takeoff flap deflection, degrees - DELLED=10., ! leading edge device deflection, degrees (0) when? - DCLMTE=1.0, ! lift coefficient increment due to optimally deflected TE flaps - DFLPLD=40., ! landing flap deflection, degrees - FLAPN=2., ! number of flap segments per wing panel (1) - ! JFLTYP 1:plain flap, 2:split flap, 3:single slotted flap (default), 4:double slotted flap - ! 5:triple slotted flap, 6:Fowler flap, 7:double slotted Fowler flap - JFLTYP=4, !2 - ! RCLMAX is the CLMAX reference value of basic wing reference conditions: aspect ratio = 12, taper ratio = 1., - ! t/c = 0.10, SweepQC = 0, Re = 6 x 10^6 - RCLMAX=1.15, - WCFLAP=1.90, ! weight trend coefficient in flap weight equation (default is a function of JFLYTYP) - ! CATD structural design category - ! 0 normal design FAR Part 23 - ! 1 utility design FAR 23 - ! 2 aerobatic design FAR 23 - ! 3.0 for transports FAR Part 25 - ! >3 value of input design limit load factor - CATD=3., - DELP=7.50, ! fuselage pressure differential, psi - DELWST=0., ! incremental structural weight, lb. (0.) - FPYL=1.25, ! factor for turbofan engine pylon weight if NTYE=7 and KNAC=2 - SKB=96.94, ! weight trend coefficient of fuselage (Composite Value from Calibration) - SKB=86.63, ! weight trend coefficient of fuselage (Composite to PRSEUS) - SKB=102.82, ! weight trend coefficient of fuselage (derated for non-advanced) - SKCC=30.0, ! weight trend coefficient of cockpit controls - SKWF=.5625, ! fraction of total theoretical wing volume used for wing fuel - SKFS=.060, ! weight trend coefficient for fuel system - SKFW=.5936, ! weight trend coefficient of fixed wing controls - SKPEI=.165, ! weight trend coefficient of engine installation, fraction dry engine - SKLG=.03390, ! weight trend coefficient of landing gear, fraction gross weight - SKMG=.85, ! weight trend coefficient main gear, fraction of landing gear - SKPES=0.258, ! weight trend coefficient of engine nacelle, fraction dry engine, if KNAC <> 2 - SKSTRUT=0.238, ! weight trend coefficient of strut, strut weight/wing weight - SKWFOLD =0.20, ! Wing fold weight factor - SKWW=88.2, ! weight trend coefficient of wing without high lift devices (Calibration Run) - SKWW=78.64, ! weight trend coefficient of wing (Composite to PRSEUS) - SKWW=106.28, ! weight trend coefficient of wing (derated for non-advanced) - SKY=.2076, ! weight trend coefficient horizontal tail - SKZ=.2587, ! weight trend coefficient vertical tail - UWNAC=2.50, ! nacelle weight/nacelle surface area; lb per sq ft, if KNAC <> 2 - UWPAX=200., ! weight per passenger, including baggage, lb (200.) - WCARGO=15970., ! weight of cargo, lb - WENG=4218., ! dry weight of one engine, lb if KNAC = 2 (includes gearbox if propeller) - WG=145000., ! initial gross weight guess, lb - WG=150000., ! initial gross weight guess, lb - WG=160000., ! initial gross weight guess, lb - WNAC=1240. ! weight of one nacelle, lb if KNAC = 2 - WPLX=0., ! design payload, lb (default function of PAX) - WPYLON=0, ! weight of one pylon, lb, if KNAC=2 and NTYPE=7 - ! CW are weight coefficients for various subsytems. >1 is actual weight in lbsf - CW(1)=1014., ! APU - CW(2)=.0736, ! instruments - CW(3)=.085, ! hydraulics for flight controls - CW(4)=.105, ! hydraulics for gear - CW(5)=1504., ! avionics - CW(6)=1.65, ! air conditioning - CW(7)=126., ! anti-icing system - CW(8)=9114., ! furnishings - CW(9)=5.0, ! passenger service items lbsf per passenger - CW(10)=3.0, ! water lbsf per occupant - CW(11)=0.0, ! emergency equipment - CW(12)=10., ! catering items lbsf per passenger CW(13)=6.0, - CW(13)=12., ! trapped fuel factor - CKFF=1.000, ! factor on installed engine fuel flow - DCDSE=-1.0, ! delta CD due to engine out (default is zero), -1: program computes increment - DNQDE=1.2095, ! Nacelle Diamter-to-Engine Diameter Ratio - ENP=2. ! number of engines - HBTP=0.472, ! turbofan engine face hub/tip ratio, if NTYE=7 and KNAC <> 2 - KODETO=5, ! engine power setting during takeoff segment if NTYE=7 - KODECL=7, ! engine power setting during climb segment if NTYE=7 - KODETR=6, ! engine power setting during turn segment if NTYE=7 - ! KODEAC is engine power setting during acceleration segment if NTYE = 7 - ! 5: maximum power (default) - ! 6: maximum continuous power - ! 7: maximum climb power - KODEAC=7, - ! NTYE sets the type of engine - ! 1: reciprocating engine with carburetor, 2: reciprocating engine with fuel injection - ! 3: recip engine with fuel injection and geared, 4: rotary combustion engine - ! 5: turboshaft engine, 6: turboprop engine - ! 7: turbojet or turbofan engine - ! 11, 12, 13 same as 1, 2, 3 except HOPWSZ computes geometry and weight - ! 14 same as 4 except RCWSZ computes geometry and weight - NTYE=7, - RELP=0.0, ! engine cg fraction of fuselage length, for fuselage mounted engines, (0.) if LCWING <> 0 - SM1D=0.625, ! engine face Mach number sea level static if NTYE = 7 and KNAC <> 2 - SWSLS=.21366, ! engine specific weight lb/lb thrust or lb/HP for recip/ turboprop if KNAC <> 2 - THIN=21162., ! input thrust for one engine, lbf., if JENGSZ=4 and NTYE=7 28620 - 21726 - EMCRU=0.80, ! design cruise Mach number for engine sizing (not mission analysis) - HNCRU=36000., ! design cruise altitude in feet - HSCREQ=25000., ! required engine-out service ceiling - ! IWLD 0: landing weight = gross weight (default) 1: landing weight = weight at end of mission - ! 2: landing weight = fraction of gross weight (see WLPCT) - IWLD=2, - ! JENGSZ sets the type of engine sizing - ! 0: size engine for cruise only - ! 1: cruise and takeoff only - ! 2: cruise, takeoff, and climb only - ! 3: size for cruise and climb only - ! 4: engine thrust specified; (input KNAC=2, ELN, DBARN, WENG, WNAC) only if NTYE=7 - JENGSZ =4, !2 - RWCRTX=.985, ! ratio of cruise weight to gross weight for propulsion sizing (1.0) - VMLFSL=440., ! maximum structural design flight speed, mph - WGS=93.1, ! wing loading, psf - WLPCT=.9423, ! ratio of landing weight to gross weight, if IWLD=2 - RCCRU=100.0, ! ROC at cruise power - ROCTOC=300., ! rate of climb at top of climb ft/min - XTORQ=8000., ! required takeoff distance to clear 35 ft, input if JENGSZ=1 or 2 (99999.) - TDELTO=27.0, ! temperature increment above standard day for takeoff - TDELLD=27.0, ! temperature increment above standard day for landing - ARNGE(1) = 3500., ! 0: no range or endurance requirement (default) <24: design endurance, hrs >24: design range, nm - ! ARNGE(2) =0., ! Design Altitude, Short Range - ARNGE(3) = 900., ! Off Design Range, Short Range - ! ARNGE(4) = 0., ! Off Design Altitude, Long Range - CRALT =36000., ! mission cruise altitude, ft (HNCRU) - CRMACH=.80, ! mission analysis cruise Mach number (use EMCRU for engine sizing) - DELTT=0.1677, ! time spent taxiing before takeoff and after landing, hours - DV1=10., ! increment of engine failure decision speed above stall, kts (5) - DVR=5., ! increment of takeoff rotation speed above engine failure decision speed above stall, kts (5) - ! ICLM 1: climb at maximum rate of climb (default) 2: climb at maximum allowable operating speed - ! 3: climb at input EAS - ICLM=3, -! ICRUS = 0, cruise at CRALT (default) for cost and range calculation -! ICRUS = 1, cruise at normal power for cost and range calculation -! ICRUS = 2, cruise for best specific range for cost and range calculation -! ICRUS = 3, cruise for best endurance for cost and range calculation -! ICRUS = 10,11,12,13 – Cruise/Climb at constant Mach Number -! ICRUS = 20,21,22,23 – Cruise/Climb at constant True Airspeed, TAS -! ICRUS = 30,31,32,33 – Cruise/Climb at constant Equivalent Airspeed, EAS - ICRUS=0, !cruise specifier - MX=0, ! 0 – No alternate mission profile (default); 1 – Alternate mission profile input in NEWMIS namelist - NFAIL=0, ! 0: computes engine out and accelerate/stop distance, 1: computes only all engine performance (default) - OFALT=0., ! off design mission altitude in feet (0.0) - OFEM=.78, ! off design specified mission Mach number - ROSCAB=9999., ! cabin rate of sink during descent (500.) fpm - RSMX=900., ! maximum allowable rate of sink during landing approach ft per min (1000) - FRESF=-0.15, ! Reserve fuel fraction of mission fuel (negative sign trigger) - RF(1)=.05, ! Reserve Fuel Input: Time for Missed Approach - RF(2)=125., ! Reserve Fuel Input: Range to alternate - RF(3)=20000., ! Reserve Fuel Input: Cruise altitude to alternate - RF(4)=25000., ! Reserve Fuel Input: Holding Altitude - SINKTD=5., ! landing touchdown sink rate, ft per sec (3.0) - VCLMB=270., ! climb speed, EAS, kts (input only if ICLM=3) - XLFMX=1.15, ! landing flare load factor if < 4 or landing flare initiation height, ft if > 4. (1.2) - ALR=1.11, ! man-hour labor rate $ per hour ? - CINP=.11, ! cost of annual inspection ? - CLIAB=1984., ! cost of liability insurance ? - CMF=15., ! increment to fixed annual cost ? - CMV=.15, ! increment to hourly operating cost ? - CRWOH=15., ! crew overhead rate ? - DYR=12., ! aircraft depreciation period in years (8) - FCSF=2.5, ! fuel cost, $ per gallon (0.51) - HIR=0.015, ! hull insurance rate; insurance cost/aircraft price (0.02) - HRI=2500., ! hours between annual inspection (100) - OHR=350., ! Overhaul cost of one engine, $ per lb thrust or $ per HP (5.5) - PRV=.15, ! aircraft residual value/original value (0.2) - RI=.8, ! loan interest rate; yearly interest/loan (0.) - SRPM=18000., ! Cabin Attendant Cost ($/yr.) - TBO=3500., ! time between overhauls, hr (0. default which deletes cost computations) - TR=1.0, ! property tax rate; tax/value (0.) - $END - diff --git a/aviary/utils/test/csv_test.csv b/aviary/utils/test/data/csv_test.csv similarity index 100% rename from aviary/utils/test/csv_test.csv rename to aviary/utils/test/data/csv_test.csv diff --git a/aviary/utils/test/flops_test_polar.txt b/aviary/utils/test/data/flops_test_polar.txt similarity index 100% rename from aviary/utils/test/flops_test_polar.txt rename to aviary/utils/test/data/flops_test_polar.txt diff --git a/aviary/utils/test/test_drag_polar_data.csv b/aviary/utils/test/data/test_drag_polar_data.csv similarity index 97% rename from aviary/utils/test/test_drag_polar_data.csv rename to aviary/utils/test/data/test_drag_polar_data.csv index 558d2b8ff..c762e6653 100644 --- a/aviary/utils/test/test_drag_polar_data.csv +++ b/aviary/utils/test/data/test_drag_polar_data.csv @@ -1,145 +1,145 @@ -altitude ,mach_number ,angle_of_attack,lift_coefficient, total_drag_coefficient -0,0.2,-2,0.094876064,0.009822906 -0,0.2,0,0.312245244,0.012348892 -0,0.2,2,0.526732695,0.018104994 -0,0.2,4,0.738624783,0.026931199 -0,0.2,6,0.948256669,0.038891873 -0,0.2,10,1.37381249,0.072045321 -0,0.4,-2,0.10109343,0.00897394 -0,0.4,0,0.331242642,0.011794696 -0,0.4,2,0.558215806,0.018197124 -0,0.4,4,0.78234899,0.028002964 -0,0.4,6,1.00403071,0.041269684 -0,0.4,10,1.4548071,0.078202412 -0,0.5,-2,0.106943991,0.008799865 -0,0.5,0,0.348482284,0.011907858 -0,0.5,2,0.586591715,0.018925735 -0,0.5,4,0.821646945,0.029659873 -0,0.5,6,1.0540806,0.044158552 -0,0.5,10,1.52725612,0.084663215 -0,0.6,-2,0.116201724,0.008755005 -0,0.6,0,0.374581734,0.012332239 -0,0.6,2,0.628753876,0.020345718 -0,0.6,4,0.880405735,0.032546498 -0,0.6,6,1.12886908,0.048978839 -0,0.6,10,1.63519161,0.095162308 -0,0.7,-2,0.132280494,0.008902517 -0,0.7,0,0.416816813,0.013336078 -0,0.7,2,0.696795397,0.023089868 -0,0.7,4,0.973468481,0.037876912 -0,0.7,6,1.24662498,0.057702287 -0,0.7,10,1.80500261,0.113703109 -0,0.8,-2,0.167428501,0.00957739 -0,0.8,0,0.497855602,0.016016403 -0,0.8,2,0.823365761,0.029601436 -0,0.8,4,1.14426867,0.049986007 -0,0.8,6,1.46094114,0.07706223 -0,0.8,10,2.11188335,0.153895725 -20000,0.2,-2,0.094876064,0.010748936 -20000,0.2,0,0.312245244,0.013278551 -20000,0.2,2,0.526732695,0.019035924 -20000,0.2,4,0.738624783,0.027861195 -20000,0.2,6,0.948256669,0.039818804 -20000,0.2,10,1.37381249,0.072958942 -20000,0.4,-2,0.10109343,0.009771491 -20000,0.4,0,0.331242642,0.01259557 -20000,0.4,2,0.558215806,0.018999276 -20000,0.4,4,0.78234899,0.028804499 -20000,0.4,6,1.00403071,0.042068785 -20000,0.4,10,1.4548071,0.078990525 -20000,0.5,-2,0.106943991,0.009561 -20000,0.5,0,0.348482284,0.012672322 -20000,0.5,2,0.586591715,0.019691561 -20000,0.5,4,0.821646945,0.030425263 -20000,0.5,6,1.0540806,0.044921782 -20000,0.5,10,1.52725612,0.085416334 -20000,0.6,-2,0.116201724,0.009487973 -20000,0.6,0,0.374581734,0.013068627 -20000,0.6,2,0.628753876,0.021083571 -20000,0.6,4,0.880405735,0.03328418 -20000,0.6,6,1.12886908,0.04971467 -20000,0.6,10,1.63519161,0.095888927 -20000,0.7,-2,0.132280494,0.009612703 -20000,0.7,0,0.416816813,0.014049894 -20000,0.7,2,0.696795397,0.023805393 -20000,0.7,4,0.973468481,0.038592556 -20000,0.7,6,1.24662498,0.058416441 -20000,0.7,10,1.80500261,0.11440913 -20000,0.8,-2,0.167428501,0.010268506 -20000,0.8,0,0.497855602,0.016711584 -20000,0.8,2,0.823365761,0.030298771 -20000,0.8,4,1.14426867,0.050683899 -20000,0.8,6,1.46094114,0.077759149 -20000,0.8,10,2.11188335,0.154586048 -30000,0.2,-2,0.094876064,0.01132055 -30000,0.2,0,0.312245244,0.013852395 -30000,0.2,2,0.526732695,0.019610547 -30000,0.2,4,0.738624783,0.028435235 -30000,0.2,6,0.948256669,0.040390954 -30000,0.2,10,1.37381249,0.073522871 -30000,0.4,-2,0.10109343,0.010261747 -30000,0.4,0,0.331242642,0.013087861 -30000,0.4,2,0.558215806,0.019492345 -30000,0.4,4,0.78234899,0.029297188 -30000,0.4,6,1.00403071,0.042559974 -30000,0.4,10,1.4548071,0.079474954 -30000,0.5,-2,0.106943991,0.010028278 -30000,0.5,0,0.348482284,0.013141634 -30000,0.5,2,0.586591715,0.020161704 -30000,0.5,4,0.821646945,0.030895132 -30000,0.5,6,1.0540806,0.045390324 -30000,0.5,10,1.52725612,0.085878672 -30000,0.6,-2,0.116201724,0.009937502 -30000,0.6,0,0.374581734,0.013520245 -30000,0.6,2,0.628753876,0.02153608 -30000,0.6,4,0.880405735,0.033736581 -30000,0.6,6,1.12886908,0.050165931 -30000,0.6,10,1.63519161,0.09633454 -30000,0.7,-2,0.132280494,0.010047891 -30000,0.7,0,0.416816813,0.0144873 -30000,0.7,2,0.696795397,0.024243841 -30000,0.7,4,0.973468481,0.039031073 -30000,0.7,6,1.24662498,0.058854041 -30000,0.7,10,1.80500261,0.114841741 -30000,0.8,-2,0.167428501,0.010691707 -30000,0.8,0,0.497855602,0.017137263 -30000,0.8,2,0.823365761,0.030725762 -30000,0.8,4,1.14426867,0.051111226 -30000,0.8,6,1.46094114,0.078185878 -30000,0.8,10,2.11188335,0.155008735 -40000,0.2,-2,0.094876064,0.012082662 -40000,0.2,0,0.312245244,0.01461747 -40000,0.2,2,0.526732695,0.020376651 -40000,0.2,4,0.738624783,0.029200558 -40000,0.2,6,0.948256669,0.041153752 -40000,0.2,10,1.37381249,0.074274716 -40000,0.4,-2,0.10109343,0.010913067 -40000,0.4,0,0.331242642,0.013741874 -40000,0.4,2,0.558215806,0.020147387 -40000,0.4,4,0.78234899,0.029951717 -40000,0.4,6,1.00403071,0.04321251 -40000,0.4,10,1.4548071,0.080118518 -40000,0.5,-2,0.106943991,0.0106484 -40000,0.5,0,0.348482284,0.013764447 -40000,0.5,2,0.586591715,0.020785612 -40000,0.5,4,0.821646945,0.031518677 -40000,0.5,6,1.0540806,0.046012099 -40000,0.5,10,1.52725612,0.086492212 -40000,0.6,-2,0.116201724,0.010533556 -40000,0.6,0,0.374581734,0.014119058 -40000,0.6,2,0.628753876,0.02213607 -40000,0.6,4,0.880405735,0.034336421 -40000,0.6,6,1.12886908,0.05076426 -40000,0.6,10,1.63519161,0.096925373 -40000,0.7,-2,0.132280494,0.010624519 -40000,0.7,0,0.416816813,0.015066856 -40000,0.7,2,0.696795397,0.024824771 -40000,0.7,4,0.973468481,0.039612086 -40000,0.7,6,1.24662498,0.059433833 -40000,0.7,10,1.80500261,0.115414928 -40000,0.8,-2,0.167428501,0.011252107 -40000,0.8,0,0.497855602,0.017700938 -40000,0.8,2,0.823365761,0.031291167 -40000,0.8,4,1.14426867,0.051677067 -40000,0.8,6,1.46094114,0.078750926 -40000,0.8,10,2.11188335,0.155568425 +altitude ,mach_number ,angle_of_attack,lift_coefficient, total_drag_coefficient +0,0.2,-2,0.094876064,0.009822906 +0,0.2,0,0.312245244,0.012348892 +0,0.2,2,0.526732695,0.018104994 +0,0.2,4,0.738624783,0.026931199 +0,0.2,6,0.948256669,0.038891873 +0,0.2,10,1.37381249,0.072045321 +0,0.4,-2,0.10109343,0.00897394 +0,0.4,0,0.331242642,0.011794696 +0,0.4,2,0.558215806,0.018197124 +0,0.4,4,0.78234899,0.028002964 +0,0.4,6,1.00403071,0.041269684 +0,0.4,10,1.4548071,0.078202412 +0,0.5,-2,0.106943991,0.008799865 +0,0.5,0,0.348482284,0.011907858 +0,0.5,2,0.586591715,0.018925735 +0,0.5,4,0.821646945,0.029659873 +0,0.5,6,1.0540806,0.044158552 +0,0.5,10,1.52725612,0.084663215 +0,0.6,-2,0.116201724,0.008755005 +0,0.6,0,0.374581734,0.012332239 +0,0.6,2,0.628753876,0.020345718 +0,0.6,4,0.880405735,0.032546498 +0,0.6,6,1.12886908,0.048978839 +0,0.6,10,1.63519161,0.095162308 +0,0.7,-2,0.132280494,0.008902517 +0,0.7,0,0.416816813,0.013336078 +0,0.7,2,0.696795397,0.023089868 +0,0.7,4,0.973468481,0.037876912 +0,0.7,6,1.24662498,0.057702287 +0,0.7,10,1.80500261,0.113703109 +0,0.8,-2,0.167428501,0.00957739 +0,0.8,0,0.497855602,0.016016403 +0,0.8,2,0.823365761,0.029601436 +0,0.8,4,1.14426867,0.049986007 +0,0.8,6,1.46094114,0.07706223 +0,0.8,10,2.11188335,0.153895725 +20000,0.2,-2,0.094876064,0.010748936 +20000,0.2,0,0.312245244,0.013278551 +20000,0.2,2,0.526732695,0.019035924 +20000,0.2,4,0.738624783,0.027861195 +20000,0.2,6,0.948256669,0.039818804 +20000,0.2,10,1.37381249,0.072958942 +20000,0.4,-2,0.10109343,0.009771491 +20000,0.4,0,0.331242642,0.01259557 +20000,0.4,2,0.558215806,0.018999276 +20000,0.4,4,0.78234899,0.028804499 +20000,0.4,6,1.00403071,0.042068785 +20000,0.4,10,1.4548071,0.078990525 +20000,0.5,-2,0.106943991,0.009561 +20000,0.5,0,0.348482284,0.012672322 +20000,0.5,2,0.586591715,0.019691561 +20000,0.5,4,0.821646945,0.030425263 +20000,0.5,6,1.0540806,0.044921782 +20000,0.5,10,1.52725612,0.085416334 +20000,0.6,-2,0.116201724,0.009487973 +20000,0.6,0,0.374581734,0.013068627 +20000,0.6,2,0.628753876,0.021083571 +20000,0.6,4,0.880405735,0.03328418 +20000,0.6,6,1.12886908,0.04971467 +20000,0.6,10,1.63519161,0.095888927 +20000,0.7,-2,0.132280494,0.009612703 +20000,0.7,0,0.416816813,0.014049894 +20000,0.7,2,0.696795397,0.023805393 +20000,0.7,4,0.973468481,0.038592556 +20000,0.7,6,1.24662498,0.058416441 +20000,0.7,10,1.80500261,0.11440913 +20000,0.8,-2,0.167428501,0.010268506 +20000,0.8,0,0.497855602,0.016711584 +20000,0.8,2,0.823365761,0.030298771 +20000,0.8,4,1.14426867,0.050683899 +20000,0.8,6,1.46094114,0.077759149 +20000,0.8,10,2.11188335,0.154586048 +30000,0.2,-2,0.094876064,0.01132055 +30000,0.2,0,0.312245244,0.013852395 +30000,0.2,2,0.526732695,0.019610547 +30000,0.2,4,0.738624783,0.028435235 +30000,0.2,6,0.948256669,0.040390954 +30000,0.2,10,1.37381249,0.073522871 +30000,0.4,-2,0.10109343,0.010261747 +30000,0.4,0,0.331242642,0.013087861 +30000,0.4,2,0.558215806,0.019492345 +30000,0.4,4,0.78234899,0.029297188 +30000,0.4,6,1.00403071,0.042559974 +30000,0.4,10,1.4548071,0.079474954 +30000,0.5,-2,0.106943991,0.010028278 +30000,0.5,0,0.348482284,0.013141634 +30000,0.5,2,0.586591715,0.020161704 +30000,0.5,4,0.821646945,0.030895132 +30000,0.5,6,1.0540806,0.045390324 +30000,0.5,10,1.52725612,0.085878672 +30000,0.6,-2,0.116201724,0.009937502 +30000,0.6,0,0.374581734,0.013520245 +30000,0.6,2,0.628753876,0.02153608 +30000,0.6,4,0.880405735,0.033736581 +30000,0.6,6,1.12886908,0.050165931 +30000,0.6,10,1.63519161,0.09633454 +30000,0.7,-2,0.132280494,0.010047891 +30000,0.7,0,0.416816813,0.0144873 +30000,0.7,2,0.696795397,0.024243841 +30000,0.7,4,0.973468481,0.039031073 +30000,0.7,6,1.24662498,0.058854041 +30000,0.7,10,1.80500261,0.114841741 +30000,0.8,-2,0.167428501,0.010691707 +30000,0.8,0,0.497855602,0.017137263 +30000,0.8,2,0.823365761,0.030725762 +30000,0.8,4,1.14426867,0.051111226 +30000,0.8,6,1.46094114,0.078185878 +30000,0.8,10,2.11188335,0.155008735 +40000,0.2,-2,0.094876064,0.012082662 +40000,0.2,0,0.312245244,0.01461747 +40000,0.2,2,0.526732695,0.020376651 +40000,0.2,4,0.738624783,0.029200558 +40000,0.2,6,0.948256669,0.041153752 +40000,0.2,10,1.37381249,0.074274716 +40000,0.4,-2,0.10109343,0.010913067 +40000,0.4,0,0.331242642,0.013741874 +40000,0.4,2,0.558215806,0.020147387 +40000,0.4,4,0.78234899,0.029951717 +40000,0.4,6,1.00403071,0.04321251 +40000,0.4,10,1.4548071,0.080118518 +40000,0.5,-2,0.106943991,0.0106484 +40000,0.5,0,0.348482284,0.013764447 +40000,0.5,2,0.586591715,0.020785612 +40000,0.5,4,0.821646945,0.031518677 +40000,0.5,6,1.0540806,0.046012099 +40000,0.5,10,1.52725612,0.086492212 +40000,0.6,-2,0.116201724,0.010533556 +40000,0.6,0,0.374581734,0.014119058 +40000,0.6,2,0.628753876,0.02213607 +40000,0.6,4,0.880405735,0.034336421 +40000,0.6,6,1.12886908,0.05076426 +40000,0.6,10,1.63519161,0.096925373 +40000,0.7,-2,0.132280494,0.010624519 +40000,0.7,0,0.416816813,0.015066856 +40000,0.7,2,0.696795397,0.024824771 +40000,0.7,4,0.973468481,0.039612086 +40000,0.7,6,1.24662498,0.059433833 +40000,0.7,10,1.80500261,0.115414928 +40000,0.8,-2,0.167428501,0.011252107 +40000,0.8,0,0.497855602,0.017700938 +40000,0.8,2,0.823365761,0.031291167 +40000,0.8,4,1.14426867,0.051677067 +40000,0.8,6,1.46094114,0.078750926 +40000,0.8,10,2.11188335,0.155568425 From 6009c1650b4021194cb527f789ea21221ddb86f1 Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Wed, 11 Dec 2024 15:00:57 -0500 Subject: [PATCH 10/21] fixed messed up metadata for doc page --- aviary/docs/user_guide/aviary_commands.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aviary/docs/user_guide/aviary_commands.ipynb b/aviary/docs/user_guide/aviary_commands.ipynb index 7b4d17346..61a4d988b 100644 --- a/aviary/docs/user_guide/aviary_commands.ipynb +++ b/aviary/docs/user_guide/aviary_commands.ipynb @@ -4,7 +4,7 @@ "attachments": {}, "cell_type": "markdown", "metadata": {}, - "ssmall_single_aisle_GASPsmall_single_aisle_GASP + "source": [ "# Command Line Tools\n", "\n", "Aviary has a number of command line tools that are available via the `aviary`\n", From bf55b4127934b6bbd9c147b151153c614b0c7daa Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Wed, 11 Dec 2024 17:16:45 -0500 Subject: [PATCH 11/21] updated filename changes to docs examples --- aviary/docs/user_guide/aviary_commands.ipynb | 30 +++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/aviary/docs/user_guide/aviary_commands.ipynb b/aviary/docs/user_guide/aviary_commands.ipynb index 61a4d988b..4edf1409a 100644 --- a/aviary/docs/user_guide/aviary_commands.ipynb +++ b/aviary/docs/user_guide/aviary_commands.ipynb @@ -248,7 +248,7 @@ "import os\n", "commands = [\n", " 'engines','turbofan_22k.txt','N3CC/N3CC_data.py',\n", - " 'small_single_aisle_GwGm.dat small_single_aisle_GwGm.csv',\n", + " 'small_single_aisle_GASP.dat small_single_aisle_GASP.csv',\n", " 'turbofan_22k.txt -o ~/example_files']\n", "with tempfile.TemporaryDirectory() as tempdir:\n", " os.chdir(tempdir)\n", @@ -305,11 +305,12 @@ "\n", "\n", "Example usage:\n", - "```\n", + "\n", "`aviary convert_engine turbofan_23k_1.eng turbofan_23k_1_lbm_s.deck -f GASP` Convert a GASP based turbofan\n", - "`aviary convert_engine -f FLOPS turbofan_22k.eng turbofan_22k.txt` Convert a FLOPS based turbofan\n", - "`aviary convert_engine turboshaft_4465hp.eng turboshaft_4465hp.deck --data_format GASP_TS` Convert a GASP based turboshaft\n", - "```\n" + "\n", + "`aviary convert_engine turbofan_22k.eng turbofan_22k.txt -f FLOPS` Convert a FLOPS based turbofan\n", + "\n", + "`aviary convert_engine turboshaft_4465hp.eng turboshaft_4465hp.deck --data_format GASP_TS` Convert a GASP based turboshaft" ] }, { @@ -378,16 +379,10 @@ "\n", "\n", "Example usage:\n", - "```\n", - "`aviary convert_aero_table -f GASP subsystems/aerodynamics/gasp_based/data/GASP_aero_free.txt large_single_aisle_1_aero_flaps.txt` Convert a GASP based aero table\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "`aviary convert_aero_table -f FLOPS utils/test/flops_test_polar.txt aviary_flops_polar.txt` Convert a FLOPS based aero table\n", - "```\n" + "\n", + "`aviary convert_aero_table -f GASP subsystems/aerodynamics/gasp_based/data/GASP_aero_free.txt large_single_aisle_1_aero_flaps.txt` Convert a GASP based aero table\n", + "\n", + "`aviary convert_aero_table -f FLOPS utils/test/flops_test_polar.txt aviary_flops_polar.txt` Convert a FLOPS based aero table\n" ] }, { @@ -450,11 +445,12 @@ "\n", "\n", "Example usage:\n", - "```\n", + "\n", "`aviary convert_prop_table -f GASP PropFan.map PropFan.prop` Convert a GASP based propeller map\n", + "\n", "`aviary convert_prop_table -f GASP general_aviation.map general_aviation.prop` Convert a GASP based propeller map\n", + "\n", "`aviary convert_prop_table general_aviation.map` Convert a GASP based propeller map\n", - "```\n", "\n", "The first example uses Mach number and the second example uses helical Mach number. \n", "Note that the output file name can be skipped as demonstrated in the third example. Since there is only one input data format that is supported at this time, it defaults to GASP if not provided. This is shown in the third example as well." From a3c631c1df7f143582148d882815e6c1f259e869 Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Fri, 13 Dec 2024 12:25:51 -0500 Subject: [PATCH 12/21] fixed broken paths in tests --- .../interface/test/test_cmd_entry_points.py | 2 +- aviary/sizing_problem.json | 1307 ----------------- .../test/test_propeller_performance.py | 2 +- .../utils/test/test_aero_table_conversion.py | 7 +- aviary/utils/test/test_csv_data_file.py | 2 +- .../test/test_propeller_map_conversion.py | 7 +- .../benchmark_tests/test_off_design_FwFm.py | 9 +- .../benchmark_tests/test_off_design_GwGm.py | 9 +- 8 files changed, 21 insertions(+), 1324 deletions(-) delete mode 100644 aviary/sizing_problem.json diff --git a/aviary/interface/test/test_cmd_entry_points.py b/aviary/interface/test/test_cmd_entry_points.py index baa070267..f050398df 100644 --- a/aviary/interface/test/test_cmd_entry_points.py +++ b/aviary/interface/test/test_cmd_entry_points.py @@ -53,7 +53,7 @@ def test_diff_configuration_conversion(self): filepath = get_aviary_resource_path( 'utils/test/data/converter_test_data_GASP.dat' ) - outfile = Path.cwd() / 'test_aircraft/converter_test_data_GASP' / 'output.dat' + outfile = Path.cwd() / 'utils/test/data/converter_test_data_GASP' / 'output.dat' cmd = f'aviary fortran_to_aviary {filepath} -o {outfile} -l GASP' self.run_and_test_cmd(cmd) diff --git a/aviary/sizing_problem.json b/aviary/sizing_problem.json deleted file mode 100644 index 419e44243..000000000 --- a/aviary/sizing_problem.json +++ /dev/null @@ -1,1307 +0,0 @@ -[ - [ - "aircraft:blended_wing_body_design:num_bays", - 0, - "unitless", - "" - ], - [ - "aircraft:crew_and_payload:mass_per_passenger", - 180, - "lbm", - "" - ], - [ - "aircraft:crew_and_payload:num_business_class", - 0, - "unitless", - "" - ], - [ - "aircraft:crew_and_payload:num_first_class", - 11, - "unitless", - "" - ], - [ - "aircraft:crew_and_payload:num_passengers", - 169, - "unitless", - "" - ], - [ - "aircraft:crew_and_payload:num_tourist_class", - 158, - "unitless", - "" - ], - [ - "aircraft:crew_and_payload:passenger_mass_with_bags", - 200, - "lbm", - "" - ], - [ - "aircraft:design:compute_htail_volume_coeff", - false, - "unitless", - "" - ], - [ - "aircraft:design:compute_vtail_volume_coeff", - false, - "unitless", - "" - ], - [ - "aircraft:design:part25_structural_category", - 3, - "unitless", - "" - ], - [ - "aircraft:design:reserve_fuel_additional", - 3000, - "lbm", - "" - ], - [ - "aircraft:design:reserve_fuel_fraction", - 0, - "unitless", - "" - ], - [ - "aircraft:design:smooth_mass_discontinuities", - false, - "unitless", - "" - ], - [ - "aircraft:design:ulf_calculated_from_maneuver", - false, - "unitless", - "" - ], - [ - "aircraft:design:use_alt_mass", - false, - "unitless", - "" - ], - [ - "aircraft:electrical:has_hybrid_system", - false, - "unitless", - "" - ], - [ - "aircraft:engine:compute_propeller_installation_loss", - [ - true - ], - "unitless", - "" - ], - [ - "aircraft:engine:constant_fuel_consumption", - [ - 0.0 - ], - "lbm/h", - "" - ], - [ - "aircraft:engine:flight_idle_max_fraction", - [ - 1.0 - ], - "unitless", - "" - ], - [ - "aircraft:engine:flight_idle_min_fraction", - [ - 0.08 - ], - "unitless", - "" - ], - [ - "aircraft:engine:flight_idle_thrust_fraction", - [ - 0.0 - ], - "unitless", - "" - ], - [ - "aircraft:engine:fuel_flow_scaler_constant_term", - [ - 0.0 - ], - "unitless", - "" - ], - [ - "aircraft:engine:fuel_flow_scaler_linear_term", - [ - 0.0 - ], - "unitless", - "" - ], - [ - "aircraft:engine:generate_flight_idle", - [ - true - ], - "unitless", - "" - ], - [ - "aircraft:engine:geopotential_alt", - [ - false - ], - "unitless", - "" - ], - [ - "aircraft:engine:has_propellers", - [ - false - ], - "unitless", - "" - ], - [ - "aircraft:engine:ignore_negative_thrust", - [ - false - ], - "unitless", - "" - ], - [ - "aircraft:engine:interpolation_method", - [ - "slinear" - ], - "unitless", - "" - ], - [ - "aircraft:engine:num_engines", - [ - 2 - ], - "unitless", - "" - ], - [ - "aircraft:engine:num_fuselage_engines", - [ - 0 - ], - "unitless", - "" - ], - [ - "aircraft:engine:num_propeller_blades", - [ - 0 - ], - "unitless", - "" - ], - [ - "aircraft:engine:num_wing_engines", - [ - 2 - ], - "unitless", - "" - ], - [ - "aircraft:engine:scale_mass", - [ - true - ], - "unitless", - "" - ], - [ - "aircraft:engine:scale_performance", - [ - true - ], - "unitless", - "" - ], - [ - "aircraft:engine:subsonic_fuel_flow_scaler", - [ - 1.0 - ], - "unitless", - "" - ], - [ - "aircraft:engine:supersonic_fuel_flow_scaler", - [ - 1.0 - ], - "unitless", - "" - ], - [ - "aircraft:engine:type", - [ - "[]" - ], - "unitless", - "" - ], - [ - "aircraft:engine:use_propeller_map", - [ - false - ], - "unitless", - "" - ], - [ - "aircraft:engine:shaft_power_design", - [ - 1.0 - ], - "hp", - "" - ], - [ - "aircraft:fins:num_fins", - 0, - "unitless", - "" - ], - [ - "aircraft:fuel:num_tanks", - 7, - "unitless", - "" - ], - [ - "aircraft:fuselage:aisle_width", - 24, - "inch", - "" - ], - [ - "aircraft:fuselage:military_cargo_floor", - false, - "unitless", - "" - ], - [ - "aircraft:fuselage:num_aisles", - 1, - "unitless", - "" - ], - [ - "aircraft:fuselage:num_fuselages", - 1, - "unitless", - "" - ], - [ - "aircraft:fuselage:num_seats_abreast", - 6, - "unitless", - "" - ], - [ - "aircraft:fuselage:seat_pitch", - 29, - "inch", - "" - ], - [ - "aircraft:fuselage:seat_width", - 20, - "inch", - "" - ], - [ - "aircraft:landing_gear:carrier_based", - false, - "unitless", - "" - ], - [ - "aircraft:landing_gear:drag_coefficient", - 0.0, - "unitless", - "" - ], - [ - "aircraft:landing_gear:fixed_gear", - true, - "unitless", - "" - ], - [ - "aircraft:strut:dimensional_location_specified", - true, - "unitless", - "" - ], - [ - "aircraft:vertical_tail:num_tails", - 1, - "unitless", - "" - ], - [ - "aircraft:wing:airfoil_technology", - 1.92669766647637, - "unitless", - "" - ], - [ - "aircraft:wing:choose_fold_location", - true, - "unitless", - "" - ], - [ - "aircraft:wing:detailed_wing", - false, - "unitless", - "" - ], - [ - "aircraft:wing:flap_type", - "[]", - "unitless", - "" - ], - [ - "aircraft:wing:fold_dimensional_location_specified", - false, - "unitless", - "" - ], - [ - "aircraft:wing:has_fold", - false, - "unitless", - "" - ], - [ - "aircraft:wing:has_strut", - false, - "unitless", - "" - ], - [ - "aircraft:wing:load_distribution_control", - 2, - "unitless", - "" - ], - [ - "aircraft:wing:loading_above_20", - true, - "unitless", - "" - ], - [ - "aircraft:wing:num_flap_segments", - 2, - "unitless", - "" - ], - [ - "aircraft:wing:num_integration_stations", - 50, - "unitless", - "" - ], - [ - "aircraft:wing:span_efficiency_reduction", - false, - "unitless", - "" - ], - [ - "mission:design:cruise_altitude", - 35000, - "ft", - "" - ], - [ - "mission:design:rate_of_climb_at_top_of_climb", - 0.0, - "ft/min", - "" - ], - [ - "mission:summary:fuel_flow_scaler", - 1, - "unitless", - "" - ], - [ - "mission:takeoff:angle_of_attack_runway", - 0.0, - "deg", - "" - ], - [ - "mission:takeoff:obstacle_height", - 35.0, - "ft", - "" - ], - [ - "mission:takeoff:thrust_incidence", - 0.0, - "deg", - "" - ], - [ - "mission:taxi:duration", - 0.167, - "h", - "" - ], - [ - "mission:taxi:mach", - 0.0001, - "unitless", - "" - ], - [ - "settings:verbosity", - "[]", - "unitless", - "" - ], - [ - "INGASP.JENGSZ", - 4, - "unitless", - "" - ], - [ - "test_mode", - false, - "unitless", - "" - ], - [ - "use_surrogates", - true, - "unitless", - "" - ], - [ - "mass_defect", - 10000, - "lbm", - "" - ], - [ - "settings:problem_type", - "[]", - "unitless", - "" - ], - [ - "aircraft:air_conditioning:mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:anti_icing:mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:apu:mass_scaler", - 1.1, - "unitless", - "" - ], - [ - "aircraft:avionics:mass_scaler", - 1.2, - "unitless", - "" - ], - [ - "aircraft:canard:area", - 0, - "ft**2", - "" - ], - [ - "aircraft:canard:aspect_ratio", - 0, - "unitless", - "" - ], - [ - "aircraft:canard:thickness_to_chord", - 0, - "unitless", - "" - ], - [ - "aircraft:crew_and_payload:baggage_mass_per_passenger", - 45, - "lbm", - "" - ], - [ - "aircraft:crew_and_payload:cargo_container_mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:crew_and_payload:flight_crew_mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:crew_and_payload:misc_cargo", - 0, - "lbm", - "" - ], - [ - "aircraft:crew_and_payload:non_flight_crew_mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:crew_and_payload:num_flight_attendants", - 3, - "unitless", - "" - ], - [ - "aircraft:crew_and_payload:num_flight_crew", - 2, - "unitless", - "" - ], - [ - "aircraft:crew_and_payload:num_galley_crew", - 0, - "unitless", - "" - ], - [ - "aircraft:crew_and_payload:passenger_service_mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:crew_and_payload:wing_cargo", - 0, - "lbm", - "" - ], - [ - "aircraft:design:base_area", - 0, - "ft**2", - "" - ], - [ - "aircraft:design:empty_mass_margin_scaler", - 0, - "unitless", - "" - ], - [ - "aircraft:design:lift_dependent_drag_coeff_factor", - 0.909839381134961, - "unitless", - "" - ], - [ - "aircraft:design:touchdown_mass", - 152800, - "lbm", - "" - ], - [ - "aircraft:design:subsonic_drag_coeff_factor", - 1, - "unitless", - "" - ], - [ - "aircraft:design:supersonic_drag_coeff_factor", - 1, - "unitless", - "" - ], - [ - "aircraft:design:zero_lift_drag_coeff_factor", - 0.930890028006548, - "unitless", - "" - ], - [ - "aircraft:electrical:mass_scaler", - 1.25, - "unitless", - "" - ], - [ - "aircraft:engine:additional_mass_fraction", - [ - 0.0 - ], - "unitless", - "" - ], - [ - "aircraft:engine:data_file", - [ - "models/engines/turbofan_28k.deck" - ], - "unitless", - "" - ], - [ - "aircraft:engine:mass_scaler", - [ - 1.15 - ], - "unitless", - "" - ], - [ - "aircraft:engine:mass", - [ - 7400.0 - ], - "lbm", - "" - ], - [ - "aircraft:engine:reference_mass", - [ - 7400 - ], - "lbm", - "" - ], - [ - "aircraft:engine:reference_sls_thrust", - [ - 28928.1 - ], - "lbf", - "" - ], - [ - "aircraft:engine:scaled_sls_thrust", - [ - 28928.1 - ], - "lbf", - "" - ], - [ - "aircraft:engine:thrust_reversers_mass_scaler", - [ - 0.0 - ], - "unitless", - "" - ], - [ - "aircraft:engine:wing_locations", - [ - 0.26869218 - ], - "unitless", - "" - ], - [ - "aircraft:fins:area", - 0, - "ft**2", - "" - ], - [ - "aircraft:fins:mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:fins:mass", - 0, - "lbm", - "" - ], - [ - "aircraft:fins:taper_ratio", - 10, - "unitless", - "" - ], - [ - "aircraft:fuel:auxiliary_fuel_capacity", - 0, - "lbm", - "" - ], - [ - "aircraft:fuel:density_ratio", - 1, - "unitless", - "" - ], - [ - "aircraft:fuel:fuel_system_mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:fuel:fuselage_fuel_capacity", - 0, - "lbm", - "" - ], - [ - "aircraft:fuel:total_capacity", - 45694, - "lbm", - "" - ], - [ - "aircraft:fuel:unusable_fuel_mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:furnishings:mass_scaler", - 1.1, - "unitless", - "" - ], - [ - "aircraft:fuselage:length", - 128, - "ft", - "" - ], - [ - "aircraft:fuselage:mass_scaler", - 1.05, - "unitless", - "" - ], - [ - "aircraft:fuselage:max_height", - 13.17, - "ft", - "" - ], - [ - "aircraft:fuselage:max_width", - 12.33, - "ft", - "" - ], - [ - "aircraft:fuselage:passenger_compartment_length", - 85.5, - "ft", - "" - ], - [ - "aircraft:fuselage:planform_area", - 1578.24, - "ft**2", - "" - ], - [ - "aircraft:fuselage:wetted_area_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:fuselage:wetted_area", - 4158.62, - "ft**2", - "" - ], - [ - "aircraft:horizontal_tail:area", - 355, - "ft**2", - "" - ], - [ - "aircraft:horizontal_tail:aspect_ratio", - 6, - "unitless", - "" - ], - [ - "aircraft:horizontal_tail:mass_scaler", - 1.2, - "unitless", - "" - ], - [ - "aircraft:horizontal_tail:taper_ratio", - 0.22, - "unitless", - "" - ], - [ - "aircraft:horizontal_tail:thickness_to_chord", - 0.125, - "unitless", - "" - ], - [ - "aircraft:horizontal_tail:vertical_tail_fraction", - 0, - "unitless", - "" - ], - [ - "aircraft:horizontal_tail:wetted_area_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:horizontal_tail:wetted_area", - 592.65, - "ft**2", - "" - ], - [ - "aircraft:hydraulics:mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:hydraulics:system_pressure", - 3000, - "psi", - "" - ], - [ - "aircraft:instruments:mass_scaler", - 1.25, - "unitless", - "" - ], - [ - "aircraft:landing_gear:main_gear_mass_scaler", - 1.1, - "unitless", - "" - ], - [ - "aircraft:landing_gear:main_gear_oleo_length", - 102, - "inch", - "" - ], - [ - "aircraft:landing_gear:nose_gear_mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:landing_gear:nose_gear_oleo_length", - 67, - "inch", - "" - ], - [ - "aircraft:nacelle:avg_diameter", - [ - 7.94 - ], - "ft", - "" - ], - [ - "aircraft:nacelle:avg_length", - [ - 12.3 - ], - "ft", - "" - ], - [ - "aircraft:nacelle:mass_scaler", - [ - 1.0 - ], - "unitless", - "" - ], - [ - "aircraft:nacelle:wetted_area_scaler", - [ - 1.0 - ], - "unitless", - "" - ], - [ - "aircraft:paint:mass_per_unit_area", - 0.037, - "lbm/ft**2", - "" - ], - [ - "aircraft:propulsion:engine_oil_mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:propulsion:misc_mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:vertical_tail:area", - 284, - "ft**2", - "" - ], - [ - "aircraft:vertical_tail:aspect_ratio", - 1.75, - "unitless", - "" - ], - [ - "aircraft:vertical_tail:mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:vertical_tail:taper_ratio", - 0.33, - "unitless", - "" - ], - [ - "aircraft:vertical_tail:thickness_to_chord", - 0.1195, - "unitless", - "" - ], - [ - "aircraft:vertical_tail:wetted_area_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:vertical_tail:wetted_area", - 581.13, - "ft**2", - "" - ], - [ - "aircraft:wing:aeroelastic_tailoring_factor", - 0, - "unitless", - "" - ], - [ - "aircraft:wing:area", - 1370, - "ft**2", - "" - ], - [ - "aircraft:wing:aspect_ratio", - 11.22091, - "unitless", - "" - ], - [ - "aircraft:wing:bending_mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:wing:chord_per_semispan", - [ - 0.31, - 0.23, - 0.084 - ], - "unitless", - "" - ], - [ - "aircraft:wing:composite_fraction", - 0.2, - "unitless", - "" - ], - [ - "aircraft:wing:control_surface_area", - 137, - "ft**2", - "" - ], - [ - "aircraft:wing:control_surface_area_ratio", - 0.1, - "unitless", - "" - ], - [ - "aircraft:wing:glove_and_bat", - 134, - "ft**2", - "" - ], - [ - "aircraft:wing:input_station_dist", - [ - 0, - 0.2759, - 0.9367 - ], - "unitless", - "" - ], - [ - "aircraft:wing:load_fraction", - 1, - "unitless", - "" - ], - [ - "aircraft:wing:load_path_sweep_dist", - [ - 0, - 22 - ], - "deg", - "" - ], - [ - "aircraft:wing:mass_scaler", - 1.23, - "unitless", - "" - ], - [ - "aircraft:wing:max_camber_at_70_semispan", - 0, - "unitless", - "" - ], - [ - "aircraft:wing:misc_mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:wing:shear_control_mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:wing:span", - 117.83, - "ft", - "" - ], - [ - "aircraft:wing:strut_bracing_factor", - 0, - "unitless", - "" - ], - [ - "aircraft:wing:surface_ctrl_mass_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:wing:sweep", - 25, - "deg", - "" - ], - [ - "aircraft:wing:taper_ratio", - 0.278, - "unitless", - "" - ], - [ - "aircraft:wing:thickness_to_chord_dist", - [ - 0.145, - 0.115, - 0.104 - ], - "unitless", - "" - ], - [ - "aircraft:wing:thickness_to_chord", - 0.13, - "unitless", - "" - ], - [ - "aircraft:wing:ultimate_load_factor", - 3.75, - "unitless", - "" - ], - [ - "aircraft:wing:var_sweep_mass_penalty", - 0, - "unitless", - "" - ], - [ - "aircraft:wing:wetted_area_scaler", - 1, - "unitless", - "" - ], - [ - "aircraft:wing:wetted_area", - 2396.56, - "ft**2", - "" - ], - [ - "mission:constraints:max_mach", - 0.785, - "unitless", - "" - ], - [ - "mission:design:gross_mass", - 175864.58080717592, - "lbm", - "" - ], - [ - "mission:design:range", - 3375.0, - "NM", - "" - ], - [ - "mission:design:thrust_takeoff_per_eng", - 28928.1, - "lbf", - "" - ], - [ - "mission:landing:lift_coefficient_max", - 2, - "unitless", - "" - ], - [ - "mission:summary:cruise_mach", - 0.785, - "unitless", - "" - ], - [ - "mission:takeoff:fuel_simple", - 577, - "lbm", - "" - ], - [ - "mission:takeoff:lift_coefficient_max", - 3, - "unitless", - "" - ], - [ - "mission:takeoff:lift_over_drag", - 17.354, - "unitless", - "" - ], - [ - "settings:equations_of_motion", - "[]", - "unitless", - "" - ], - [ - "settings:mass_method", - "[]", - "unitless", - "" - ], - [ - "mission:summary:gross_mass", - 175864.58080717592, - "lbm", - "" - ], - [ - "aircraft:propulsion:total_num_engines", - 2, - "unitless", - "" - ], - [ - "aircraft:propulsion:total_num_fuselage_engines", - 0, - "unitless", - "" - ], - [ - "aircraft:propulsion:total_num_wing_engines", - 2, - "unitless", - "" - ] -] \ No newline at end of file diff --git a/aviary/subsystems/propulsion/test/test_propeller_performance.py b/aviary/subsystems/propulsion/test/test_propeller_performance.py index ecd6d6c3f..24b435860 100644 --- a/aviary/subsystems/propulsion/test/test_propeller_performance.py +++ b/aviary/subsystems/propulsion/test/test_propeller_performance.py @@ -455,7 +455,7 @@ def test_case_15_16_17(self): val=False, units='unitless') options.set_val(Aircraft.Engine.USE_PROPELLER_MAP, val=True, units='unitless') - prop_file_path = 'models/propellers/PropFan.prop' + prop_file_path = 'models/engines/propellers/PropFan.prop' options.set_val(Aircraft.Engine.PROPELLER_DATA_FILE, val=prop_file_path, units='unitless') options.set_val(Aircraft.Engine.INTERPOLATION_METHOD, diff --git a/aviary/utils/test/test_aero_table_conversion.py b/aviary/utils/test/test_aero_table_conversion.py index 2b64bb3c7..f926996e1 100644 --- a/aviary/utils/test/test_aero_table_conversion.py +++ b/aviary/utils/test/test_aero_table_conversion.py @@ -115,7 +115,7 @@ def test_FLOPS_table(self): 0.02848, 0.03093, 0.03398, 0.0374, 0.04091, 0.04479, 0.04904, 0.05377, 0.05891, 0.01965, 0.02021, 0.02122, 0.02265, 0.02451, 0.02647, 0.02862, 0.0311, 0.03411, 0.03749, 0.04103, 0.04504, 0.04954, 0.05461, 0.06022, 0.01997, 0.0205, 0.02149, 0.02293, 0.02484, 0.02678, 0.0289, 0.03138, 0.03439, 0.03774, 0.04173, 0.04658, 0.05226, 0.05893, 0.06653, 0.02069, 0.0211, 0.02206, 0.02355, 0.02556, 0.02756, 0.02973, 0.03226, 0.0356, 0.03965, 0.04498, 0.0511, 0.05799, 0.06558, 0.07388, 0.02252, 0.02265, 0.02352, 0.02511, 0.02742, 0.02979, 0.03244, 0.03596, 0.04021, 0.04641, 0.05251, 0.05976, 0.06817, 0.07769, 0.08832, 0.03669, 0.03593, 0.03651, 0.0384, 0.04164, 0.04582, 0.05105, 0.05619, 0.06639, 0.07341, 0.081, 0.08847, 0.0958, 0.10335, 0.11098]) expected_cdi_comments = ['# lift-dependent drag polar, function of Mach & CL'] - input = get_path('utils/test/flops_test_polar.txt') + input = get_path('utils/test/data/flops_test_polar.txt') cdi_data, cdi_comments, cd0_data, cd0_comments = _load_flops_aero_table(input) # test CDi @@ -161,13 +161,14 @@ def args(): return None self.assertEqual(line_no_whitespace.count(expected_line), 1) except Exception as error: - exc_string = f'Error: {args.output_file}\nFound: {line_no_whitespace}\nExpected: {expected_line}' + exc_string = f'Error: {args.output_file}\nFound: { + line_no_whitespace}\nExpected: {expected_line}' raise Exception(exc_string) def test_FLOPS_file(self): tempdir = tempfile.mkdtemp(prefix='testdir-') def args(): return None - args.input_file = 'utils/test/flops_test_polar.txt' + args.input_file = 'utils/test/data/flops_test_polar.txt' args.output_file = str(Path(tempdir, 'TEST_'+Path(args.input_file).name)) args.data_format = 'FLOPS' _exec_ATC(args, None) diff --git a/aviary/utils/test/test_csv_data_file.py b/aviary/utils/test/test_csv_data_file.py index 32494f4c6..e4346964e 100644 --- a/aviary/utils/test/test_csv_data_file.py +++ b/aviary/utils/test/test_csv_data_file.py @@ -21,7 +21,7 @@ class TestAviaryCSV(unittest.TestCase): """ def setUp(self): - self.filename = get_path('utils/test/csv_test.csv') + self.filename = get_path('utils/test/data/csv_test.csv') # what will get written to the csv self.data = NamedValues({'aircraft:wing:span': ([15.24, 118, 90, 171], 'ft'), 'aircraft:crew_and_payload:num_passengers': ([125, 28, 0.355, 44], diff --git a/aviary/utils/test/test_propeller_map_conversion.py b/aviary/utils/test/test_propeller_map_conversion.py index 09a686240..5677385a6 100644 --- a/aviary/utils/test/test_propeller_map_conversion.py +++ b/aviary/utils/test/test_propeller_map_conversion.py @@ -24,7 +24,7 @@ def prepare_and_run(self, filename, output_file=None, data_format=PropMapType.GA args = DummyArgs() # Specify the input file - args.input_file = filepath = get_path('models/propellers/'+filename) + args.input_file = filepath = get_path('models/engines/propellers/' + filename) # Specify the output file if not output_file: @@ -49,7 +49,7 @@ def compare_files(self, filepath, skip_list=[]): """ filename = filepath.split('.')[0]+'.prop' - validation_data = get_path('models/propellers/'+filename) + validation_data = get_path('models/engines/propellers/' + filename) # Open the converted and validation files with open('TEST_'+filename, 'r') as f_in, open(validation_data, 'r') as expected: @@ -65,7 +65,8 @@ def compare_files(self, filepath, skip_list=[]): self.assertEqual(line_no_whitespace.count(expected_line), 1) except: - exc_string = f'Error: {filename}\nFound: {line_no_whitespace}\nExpected: {expected_line}' + exc_string = f'Error: {filename}\nFound: { + line_no_whitespace}\nExpected: {expected_line}' raise Exception(exc_string) def test_PM_conversion(self): diff --git a/aviary/validation_cases/benchmark_tests/test_off_design_FwFm.py b/aviary/validation_cases/benchmark_tests/test_off_design_FwFm.py index ff9300cec..dfce9b25f 100644 --- a/aviary/validation_cases/benchmark_tests/test_off_design_FwFm.py +++ b/aviary/validation_cases/benchmark_tests/test_off_design_FwFm.py @@ -234,7 +234,8 @@ def test_off_design_SNOPT(self): if __name__ == '__main__': - test = TestOffDesign() - test.setUp() - test.test_off_design_SNOPT() - test.test_off_design_IPOPT() + unittest.main() + # test = TestOffDesign() + # test.setUp() + # test.test_off_design_SNOPT() + # test.test_off_design_IPOPT() diff --git a/aviary/validation_cases/benchmark_tests/test_off_design_GwGm.py b/aviary/validation_cases/benchmark_tests/test_off_design_GwGm.py index 619afa876..f3eadafcc 100644 --- a/aviary/validation_cases/benchmark_tests/test_off_design_GwGm.py +++ b/aviary/validation_cases/benchmark_tests/test_off_design_GwGm.py @@ -141,7 +141,8 @@ def test_off_design_SNOPT(self): if __name__ == '__main__': - test = TestOffDesign() - test.setUp() - test.test_off_design_SNOPT() - test.test_off_design_IPOPT() + unittest.main() + # test = TestOffDesign() + # test.setUp() + # test.test_off_design_SNOPT() + # test.test_off_design_IPOPT() From e8103dc1059c6b5b4553554bb71a3eb3f5eb9778 Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Fri, 13 Dec 2024 14:22:49 -0500 Subject: [PATCH 13/21] more fixes to files re-added accidentally deleted configuration test legacy input file --- .../interface/test/test_cmd_entry_points.py | 4 +- .../data/configuration_test_data_GASP.dat | 236 ++++++++++++++++++ ...LOPS.csv => converter_test_N3CC_FLOPS.csv} | 0 ... => converter_test_configuration_GASP.csv} | 2 +- ...verter_test_large_single_aisle_1_GASP.csv} | 0 ...onverter_test_small_single_aisle_GASP.csv} | 0 aviary/utils/test/test_fortran_to_aviary.py | 14 +- 7 files changed, 247 insertions(+), 9 deletions(-) create mode 100644 aviary/utils/test/data/configuration_test_data_GASP.dat rename aviary/utils/test/data/{converter_test_data_N3CC_FLOPS.csv => converter_test_N3CC_FLOPS.csv} (100%) rename aviary/utils/test/data/{converter_test_data_GASP.csv => converter_test_configuration_GASP.csv} (99%) rename aviary/utils/test/data/{converter_test_data_large_single_aisle_1_GASP.csv => converter_test_large_single_aisle_1_GASP.csv} (100%) rename aviary/utils/test/data/{converter_test_data_small_single_aisle_GASP.csv => converter_test_small_single_aisle_GASP.csv} (100%) diff --git a/aviary/interface/test/test_cmd_entry_points.py b/aviary/interface/test/test_cmd_entry_points.py index f050398df..1ff536a80 100644 --- a/aviary/interface/test/test_cmd_entry_points.py +++ b/aviary/interface/test/test_cmd_entry_points.py @@ -51,9 +51,9 @@ def bench_test_phase_info_cmd(self): class fortran_to_aviaryTestCases(CommandEntryPointsTestCases): def test_diff_configuration_conversion(self): filepath = get_aviary_resource_path( - 'utils/test/data/converter_test_data_GASP.dat' + 'utils/test/data/configuration_test_data_GASP.dat' ) - outfile = Path.cwd() / 'utils/test/data/converter_test_data_GASP' / 'output.dat' + outfile = Path.cwd() / 'utils/test/data/configuration_test_data_GASP' / 'output.dat' cmd = f'aviary fortran_to_aviary {filepath} -o {outfile} -l GASP' self.run_and_test_cmd(cmd) diff --git a/aviary/utils/test/data/configuration_test_data_GASP.dat b/aviary/utils/test/data/configuration_test_data_GASP.dat new file mode 100644 index 000000000..f24e2f2a3 --- /dev/null +++ b/aviary/utils/test/data/configuration_test_data_GASP.dat @@ -0,0 +1,236 @@ + Baseline new configuration Mach 0.80 / 23k SLS thrust turbofan -1 -1 + +aircraft:engine:reference_diameter = 6.15, +aircraft:engine:data_file=models/engines/turbofan_23k_1.deck + + $INGASP + AS=1., ! Number of aisles in the cabin + AR=19.565, ! Wing aspect ratio + ARHT=4.025, ! Horizontal tail aspect ratio + ARVT=0.825, ! Vertical tail aspect ratio + BOELTV=3.0496, ! wing span/vertical tail moment arm (if VBARVX is input) + COELTH=.13067, ! wing chord/horizontal tail moment arm (if VBARHX is input) + DLMC4=22.47, ! sweep of wing quarter chord, degrees + DWPQCH=43.50, ! vertical tail quarter chord sweep in degrees if LCWING <> 0 + ELPC=6.85, ! length of pilot compartment in feet (4.44) + ELODN=1.00, ! length to diameter ratio of nose cone of fuselage (2) + ELODT=1.18, ! length to diameter ratio of tail cone of fuselage (3.2) + HCK=4.5, ! mean fuselage cabin diameter minus mean fuselage nose diameter in feet (2.47) + HTG=15.2, ! wing height about ground during ground run in feet (3.0) + HWING=1.0, ! wing location on fuselage =0, low wing; =1 high wing + PAX=154., ! number of passenger seats excluding crew + PS=44.2, ! seat pitch in inches (old GASP) + !PS=41.5, ! seat pitch in inches (GASP One) + RELR=0.4524, ! cg of fuselage and contents, fraction fuselage(.4) if LCWING <> 0 + SAB=6., ! seats abreast in fuselage + SAH=1., ! horizontal tail location on vertical tail: 0: low tail, 1: T-tail + SCFAC=0.033, ! shift in drag divergence Mach number due to supercritical design (0.) + SF_FAC = 1.0, ! Fuselage Wetted Area Adjustment factor (1.); if SF_FAC > 10., input as Fuselage Wetted area (ft^2) + SLM=.346, ! wing taper ratio + SLMH=.352, ! taper ratio of horizontal tail + SLMV=0.801, ! taper ratio of vertical tail + STRUT=-118.0, ! attachment location of strut as fraction of half-span + SSTQSW=0.320, ! strut area divided by wing area + TCHT=.11, ! horizontal tail root thickness to chord ratio + TCR=.11, ! wing root thickness to chord ratio + TCSTRT = 0.10, ! strut thickness to chord ratio + TCT=.10, ! wing tip thickness to chord ratio + TCVT=.10, ! Vertical tail root thickness to chord rati + VBARHX=1.43, ! Hz tail volume coefficient (default function of fus length and diameter) + VBARVX=.066, ! vertical tail volume coefficient (default function of fuselage length and diameter) + WAS=24., ! aisle width, in. + WS=20.2, ! seat width, in + YMG=0., ! span fraction location of main gear on wing 0: on fuselage 1: at tip + YP=.2143, ! span fraction location of engines on wing 0: on fuselage 1: at tip + XLQDE=1.715, ! nacelle length to diameter ratio, KNAC=0 or 1 + XWQLF=0.463, ! Distance from Nose to Wing Aerodynamic Center over Fuselage Length (0.40 + ALPHL0=-1.2, ! zero lift angle of attack in degrees + CKF=1.10, ! fuselage drag form factor (numerical function of fuselage fineness ratio) + CKF=1.146, ! fuselage drag form factor (derated for non-advanced) + CKW=1.60, ! wing form factor (numerical function of TCR and TCT) + CKW=1.667, ! wing form factor (derated for non-advanced) + CKW=-1, ! Testing fortran_to_aviary + CKI=1.10, ! Wing/Fuselage Interference Factor (0.0, i.e No interference drag) + CKI=1.21, ! Wing/Fuselage Interference Factor (derated for non-advanced) + CKN=1.25, ! nacelle form factor (numerical function of nacelle fineness ratio) + CKN=1.50, ! nacelle form factor (derated for non-advanced) + CKVT=2.0, ! vertical tail form factor (numerical function of TCVT) + CKVT=2.0, ! vertical tail form factor (derated for non-advanced) + CKHT=1.7, ! horizontal tail form factor (numerical function of TCHT and SAH) + CKHT=1.7, ! horizontal tail form factor (derated for non-advanced) + CKSTRT=1.125, ! Strut/Fuselage Interference Factor (0.0, i.e No interference drag) + DELCD=0.0014, ! increment in CD (.0015) + EYEW=1.5, ! wing incidence to fuselage horizontal reference in degrees + ! KNAC determines nacelle drag bookkeeping + ! 0: nacelle drag computed as penalty to engine performance (turbofans only) + ! 1: nacelle drag part of aircraft drag; nacelle sized by engine size + ! 2: same as 1, except uses nacelle size inputs DRARN, ELN + KNAC=1, + BENGOB=0.05, ! fraction of flap-free wing span due to engines + BTEOB=0.88, ! ratio of flap span to wing span + CFOC=0.250, ! flap chord to wing chord ratio + CLEOC=.10, ! ratio of leading edge device chord to wing chord (0 for no LED) + DCDOTE=0.10, ! drag coeff increment due to optimally deflected TE flaps + DELLEO=20., ! optimal deflection for leading edge device degrees (45) + DFLPTO=10., ! takeoff flap deflection, degrees + DELLED=10., ! leading edge device deflection, degrees (0) when? + DCLMTE=1.0, ! lift coefficient increment due to optimally deflected TE flaps + DFLPLD=40., ! landing flap deflection, degrees + FLAPN=2., ! number of flap segments per wing panel (1) + ! JFLTYP 1:plain flap, 2:split flap, 3:single slotted flap (default), 4:double slotted flap + ! 5:triple slotted flap, 6:Fowler flap, 7:double slotted Fowler flap + JFLTYP=4, !2 + ! RCLMAX is the CLMAX reference value of basic wing reference conditions: aspect ratio = 12, taper ratio = 1., + ! t/c = 0.10, SweepQC = 0, Re = 6 x 10^6 + RCLMAX=1.15, + WCFLAP=1.90, ! weight trend coefficient in flap weight equation (default is a function of JFLYTYP) + ! CATD structural design category + ! 0 normal design FAR Part 23 + ! 1 utility design FAR 23 + ! 2 aerobatic design FAR 23 + ! 3.0 for transports FAR Part 25 + ! >3 value of input design limit load factor + CATD=3., + DELP=7.50, ! fuselage pressure differential, psi + DELWST=0., ! incremental structural weight, lb. (0.) + FPYL=1.25, ! factor for turbofan engine pylon weight if NTYE=7 and KNAC=2 + SKB=96.94, ! weight trend coefficient of fuselage (Composite Value from Calibration) + SKB=86.63, ! weight trend coefficient of fuselage (Composite to PRSEUS) + SKB=102.82, ! weight trend coefficient of fuselage (derated for non-advanced) + SKCC=30.0, ! weight trend coefficient of cockpit controls + SKWF=.5625, ! fraction of total theoretical wing volume used for wing fuel + SKFS=.060, ! weight trend coefficient for fuel system + SKFW=.5936, ! weight trend coefficient of fixed wing controls + SKPEI=.165, ! weight trend coefficient of engine installation, fraction dry engine + SKLG=.03390, ! weight trend coefficient of landing gear, fraction gross weight + SKMG=.85, ! weight trend coefficient main gear, fraction of landing gear + SKPES=0.258, ! weight trend coefficient of engine nacelle, fraction dry engine, if KNAC <> 2 + SKSTRUT=0.238, ! weight trend coefficient of strut, strut weight/wing weight + SKWFOLD =0.20, ! Wing fold weight factor + SKWW=88.2, ! weight trend coefficient of wing without high lift devices (Calibration Run) + SKWW=78.64, ! weight trend coefficient of wing (Composite to PRSEUS) + SKWW=106.28, ! weight trend coefficient of wing (derated for non-advanced) + SKY=.2076, ! weight trend coefficient horizontal tail + SKZ=.2587, ! weight trend coefficient vertical tail + UWNAC=2.50, ! nacelle weight/nacelle surface area; lb per sq ft, if KNAC <> 2 + UWPAX=200., ! weight per passenger, including baggage, lb (200.) + WCARGO=15970., ! weight of cargo, lb + WENG=4218., ! dry weight of one engine, lb if KNAC = 2 (includes gearbox if propeller) + WG=145000., ! initial gross weight guess, lb + WG=150000., ! initial gross weight guess, lb + WG=160000., ! initial gross weight guess, lb + WNAC=1240. ! weight of one nacelle, lb if KNAC = 2 + WPLX=0., ! design payload, lb (default function of PAX) + WPYLON=0, ! weight of one pylon, lb, if KNAC=2 and NTYPE=7 + ! CW are weight coefficients for various subsytems. >1 is actual weight in lbsf + CW(1)=1014., ! APU + CW(2)=.0736, ! instruments + CW(3)=.085, ! hydraulics for flight controls + CW(4)=.105, ! hydraulics for gear + CW(5)=1504., ! avionics + CW(6)=1.65, ! air conditioning + CW(7)=126., ! anti-icing system + CW(8)=9114., ! furnishings + CW(9)=5.0, ! passenger service items lbsf per passenger + CW(10)=3.0, ! water lbsf per occupant + CW(11)=0.0, ! emergency equipment + CW(12)=10., ! catering items lbsf per passenger CW(13)=6.0, + CW(13)=12., ! trapped fuel factor + CKFF=1.000, ! factor on installed engine fuel flow + DCDSE=-1.0, ! delta CD due to engine out (default is zero), -1: program computes increment + DNQDE=1.2095, ! Nacelle Diamter-to-Engine Diameter Ratio + ENP=2. ! number of engines + HBTP=0.472, ! turbofan engine face hub/tip ratio, if NTYE=7 and KNAC <> 2 + KODETO=5, ! engine power setting during takeoff segment if NTYE=7 + KODECL=7, ! engine power setting during climb segment if NTYE=7 + KODETR=6, ! engine power setting during turn segment if NTYE=7 + ! KODEAC is engine power setting during acceleration segment if NTYE = 7 + ! 5: maximum power (default) + ! 6: maximum continuous power + ! 7: maximum climb power + KODEAC=7, + ! NTYE sets the type of engine + ! 1: reciprocating engine with carburetor, 2: reciprocating engine with fuel injection + ! 3: recip engine with fuel injection and geared, 4: rotary combustion engine + ! 5: turboshaft engine, 6: turboprop engine + ! 7: turbojet or turbofan engine + ! 11, 12, 13 same as 1, 2, 3 except HOPWSZ computes geometry and weight + ! 14 same as 4 except RCWSZ computes geometry and weight + NTYE=7, + RELP=0.0, ! engine cg fraction of fuselage length, for fuselage mounted engines, (0.) if LCWING <> 0 + SM1D=0.625, ! engine face Mach number sea level static if NTYE = 7 and KNAC <> 2 + SWSLS=.21366, ! engine specific weight lb/lb thrust or lb/HP for recip/ turboprop if KNAC <> 2 + THIN=21162., ! input thrust for one engine, lbf., if JENGSZ=4 and NTYE=7 28620 - 21726 + EMCRU=0.80, ! design cruise Mach number for engine sizing (not mission analysis) + HNCRU=36000., ! design cruise altitude in feet + HSCREQ=25000., ! required engine-out service ceiling + ! IWLD 0: landing weight = gross weight (default) 1: landing weight = weight at end of mission + ! 2: landing weight = fraction of gross weight (see WLPCT) + IWLD=2, + ! JENGSZ sets the type of engine sizing + ! 0: size engine for cruise only + ! 1: cruise and takeoff only + ! 2: cruise, takeoff, and climb only + ! 3: size for cruise and climb only + ! 4: engine thrust specified; (input KNAC=2, ELN, DBARN, WENG, WNAC) only if NTYE=7 + JENGSZ =4, !2 + RWCRTX=.985, ! ratio of cruise weight to gross weight for propulsion sizing (1.0) + VMLFSL=440., ! maximum structural design flight speed, mph + WGS=93.1, ! wing loading, psf + WLPCT=.9423, ! ratio of landing weight to gross weight, if IWLD=2 + RCCRU=100.0, ! ROC at cruise power + ROCTOC=300., ! rate of climb at top of climb ft/min + XTORQ=8000., ! required takeoff distance to clear 35 ft, input if JENGSZ=1 or 2 (99999.) + TDELTO=27.0, ! temperature increment above standard day for takeoff + TDELLD=27.0, ! temperature increment above standard day for landing + ARNGE(1) = 3500., ! 0: no range or endurance requirement (default) <24: design endurance, hrs >24: design range, nm + ! ARNGE(2) =0., ! Design Altitude, Short Range + ARNGE(3) = 900., ! Off Design Range, Short Range + ! ARNGE(4) = 0., ! Off Design Altitude, Long Range + CRALT =36000., ! mission cruise altitude, ft (HNCRU) + CRMACH=.80, ! mission analysis cruise Mach number (use EMCRU for engine sizing) + DELTT=0.1677, ! time spent taxiing before takeoff and after landing, hours + DV1=10., ! increment of engine failure decision speed above stall, kts (5) + DVR=5., ! increment of takeoff rotation speed above engine failure decision speed above stall, kts (5) + ! ICLM 1: climb at maximum rate of climb (default) 2: climb at maximum allowable operating speed + ! 3: climb at input EAS + ICLM=3, +! ICRUS = 0, cruise at CRALT (default) for cost and range calculation +! ICRUS = 1, cruise at normal power for cost and range calculation +! ICRUS = 2, cruise for best specific range for cost and range calculation +! ICRUS = 3, cruise for best endurance for cost and range calculation +! ICRUS = 10,11,12,13 – Cruise/Climb at constant Mach Number +! ICRUS = 20,21,22,23 – Cruise/Climb at constant True Airspeed, TAS +! ICRUS = 30,31,32,33 – Cruise/Climb at constant Equivalent Airspeed, EAS + ICRUS=0, !cruise specifier + MX=0, ! 0 – No alternate mission profile (default); 1 – Alternate mission profile input in NEWMIS namelist + NFAIL=0, ! 0: computes engine out and accelerate/stop distance, 1: computes only all engine performance (default) + OFALT=0., ! off design mission altitude in feet (0.0) + OFEM=.78, ! off design specified mission Mach number + ROSCAB=9999., ! cabin rate of sink during descent (500.) fpm + RSMX=900., ! maximum allowable rate of sink during landing approach ft per min (1000) + FRESF=-0.15, ! Reserve fuel fraction of mission fuel (negative sign trigger) + RF(1)=.05, ! Reserve Fuel Input: Time for Missed Approach + RF(2)=125., ! Reserve Fuel Input: Range to alternate + RF(3)=20000., ! Reserve Fuel Input: Cruise altitude to alternate + RF(4)=25000., ! Reserve Fuel Input: Holding Altitude + SINKTD=5., ! landing touchdown sink rate, ft per sec (3.0) + VCLMB=270., ! climb speed, EAS, kts (input only if ICLM=3) + XLFMX=1.15, ! landing flare load factor if < 4 or landing flare initiation height, ft if > 4. (1.2) + ALR=1.11, ! man-hour labor rate $ per hour ? + CINP=.11, ! cost of annual inspection ? + CLIAB=1984., ! cost of liability insurance ? + CMF=15., ! increment to fixed annual cost ? + CMV=.15, ! increment to hourly operating cost ? + CRWOH=15., ! crew overhead rate ? + DYR=12., ! aircraft depreciation period in years (8) + FCSF=2.5, ! fuel cost, $ per gallon (0.51) + HIR=0.015, ! hull insurance rate; insurance cost/aircraft price (0.02) + HRI=2500., ! hours between annual inspection (100) + OHR=350., ! Overhaul cost of one engine, $ per lb thrust or $ per HP (5.5) + PRV=.15, ! aircraft residual value/original value (0.2) + RI=.8, ! loan interest rate; yearly interest/loan (0.) + SRPM=18000., ! Cabin Attendant Cost ($/yr.) + TBO=3500., ! time between overhauls, hr (0. default which deletes cost computations) + TR=1.0, ! property tax rate; tax/value (0.) + $END diff --git a/aviary/utils/test/data/converter_test_data_N3CC_FLOPS.csv b/aviary/utils/test/data/converter_test_N3CC_FLOPS.csv similarity index 100% rename from aviary/utils/test/data/converter_test_data_N3CC_FLOPS.csv rename to aviary/utils/test/data/converter_test_N3CC_FLOPS.csv diff --git a/aviary/utils/test/data/converter_test_data_GASP.csv b/aviary/utils/test/data/converter_test_configuration_GASP.csv similarity index 99% rename from aviary/utils/test/data/converter_test_data_GASP.csv rename to aviary/utils/test/data/converter_test_configuration_GASP.csv index 5980964e9..f1c377b7e 100644 --- a/aviary/utils/test/data/converter_test_data_GASP.csv +++ b/aviary/utils/test/data/converter_test_configuration_GASP.csv @@ -1,4 +1,4 @@ -# GASP-derived aircraft input deck converted from converter_test_data_GASP.dat +# GASP-derived aircraft input deck converted from configuration_test_data_GASP.dat # Input Values aircraft:air_conditioning:mass_coefficient,1.65,unitless diff --git a/aviary/utils/test/data/converter_test_data_large_single_aisle_1_GASP.csv b/aviary/utils/test/data/converter_test_large_single_aisle_1_GASP.csv similarity index 100% rename from aviary/utils/test/data/converter_test_data_large_single_aisle_1_GASP.csv rename to aviary/utils/test/data/converter_test_large_single_aisle_1_GASP.csv diff --git a/aviary/utils/test/data/converter_test_data_small_single_aisle_GASP.csv b/aviary/utils/test/data/converter_test_small_single_aisle_GASP.csv similarity index 100% rename from aviary/utils/test/data/converter_test_data_small_single_aisle_GASP.csv rename to aviary/utils/test/data/converter_test_small_single_aisle_GASP.csv diff --git a/aviary/utils/test/test_fortran_to_aviary.py b/aviary/utils/test/test_fortran_to_aviary.py index e4ccfe3ea..9059db8d9 100644 --- a/aviary/utils/test/test_fortran_to_aviary.py +++ b/aviary/utils/test/test_fortran_to_aviary.py @@ -65,7 +65,7 @@ def compare_files(self, filepath, skip_list=['# created ']): def test_large_single_aisle(self): filepath = 'models/large_single_aisle_1/large_single_aisle_1_GASP.dat' comparison_filepath = ( - 'utils/test/data/converter_test_data_large_single_aisle_1_GASP.csv' + 'utils/test/data/converter_test_large_single_aisle_1_GASP.csv' ) self.prepare_and_run( @@ -77,7 +77,7 @@ def test_large_single_aisle(self): def test_small_single_aisle(self): filepath = 'models/small_single_aisle/small_single_aisle_GASP.dat' comparison_filepath = ( - 'utils/test/data/converter_test_data_small_single_aisle_GASP.csv' + 'utils/test/data/converter_test_small_single_aisle_GASP.csv' ) self.prepare_and_run( @@ -87,10 +87,12 @@ def test_small_single_aisle(self): self.compare_files(comparison_filepath) def test_diff_configuration(self): - filepath = 'utils/test/data/converter_test_data_GASP.dat' - comparison_filepath = 'utils/test/data/converter_test_data_GASP.csv' + filepath = 'utils/test/data/configuration_test_data_GASP.dat' + comparison_filepath = 'utils/test/data/converter_test_configuration_GASP.csv' - self.prepare_and_run(filepath) + self.prepare_and_run( + filepath, out_file=Path.cwd() / Path('TEST_' + comparison_filepath) + ) self.compare_files(comparison_filepath) def test_N3CC(self): @@ -99,7 +101,7 @@ def test_N3CC(self): # test. filepath = 'models/N3CC/N3CC_generic_low_speed_polars_FLOPS.txt' - comparison_filepath = 'utils/test/data/converter_test_data_N3CC_FLOPS.csv' + comparison_filepath = 'utils/test/data/converter_test_N3CC_FLOPS.csv' self.prepare_and_run( filepath, out_file=Path.cwd() / Path('TEST_' + comparison_filepath), From 98b4381729bd8170a25deed1c78b111747164d6e Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Fri, 13 Dec 2024 15:04:24 -0500 Subject: [PATCH 14/21] removed Aviary variable names from GASP input file for converter tests --- aviary/utils/engine_deck_conversion.py | 15 ++++++++++----- .../test/data/configuration_test_data_GASP.dat | 3 --- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/aviary/utils/engine_deck_conversion.py b/aviary/utils/engine_deck_conversion.py index b6476f733..239811ade 100644 --- a/aviary/utils/engine_deck_conversion.py +++ b/aviary/utils/engine_deck_conversion.py @@ -4,6 +4,7 @@ import getpass from datetime import datetime from enum import Enum +from copy import deepcopy import numpy as np import openmdao.api as om @@ -43,17 +44,18 @@ def __str__(self): TEMPERATURE = EngineModelVariables.TEMPERATURE_T4 # EXIT_AREA = EngineModelVariables.EXIT_AREA -flops_keys = [ +_flops_keys = [ MACH, ALTITUDE, THROTTLE, GROSS_THRUST, RAM_DRAG, FUEL_FLOW, - NOX_RATE] # , EXIT_AREA] + NOX_RATE, +] # , EXIT_AREA] # later code assumes T4 is last item in keys -gasp_keys = [MACH, ALTITUDE, THROTTLE, FUEL_FLOW, TEMPERATURE] +_gasp_keys = [MACH, ALTITUDE, THROTTLE, FUEL_FLOW, TEMPERATURE] header_names = { MACH: 'Mach_Number', @@ -108,8 +110,8 @@ def EngineDeckConverter(input_file, output_file, data_format: EngineDeckType): f'# {legacy_code}-derived {engine_type} deck converted from {data_file.name}') if data_format == EngineDeckType.FLOPS: - header = {key: default_units[key] for key in flops_keys} - data = {key: np.array([]) for key in flops_keys} + header = {key: default_units[key] for key in _flops_keys} + data = {key: np.array([]) for key in _flops_keys} with open(data_file, newline='', encoding='utf-8-sig') as file: reader = _read_flops_engine(file) @@ -133,6 +135,9 @@ def EngineDeckConverter(input_file, output_file, data_format: EngineDeckType): # data[EXIT_AREA].append(line[7]) elif data_format in (EngineDeckType.GASP, EngineDeckType.GASP_TS): + # prevent modifications to gasp_keys from overwriting base _gasp_keys, to avoid + # errors when `EngineDeckConverter()` is ran multiple times in a row + gasp_keys = deepcopy(_gasp_keys) is_turbo_prop = True if data_format == EngineDeckType.GASP_TS else False temperature = gasp_keys.pop() fuelflow = gasp_keys.pop() diff --git a/aviary/utils/test/data/configuration_test_data_GASP.dat b/aviary/utils/test/data/configuration_test_data_GASP.dat index f24e2f2a3..fe44e08e6 100644 --- a/aviary/utils/test/data/configuration_test_data_GASP.dat +++ b/aviary/utils/test/data/configuration_test_data_GASP.dat @@ -1,7 +1,4 @@ Baseline new configuration Mach 0.80 / 23k SLS thrust turbofan -1 -1 - -aircraft:engine:reference_diameter = 6.15, -aircraft:engine:data_file=models/engines/turbofan_23k_1.deck $INGASP AS=1., ! Number of aisles in the cabin From fd71831381c2099373ca8dfb30691e68f6d3d095 Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Mon, 16 Dec 2024 14:49:21 -0500 Subject: [PATCH 15/21] fixed f-string formatting issue --- aviary/utils/test/test_aero_table_conversion.py | 6 ++++-- aviary/utils/test/test_propeller_map_conversion.py | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/aviary/utils/test/test_aero_table_conversion.py b/aviary/utils/test/test_aero_table_conversion.py index f926996e1..d030dd10f 100644 --- a/aviary/utils/test/test_aero_table_conversion.py +++ b/aviary/utils/test/test_aero_table_conversion.py @@ -161,8 +161,10 @@ def args(): return None self.assertEqual(line_no_whitespace.count(expected_line), 1) except Exception as error: - exc_string = f'Error: {args.output_file}\nFound: { - line_no_whitespace}\nExpected: {expected_line}' + exc_string = ( + f'Error: {args.output_file}\nFound: ' + f'{line_no_whitespace}\nExpected: {expected_line}' + ) raise Exception(exc_string) def test_FLOPS_file(self): diff --git a/aviary/utils/test/test_propeller_map_conversion.py b/aviary/utils/test/test_propeller_map_conversion.py index 5677385a6..a144f7df7 100644 --- a/aviary/utils/test/test_propeller_map_conversion.py +++ b/aviary/utils/test/test_propeller_map_conversion.py @@ -65,8 +65,10 @@ def compare_files(self, filepath, skip_list=[]): self.assertEqual(line_no_whitespace.count(expected_line), 1) except: - exc_string = f'Error: {filename}\nFound: { - line_no_whitespace}\nExpected: {expected_line}' + exc_string = ( + f'Error: {filename}\nFound: {line_no_whitespace}' + f'\nExpected: {expected_line}' + ) raise Exception(exc_string) def test_PM_conversion(self): From 0909a1c3b4147c94f05790d74a42105f21940601 Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Mon, 16 Dec 2024 17:37:04 -0500 Subject: [PATCH 16/21] added global throttle settings to converter tests moved propeller tests to appropriate folder --- .../propulsion/{ => propeller}/test/test_hamilton_standard.py | 0 .../propulsion/{ => propeller}/test/test_propeller_map.py | 0 .../{ => propeller}/test/test_propeller_performance.py | 0 aviary/utils/test/data/converter_test_configuration_GASP.csv | 1 + .../utils/test/data/converter_test_large_single_aisle_1_GASP.csv | 1 + .../utils/test/data/converter_test_small_single_aisle_GASP.csv | 1 + 6 files changed, 3 insertions(+) rename aviary/subsystems/propulsion/{ => propeller}/test/test_hamilton_standard.py (100%) rename aviary/subsystems/propulsion/{ => propeller}/test/test_propeller_map.py (100%) rename aviary/subsystems/propulsion/{ => propeller}/test/test_propeller_performance.py (100%) diff --git a/aviary/subsystems/propulsion/test/test_hamilton_standard.py b/aviary/subsystems/propulsion/propeller/test/test_hamilton_standard.py similarity index 100% rename from aviary/subsystems/propulsion/test/test_hamilton_standard.py rename to aviary/subsystems/propulsion/propeller/test/test_hamilton_standard.py diff --git a/aviary/subsystems/propulsion/test/test_propeller_map.py b/aviary/subsystems/propulsion/propeller/test/test_propeller_map.py similarity index 100% rename from aviary/subsystems/propulsion/test/test_propeller_map.py rename to aviary/subsystems/propulsion/propeller/test/test_propeller_map.py diff --git a/aviary/subsystems/propulsion/test/test_propeller_performance.py b/aviary/subsystems/propulsion/propeller/test/test_propeller_performance.py similarity index 100% rename from aviary/subsystems/propulsion/test/test_propeller_performance.py rename to aviary/subsystems/propulsion/propeller/test/test_propeller_performance.py diff --git a/aviary/utils/test/data/converter_test_configuration_GASP.csv b/aviary/utils/test/data/converter_test_configuration_GASP.csv index f1c377b7e..c6fe68f63 100644 --- a/aviary/utils/test/data/converter_test_configuration_GASP.csv +++ b/aviary/utils/test/data/converter_test_configuration_GASP.csv @@ -28,6 +28,7 @@ aircraft:design:static_margin,0.05,unitless aircraft:design:structural_mass_increment,0,lbm aircraft:design:supercritical_drag_shift,0.033,unitless aircraft:engine:additional_mass_fraction,0.165,unitless +aircraft:engine:global_throttle,True,unitless aircraft:engine:mass_scaler,1,unitless aircraft:engine:mass_specific,0.21366,lbm/lbf aircraft:engine:num_engines,2,unitless diff --git a/aviary/utils/test/data/converter_test_large_single_aisle_1_GASP.csv b/aviary/utils/test/data/converter_test_large_single_aisle_1_GASP.csv index d74211a19..94d8c3afe 100644 --- a/aviary/utils/test/data/converter_test_large_single_aisle_1_GASP.csv +++ b/aviary/utils/test/data/converter_test_large_single_aisle_1_GASP.csv @@ -28,6 +28,7 @@ aircraft:design:static_margin,0.03,unitless aircraft:design:structural_mass_increment,0,lbm aircraft:design:supercritical_drag_shift,0.033,unitless aircraft:engine:additional_mass_fraction,0.14,unitless +aircraft:engine:global_throttle,True,unitless aircraft:engine:mass_scaler,1,unitless aircraft:engine:mass_specific,0.21366,lbm/lbf aircraft:engine:num_engines,2,unitless diff --git a/aviary/utils/test/data/converter_test_small_single_aisle_GASP.csv b/aviary/utils/test/data/converter_test_small_single_aisle_GASP.csv index 0e3c22ec0..2585162cf 100644 --- a/aviary/utils/test/data/converter_test_small_single_aisle_GASP.csv +++ b/aviary/utils/test/data/converter_test_small_single_aisle_GASP.csv @@ -28,6 +28,7 @@ aircraft:design:static_margin,0.05,unitless aircraft:design:structural_mass_increment,0,lbm aircraft:design:supercritical_drag_shift,0.025,unitless aircraft:engine:additional_mass_fraction,0.14,unitless +aircraft:engine:global_throttle,True,unitless aircraft:engine:mass_scaler,1,unitless aircraft:engine:mass_specific,0.2153,lbm/lbf aircraft:engine:num_engines,2,unitless From c6a54f6d87b3cea878584bd127e9390bfa269364 Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Fri, 27 Dec 2024 12:19:58 -0500 Subject: [PATCH 17/21] merge fixes --- aviary/utils/fortran_to_aviary.py | 2 +- aviary/utils/test/data/converter_test_N3CC_FLOPS.csv | 1 + aviary/utils/test/data/converter_test_configuration_GASP.csv | 1 + .../test/data/converter_test_large_single_aisle_1_GASP.csv | 1 + .../utils/test/data/converter_test_small_single_aisle_GASP.csv | 1 + aviary/utils/test/test_fortran_to_aviary.py | 2 +- 6 files changed, 6 insertions(+), 2 deletions(-) diff --git a/aviary/utils/fortran_to_aviary.py b/aviary/utils/fortran_to_aviary.py index 759e142aa..99c7fdbf4 100644 --- a/aviary/utils/fortran_to_aviary.py +++ b/aviary/utils/fortran_to_aviary.py @@ -353,7 +353,7 @@ def process_and_store_data( var_ind -= fortran_offset # Aviary has a reduction gearbox which is 1/gear ratio of GASP gearbox - if current_namelist + var_name == 'INPROP.GR': + if current_namelist + '.' + var_name == 'INPROP.GR': var_values = [1 / var for var in var_values] vehicle_data['input_values'] = set_value( Aircraft.Engine.Gearbox.GEAR_RATIO, diff --git a/aviary/utils/test/data/converter_test_N3CC_FLOPS.csv b/aviary/utils/test/data/converter_test_N3CC_FLOPS.csv index 67db9490b..b7fa6ec86 100644 --- a/aviary/utils/test/data/converter_test_N3CC_FLOPS.csv +++ b/aviary/utils/test/data/converter_test_N3CC_FLOPS.csv @@ -45,6 +45,7 @@ aircraft:engine:num_fuselage_engines,0,unitless aircraft:engine:num_wing_engines,2,unitless aircraft:engine:reference_mass,6293.8,lbm aircraft:engine:reference_sls_thrust,22200.5,lbf +aircraft:engine:scale_factor,0.99997747798473,unitless aircraft:engine:scaled_sls_thrust,22200,0,0,0,0,0,lbf aircraft:engine:subsonic_fuel_flow_scaler,1,unitless aircraft:engine:supersonic_fuel_flow_scaler,1,unitless diff --git a/aviary/utils/test/data/converter_test_configuration_GASP.csv b/aviary/utils/test/data/converter_test_configuration_GASP.csv index c6fe68f63..5e33e153f 100644 --- a/aviary/utils/test/data/converter_test_configuration_GASP.csv +++ b/aviary/utils/test/data/converter_test_configuration_GASP.csv @@ -36,6 +36,7 @@ aircraft:engine:pod_mass_scaler,1,unitless aircraft:engine:pylon_factor,1.25,unitless aircraft:engine:reference_diameter,5.8,ft aircraft:engine:reference_sls_thrust,28690,lbf +aircraft:engine:scale_factor,0.7376089229696758,unitless aircraft:engine:scaled_sls_thrust,21162,lbf aircraft:engine:type,7,unitless aircraft:engine:wing_locations,0.2143,unitless diff --git a/aviary/utils/test/data/converter_test_large_single_aisle_1_GASP.csv b/aviary/utils/test/data/converter_test_large_single_aisle_1_GASP.csv index 94d8c3afe..79a79d9cc 100644 --- a/aviary/utils/test/data/converter_test_large_single_aisle_1_GASP.csv +++ b/aviary/utils/test/data/converter_test_large_single_aisle_1_GASP.csv @@ -36,6 +36,7 @@ aircraft:engine:pod_mass_scaler,1,unitless aircraft:engine:pylon_factor,1.25,unitless aircraft:engine:reference_diameter,5.8,ft aircraft:engine:reference_sls_thrust,28690,lbf +aircraft:engine:scale_factor,1.0,unitless aircraft:engine:scaled_sls_thrust,28690,lbf aircraft:engine:type,7,unitless aircraft:engine:wing_locations,0.35,unitless diff --git a/aviary/utils/test/data/converter_test_small_single_aisle_GASP.csv b/aviary/utils/test/data/converter_test_small_single_aisle_GASP.csv index 2585162cf..1465fbf34 100644 --- a/aviary/utils/test/data/converter_test_small_single_aisle_GASP.csv +++ b/aviary/utils/test/data/converter_test_small_single_aisle_GASP.csv @@ -36,6 +36,7 @@ aircraft:engine:pod_mass_scaler,1,unitless aircraft:engine:pylon_factor,0.6,unitless aircraft:engine:reference_diameter,5.8,ft aircraft:engine:reference_sls_thrust,28690,lbf +aircraft:engine:scale_factor,0.8295573370512374,unitless aircraft:engine:scaled_sls_thrust,23800,lbf aircraft:engine:type,7,unitless aircraft:engine:wing_locations,0.272,unitless diff --git a/aviary/utils/test/test_fortran_to_aviary.py b/aviary/utils/test/test_fortran_to_aviary.py index 9059db8d9..53e824e3e 100644 --- a/aviary/utils/test/test_fortran_to_aviary.py +++ b/aviary/utils/test/test_fortran_to_aviary.py @@ -114,4 +114,4 @@ def test_N3CC(self): unittest.main() # test = TestFortranToAviary() - # test.test_N3CC() + # test.test_small_single_aisle() From 60e7715ad83916d8a82b74e2291d5f72491c274c Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Tue, 31 Dec 2024 13:04:39 -0500 Subject: [PATCH 18/21] update openmdao min requirement --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 143676dd5..e6b14555c 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', - ] - } + ], + }, ) From 0788bbece12d8b30b431d288b9e07bf7fafdd80e Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Thu, 2 Jan 2025 11:30:25 -0500 Subject: [PATCH 19/21] updated variable names in converter test csv --- aviary/utils/test/data/converter_test_N3CC_FLOPS.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aviary/utils/test/data/converter_test_N3CC_FLOPS.csv b/aviary/utils/test/data/converter_test_N3CC_FLOPS.csv index b7fa6ec86..a189ad140 100644 --- a/aviary/utils/test/data/converter_test_N3CC_FLOPS.csv +++ b/aviary/utils/test/data/converter_test_N3CC_FLOPS.csv @@ -115,7 +115,7 @@ aircraft:wing:airfoil_technology,1.6,unitless aircraft:wing:area,1220,1,0,0,0,0,ft**2 aircraft:wing:aspect_ratio,11.5587605382765,1,0,0,0,0,unitless aircraft:wing:aspect_ratio_reference,11.5587605382765,unitless -aircraft:wing:bending_mass_scaler,1,unitless +aircraft:wing:bending_material_mass_scaler,1,unitless aircraft:wing:bwb_aft_body_mass_scaler,1,unitless aircraft:wing:chord_per_semispan,0.273522534166506,0.204274849507037,0.0888152947868224,0.0725353313595661,unitless aircraft:wing:composite_fraction,0.33333,unitless From e638205505d93900f4f4291f049376a29839d285 Mon Sep 17 00:00:00 2001 From: Kenneth-T-Moore Date: Wed, 22 Jan 2025 16:52:39 -0500 Subject: [PATCH 20/21] Fix manifest for the propeller decks --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 89835c49e..5f8a77415 100644 --- a/setup.py +++ b/setup.py @@ -60,9 +60,9 @@ "models/engines/*.deck", "models/engines/*.txt", "models/engines/*.eng", + "models/engines/propellers/*.map", + "models/engines/propellers/*.prop", "models/N3CC/*", - "models/propellers/*.map", - "models/propellers/*.prop", "models/large_single_aisle_1/*", "models/large_single_aisle_2/*", "models/small_single_aisle/*", From 1d27b72ff3135c0aeadbe192cf876e5e04fb57a9 Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Wed, 29 Jan 2025 13:13:35 -0500 Subject: [PATCH 21/21] relaxed test tolerance for linux systems --- aviary/subsystems/mass/flops_based/test/test_landing_gear.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aviary/subsystems/mass/flops_based/test/test_landing_gear.py b/aviary/subsystems/mass/flops_based/test/test_landing_gear.py index 6f67d9ffd..64f9184e5 100644 --- a/aviary/subsystems/mass/flops_based/test/test_landing_gear.py +++ b/aviary/subsystems/mass/flops_based/test/test_landing_gear.py @@ -78,7 +78,7 @@ def test_case(self): prob.set_val(Aircraft.Design.TOUCHDOWN_MASS, 100000.0, 'lbm') partial_data = prob.check_partials(out_stream=None, method="cs") - assert_check_partials(partial_data, atol=2e-12, rtol=1e-12) + assert_check_partials(partial_data, atol=1e-11, rtol=1e-12) class AltLandingGearMassTest(unittest.TestCase):