SU2 Analysis Interface Module (AIM)
SU2 Analysis Interface Module (AIM) based on FUN3D AIM
|
This is a walkthrough for using SU2 AIM to analyze and three-dimensional two-wing configuration.
It is presumed that ESP and CAPS have been already installed. In addition, appropriate meshing and analysis packages were available for CAPS to link them to the corresponding AIMS.
In this example, TetGen is used for volume mesh generation, and SU2 is used for flow analysis. During the CAPS/pyCAPS build process, the location of TetGen source code needs to be set in ESPenv.sh to build TetGen AIM.
Two scripts are used for this illustration:
This is a two-part process. The first part consists of creating a geometry model. The second part is setting the AIMs that uses this geometry model to perform desired analysis. In this walkthrough, the geometry model is created using ESP script and setup for AIMs is done using pyCAPS.
Step 1: Setting up the CAPS Fidelity is the first step. This is required to provide CAPS information about all the geometries models available for analysis. In this example, the geometry model generated can be used for CFD analysis as shown:
Step 2: A typical geometry model can be created and interactively modified using design parameters. These design parameters are either design-variable based, or geometry-variables based. In this example a two-wing configuration is created using following design parameters.
3: Set CAPS internal attributes
Step 4: Local analytical formulation for geometry creation
Step 5: Building solid model. Once all design and locale variables are defined, a half span, solid model is created by "ruling" together to NACA series airfoils (following a series of scales, rotations, and translations).
A full span model is then created by mirroring and joining the half-span model.
Once the desired model obtained it needs to be rotated so that it is in the expected aero-coordinated system (y- out the right wing, x- in the flow direction, and +z- up).
Step 6: An attribute is then placed in the geometry so that the geometry components may be reference by the SU2 AIM
Next a second wing is created and scaled using the store/restore operations.
Step 7: For three-dimensional CFD analysis with the FUN3D AIM a "farfield" or "bounding box" boundary need to be also provided. In this example a simple sphere is created, and designated as such using the capsGroup attribute.
Step 8: Close the ESP script
Step 1: Import (py)CAPS environment.
Step 2: Initialize
Step 3: Load the geometry
Step 4: Extract the geometry model specific to the desired analysis
Step 5: Make a list of design parameters available to interact with geometry model
Step 6: Load required AIMS. A typical high-fidelity CFD analysis requires mesh AIMs and an analysis AIM. For surface meshing, the face tessellation from ESP geometry can be directly used as a surface mesh. If the face tessellation is not satisfactory, an additional step of using surface AIM for external surface mesh generator will be required. Here, the face tessellation is used as surface mesh. For volume mesh generation, TetGen is used. For this, TetGen AIM is used.
Provide appropriate inputs to mesh generator required to generate mesh with adequate mesh quality and any additional features, such as boundary layer and local refinement. Refer TetGen AIM documentation for the list of all the available options.
After options are set aimPreAnalysis needs to be executed:
Load and SU2 AIM and link it to TetGen AIM as a parent. This step is required so that the volume mesh generated by TetGen AIM can be used for SU2 analysis. This step allows the volume mesh generated by TetGen AIM to be converted into SU2 native format.
Set analysis parameters specific to SU2. These parameters are automatically converted into SU2 specific format and transferred into the SU2 configuration file. See AIM Inputs for the available options.
Set the boundary conditions using attribution. These boundary tags and associated boundary conditions are converted into SU2 specific boundary conditions and set in the SU2 configuration file.
After all desired options are set aimPreAnalysis needs to be executed.
Execute SU2 flow solver. Here the python module for parallel computation is used. The configuration file (and the corresponding mesh file) is provided automatically for executing SU2. The number of processors can be set by user, depending on the available computational resources.
Perform post analysis task, such as parsing the final values from SU2 execution.
Step 7: Print the post analysis values.
Step 8: Close the script upon normal termination.
Issuing the following command executes the script:
python su2_and_Tetgen_PyTest.py