Fill out the form to download

Required field
Required field
Not a valid email address
Required field
Required field
  • Set up your own cloud-native simulation in minutes.

  • Documentation

    Tutorial: LBM Simulation of a Truck’s Aerodynamics

    This tutorial is a step-by-step guide on setting up and running an external aerodynamics simulation around a truck using the Incompressible Lattice-Boltzmann solver\(^1\). Note that this solver is accessible on-demand, 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 run the simulation. This solver is only accessible through professional licenses, therefore this tutorial cannot be performed using a community license – Learn more about SimScale’s professional license options.

    If you want to perform external aerodynamics with a community license, please 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. Running the simulation and analyzing the results

    1. Prepare the CAD Model and Select the Analysis Type

    As a first step, click on the button below. It will copy the tutorial project containing the geometry into your Workbench.

    The following picture demonstrates what is 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

    Before setting a simulation to run, we need to select the analysis type of interest:

    creating a new simulation
    Figure 3: After selecting the geometry, click on ‘Create Simulation’ to choose a new analysis type.

    After clicking on the ‘Create Simulation’ button, the analysis type widget appears:

    simscale simulation library
    Figure 4: SimScale simulation library. Here you can choose which analysis type you want to simulate, for this tutorial we choose the ‘Incompressible (LBM)’ solver.

    The Incompressible (LBM) solver is a powerful external aerodynamics module that runs in GPUs. This solver is transient by nature and allows fast computing times even for large grids. Please visit this page for more details on the Incompressible (LBM) solver.

    At this point, a new simulation tree loads in the Workbench. In the global settings, we have multiple turbulence models to choose from

    simulation properties turbulence model k-omega SST DDES
    Figure 5: Simulation tree and global settings of an Incompressible (LBM) CFD analysis.

    For this simulation, the default turbulence model (‘k-omega SST DDES’) is used – more details about this and other turbulence models are available here.

    1.2 External Flow Domain

    In this simulation type, one of the most important settings is the External flow domain dimensions. Here the user can define a cartesian box that represents the computational domain. It is important to make the cartesian box large enough, preventing negative impacts of the boundary conditions on the region of interest.

    Below, you will find a rule-of-thumb that can be used as a starting point. The dimensions are based on the length L of the truck, which is roughly 16 meters in this model.

    aerodynamic analysis of a truck tunnel dimension references
    Figure 6: Tunnel dimension references for aerodynamic analysis of a truck

    Notice how the flow domain is longer downstream from the truck: this is mostly to allow the wake to develop. Following the rule-of-thumb above, we will obtain the coordinates in Figure 7:

    external flow domain setup properties for a truck simulation
    Figure 7: External flow domain coordinates for aerodynamic analysis of a truck
    • x min‘-34’ \(m\)
    • y min: ‘-16’ \(m\)
    • z min: ‘0’ \(m\)
    • x max: ‘96’ \(m\)
    • y max: ‘16’ \(m\)
    • z max: ‘32’ \(m\)

    Did you know?

    By adjusting the Rotation angle of the external flow domain, it is possible to rotate the computational domain.

    This feature is especially useful for yaw angle studies, as it swiftly rotates the domain without adjustments in the CAD model.

    flow domain rotation incompressible lbm yaw
    Figure 8: Rotating the flow domain by 30 degrees about the z-axis. The right-hand rule applies to the direction of rotation.

    For this tutorial, all Rotation angles will remain at zero.

    2. Assigning the Material and Boundary Conditions

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

    2.1. Define a Material

    In LBM simulations, the solver automatically sets Air to the flow domain. However, it is possible to change the values of each field.

    air properties for the lbm solver
    Figure 9: Default air properties for an Incompressible LBM run.

    2.2. Assign the Boundary Conditions

    As soon as an incompressible LBM simulation is created, the flow domain boundaries receive a set of default boundary conditions. For the default set of boundary conditions, the LBM solver makes the following assumptions:

    • The positive z-direction is the sky;
    • Without rotating the flow domain, the air flows in the positive x-direction, which represents the north.

    Since the CAD model from this tutorial follows the principles above, there are only a couple of adjustments needed from the default boundary conditions. The image below shows the boundary conditions used in this tutorial:

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

    In this case, only two boundary conditions need adjustments: faces A and E.

    a. Velocity Inlet (A)

    For the velocity settings, the user can define the velocity and turbulence. Please adjust the velocity to a fixed value of ’22’ \(m/s\).

    velocity inlet definition lbm
    Figure 11: To adjust the velocity, click on the field and edit the value.

    Did you know?

    You can upload a .csv file to define an atmospheric boundary layer profile for velocity and turbulence intensity/turbulent kinetic energy as a function of height. This is discussed in greater detail in the following post: Defining an Atmospheric Boundary Layer.

    b. Ground (E)

    By default, the ground face receives a No-slip condition, which is adequate for simulations with standing objects. Since the truck is moving, we will adjust the ground to ‘Moving wall’, with the same value as the velocity inlet in the positive x-direction:

    moving wall setup
    Figure 12: The wall moves in the positive x-direction, according to the orientation cube

    2.3. Simulation Control

    Under Simulation control, we can adjust the End time of the simulation. As a rule of thumb, we should ensure at least 2 fluid passes through the computational domain – this means that a particle should have time to flow from inlet to outlet at least 2 times during the simulation.

    Referring back to Figure 7, the flow domain has 130 meters in the x-direction, and we have a velocity of 22 \(m/s\) at the inlet. This means that we need at least 11.82 seconds for the end time of the simulation. In this tutorial, we will use an End time of ’15’ seconds.

    simulation control settings truck simulation
    Figure 13: Simulation control panel.

    The Maximum runtime represents the wall-clock time that the simulation is allowed to run for. For this simulation, the default setting of 10000 seconds works very well.

    2.4. Advanced Modelling

    Under the Advanced modelling section, you will find additional physics to use, such as Rotating walls and Porous objects. The truck has five sets of wheels that act as rotating walls.

    For the set up of a rotating wall, the user defines the Axis of rotation, a point on the axis of rotation (Origin), and the Rotational velocity. As a result, one rotating wall configuration is needed for each set of wheels.

    Find below the steps for the first set of wheels of the truck:

    rotating wall for wheels of a truck
    Figure 14: The first set of wheels consist of the first row of wheels of the truck. They can receive the same rotating wall definition because they share the same axis of rotation, represented by the arrow.
    1. Create a new rotating wall by clicking on the ‘+’ button
    2. Define the Origin, Axis, and Rotational velocity. A CAD tool is helpful to obtain the origin coordinates (i.e. the center point of the wheel). The settings below are good for the first row:

      x: ‘0’ \(m\)
      y: ‘-1.15990381’ \(m\)
      z: ‘0.525’ \(m\)

      x: ‘0’
      y: ‘-1’
      z: ‘0’

      Rotational velocity: Please note that the right-hand rule applies to the direction of rotation. To calculate the rotational velocity, we can use \(V = \omega r\), where \(V\) is the linear velocity of the truck, and \(r\) is the radius of the wheel. The resulting rotational velocity is ‘41.91’ \(rad/s\).
    3. Assign the 20 faces from the first row of wheels
    4. If you would like, you can change the name of the rotating wheel window to a more fitting one, for example, ‘First set’.

    Now, repeat the same process for the other 4 sets of wheels. The table below summarizes the settings:

    SetSecond setThird setFourth setFifth set
    Origin x (m)3.99.79410.94412.094
    Origin y (m)-1.15990381 -1.15990381 -1.15990381 -1.15990381
    Origin z (m)0.5250.5250.5250.525
    Axis x0000
    Axis y-1-1-1-1
    Axis z0000
    Rotational Velocity (rad/s)41.9141.9141.9141.91
    Number of faces for the assignment32262626
    Table 1: Rotating wall setup for each set of wheels

    Once you finish this process for all sets, you should have this list on your simulation tree:

    rotating wall list
    Figure 15: Rotating wall list for all the wheels of the truck

    2.5. Result Control

    The Result control settings allow us to define what information we want to obtain from the results. Several options are available, among forces and moments, probe points, vorticity, etc. – Please check this page for an overview.

    In this tutorial, we will set up the Transient output, Statistical averaging, and Snapshot.

    a. Transient Output

    In short, the transient output consists of datasets extracted from the results at a certain frequency. For this tutorial, we will create a Local cartesian box and assign it to the transient output.

    Care must be taken with the transient output, as it can generate several gigabytes of data if one is not cautious. A good practice is to use Local slices or a small Local cartesian box. For a full description of the transient output, please refer to this page.

    After expanding Result control and selecting Transient output, please click on the ‘+’ button next to Geometry primitives and select a ‘Local slice’:

    local slice set up transient output
    Figure 16: A Local slice represents a plane where the transient results will be shown.

    In the window that pops up, adjust the Normal to the y-direction:

    local slice set up lbm
    Figure 17: The visual representation of the plane allows you to place it more accurately.

    After saving the local slice settings, it will automatically be assigned to the transient output. Before saving the settings, enable ‘Export surface fields’. This option will save the transient results on the walls of the truck.

    transient output configuration
    Figure 18: Final configuration of the transient output.

    With a Fraction from end of 0.2, this result control will start saving data in the final 20% of the simulation, with a moderate frequency.

    b. Statistical Averaging

    To obtain the mean values from the transient simulation we use the Statistical averaging result control. The statistical results are less memory-intensive than the transient output, so we can use larger geometry primitives, if necessary. Please assign the ‘External Flow Domain’ to the Statistical averaging output and enable the ‘Export surface fields’ option.

    statistical averaging setup
    Figure 19: Statistical averaging setup, sampling the final 20% of the simulation.

    c. Snapshot

    The result control item Snapshot saves the data from the final time step of the simulation. In this case, please assign the ‘External Flow Domain’ volume to it:

    snapshot setup
    Figure 20: Snapshot setup.

    3. Mesh Settings

    The Incompressible LBM analysis allows automatic and manual meshing. For an in depth description of the mesh settings, please visit this documentation page.

    In this tutorial, we will make use of the ‘Manual’ configuration, using a ‘Coarse’ fineness. The Reference length represents the longest characteristic length of the geometry – for a truck, the length of the vehicle is the best choice.

     mesh properties panel
    Figure 21: As mentioned before, the length of the truck is approximately 16 meters.

    3.1. Meshing Refinements

    This meshing tool also allows refinements for a better mesh resolution within the regions of interest.

    a. Region Refinements

    A region refinement allows you to control the maximum cell size in a certain region of the domain. Follow the steps below to create a region refinement:

    region refinement set up incompressible lbm
    Figure 22: Steps to create a new refinement for a mesh.
    1. Click on the ‘+’ button next to Refinements. From the list, select a ‘Region refinement’
    2. Based on the Target resolution, the meshing tool will control the local cell size so it won’t be larger than this value. Please adjust the Target resolution to ‘0.1’ \(m\)
    3. Click on the ‘+’ button next to Geometry primitives and select a ‘Local cartesian box’.

    In the local cartesian box configuration window, type in the coordinates below:

    wake region refinement truck simulation
    Figure 23: First Local cartesian box, capturing a section upstream of the truck, and a longer section downstream (wake)

    After saving the settings, create a second Local cartesian box with the following coordinates:

    ground region refinement truck
    Figure 24: Coordinates for the second Local cartesian box, capturing the ground around the truck

    After saving, make sure that both local cartesian boxes are assigned to the region refinement.

    b. Surface Refinement

    The next refinement is a Surface refinement for the truck walls. The image below shows the steps:

    surface refinement settings
    Figure 25: Surface refinement allows a finer resolution on the truck walls.
    1. After clicking on the ‘+’ button next to Refinements, select a ‘Surface refinement’
    2. Set ‘0.04’ \(m\) to the Target resolution, which is a good starting point for a truck. Furthermore, increase the Buffer cells between refinement levels to ‘5’
    3. The easiest way to assign all truck faces at once is by right-clicking and choosing ‘Assign all visible’

    4. Simulation and Results

    You are now able to start a simulation run by clicking on the ‘+’ button next to Simulation Runs. Please note that a warning message will show up – the warning message will not be an issue for this tutorial, therefore, select ‘Run anyway’.

    simulation run settings
    Figure 26: Simulation run settings

    4.1 Post-Process the Results

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

    1. Snapshot Solution: the result of the last timestep.
    2. Averaged Solution: an averaged result, with a sample of the last 20% of the simulation
    3. Transient Solution: a transient result based on the interval of the timesteps. Transient results can be animated as they contain data from several timesteps.

    You can access these results under the simulation run, by clicking on the respective name:

    new simulation run simulation tree
    Figure 27: Opening the results of a simulation run in SimScale

    As a demonstration, we will inspect the ‘Transient solution’ of this simulation. After opening the results, you will find the filters ribbon on the top, and the timestep selector on the right-hand side panel:

    post-processor overview truck
    Figure 28: Overview of the post-processor.

    The timestep selector is particularly useful for transient runs, as you can go through the various saved states. In the Parts Color tab, under Coloring, it is also possible to choose a parameter to plot in the results. The image above is showing the pressure contours, however other parameters such as velocity are also available.

    By selecting an ‘Animation’ filter from the top ribbon, we can create an animation over the timesteps from the results:

    creating an animation filter
    Figure 29: The animation filter allows different animation speeds, ranges, and skipped frames. Press the ‘Play’ button to load the animation.

    After pressing, the animation loads and you will see the results directly in the SimScale platform.

    Video: Animation of transient results around the truck

    In conclusion, the Incompressible LBM analysis type is a powerful tool for transient external aerodynamics studies. It allows for quick simulation set ups, while maintaining robustness and speed as the simulation runs.

    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: February 8th, 2023