Generate SU2 solver scripts using WELSIM

SimLet

April 21, 2023

SU2 is an open-source CFD solver originally developed by Stanford University. With the continuous efforts of developers and users in recent years, SU2 has become a mature CFD solver, which contains Euler, Navier-Stokes, and RANS solvers for compressible and incompressible fluids. The package supports various fluids and algorithms from low-speed incompressible fluid to supersonic compressible fluid. Both OpenMP and MPI parallel computing are available, as well as adaptive mesh features. It has been widely applied in academia and industry. At present, the source code of SU2 is available on GitHub, and users can run this project on a variety of systems ranging from laptops to supercomputers. Meanwhile, thanks to the LGPL licensing, SU2 is relatively friendly for commercial use.

su2_github

The input script of the SU2 solver is concise and easy to learn. The user only needs to provide the configuration file usually coming with the suffix “cfg”, and SU2’s own format or CGNS mesh file. The configuration file contains all the information required for the CFD computation except the mesh. WELSIM can automatically generate both configuration and mesh files according to the user’s model settings.

welsim_export_su2

Generate SU2 solver script using WELSIM 1.Setting up analysis type

Create a new project and set the physics type of the project to Fluids. Select the required analysis type, as shown in the figure, the fluid provides two types of analysis: Steady and Transient.

welsim_cfd_analysis_types

2.Add materials to define fluid fields

WELSIM provides an advanced material editing module, users can quickly add fluid material properties and define relevant parameters. Currently, the supported fluid properties are: density, thermal conductivity, specific heat, viscosity coefficient, Prandtl number, etc. The package also provides pre-defined Air and Water materials that are commonly used in CFD analysis. The following figure shows the overview of the material editing interface of WELSIM.

welsim_cfd_material_air

3.Boundary conditions and field conditions

In CFD analysis, boundary and field conditions play an important role. WELSIM currently supports most of the boundary conditions of SU2, including Symmetry, Euler wall, Far Field, Inlet, Outlet, Temperature, and Heat Flux. The supported field conditions are Velocity, Free Stream Field, etc.

welsim_cfd_bcs

4.Meshing

WELSIM provides fast automated meshing and supports Tet4/10 and Tri3/6 elements. After simply setting the size of the element, execute the mesh generation command to obtain the mesh data. Although SU2 uses a finite volume algorithm and supports unstructured mesh, the finite element mesh generated by WELSIM fully meets the computational requirements. The automatically generated 2D and 3D meshes are shown below.

welsim_cfd_mesh_2d_naca0012

welsim_417_cfd3d_onera_m6_mesh

5.Set solver conditions

Due to the complexity of CFD computation, SU2 provides users with a variety of solver settings. WELSIM also supports these solver conditions correspondingly, such as turbulence model, density model, convective model, multigrid algorithms, etc. The CFD solver setting interface is shown in the figure below.

welsim_cfd_solver_cfg

6.Export the solver scripts

After completing the above settings, users can select the Export SU2 Scripts in the Tools option of the Menu. The output files can be obtained in the specified directory. Using the SU2_CFD executable file, users can solve the defined models directly.

welsim_export_su2_files

Now, exporting SU2 solver scripts is completed.

It is also applicable if the users want to directly run the SU2 solver in WELSIM. Instead of exporting scripts, users can click the Solve button. WELSIM will automatically run the SU2 solver for the current project. When the model is computed, the user can directly perform post-processing operations. The figure below shows the CFD result contours that are directly solved and post-processed using SU2 and WELSIM.

welsim_409_cfd2d_rst_velocity_total

welsim_410_cfd2d_inc_species_transport

welsim_411_cfd2d_inviscid_bump_machnum

welsim_412_cfd2d_inviscid_supersonic_wedge

welsim_cfd2d_lam_cylinder_lam_viscosity

Generating complex models for the SU2 solver becomes quick and easy thanks to the ease of use of WELSIM. At present, the development version of WELSIM 2023R3 (v2.7) already contains these features, and it will be continuously maintained and enhanced in future versions.


WelSim and the author are not affiliated with SU2. SU2 is used only as a nominative reference to the open-source project and software developed and released by these teams or institutions.

WelSim is an independent engineering simulation software provider, located in Greater Pittsburgh, PA. Its flagship product WESLIM is a general-purpose engineering simulation software with an all-in-one graphical user interface and self-integrated features.