Fill out the form to download

Required field
Required field
Not a valid email address
Required field


Tutorial: Incompressible Turbulent Airflow Around a Spoiler

This article provides a step-by-step tutorial for the flow simulation around a GT car rear spoiler using the incompressible turbulent flow analysis type.

flow visualization around the spoiler shown within the simscale platform
Figure 1: Flow visualization across the spoiler


This tutorial teaches how to:

  • Set up and run an incompressible turbulent flow simulation.
  • Assign boundary conditions, material, and other models to the simulation.
  • Mesh the geometry with the SimScale standard meshing algorithm.

The typical SimScale workflow will be followed:

  • Prepare the CAD model for the simulation.
  • Set up the simulation.
  • Set up the mesh.
  • Run the simulation and analyze the results.

1. Prepare the CAD model and Select the Analysis Type

First of all, click the button below. It will copy the tutorial project containing the geometry into your own Workbench.

The following picture shows the geometry used for the simulation. It corresponds to a typical car spoiler, installed to increase the downforce in the rear axis:

project workbench flow around a spoiler
Figure 2: Imported project in the SimScale Workbench

1.1 Required CAD Preparation

You can see that there are two geometries in the imported project. The first one is called Original Spoiler and the second one Spoiler – Flow Region. The original model shows the geometry of the solid part to be analyzed:

geometry model flow around a spoiler
Figure 3: Model of the spoiler to be analyzed

The Spoiler – Flow Region part contains the virtual wind tunnel representing the volume of air around the spoiler. Notice that, as the spoiler is symmetric, we simulate only one half of the geometry to optimize simulation resources:

extracted flow region flow around a spoiler
Figure 4: Model and dimensions of the flow region around the spoiler; notice the usage of the symmetry.

Figure 4 also shows how the bounding box dimensions were chosen, relative to the chord length of the spoiler, \(L = \) 0.25 \(m\).


You can better visualize the internal faces by changing the render mode to translucent surfaces. Do this by using the viewer toolbar at the top of the Workbench.

You can check the details of the flow volume creation by selecting the Spoiler – Flow Region geometrical object item on the left, and clicking the ‘CAD mode’ icon:

access cad mode flow around a spoiler
Figure 5: Parameters of the enclosure creation operation

The CAD mode will open, with the performed operations shown under History:

cad model simscale
Figure 6: CAD mode for the flow volume creation.

We can see that for the creation of the flow volume, two CAD operations were performed:

  1. External flow volume, to create the flow region (virtual wind tunnel), and
  2. Delete bodies, to remove the spoiler part from the model

The details of the operations can be seen below:

setting the face parameters within the simscale platform
Figure 7: Parameters for the external flow volume operation
Figure 8: Parameters for the delete bodies operation

1.2 Create Topological Entity Sets

Topological entity sets are groups of faces used for boundary conditions or other assignments. By using them, the simulation setup can be done faster.

They can be found in the scene tree on the right side of the workbench:

topological entity sets flow around a spoiler
Figure 9: Topological entity sets

Five of the needed sets are already provided in the template project, but the set for the flow inlet face is still missing. The picture below shows how to add it:

creating a new topological entity set flow around a spoiler
Figure 10: Creating a topological entity set
  1. First, select the corresponding faces from the viewer (notice this is the one just in front of the spoiler).
  2. Click the ‘+’ icon next to Topological Entity Sets in the scene tree.

In the pop-up dialog that appears, name the set ‘Inlet’ and click ‘Create new set’.

naming of a new topological entity set flow around a spoiler
Figure 11: Name and finish the topological entity set creation.

1.3 Create the Simulation

Now we can start with the simulation setup. Follow the steps shown in Figure 5 and click the ‘Create Simulation’ button located at the bottom right of the panel. The simulation library window appears to select the appropriate simulation type:

simulation library flow around a spoiler
Figure 12: SimScale simulation library

Choose Incompressible and click ‘Create Simulation’.

2. Set Up the Simulation

Now we are defining the physical situation of our simulation.

A new simulation tree will appear on the left along with the global settings, which we will leave with the default values:

simulation parameters flow around a spoiler
Figure 13: Simulation global parameters

Notice that the k-omega SST turbulence model is selected, which is the default for all SimScale simulations. Also notice that this will be a steady-state flow analysis.

2.1 Material

To define and assign a material, click the ‘+’ icon next to Materials. Doing so, the SimScale material library will pop up. Select Air from the materials library and click ‘Apply’:

materials library flow around a spoiler
Figure 14: SimScale materials library

The material properties window will appear. The Flow Region volume is automatically selected because it is the only one present in the model. Accept the selection with the checkmark.

material definition, flow around a spoiler
Figure 15: Material parameters for air and assignment of the flow region

2.2 Boundary Conditions

Now we will define the boundary conditions. In order to create a boundary condition, follow the steps shown in the picture below:

