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: Car Park Contamination Simulation

    This tutorial will provide step-by-step guidance on how to set up a contamination control simulation inside a car park.

    Figure 1: Concentration distribution of CO inside a car parking space


    This tutorial will teach you how to:

    • Set up and run car park contamination simulation.
    • Assign boundary conditions, material, passive species and momentum sources to the simulation.
    • Mesh with SimScale’s standard meshing algorithm.

    This tutorial will follow the usual SimScale workflow:

    1. Prepare the CAD model for the simulation
    2. Set up the simulation
    3. Create the mesh
    4. Run the simulation and analyze the results

    1. Prepare the CAD Model and Select the Analysis Type

    First, you should import this project into your Workbench.

    By importing the tutorial project, a new project containing the car park geometry can be seen:

    workbench view with car park model uploaded
    Figure 2: Look of the Workbench after importing the tutorial project

    In the translucent render mode, you can see the jet fans and the car has been included in the model. This will make the simulation setup process easier because we will only need to select these bodies later. You can also notice this fact by examining the individual components under the scene tree on the right of the Workbench.

    1.1 Create the Simulation

    You can follow the steps below to create your simulation:

    First of all, to create a new simulation, click on the ‘+’ button next to Simulations in the simulation tree or the ‘Create Simulation’ button on the geometry panel.

    geometry dialog box to show user how to start setting up a simulation
    Figure 3: The panel opens upon selection of the geometry item.

    Next, select the ‘Incompressible’ analysis type and click on ‘Create Simulation’.

    simulation list in simscale with incompressible selected and the create simulation button
    Figure 4: The simulation library shows the list of available physical models.

    Doing so creates a new simulation tree, like shown below:

    simulation tree in simscale showing the steps on setting up a new simulation
    Figure 5: The simulation tree is created after selecting a physical model.

    All setup steps that are already sufficient for initializing the simulation are highlighted with a green checkmark. Steps that require some user input are shown with a red circle and those that have a blue circle indicate optional settings.

    2. Simulation Setup

    In this section, we will be defining the physics of our model for the car park contamination simulation.

    2.1 Passive Species

    To define a contaminant for our car park contamination simulation, we will need to define a passive species in our simulation. This is done by following the steps below:

    general settings of incompressible flow simulation for car park contamination simulation
    Figure 6: The simulation panel is used to configure general settings.
    • After you have selected your analysis type, which is shown in Figure 5, a dialog box will pop up showing the global settings for your simulation. If you ever need to go back to this, you can do it by clicking on your analysis type in the simulation tree.
    • To enable a scalar transport simulation, which we need to calculate the contamination, we have to define the number of passive species that will be simulated. In this simulation, we will assign 1 passive species because we only have one contaminant, which is CO.

    Read more:

    You can find more information and instructions on passive species modeling below:

    2.2 Model

    A scalar transport simulation is highly dependent on two aspects:

    1. How strong is the transport of mass in the flow? (described by the Turbulent Schmidt Number), and
    2. How fast is the rate of diffusion? (described by the Diffusion coefficient).

    You can change these values in the Model settings panel in your simulation tree, but for this simulation, we will use the default values.

    model for car park contamination simulation with turbulent schmidt number defined as 0.7 and difffusion coefficient as 1e-5
    Figure 7: The model panel is used to set up general physical properties.

    2.3 Material

    Air will be assigned as the simulated material in the simulation. To define this, click on the ‘+’ button next to Materials, which opens the SimScale material library:

    material list with air selected in SimScale
    Figure 8: The materials library displays typical materials and its properties.

    Select ‘Air’ and confirm your choice by hitting ‘Apply’. A dialog box showing all the physical parameters of the selected material will show up:

    material dialog box showing physical properties of chosen material
    Figure 9: Material panel showing the properties for air.

    We will select ‘Car Park’ as the fluid region of the simulation (from the scene tree on the right) and confirm the operation by hitting the check box on the top right of the material dialog box.

    You can also just select any material from the library, and change its name and properties to define a custom material.

    2.4 Initial Conditions

    In this section, you are able to modify the initial conditions of the simulation. This simulation is not time-dependent, which means that it will not affect your results, whatever you define here. However, if you already have a correct guess about the end result, adding it here will stabilize the simulation and help the solver to converge faster.

    In this case also if you don’t know the end result, just leave the initial conditions at their default values.

    2.5 Boundary Conditions

    This simulation will use three boundary conditions:

    1. Four inlets to define where the air enters the space.
    2. A pressure inlet to define the airflow inside the car park.
    3. Three outlets to define where the air will exit.
    overview of boundary conditions
    Figure 10: Overview of boundary conditions showing locations of inlets, outlets, ramp, and production of CO
    locations of 6 jet fans inside the model
    Figure 11: Locations of the jet fans in the parking space ceiling

    Topological Entity Sets

    To make the further boundary condition assignment easier, the faces belonging to the same boundary condition are grouped within a Topological Entity Set. You can find them on the right side of the Workbench in the scene tree under Topological Entity Sets.

    The following picture shows how to create them, in case you want to do them yourself.

    steps on how to create an entity set for an air inlet of a car park.
    Figure 12: The highlighted faces should be used for the creation of the entity sets
    1. Select the faces that you want to group.
    2. Click the ‘+’ button beside the Topological Entity Sets.
    3. Name the group as ‘Inlets’.
    Now go ahead and create another set for the outlets

    To define the boundary conditions, click on ‘+’ next to Boundary conditions, which opens the boundary condition library, as shown in the picture below:

    list of boundary conditions available in simscale
    Figure 13: How to create a new boundary condition

    a. Fresh Air Supply: Velocity Inlet

    To define the inlets, please create a new Velocity inlet boundary condition, and assign the properties according to the following picture.

    velocity inlet boundary condition used for car park contamination simulation with velocity defined as volumetric flow rate and a value of 5 m3/s
    Figure 14: Setup for the velocity inlet boundary condition
    • The value assigned as the (V)Volumetric flow is ‘5 \(m^3/s\)‘.
    • You can directly select the topological entity set Inlets defined before. The assigned faces will turn blue.
    • Leave the Passive scalars value to zero, which represents a clean air input.

    b. Opening to Environment: Pressure Inlet

    For the remaining inlet, we will define a Pressure inlet. Therefore follow the steps from Figure 14. Define the settings as presented in the picture below:

    velocity inlet boundary condition used for car park contamination simulation with default values
    Figure 15: A pressure inlet condition is assigned to the ramp opening (see Figure 10).
    • Leave the default values as they are and assign the face of the Ramp.

    c. Outlet

    Finally, we need to define the location of the outlets. Therefore, create a Velocity outlet according to Figure 10 and define it as presented in the picture below:

    velocity outlet boundary condition for outlets for car park contamination simulation with velocity as volumetric flow rate with a value 8 m3/s
    Figure 16: Setup for the velocity outlets boundary condition
    • Define the Velocity type as ‘Flow Rate’ and define the Flow rate type as ‘(V)Volumetric flow’ and give the value ‘8 \(m^3/s\)’.
    • Select the ‘Outlets’ topological entity set

    2.6 Advanced Concepts

    Under Advanced concepts, we will define the setup for Momentum sources to model the fans for the ventilation in the car park and the CO concentrations by defining a Passive scalar source. The jet fans and the car has been included in the model, so there is no need to create any new geometry.

    Click on ‘Advanced concepts’ and hit the ‘+’ button right next to the respective item, like presented in the picture below:

    location of advanced concepts in the simulation tree which is below boundary conditions and contains rotating zones, porous media, momentum sources and passive scalar sources.
    Figure 17: How to create an advanced concept model

    a. Jet Fans

    We will also model the jet fans installed in the car park as the mitigation method to circulate CO out of the car park. To do this, create a Momentum Source by hitting the ‘+’ button:

    momentum source jet fans
    Figure 18: Setup for the jet fans model

    Next, we will assign the average velocity of the fans which is 8 \(m/s\) in the X-direction and select all the Fan parts in the model (again, use the scene tree).

    b. Car Smoke

    We will set a velocity for the CO coming out of the car by following the similar steps above but instead of selecting the fans, we will use the Car as the momentum source.

    momentum source definition average velocity
    Figure 19: The car is modeled as a momentum source

    The velocity of the CO emitted by the car will be 0.8 \(m/s\) in the z-direction.

    c. Passive Scalar Source

    Create a Passive scalar source like demonstrated in the figure above, then define the setup according to the following figure:

    passive scalar source defined for car park contamination simulation with flux value of 1 1/(m2/s)
    Figure 19: Setup for the passive scalar source on the car surface
    1. Define the passive scalar source as ‘Passive scalar source’
    2. Set the Flux as ‘8.2’ \(1/s\).
    3. Assign ‘Car’ as the source and you can do this similar to how the fans were assigned.

    Confirm the definition by hitting the check button on the top right of the panel.

    You can find definitions and details about the passive scalar flux in this documentation page.

    2.7 Numerics

    The tree item Numerics enables to control the numerical settings for the solver. The default values are fine for most simulations, however, experts can define whatever numerical settings they want.

    For this tutorial, the default values are good enough.

    2.8 Simulation Control

    The next important tree item is Simulation control which allows steering the overall simulation settings. For this car park contamination simulation, however, we will leave everything as it is.

    2.9 Mesh Setup

    In order for you to get an accurate result, a good mesh is necessary. However, the finer the mesh the more core hours will be consumed. It is best to start from a coarse mesh and increase the fineness level if necessary. You can create your mesh by clicking ‘Mesh’ in the simulation tree. This simulation utilizes the Standard meshing algorithm. You can keep all parameters with their default values.

    mesh settings for car park contamination simulation using default settings
    Figure 20: Mesh panel, with the default settings

    You do not need to use the Generate button to compute the mesh, as this action will be performed as part of the simulation run. Nonetheless, once the mesh is created, you can come back to this section and visualize it. It should look like follows:

    mesh for car park model with 1.8 million cells generated with simscale's standard meshing algorithm
    Figure 21: This is how the mess looks after being generated.

    3. Simulation Run

    Now the simulation setup is complete and you’re ready to start your analysis. For this, a simulation run needs to be created. A simulation run solves the physical model that we just defined.

    steps to show how to start a simulation run
    Figure 22: How to start a simulation run

    In order to create a new run, click the ‘+’ icon next to Simulation Runs.

    dialog box when starting a new run with resource estimation and name of the run
    Figure 23: New run dialog box showing the resource estimation

    A dialog box will pop up asking you to name your run. Click the ‘Start’ button to launch the computation. When the process is finished, you will also be notified via e-mail.

    4. Post-Process Results

    After the simulation has finished, you will be able to analyze your results with the built-in post-processor.

    steps on how to access the post-processor in simscale
    Figure 24: There are two ways to access the graphical post-processor.

    You can access the post-processor in two ways, by clicking on ‘Post-process results’ in the Run dialog or clicking on ‘Solution Fields’ under your simulation run. You will then be redirected to the post-processor. Before continuing, make sure that there are no predefined filters and that you are at the last timestep of the simulation.

    For this tutorial, we will visualize the areas where there is a high concentration of CO in the car park by using the Iso Volume filter. Iso volumes enable us to set a range for the output results from the simulation. Follow the steps below to find unsafe areas in the car park:

    1. Select the ‘Iso Volume’ filter from the top bar.
    2. Change the Iso Volume filter parameters as below:
      1. Set Iso scalar to ‘Passive scalar 1’
      2. Expand the Iso value range
      3. Set the minimum Iso value to ‘0.5’
      4. Set the maximum Iso value to ‘1.183’
      5. Change the Coloring to ‘Passive scalar 1’ so that the colors will correspond to the CO concentration level.
    3. Change the maximum range of the color bar to ‘1.183’
    concentration of co inside a car park visualized with isovolumes
    Figure 26: Visualization of the CO concentration using isovolumes

    You can see from the figure above that the high concentration of CO only exists in the vicinities of the car.

    To observe the concentration distribution of CO and the airflow across the parking, create a cutting plane as follows:

    1. Add a ‘Cutting Plane’ from the top bar.
    2. Change the Orientation of the cutting plane to the ‘Z’ axis and if it is inverted click on the inverse icon .
    3. Change the Position of the cutting plane to the coordinates: ’49, 25, 1.75′
    4. Change the Coloring to ‘Passive scalar 1’ to visualize the concentration of CO.
    5. Visualize the vectors by sliding the toggle beside Vectors.
    6. Change the Coloring of the vectors to a black ‘Solid color‘.
    cutting plane of concentration distribution
    Figure 27: Concentration distribution of CO at z = 1.75 \(m\) with velocity vectors on the plane

    Based on the figure above, the airflow inside the car park with air jets is sufficient to decrease the concentration of CO inside the car park.

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

    Congratulations! You finished the car park contamination tutorial!

    Last updated: August 10th, 2023