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. Note that this solver is accessible for professional users only.
This tutorial uses the Lattice Boltzmann method (LBM) 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 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:
Setting up the simulation
Creating 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 demonstrates what should be visible after importing the tutorial project.
1.1 Create the Simulation
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:
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.
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.
2.2. Assign the Boundary Conditions
In order to assign boundary conditions to the flow domain, click on the ‘+’ icon next to the BoundaryConditions, 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.
Once the changes in the boundary conditions names are done it is more intuitive to properly set their effects in the flow domain.
a. Side (A), Side (B), Top (D)
This faces define the sides and top faces of the fluid volume. We will model it as aSlip Wall to avoid the friction effects that in the real conditions would not exist.
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.
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.
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.
2.3. Simulation Control
Fill the simulation control panel in like below:
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:
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)
Table 1: Rotating wall setup properties for each tire in left side of the truck.
Rotational Velocity (rad/s)
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:
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:
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.
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.
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:
Select the Manual mesh settings with a ‘Coarse’fineness. The reference length is 18m and is the maximum dimension existing in the truck model.
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.
Click on the ‘+’ icon under the Geometry Primitivesat the right of the screen.
Choose the ‘Local cartesian box’ option.
Create a second local cartesian box with the following properties:
b. Assign Region Refinements to the Local Cartesian Box
In order to add refinement regions, click under the ‘Mesh settings’ on the‘Refinements’ button.
Add a region refinement to the rear-wake box:
And one more region refinement to the ground area, to create a more dense mesh there:
c. Assign Surface Refinement to the Truck Surfaces
In order to add refinement regions, click under the‘Mesh settings’on the ‘Refinements’ button.
Add a surface refinement to the truck surfaces with the following properties:
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.
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:
Snapshot Solution: the result of the last timestep.
Averaged Solution: an averaged result of the last 20% of the timesteps.
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 moments, Probe 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.
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.
By clicking on the finished simulation runs, the solutions that are available will appear.
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.
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.
Congratulations! You finished the aerodynamic analysis of a truck tutorial!
Strictly Necessary Cookies
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.