creating boundary condition, flow around a spoiler
Figure 16: Creating a boundary condition
  1. Click the ‘+’ button next to Boundary Conditions.
  2. Select the proper type from the drop-down menu.
  3. Set up the physical parameters and assign faces in the pop-up dialog (not shown in the picture).

Now apply this process for the following boundary conditions:

boundary conditions overview, CFD analysis of a spoiler
Figure 17: Boundary conditions overview

a. Spoiler Surface

For the spoiler surfaces, a no-slip wall condition is used.

Create a new boundary condition by following the instructions in Figure 16 and select ‘Wall’. Now select the Spoiler topological entity set to assign it to the boundary condition. You can also rename the boundary condition to ‘Spoiler’.

Leave all parameters as default, as shown in the picture:

spoiler boundary condition, simulation of flow around a spoiler
Figure 18: Spoiler faces boundary condition

b. External Walls

For the external walls, a slip Wall boundary condition is used.

Create it according to the steps presented in Figure 16, selecting a Wall condition. Once the setup panel pops up, select the External walls entity set that was created before for the assignment and change the Velocity parameter to Slip.

The setup should look as shown in the picture:

slip velocity for external walls in spoiler tutorial
Figure 19: External walls boundary condition

c. Inlet

For the flow inlet face, a velocity inlet boundary condition will be used. Follow the same procedure as before to create a Velocity inlet boundary condition and assign the Inlet entity set.

Set up the dialog as shown in the picture:

inlet boundary condition
Figure 20: Flow inlet boundary condition

Define a fixed value velocity of ’10 \(m/s\)’ in the y-direction \((U_y)\).

d. Outlet

For the flow outlet face, a pressure outlet boundary condition will be used. Follow the same procedure as before to create a Pressure outlet boundary condition and assign the Outlet entity set.

flow outlet boundary condition, spoiler cfd analysis
Figure 21: Flow outlet boundary condition

Set the Pressure type to Fixed value and leave the Gauge pressure at 0 /(Pa/) default.

e. Floor

For the floor below the spoiler, a moving wall boundary condition will be used. Create a Wall boundary condition, and assign the Floor entity set.

Set up the parameters as show in the picture:

floor boundary condition
Figure 22: Floor boundary condition

Select ‘Moving wall’ for the (U) Velocity option and assign ’10 \(m/s\)’ to in the y-direction.

f. Symmetry

Finally, for the symmetry plane, a corresponding boundary condition will be used. Create a Symmetry boundary condition, and assign the Symmetry entity set.

Set up the parameters as show in the picture:

symmetry boundary condition
Figure 23: Floor boundary condition

3. Simulation Control

One important setup in order to help the simulation achieve good results and converge faster is the Potential flow initialization. Toggle it on inside the Simulation Control tab, as shown in the figure:

simulation control panel potential flow initialization
Figure 24: Activate the ‘Potential flow initialization’ to achieve better results.

4. Mesh

For this tutorial, we are using the hex-dominant automatic mesher. Click on ‘Mesh’ from the simulation tree and define the global settings as follows. You can rename it as Hexahedral Mesh:

mesh setting automatic hex-dominant global
Figure 25: Global meshing settings for the Hex-dominant mesher.

Do not generate the mesh yet. Click on the blue checkmark and save.

Now we want to refine the wake region. Therefore we need to create a region refinement for the hex mesh.

creating a new region refinement in the simscale hex donimant mehser
Figure 26: Adding a Region refinement.

Click on the ‘+ button’ next to Refinements and select ‘Region refinement’. This opens the settings panel.

region refinement settings for meshing
Figure 27: Region refinement settings

Set the maximum edge length to ‘0.01 \(m\)’ and click on ‘+’ to create a cartesian box geometry primitive for the volume assignment:

creating a cartesian box
Figure 28: Creating a Cartesian box to refine the cells within this volume

Define the following dimensions for the Cartesian box in meters as shown in the picture above.

  • Minimum x: ‘0’
  • Minimum y: ‘-0.1’
  • Minimum z: ‘-0.2’
  • Maximum x: ‘0.55’
  • Maximum y: ‘1.5’
  • Maximum z: ‘0.2’

Now you should get redirected to the settings for the region refinement. Assign the cartesian box that you just created. This ensures that all the cells within this box will have a maximum edge length of 0.01 \(m\).

cartesian box assignment for region refinement of spoiler using hex mesh
Figure 29: Assigning the newly created cartesian box for the region refinement of the wake behind the spoiler

Save the settings and go back to the Mesh node in the simulation tree and hit ‘Generate’ to generate the mesh.

After about 20-30 minutes, you will see this mesh:

mesh from the spoiler tutorial
Figure 30: Generated Hexahedral mesh

Alternatively, you can also just use the default settings for the mesh and hit generate.

