Author: Jaime Galiana Herrera
Final-Year Project in fulfillment of MEng Aeronautics with Spacecraft Engineering
To be run on Imperial HPC
- Overview
- Prerequisites
- Setting Up the Process
- Preparing the Environment
- Running the Automation Script
- Understanding the Workflow
- Post-Processing
- Usage Notes
- License
This workflow automates the following steps:
- Geometry Generation: Creating the geometry of the winglet.
- Mesh Generation: Generating the computational mesh with or without a prism layer.
- CFD Simulation: Running the Computational Fluid Dynamics (CFD) simulation to analyze the flow.
- ASO: Running the Aerodynamic Shape Optimization based on CFD results.
Ensure all required modules are installed and available in your environment. This includes tools like:
To run this project on the HPC you need to set up a Python environment with the following libraries:
- numpy
- argparse
- scipy
- vtk
The project includes a script named submit_setupPythonEnv.pbs that automates the setup of the required Python environment.
qsub submit_setupPythonEnv.pbsTo leverage the AD capabilities in SU2 for shape optimization, it is necessary to compile SU2 with these features enabled. Unfortunately, the process of compiling SU2 on an HPC system can be complex and lacks comprehensive documentation. The following script provides a way to compile the source code on the Imperial HPC system with these features enabled.
qsub submit_compileSU2.pbschmod +x SU2_CFD SU2_GEO SU2_DEF SU2_SOL SU2_CFD_AD SU2_DOT_ADTo set up this project, you need to update all the paths to the respective software and main project folders.
Ensure you have all the necessary template files:
winggen.vspscriptfor geometry generation.macro_with_prism.javaandmacro_without_prism.javafor mesh generation.Euler-cfd.pyandRANS-cfd.pyfor CFD simulation.Euler-shapeOptimisation.pyandRANS-shapeOptimisation.pyfor ASO.
One example is provided in the template directory for FLEXOP aricraft wing geometry. Modify as necessary for the desired wing geometry or flow conditions.
Use the main_runAutomation.py script to set up and submit the job. This script takes various arguments to control which steps to run and their configurations.
| Argument | Description |
|---|---|
-np |
Number of parallel processes |
-mem |
Total memory of the process |
-time |
Job time in hours |
-geo |
Run geometry generation (0: No, 1: Yes) |
-mesh |
Run mesh generation (0: No, 1: Yes) |
-prism-layer |
Include prism layer in mesh (0: No, 1: Yes) |
-cfd |
Run CFD (0: No, 1: Yes) |
-cfd-solver |
CFD Solver to use (Euler or RANS) |
-aso |
Run ASO (0: No, 1: Yes) |
-aso-solver |
ASO Solver to use (Euler or RANS) |
python3 main_runAutomation.py -np 8 -mem 32 -time 8 -geo 1 -mesh 1 -prism-layer 0 -cfd 1 -cfd-solver euler -aso 1 -aso-solver eulerThe submit_automated_process.pbs script submits main_runAutomation.py with the desired list of input cant and sweep angles.
The main_runAutomation.py script creates directories for each winglet configuration and subdirectories for each step (GEOMETRY, MESH, CFD, ASO).
The main_runAutomation.py script modifies the submit_template.pbs script to include the correct parameters and paths based on the user's input.
The modified submit_template.pbs script is submitted to the job scheduler using qsub from each directory created for each of the winglet configurations.
If geometry generation is enabled (-geo 1), the winggen.vspscript file is used to generate the geometry.
If mesh generation is enabled (-mesh 1):
- The
mesh_generation.pyscript is invoked. - The
-prism-layerargument determines whether the mesh includes a prism layer. - For the RANS solver, the script iterates to adjust the prism layer based on y+ values.
If CFD is enabled (-cfd 1):
- The
run_CFD.pyscript runs the CFD simulation. - For the RANS solver, the script checks y+ values and iterates mesh generation if necessary.
If ASO is enabled (-aso 1), the run_ASO.py script runs the shape optimization based on CFD results.
The software includes a script, extract_coefficients.py, which iterates through all winglet directories and extracts the CL and CD data. This is run using
qsub submit_postProcessing.pbs- Use the
main_runAutomation.pyscript to set up and submit the job. - Ensure the correct directories and input files are in place.
- The
run_CFD.pyscript includes an iterative process to adjust the mesh if the y+ values are too high, but this only applies to the RANS solver. - Each script has specific roles and works together to complete the full workflow.
This project is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. You are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- NonCommercial — You may not use the material for commercial purposes.
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
View the full license at: http://creativecommons.org/licenses/by-nc/4.0/

