Skip to content

Commit

Permalink
Merge pull request #130 from ImperialCollegeLondon/dev_output
Browse files Browse the repository at this point in the history
Output directory in the location specified in settings[SHARPy][log_folder]
  • Loading branch information
ngoiz authored Apr 5, 2021
2 parents 8cf89c3 + 5380a04 commit 4cab27a
Show file tree
Hide file tree
Showing 48 changed files with 383 additions and 697 deletions.
10 changes: 3 additions & 7 deletions cases/coupled/X-HALE/generate_xhale.py
Original file line number Diff line number Diff line change
Expand Up @@ -1812,11 +1812,9 @@ def generate_solver_file():
'CreateSnapshot',
],
'postprocessors_settings': {'BeamLoads': {}, # you need to specify the dict even if empty
'BeamPlot': {'folder': route + '/output/',
'include_rbm': 'on',
'BeamPlot': {'include_rbm': 'on',
'include_applied_forces': 'on'},
'AerogridPlot': {
'folder': route + '/output/',
'include_rbm': 'on',
'include_applied_forces': 'on',
'minus_m_star': 0},
Expand Down Expand Up @@ -1853,13 +1851,11 @@ def generate_solver_file():
'continuous_eigenvalues': 'off',
'dt': dt,
'plot_eigenvalues': 'on'}
settings['BeamPlot'] = {'folder': route + '/output/',
'include_rbm': 'on',
settings['BeamPlot'] = {'include_rbm': 'on',
'include_applied_forces': 'on',
'include_forward_motion': 'off'}

settings['AerogridPlot'] = {'folder': route + '/output/',
'include_rbm': 'on',
settings['AerogridPlot'] = {'include_rbm': 'on',
'include_forward_motion': 'off',
'include_applied_forces': 'on',
'minus_m_star': 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,11 +490,9 @@ def generate_solver_file(horseshoe=False):
'controlled_surfaces': 0,
'time_history_input_file': 'pitch.csv'}},
'postprocessors': ['BeamPlot', 'AerogridPlot'],
'postprocessors_settings': {'BeamPlot': {'folder': route + '/output/',
'include_rbm': 'on',
'postprocessors_settings': {'BeamPlot': {'include_rbm': 'on',
'include_applied_forces': 'on'},
'AerogridPlot': {
'folder': route + '/output/',
'include_rbm': 'on',
'include_applied_forces': 'on',
'minus_m_star': 0}},
Expand All @@ -520,25 +518,17 @@ def generate_solver_file(horseshoe=False):
'aligned_grid': 'on',
'mstar': int(m_main*wake_length),
'freestream_dir': ['1', '0', '0']}
config['AerogridPlot'] = {'folder': route + '/output/',
'include_rbm': 'on',
config['AerogridPlot'] = {'include_rbm': 'on',
'include_applied_forces': 'on',
'minus_m_star': 0
}
config['AeroForcesCalculator'] = {'folder': route + '/output/forces',
'write_text_file': 'on',
config['AeroForcesCalculator'] = {'write_text_file': 'on',
'text_file_name': case_name + '_aeroforces.csv',
'screen_output': 'on',
'unsteady': 'off'
}
config['BeamPlot'] = {'folder': route + '/output/',
'include_rbm': 'on',
config['BeamPlot'] = {'include_rbm': 'on',
'include_applied_forces': 'on'}
config['BeamCsvOutput'] = {'folder': route + '/output/',
'output_pos': 'on',
'output_psi': 'on',
'output_for_pos': 'on',
'screen_output': 'off'}
config.write()


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,9 @@ def generate_solver_file(horseshoe=False):
'time_history_input_file': 'roll.csv'}},
'postprocessors': ['BeamLoads', 'BeamPlot', 'AerogridPlot'],
'postprocessors_settings': {'BeamLoads': {},
'BeamPlot': {'folder': route + '/output/',
'include_rbm': 'on',
'BeamPlot': {'include_rbm': 'on',
'include_applied_forces': 'on'},
'AerogridPlot': {
'folder': route + '/output/',
'include_rbm': 'on',
'include_applied_forces': 'on',
'minus_m_star': 0}},
Expand Down Expand Up @@ -530,25 +528,17 @@ def generate_solver_file(horseshoe=False):
'aligned_grid': 'on',
'mstar': int(m_main*wake_length),
'freestream_dir': ['1', '0', '0']}
config['AerogridPlot'] = {'folder': route + '/output/',
'include_rbm': 'on',
config['AerogridPlot'] = {'include_rbm': 'on',
'include_applied_forces': 'on',
'minus_m_star': 0
}
config['AeroForcesCalculator'] = {'folder': route + '/output/forces',
'write_text_file': 'on',
config['AeroForcesCalculator'] = {'write_text_file': 'on',
'text_file_name': case_name + '_aeroforces.csv',
'screen_output': 'on',
'unsteady': 'off'
}
config['BeamPlot'] = {'folder': route + '/output/',
'include_rbm': 'on',
config['BeamPlot'] = {'include_rbm': 'on',
'include_applied_forces': 'on'}
config['BeamCsvOutput'] = {'folder': route + '/output/',
'output_pos': 'on',
'output_psi': 'on',
'output_for_pos': 'on',
'screen_output': 'off'}
config.write()


Expand Down
27 changes: 8 additions & 19 deletions cases/coupled/linear_horten/generate_linear_horten.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,12 @@
'fx_tolerance': 1e-2,
'm_tolerance': 1e-2}

settings['AerogridPlot'] = {'folder': './output/',
'include_rbm': 'off',
settings['AerogridPlot'] = {'include_rbm': 'off',
'include_applied_forces': 'on',
'minus_m_star': 0,
'u_inf': ws.u_inf
}
settings['AeroForcesCalculator'] = {'folder': './output/',
'write_text_file': 'off',
settings['AeroForcesCalculator'] = {'write_text_file': 'off',
'text_file_name': ws.case_name + '_aeroforces.csv',
'screen_output': 'on',
'unsteady': 'off',
Expand All @@ -157,8 +155,7 @@
'S_ref': 12.809,
}

settings['BeamPlot'] = {'folder': './output/',
'include_rbm': 'on',
settings['BeamPlot'] = {'include_rbm': 'on',
'include_applied_forces': 'on',
'include_FoR': 'on'}

Expand Down Expand Up @@ -206,19 +203,15 @@
'dt': ws.dt,
'include_unsteady_force_contribution': 'off',
'postprocessors': ['BeamLoads', 'BeamPlot', 'AerogridPlot', 'WriteVariablesTime'],
'postprocessors_settings': {'BeamLoads': {'folder': './output/',
'csv_output': 'off'},
'BeamPlot': {'folder': './output/',
'include_rbm': 'on',
'postprocessors_settings': {'BeamLoads': {'csv_output': 'off'},
'BeamPlot': {'include_rbm': 'on',
'include_applied_forces': 'on'},
'AerogridPlot': {
'u_inf': ws.u_inf,
'folder': './output/',
'include_rbm': 'on',
'include_applied_forces': 'on',
'minus_m_star': 0},
'WriteVariablesTime': {
'folder': './output/',
'cleanup_old_solution': 'on',
'delimiter': ',',
'FoR_variables': ['total_forces',
Expand Down Expand Up @@ -272,8 +265,7 @@
'display_root_locus': 'off',
'frequency_cutoff': 0,
'export_eigenvalues': 'on',
'num_evals': 10000,
'folder': './output/'}
'num_evals': 10000,}


settings['LinDynamicSim'] = {'dt': ws.dt,
Expand All @@ -283,12 +275,10 @@
'postprocessors': ['BeamPlot', 'AerogridPlot'],
'postprocessors_settings': {'AerogridPlot': {
'u_inf': ws.u_inf,
'folder': './output',
'include_rbm': 'on',
'include_applied_forces': 'on',
'minus_m_star': 0},
'BeamPlot': {'folder': './output/',
'include_rbm': 'on',
'BeamPlot': {'include_rbm': 'on',
'include_applied_forces': 'on'}}}


Expand All @@ -297,8 +287,7 @@
'b_ref': ws.span,
'c_ref': 0.719}

settings['SaveData'] = {'folder': './output',
'save_aero': 'off',
settings['SaveData'] = {'save_aero': 'off',
'save_struct': 'off',
'save_linear': 'on',
'save_linear_uvlm': 'on'}
Expand Down
16 changes: 5 additions & 11 deletions cases/coupled/multibody_takeoff/generate_hale.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,28 +761,22 @@ def generate_solver_file():
'dt': dt,
'include_unsteady_force_contribution': 'on',
'postprocessors': ['BeamLoads', 'BeamPlot', 'AerogridPlot'],
'postprocessors_settings': {'BeamLoads': {'folder': route + '/output/',
'csv_output': 'off'},
'BeamPlot': {'folder': route + '/output/',
'include_rbm': 'on',
'postprocessors_settings': {'BeamLoads': {'csv_output': 'off'},
'BeamPlot': {'include_rbm': 'on',
'include_applied_forces': 'on'},
'AerogridPlot': {
'folder': route + '/output/',
'include_rbm': 'on',
'include_applied_forces': 'on',
'minus_m_star': 0},
}}

settings['BeamLoads'] = {'folder': route + '/output/',
'csv_output': 'off'}
settings['BeamLoads'] = {'csv_output': 'off'}

settings['BeamPlot'] = {'folder': route + '/output/',
'include_rbm': 'on',
settings['BeamPlot'] = {'include_rbm': 'on',
'include_applied_forces': 'on',
'include_forward_motion': 'on'}

settings['AerogridPlot'] = {'folder': route + '/output/',
'include_rbm': 'on',
settings['AerogridPlot'] = {'include_rbm': 'on',
'include_forward_motion': 'off',
'include_applied_forces': 'on',
'minus_m_star': 0,
Expand Down
19 changes: 6 additions & 13 deletions cases/coupled/simple_HALE/generate_hale.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,28 +775,22 @@ def generate_solver_file():
'dt': dt,
'include_unsteady_force_contribution': 'on',
'postprocessors': ['BeamLoads', 'BeamPlot', 'AerogridPlot'],
'postprocessors_settings': {'BeamLoads': {'folder': route + '/output/',
'csv_output': 'off'},
'BeamPlot': {'folder': route + '/output/',
'include_rbm': 'on',
'postprocessors_settings': {'BeamLoads': {'csv_output': 'off'},
'BeamPlot': {'include_rbm': 'on',
'include_applied_forces': 'on'},
'AerogridPlot': {
'folder': route + '/output/',
'include_rbm': 'on',
'include_applied_forces': 'on',
'minus_m_star': 0},
}}

settings['BeamLoads'] = {'folder': route + '/output/',
'csv_output': 'off'}
settings['BeamLoads'] = {'csv_output': 'off'}

settings['BeamPlot'] = {'folder': route + '/output/',
'include_rbm': 'on',
settings['BeamPlot'] = {'include_rbm': 'on',
'include_applied_forces': 'on',
'include_forward_motion': 'on'}

settings['AerogridPlot'] = {'folder': route + '/output/',
'include_rbm': 'on',
settings['AerogridPlot'] = {'include_rbm': 'on',
'include_forward_motion': 'off',
'include_applied_forces': 'on',
'minus_m_star': 0,
Expand Down Expand Up @@ -844,8 +838,7 @@ def generate_solver_file():
'display_root_locus': 'off',
'frequency_cutoff': 0,
'export_eigenvalues': 'off',
'num_evals': 40,
'folder': route + '/output/'}
'num_evals': 40,}


import configobj
Expand Down
Loading

0 comments on commit 4cab27a

Please sign in to comment.