You can choose to use the default standard mesher to mesh your domain. Read more about the standard mesh algorithm here.

mesh parameters flow around a spoiler
Figure 31: Mesh setup for standard mesh algorithm

5. Start the Simulation

Now that the simulation setup is complete, a new simulation run can be created to perform the computation. For this, click the ‘+’ button next to Simulation Runs in the simulation tree. In the pop-up window, give a proper name to the run and click Start:

creating simulation run flow around a spoiler
Figure 32: Creating and starting a new simulation run

This computation takes about an hour or more to be completed. If you can’t wait to see the results, at the end of the article you will find a link to the completed version of the project.

6. Post-Processing

You can visualize your results by using SimScale’s online post-processor. We will visualize the pressure distribution on the spoiler, create a cutting plane, and animate the streamlines of the flow around the spoiler.

6.1 Pressure Distribution

One of the results of interest is the pressure distribution on the surface of the spoiler. Follow the steps below to visualize the same:

  • When you enter the post-processor for the first time, check if you are at the last time step of the simulation and there are no pre-defined filters. Also, change the Coloring of your parts to ‘Pressure’.
post-processor interface
Figure 33: Make sure that you are at the last time and choose ‘Pressure’ as the Coloring of the model
  • Hide the enclosure, which you can do by selecting the faces of the enclosure, right-click on the mouse and select ‘Hide selection’:
how to hide selected faces
Figure 34: Hiding enclosure around the spoiler

After hiding the enclosure, you should then get a clear visualization of the pressure distribution on the spoiler similar to the figure below:

pressure on the spoiler
Figure 35: Pressure distribution on a spoiler and highest at surfaces directly facing the flow

Figure 34 shows that high pressure occurs on the top surfaces of the spoiler and lowest at the bottom surfaces which will create downforce on the spoiler.

6.1 Cutting Planes

A cutting plane can also be used to better understand the turbulence around the spoiler and its characteristics. To create a cutting plane, select ‘Cutting plane’ from the Filters panel.

how to visualize cutting planes
Figure 36: Selecting ‘Cutting Plane’ from the filters panel

Next, place the cutting plane at the mid-section of the spoiler which is at Position: 0.1, 1.5, 0.4. Keep the orientation normal to the x-axis. Switch Coloring to k (turbulent kinetic energy). Finally, show the velocity vectors by sliding the toggle beside Vectors and changing the Coloring to black Solid color.

turbulence kinetic energy field and velocity vectors around a spoiler on a cutting plane
Figure 37: Cutting plane showing turbulence kinetic energy field around a spoiler and velocity vectors

Here, we can see turbulence starts to occur when the flow hits the wing and is at its highest under and at the trailing edge of the wing.

6.3 Streamlines and Animation

Another result of interest is visualizing the streamlines around the spoiler. Follow the steps below to show the streamlines and animate them:

  • Click the ‘Add Filter’ button in the Filters panel and select ‘Particle Trace’. This will take you to the settings for the particle traces.
visualizing particle traces
Figure 38: Selecting ‘Particle Trace’ from the filters panel
  • Configure your streamlines by firstly choosing the entry position of the particle traces, which should be the inlet. Click the icon beside Position and click on the surface of the inlet. This will hide the model, which can be turned on again by sliding the slider besides Parts Color.
how to choose particle trace entry position
Figure 39: Choose the inlet as the entry position of the particle traces and show the model again by sliding the slider besides Parts Color
  • Configure your particle traces so that the streamlines show relevant pictures. Change the number of particle traces by changing the values in #Seeds horizontally to ’50’ and #Seeds vertically to ‘8’. Change the Spacing to ‘1e-2’ and the Size to ‘1e-3’. Hide the walls of the fluid domain to see the streamlines around the spoiler. Finally, change the Coloring in Parts color to some contrasting white or grey solid color.
particle trace settings
Figure 40: Change the #Seeds horizontally to ’50’ and #Seeds vertically to ‘8’, the Spacing to ‘1e-2’ and the Size to ‘1e-3’
  • To create an animation, click the ‘Add Filter’ button and select ‘Animation’. After that, hide the walls of the fluid domain to make the streamlines more clear.
  • Change the Animation type to ‘Particle trace’.
  • Finally, you can play the animation by clicking the play button playbutton and the animation will start.
streamlines animation around a spoiler
Animation 1: Flow streamlines around the spoiler with tip vortices at the trailing edge of the spoilers

Animation 1 displays the airflow streamlines. The generated tip vortices, the up-wash and the low speed close to the surface (blue portions of the streamlines) can be appreciated from this plot.

You can analyze your results with the SimScale post-processor. Have a look at our post-processing guide to learn how to use it.

Congratulations! You finished the tutorial!


If you have questions or suggestions, please reach out either via the forum or contact us directly.

Last updated: June 14th, 2021

What's Next

part of: Tutorials

Data Privacy