This is an old revision of the document!
Please refer to the SU2 home page for more information on SU2, an open-source code targeted at aerodynamics and adjoint shape development. The current version of the is 4.0, and has been installed in '/opt/gridware/non-supported/SU2'.
To set up a suitable environment for running SU2, add the following lines to your .bashrc file and ensure that they are sourced:
#### Setup environment for SU2, uses some OpenFOAM stuff, #### therefore start by setting up OpenFOAM-2.4.0 environment . /opt/gridware/applications/OpenFOAM/OF240 module load /opt/gridware/bioinformatics/modules/python/2.7.5 export SU2_RUN="/opt/gridware/non-supported/SU2/bin" export SU2_HOME="/opt/gridware/non-supported/SU2/SU2v4.0.0" export PATH=$PATH:$SU2_RUN export PYTHONPATH=$PYTHONPATH:$SU2_RUN
The OpenFOAM settings are merely there to ensure that some more recent libraries and utilities that were compiled for OpenFOAM are available. SU2 has nothing whatsoever to do with OpenFOAM.
When running in an interactive environment, SU2 makes use of python scripting to automate
tasks. For cluster running, it is necessary to qsub a PBS script. This example executes the classic
Onera M6 transonic wing example from the TestCases/euler/oneram6 directory.
#!/bin/bash # This example script requests 4 nodes of the ''Dell'' cluster, each with 12 processor cores #PBS -l select=4:ncpus=12:mpiprocs=12:mem=2GB:jobtype=dell,place=free:group=nodetype #PBS -q workq #PBS -l walltime=01:00:00 #PBS -o /export/home/user/scratch/SU2/TestCases/euler/oneram6/stdout #PBS -e /export/home/user/scratch/SU2/TestCases/euler/oneram6/stderr #PBS -m abe #PBS -M user@wherever.co.za # Setup the environment #### Setup environment for SU2, uses some OpenFOAM stuff, #### therefore start by setting up OpenFOAM-2.4.0 environment . /opt/gridware/applications/OpenFOAM/OF240 module load /opt/gridware/bioinformatics/modules/python/2.7.5 export SU2_RUN="/opt/gridware/non-supported/SU2/bin" export SU2_HOME="/opt/gridware/non-supported/SU2/SU2v4.0.0" export PATH=$PATH:$SU2_RUN export PYTHONPATH=$PYTHONPATH:$SU2_RUN # The -d option used with moab no longer works. Set this environment variable explicitly. export PBS_JOBDIR=/export/home/user/SU2/TestCases/euler/oneram6 # Explicitly change to the job directory cd $PBS_JOBDIR nproc=`cat $PBS_NODEFILE | wc -l` ### Run the SU2_CFD solver mpirun -np $nproc -machinefile $PBS_NODEFILE SU2_CFD inv_ONERAM6_JST.cfg > SU2_CFD.out ### Check to see if the solution_flow.dat file exists. If it does, ### use it to generate the necessary output files. If it doesn't, ### copy the restart file to solution_flow.dat and generate the output. ### Make sure that these two file names are consistent with what you have ### used in the .cfg file for the run. if [ ! -e solution_flow.dat ] ; then cp restart_flow.dat solution_flow.dat fi ### Build the specified format output files mpirun -np 1 -machinefile $PBS_NODEFILE SU2_SOL inv_ONERAM6_JST.cfg > SU2_SOL.out
By default, the SU2 example cases write Tecplot format output files. CHPC does not have a license for Tecplot, although it is possible to read Tecplot files into Paraview. However, in the SU2 input file it is easy to specify Paraview format output files (VTK) directly. Refer to the instructions on Remote Visualization to obtain a graphics environment for post-processing with VirtualGL and Paraview or VisIt.