Fill out the form to download

Required field
Required field
Not a valid email address
Required field


Tutorial: LBM Simulation of a Truck’s Aerodynamics

This tutorial is a step-by-step guide about how to set up and run a simulation of the airflow around a truck using the Lattice-Bolzman solver\(^1\). Note that this solver is accessible for professional users only.

truck model with surface data
Figure 1: Truck model with surface analysis.


This tutorial uses the Lattice Boltzmann method (LBM), provided by Numeric Systems GmbH (Pacefish®)\(^1\), to solve the simulation, which is only accessible through professional licenses.
This tutorial cannot be performed using the community license. Learn more.
If you want to perform external aerodynamics with a community license, you can check out this tutorial.


This tutorial teaches, using a truck model, how to:

  • set up and run an LBM-Lattice Boltzmann method simulation
  • assign Geometry primitives in SimScale
  • assign boundary conditions, material, and other properties to the simulation
  • mesh with the SimScale LBM manual mesher.

We are following the typical SimScale workflow:

  1. Setting up the simulation
  2. Creating the mesh
  3. 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 demonstrates what should be visible after importing the tutorial project.

import cad workbench
Figure 2: Imported CAD model of the truck in the SimScale workbench.

1.1 Create the Simulation

simscale simulation library
Figure 3: SimScale simulation library. Here you can choose which analysis type you want to simulate, for this tutorial we choose the incompressible solver.

Select the ‘Incompressible (LBM)‘ analysis, which is used for cases where the Mach number in any point of the domain reaches a value lower than 0.3. This truck simulation will be using a velocity of 22 m/s, so the incompressible analysis is the best fit.

Switch the Turbulence model to ‘k-omega SST‘ in the panel that appears:

simulation properties turbulence model k-omega SST
Figure 4: Choosing the k-omega SST turbulence model for the incompressible (LBM) CFD analysis.

1.2 External Flow Domain

For this simulation, we need to define the fluid region surrounding the truck. For that, we need to changes the coordinates that limit this flow domain. Bellow, there are coordinates that should be used in this case. Note that the fluid volume is longer on the back of the truck compared to the front to allow the flow to develop and capture that information.

aerodynamic analysis of a truck tunnel dimension references
Figure 5: Tunnel dimension references for aerodynamic analysis of a truck.
external flow domain setup properties
Figure 6: External flow domain coordinates for aerodynamic analysis of a truck.

2. Assigning the Material and Boundary Conditions

In this section we will define the physics of the simulation.

2.1. Define a Material

In the LBM simulation, we don’t need to define the fluid as it assumes that we are working with air. The properties that define the air can be changed to the expected conditions we want to simulate.

air properties for the lbm solver
Figure 7: Air properties.

2.2. Assign the Boundary Conditions

boundary conditions overview shown in the truck and fluid region model
Figure 8: Boundary conditions overview.

In order to assign boundary conditions to the flow domain, click on the ‘+’ icon next to the Boundary Conditions, and the predefined boundary conditions will appear on the menu. Note that they a letter and a description to help in the visualizations on where that boundary conditions are being applied. As a default, the Top face of the fluid region is defined by the positive direction where the z-axis points to and to show how to act if your model is not defined in this way we will present the steps to solve this.

Click on the Top (F) and by clicking on the boundary conditions name in the menu you should change it to Outlet face. The same process goes, for example, to the Ground face that was by default in the E face but needs to be assigned to the C face. Repeat the process for the other faces on the fluid volume.

changing boundary conditions name
Figure 9: naming boundary conditions.

Once the changes in the boundary conditions names are done it is more intuitive to properly set their effects in the flow domain.

boundary conditions final name
Figure 10: Final boundary conditions.

a. Side (A), Side (B), Top (D)

This faces define the sides and top faces of the fluid volume. We will model it as a Slip Wall to avoid the friction effects that in the real conditions would not exist.

slip wall setup
Figure 11: Example of a slip wall setup.

b. Ground (C)

This face is representative of the floor where the truck is moving on. It is defined as a Moving Wall since we are defining the movement of the truck surroundings, similar to a traditional wind tunnel approach. The velocity used, as mention before, is ’22 m/s’ in the z-direction.

moving wall setup
Figure 12: Example of a moving wall setup.

c. Velocity Inlet (E)

This is the inlet face where the air will enter the flow domain. The velocity is coherent to the ’22 m/s’ previously applied.

velocity inlet setup
Figure 13: Example of a velocity inlet setup.

You can upload a CSV file to define an atmospheric boundary layer for both velocities as a function of height and intensity or kinetic energy as a function of height. This is discussed in greater detail a post here: Defining an Atmospheric Boundary Layer.

c. Pressure Outlet (F)

This is the face from where the air is going to exit the flow domain.

Pressure outlet setup
Figure 14: Example of a pressure outlet setup.

2.3. Simulation Control

Fill the simulation control panel in like below:

simulation control panel
Figure 15: Simulation control panel.

The end time, ’15 s’ is the time in which you want the simulation to run, and the maximum run time, ‘3e+6 s’ will cap the simulation to the maximum time in real-time.

2.4. Advanced Modelling

Here we can assign boundary conditions that are not mandatorily defined, but rather advanced options.

a. Rotating Walls

The tires of the truck rotate when the truck is moving so the surfaces defining the tires need to be assigned as rotating walls:

rotational wall setup
Figure 16: Rotational wall setup for a wheel.

We need to define an origin, the axis of rotation and the rotational velocity accordingly to the velocity’s previously assigned, as shown here for each wheel:

