diff --git a/UNICADOworkflow/src/parameter_study/prepare_resume_of_parameter_study.py b/UNICADOworkflow/src/parameter_study/prepare_resume_of_parameter_study.py index fbe16c251a34d6d2e9772dd2fab47019443a1b66..38fa73301ea7dfd26a6ae22da6ef971677ab8ed9 100644 --- a/UNICADOworkflow/src/parameter_study/prepare_resume_of_parameter_study.py +++ b/UNICADOworkflow/src/parameter_study/prepare_resume_of_parameter_study.py @@ -130,7 +130,7 @@ def prepare_resume_of_parameter_study(paths_and_names, path_to_folder_old_refere # create new aircraft project folder in temporary working directory if not os.path.isdir(temporary_working_directory + '/' + aircraft_project[:-4]): - os.makedirs(temporary_working_directory + '/' + aircraft_project[:-4] + '/cleanSheetDesign') + os.makedirs(temporary_working_directory + '/' + aircraft_project[:-4] + '/clean_sheet_design') # create new temporary result folder in temporary working directory if not os.path.isdir(temporary_working_directory + '/temporaryResults'): @@ -197,11 +197,11 @@ def prepare_resume_of_parameter_study(paths_and_names, path_to_folder_old_refere if os.path.isdir(path_to_folder_old_reference + element + '/' + result): shutil.copytree(path_to_folder_old_reference + element + '/' + result, temporary_working_directory + '/' + aircraft_project[:-4] - + '/cleanSheetDesign/' + result) + + '/clean_sheet_design/' + result) else: shutil.copyfile(path_to_folder_old_reference + element + '/' + result, temporary_working_directory + '/' + aircraft_project[:-4] - + '/cleanSheetDesign/' + result) + + '/clean_sheet_design/' + result) # else condition: current element is a file -> copy file to temporary working directory else: diff --git a/UNICADOworkflow/src/pre_condition/set_configuration_parameter.py b/UNICADOworkflow/src/pre_condition/set_configuration_parameter.py index a765e31b6feecb12a6515ed9184ce07046c0ea0f..dc26ceef03b362e717b6a48e05a7fd5df8a25197 100644 --- a/UNICADOworkflow/src/pre_condition/set_configuration_parameter.py +++ b/UNICADOworkflow/src/pre_condition/set_configuration_parameter.py @@ -434,7 +434,7 @@ def set_configuration_parameter(paths_and_names, global_loop_counter): # delete current folder from project folder while_count = 0 while True: - if os.path.isdir(path_to_project + element) and not element == 'cleanSheetDesign' \ + if os.path.isdir(path_to_project + element) and not element == 'clean_sheet_design' \ and not element == 'retrofitDesign': try: shutil.rmtree(path_to_project + element) @@ -717,7 +717,7 @@ def set_configuration_parameter(paths_and_names, global_loop_counter): break # check if retrofit design is selected - # -> if true: -> skipp set parameter to initial_sizing configuration file + # -> if true: -> skip set parameter to initial_sizing configuration file file_name_list = [] if not skip_initial_sizing_flag and not file_name == "cpacs_interface": file_name_list.append(file_name) diff --git a/UNICADOworkflow/src/sub_function/prepare_single_mission_analysis.py b/UNICADOworkflow/src/sub_function/prepare_single_mission_analysis.py index b3447eb37b7e963745915f81ff57e03cd2462bbc..a2fc70d581697a876c3d5a02e3bc39d0b5db5cf5 100644 --- a/UNICADOworkflow/src/sub_function/prepare_single_mission_analysis.py +++ b/UNICADOworkflow/src/sub_function/prepare_single_mission_analysis.py @@ -63,9 +63,9 @@ def prepare_single_mission_analysis(path_of_working_directory_rce, aircraft_proj if not os.path.isfile(path_of_working_directory_rce + current_workflow_name + '/' + aircraft_project + '/' + file_name): if os.path.isfile(path_of_working_directory_rce + current_workflow_name - + '/' + aircraft_project + '/cleanSheetDesign/' + file_name): + + '/' + aircraft_project + '/clean_sheet_design/' + file_name): shutil.copyfile(path_of_working_directory_rce + current_workflow_name - + '/' + aircraft_project + '/cleanSheetDesign/' + file_name, + + '/' + aircraft_project + '/clean_sheet_design/' + file_name, path_of_working_directory_rce + current_workflow_name + '/' + aircraft_project + '/' + file_name) @@ -85,9 +85,9 @@ def prepare_single_mission_analysis(path_of_working_directory_rce, aircraft_proj if not os.path.isdir(path_of_working_directory_rce + current_workflow_name + '/' + aircraft_project + '/geometry_data/'): if os.path.isdir(path_of_working_directory_rce + current_workflow_name - + '/' + aircraft_project + '/cleanSheetDesign/geometry_data/'): + + '/' + aircraft_project + '/clean_sheet_design/geometry_data/'): shutil.copytree(path_of_working_directory_rce + current_workflow_name - + '/' + aircraft_project + '/cleanSheetDesign/geometry_data/', + + '/' + aircraft_project + '/clean_sheet_design/geometry_data/', path_of_working_directory_rce + current_workflow_name + '/' + aircraft_project + '/geometry_data/') print('Warning: No geometry data in temporary working directory found! \n ' @@ -104,9 +104,9 @@ def prepare_single_mission_analysis(path_of_working_directory_rce, aircraft_proj if not os.path.isdir(path_of_working_directory_rce + current_workflow_name + '/' + aircraft_project + '/aero_data/'): if os.path.isdir(path_of_working_directory_rce + current_workflow_name - + '/' + aircraft_project + '/cleanSheetDesign/aero_data/'): + + '/' + aircraft_project + '/clean_sheet_design/aero_data/'): shutil.copytree(path_of_working_directory_rce + current_workflow_name - + '/' + aircraft_project + '/cleanSheetDesign/aero_data/', + + '/' + aircraft_project + '/clean_sheet_design/aero_data/', path_of_working_directory_rce + current_workflow_name + '/' + aircraft_project + '/aero_data/') print('Warning: No aero data in temporary working directory found! \n ' @@ -123,9 +123,9 @@ def prepare_single_mission_analysis(path_of_working_directory_rce, aircraft_proj if not os.path.isdir(path_of_working_directory_rce + current_workflow_name + '/' + aircraft_project + '/engine_data/'): if os.path.isdir(path_of_working_directory_rce + current_workflow_name - + '/' + aircraft_project + '/cleanSheetDesign/engine_data/'): + + '/' + aircraft_project + '/clean_sheet_design/engine_data/'): shutil.copytree(path_of_working_directory_rce + current_workflow_name - + '/' + aircraft_project + '/cleanSheetDesign/engine_data/', + + '/' + aircraft_project + '/clean_sheet_design/engine_data/', path_of_working_directory_rce + current_workflow_name + '/' + aircraft_project + '/engine_data/') print('Warning: No engine data in temporary working directory found! \n ' @@ -156,7 +156,7 @@ def prepare_single_mission_analysis(path_of_working_directory_rce, aircraft_proj '/value').text # check if engine data exist -> if false: - # -> try to copy engine data from cleanSheetDesign folder otherwise raise an error and abort program + # -> try to copy engine data from clean_sheet_design folder otherwise raise an error and abort program if not os.path.isdir(path_of_working_directory_rce + current_workflow_name + '/' + aircraft_project + '/' + 'engine_data/' + engine_name): try: @@ -165,12 +165,12 @@ def prepare_single_mission_analysis(path_of_working_directory_rce, aircraft_proj os.mkdir(path_of_working_directory_rce + current_workflow_name + '/' + aircraft_project + '/' + 'engine_data') shutil.copytree(path_of_working_directory_rce + current_workflow_name + '/' + aircraft_project + '/' - + 'cleanSheetDesign/engine_data/' + engine_name, + + 'clean_sheet_design/engine_data/' + engine_name, path_of_working_directory_rce + current_workflow_name + '/' + aircraft_project + '/' + 'engine_data/' + engine_name) - print('Necessary engine data for ' + engine_name + ' successfully copied from "cleanSheetDesign" folder!') + print('Necessary engine data for ' + engine_name + ' successfully copied from "clean_sheet_design" folder!') log_file_list.append(str(datetime.now().strftime('%Y-%m-%d %H:%M:%S')) + 'Necessary engine data for ' - + engine_name + ' successfully copied from "cleanSheetDesign" folder!') + + engine_name + ' successfully copied from "clean_sheet_design" folder!') except OSError: print('Error: Necessary engine data for ' + engine_name + ' not available! ' diff --git a/UNICADOworkflow/src/sub_function/select_configuration_files_from_existing_project.py b/UNICADOworkflow/src/sub_function/select_configuration_files_from_existing_project.py index 71f7754eb940cad9a03d9f6a9035231404a4f68f..34f7b491dc86d4d5761864d4686df77e7da1224d 100644 --- a/UNICADOworkflow/src/sub_function/select_configuration_files_from_existing_project.py +++ b/UNICADOworkflow/src/sub_function/select_configuration_files_from_existing_project.py @@ -78,11 +78,11 @@ def select_configuration_files_from_existing_project(path_of_working_directory_r # Use configuration file from clean sheet design folder if use_configs_from_existing_project == 1: path_to_config = path_of_working_directory_rce + current_workflow_name + '/' + aircraft_project \ - + '/cleanSheetDesign/config_files/' + + '/clean_sheet_design/config_files/' check_flag_xml_in_clean_sheet_folder =\ os.path.isdir(path_of_working_directory_rce + current_workflow_name + '/' + aircraft_project - + '/cleanSheetDesign/config_files/') - folder_name = 'cleanSheetDesign' + + '/clean_sheet_design/config_files/') + folder_name = 'clean_sheet_design' # Use configuration file from engine calibrated design folder if use_configs_from_existing_project == 2: @@ -113,7 +113,7 @@ def select_configuration_files_from_existing_project(path_of_working_directory_r name_of_checkout_dir_from_repository = str(root_of_workflow_tree.find( './control_settings/program_specific_settings/iteration_settings/use_configs_from_existing_project/' 'mode_specific_settings/mode_4/name_of_config_checkout_dir/value').text) - # Check if the given input directory not equal to 'cleanSheetDesign' -> if true: -> retrofit design will be used + # Check if the given input directory not equal to 'clean_sheet_design' -> if true: -> retrofit design will be used if name_of_checkout_dir_from_repository == 'aerodynamicCalibration' \ or name_of_checkout_dir_from_repository == 'engineCalibration' \ or name_of_checkout_dir_from_repository == 'withoutCalibration': @@ -151,8 +151,8 @@ def select_configuration_files_from_existing_project(path_of_working_directory_r 'mode_specific_settings/mode_4/name_of_config_checkout_dir/value').text) ssh_url = 'ssh://git@unicado.ilr.rwth-aachen.de:2222/source/' + repository_name + '.git' - if name_of_checkout_dir_from_server == 'cleanSheetDesign': - name_of_checkout_dir_from_server = aircraft_type + '/' + aircraft_project + '/cleanSheetDesign/config_files' + if name_of_checkout_dir_from_server == 'clean_sheet_design': + name_of_checkout_dir_from_server = aircraft_type + '/' + aircraft_project + '/clean_sheet_design/config_files' else: name_of_checkout_dir_from_server = aircraft_type + '/' + aircraft_project + '/retrofitDesign/' \ + name_of_checkout_dir_from_server + '/config_files' @@ -193,7 +193,15 @@ def select_configuration_files_from_existing_project(path_of_working_directory_r for content in list_of_working_directory_content: if content == tool_name: if os.path.isdir(path_of_working_directory + content): - if content == 'aerodynamic_assessment': + if content == 'fuselage_design': + shutil.copytree(path_of_working_directory + '/' + content + '/fuselage_design_lib', + path_of_working_directory_rce + current_workflow_name + + '/fuselage_design_lib') + if content == 'landing_gear_design': + shutil.copytree(path_of_working_directory + '/' + content + '/landing_gear_lib', + path_of_working_directory_rce + current_workflow_name + + '/landing_gear_lib') + if content == 'aerodynamic_analysis': print(path_to_config + element + '/liftingLine_conf.xml') if os.path.isfile(path_to_config + element + '/liftingLine_conf.xml'): shutil.copyfile(path_to_config + element + '/liftingLine_conf.xml', @@ -205,7 +213,7 @@ def select_configuration_files_from_existing_project(path_of_working_directory_r + ': Replacement of liftingLine configuration file from ' + folder_name + ' folder successfully done!') - if content == 'cpacsInterface': + if content == 'cpacs_interface': print(path_to_config + element + '/convertUNICADO2CPACS_conf.xml') if os.path.isfile(path_to_config + element + '/convertUNICADO2CPACS_conf.xml'): shutil.copyfile(path_to_config + element + '/convertUNICADO2CPACS_conf.xml', diff --git a/UNICADOworkflow/src/sub_function/select_engine_from_existing_project.py b/UNICADOworkflow/src/sub_function/select_engine_from_existing_project.py index a8d5aace823e7e50201435d26895ea7739f41cbd..639b028d9df3b8416c582c0b40a573e8e7572578 100644 --- a/UNICADOworkflow/src/sub_function/select_engine_from_existing_project.py +++ b/UNICADOworkflow/src/sub_function/select_engine_from_existing_project.py @@ -85,10 +85,10 @@ def select_engine_from_existing_project(path_of_working_directory_rce, path_to_a # use engine from clean sheet design folder if use_engine_from_existing_project == 1: check_flag_engine_in_folder = os.path.isdir(path_of_working_directory_rce + '/' + current_workflow_name + '/' - + aircraft_project + '/cleanSheetDesign/engine_data/') + + aircraft_project + '/clean_sheet_design/engine_data/') source = path_of_working_directory_rce + '/' + current_workflow_name + '/' + aircraft_project \ - + '/cleanSheetDesign/engine_data/' - folder_name = 'cleanSheetDesign' + + '/clean_sheet_design/engine_data/' + folder_name = 'clean_sheet_design' # use engine from engine calibrated design folder if use_engine_from_existing_project == 2: @@ -120,7 +120,7 @@ def select_engine_from_existing_project(path_of_working_directory_rce, path_to_a name_of_checkout_dir_from_repository = str(root_of_workflow_tree.find( './control_settings/program_specific_settings/iteration_settings/use_engine_from_existing_project/' 'mode_specific_settings/mode_4/name_of_engine_checkout_dir/value').text) - # Check if the given input directory not equal to 'cleanSheetDesign' -> if true: -> retrofit design will be used + # Check if the given input directory not equal to 'clean_sheet_design' -> if true: -> retrofit design will be used if name_of_checkout_dir_from_repository == 'aerodynamicCalibration' \ or name_of_checkout_dir_from_repository == 'engineCalibration' \ or name_of_checkout_dir_from_repository == 'withoutCalibration': @@ -164,8 +164,8 @@ def select_engine_from_existing_project(path_of_working_directory_rce, path_to_a ssh_url = 'ssh://git@unicado.ilr.rwth-aachen.de:2222/source/' + repository_name + '.git' if repository_name.lower() == 'raircraftreferences': - if name_of_checkout_dir_from_server == 'cleanSheetDesign': - name_of_checkout_dir_from_server = aircraft_type + '/' + aircraft_project + '/cleanSheetDesign/engine_data' + if name_of_checkout_dir_from_server == 'clean_sheet_design': + name_of_checkout_dir_from_server = aircraft_type + '/' + aircraft_project + '/clean_sheet_design/engine_data' elif name_of_checkout_dir_from_server == 'aerodynamicCalibration' \ or name_of_checkout_dir_from_server == 'engineCalibration' \ or name_of_checkout_dir_from_server == 'withoutCalibration':