## 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.

## Overview

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:

### 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:

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:

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

Tip

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:

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

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:

### 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:

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:

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’.

### 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:

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:

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’:

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.

### 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:

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:

#### 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:

#### 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:

#### 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:

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.

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:

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:

## 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:

## 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:

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.

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

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

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$$.

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:

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.

## 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:

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’.
• Hide the enclosure, which you can do by selecting the faces of the enclosure, right-click on the mouse and select ‘Hide selection’:

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

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.

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.

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.
• 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.
• 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.
• 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 and the animation will start.

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!

Note

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