Rotational Velocity (rad/s)41.9141.9141.9141.9141.91
Table 1: Rotating wall setup properties for each tire in left side of the truck.
Rotational Velocity (rad/s)41.9141.9141.9141.9141.91
Table 2: Rotating wall setup properties for each tire on the right side of the truck.

Once you finish this process for all the wheels, including renaming the operations, you should have this list on your operations tree:

rotational wall list
Figure 17: Rotational wall list.

2.5. Result Control

To extract data from the fluid region we need to had some Result controls, with the help of geometry primitives, to our set up:

a. Transient Output

To define where this data is going to be extracted from for your aerodynamic analysis of a truck, there is a need to define a Local Cartesian box. Click on the ‘Transient output’ option in the result control tree and on the ‘+’ button that can be found in the menu that shows. The properties defining this local cartesian box are the following:

local cartesian box setup
Figure 18: Local cartesian box properties.

Click ‘save‘ the properties and define the transient output data in a way that captures with a moderate resolution the data from the last 20% of the simulation run time. You should enable Export flow-domain fields and define the pedestrian slice as the geometry primitive in the Transient Output by sliding the slider so it shows a blue color.

transient output setup
Figure 19: Transient output setup.

b. Statistical Averaging

To obtain the mean values from the transient simulation we use the statistical averaging results. Use the following steps and properties to define the averaged results of the fluid volume.

statistical averaging setup
Figure 20: Statistical averaging setup.

c. Snapshot

To obtain the last timestep of the simulation and export the instantaneous result fields for either fluid volume or surface data or both, follow this setup:

snapshot setup
Figure 21: Snapshot setup.

3. Mesh

Select the Manual mesh settings with a ‘Coarse’ fineness. The reference length is 18m and is the maximum dimension existing in the truck model.

 mesh properties panel
Figure 22: Mesh properties panel.

3.1. Meshing Refinements

This project needs some refinements to better capture the results.

a. Create Geometry Primitives

Prior to adding refinements, you must create some Geometry Primitives sets.

geometrical primitive creation
Figure 23: Creation of a new geometry primitive.
  • Click on the ‘+’ icon under the Geometry Primitives at the right of the screen.
  • Choose the ‘Local cartesian box’ option.
rear-wake-box geometry primitives
Figure 24: Dimensions of the local geometry primitive in the truck surroundings.

Create a second local cartesian box with the following properties:

ground region geometry primitives
Figure 25: Dimensions of the local geometry primitive in the ground region.

b. Assign Region Refinements to the Local Cartesian Box

In order to add refinement regions, click under the ‘Mesh settings’ on the Refinements’ button.

region refinement
Figure 26: Adding region refinements.

Add a region refinement to the rear-wake box:

rear wake box refinement region
Figure 27: Region Refinement for the Rear-Wake Box region.

And one more region refinement to the ground area, to create a more dense mesh there:

ground refinement region
Figure 28: Region refinement for the ground region.

c. Assign Surface Refinement to the Truck Surfaces

In order to add refinement regions, click under the Mesh settings’ on the ‘Refinements’ button.

surface refinement
Figure 29: Adding surface refinement.

Add a surface refinement to the truck surfaces with the following properties:

surface refinement setup
Figure 30: Surface refinement for the truck surfaces.

4. Simulation and Results

You are able to start a simulation run after going through the simulation tree. At this point, errors or warnings will be displayed. If no errors occur, you will be asked to name the run and start it. If warnings are present, the user can choose to continue regardless of or cancel and amend the issue. You will be asked to fix the issues before running the simulation if errors are detected.

simulation run settings
Figure 31: Simulation run settings.

4.1 Post-Process the Results

After the aerodynamic analysis of a truck simulation has finished, you will have three main results at your disposal, which are:

  1. Snapshot Solution: the result of the last timestep.
  2. Averaged Solution: an averaged result of the last 20% of the timesteps.
  3. Transient Solution: a transient result based on the interval of the timesteps. Transient results can be animated as it has saved the result from each timestep.

If you have defined additional result controls such as Forces and momentsProbe points, or Field calculations, the results will be available below the simulation results.

For the three solutions, you will have SimScale’s built-in post-processor at your disposal. Below is a view of the new post-processor after the external flow analysis simulation has finished.

simscale post-processor view
Figure 32: View of SimScale’s post-processor.

You can access these results by:

  • Clicking the Post-process results button, after the run is finished. You will be taken to the averaged solution.
external flow analysis post-process results from dialog box in simscale
Figure 33: Post-process results from dialog box.
  • By clicking on the finished simulation runs, the solutions that are available will appear.
new simulation run simulation tree
Figure 34: Post-process results from simulation runs.

a. Transient Results

You will have the full capability of SimScale’s post-processor to process your aerodynamic analysis of a truck simulation results, however, we will focus on the transient results.

As described before, you are able to animate the simulation results with the transient solution. Here are the steps to set up an animation of your results:

  • Select Transient Solution in your simulation tree.
  • In the Coloring menu, you can select the results you want to show. We will select Pressure as an example and will appear after being selected.
pressure analysis in a truck surface in the post-processor
Figure 35: Pressure distribution in the truck surface.
  • Click on ‘Add Filter’, and select the ‘Cutting Plane’ option. In the cutting plane options, you should have the ‘X’ direction as the normal, turn the Clip model function off, and use the Velocity Magnitude option in the ‘Coloring’ field.
  • You can start your animation by clicking the ‘play’ button on the top of the post-processor. The animation will start after the post-processor has finished loading the results. Below is an example of an animation of a simulation run.
pressure and velocity analysis in the post-processor using a truck model
Figure 36: Animation of transient results.

Congratulations! You finished the aerodynamic analysis of a truck tutorial!


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

Last updated: June 24th, 2021

Data Privacy