Back to all tutorials

Clean Room Ventilation - CFD Simulation CFD Software Tutorial

1. Introduction

This tutorial guides you through the process of simulating a clean room ventilation system using SimFlow CFD software. To follow this tutorial, you may download SimFlow free version.

Clean Room
Clean rooms are specialized environments designed to maintain extremely low levels of contaminants such as dust, microorganisms, airborne particles, or water vapor. By precisely controlling air quality, temperature, and humidity, these rooms provide the sterile and stable conditions required for sensitive research, manufacturing, and testing processes. To achieve this level of cleanliness, clean rooms rely on advanced ventilation and filtration systems that continuously supply purified air and remove impurities.

In this tutorial, you will learn how to:

  • Set up a simulation of a clean room ventilation system
  • Model HEPA filters using a porous medium
  • Represent a 2D permeable floor as a porous baffle
  • Calculate the air residence time within the room
  • Identify potential locations of airflow stagnation points

By the end of this tutorial, you will have a solid understanding of how to simulate and assess the performance of a clean room ventilation system, including the calculation of air residence time and analysis of flow behavior.

2. Create Case

Open SimFlow and create a new case named clean room

  1. Click New
  2. Provide name clean room
  3. Click Create to open a new case
simflow-launcher

3. Import Geometry

Firstly, we need to download and import the following geometries:

  1. Click Import Geometry
  2. Select geometry files:
    equipment.stl
    filters.stl
    floor.stl
    inlet.stl
    outlet.stl
  3. Click Open
cr 01 import geometry@2x

4. Import Geometry II

If the imported geometry is in STL format, be aware that STL files do not include unit information. Therefore, you must manually specify the correct unit after import. If you’re unsure of the original unit used during export, you can estimate it by checking the Geometry size displayed in the interface.

In this case, since the fan geometry is correctly defined in meters, no rescaling is required.

  1. Ensure STL geometry units are set to meter
  2. Click OK
cr 02 geoetry units@2x

5. Geometry - Clean Room

After importing the geometry, it will appear in the 3D window. The geometry components include:

  • Cleanroom furniture (equipment)
  • Ventilation inlets
  • Ventilation outlets
  • Floor – 2D surface

The walls of the cleanroom are not included, as they will be defined by the base mesh in later steps.

cr 03 geometry@2x

6. Meshing Parameters - Clean Room Equipment

To create the mesh, we need to specify the meshing options for the given geometries.

For the equipment inside the room, we will refine the mesh.

  1. Go to Hex Meshing panel
  2. Select the equipment component
  3. Enable Mesh Geometry for equipment
  4. Set Refinement to
    Min 0
    Max 1
cr 04 hex meshing 1@2x

7. Meshing Parameters - Filters

For the filters, we will also refine the mesh. Since the filters are modeled as a porous medium, we need to create a dedicated cell zone for them. This will allow us to apply the porous media model and accurately represent the flow resistance introduced by the filter.

  1. Select the filters component
  2. Enable Mesh Geometry
  3. Set Refinement to
    Min 1
    Max 1
cr 05 hex meshing filters@2x

8. Meshing Parameters - Floor

In this simulation, we want to model a suspended floor on which equipment is placed, with open space below for air to be discharged. Since a floor is permeable but includes filters and ventilation grilles resist airflow, we will again use a porous medium. In this case, the floor thickness is very small, so we can model it as a 2D surface. The porosity will be defined later using the Porous Baffle boundary condition.

To model the floor by the surface inside the domain (immersed boundary), make sure to enable the Create Baffle option. A baffle is a thin internal surface that separates regions without adding physical thickness. It is commonly used for internal walls, fans, or porous surfaces. By duplicating the original surface, the baffle creates two coincident faces, allowing different boundary conditions to be applied on each side (immersed boundary approach).

  1. Select the floor component
  2. Enable Mesh Geometry
  3. Mark Create Baffle
cr 06 hex meshing floor@2x

9. Meshing Parameters - Inlet

For the inlet and outlet, apply mesh refinement near its surface to level 1, ensuring accurate resolution of airflow entering and leaving the cleanroom.

  1. Select the inlet component
  2. Enable Mesh Geometry
  3. Set Refinement to
    Min 1
    Max 1
cr 07 hex meshing inlet@2x

10. Meshing Parameters - Outlets

Repeat the same setup for the outlet.

  1. Select the outlet component
  2. Enable Mesh Geometry
  3. Set Refinement to
    Min 1
    Max 1
cr 08 hex meshing outlet@2x

11. Base Mesh - Domain

To define the cleanroom boundaries, we will use the Box base mesh type. It matches the rectangular shape of the room.

  1. Go to Base tab
  2. Set the base mesh size:
    Min \({\sf [m]}\)000
    Min \({\sf [m]}\)5.583.2
  3. Mark Lock Cell Size
  4. Define the number of divisions along one axis — the remaining directions will adjust automatically
    Division558032
cr 09 hex meshing base@2x

12. Material Point

The material point indicates which side of the geometry the mesh will be retained on. Since we are simulating airflow inside the clean room, the material point must be placed within the base mesh and outside the equipment.

  1. Go to Point tab
  2. Specify location inside clean room
    Material Point322
cr 10 hex meshing point@2x

13. Start Meshing

In this step, we will initiate the meshing process.

In the meshing panel, you can indicate how many CPUs you would like to use for this process. Note that if you are using the free version of SimFlow, you may only use serial meshing and cannot create meshes larger than 200,000 nodes.

To meet this limit, we need to reduce the cell count by decreasing the number of cells between refinement levels.

If you would like to test full version Request 30-day Trial

  1. Switch to Mesh tab
  2. Go to Settings
  3. Set Cells Between Levels to 2
  4. Start the meshing process with Mesh button
cr 11 hex meshing mesh@2x

14. Mesh

After the meshing process is complete, the mesh will appear on the screen.
To preview the mesh resolution and internal boundaries of the cleanroom, we can hide the external boundary faces while keeping the edges and remaining internal boundaries visible.

  1. Expand the Graphics Objects List
  2. Go to MESH
  3. Disable Toggle face visibility for the boundaries
cr 12 mesh@2x

15. Create Floor Interface

In the mesh setup, we enabled baffle creation for the floor, which splits the mesh along the surface Now, we will create a Cyclic Interface to connect both sides of the internal boundary, allowing airflow through the floor.

  1. Holding Ctrl key select following boundaries
    floor
    floor_slave
  2. Select Create Cyclic Interface
cr 13 mesh interface@2x

16. Check Mesh Boundaries

Review the boundary list and assign appropriate types to each boundary. Wall type prevents fluid from crossing, while Patch type allows fluid to pass through, making it suitable for inlets and outlets.

  1. Define boundary types accordingly
    boundaries wall
    equipment wall
    inlet patch
    outlet patch
cr 14 mesh boundaries@2x

17. Select Solver - SIMPLE

Cleanroom simulations can be performed as transient analyses, capturing the full flow history. However, such calculations are typically very time-consuming. In this tutorial, we will show an alternative approach to measure air residence time using a steady-state simulation with a passive scalar model.
For this purpose, we will use the SIMPLE (simpleFoam) solver.

  1. Go to SETUP panel
  2. Select Steady State type
  3. Select Incompressible flow filter
  4. Select SIMPLE (simpleFoam) solver
  5. Click Select button to confirm
cr 15 solver@2x

18. Turbulence

We are going to use the standard \(k{-}\omega \; SST\) model to resolve turbulence.

  1. Go to Turbulence panel
  2. Select RANS modeling
  3. Select \(k{-}\omega \; SST\) model
cr 16 turbulence@2x

19. Transport Properties - Air

As a fluid material, we will use air.

  1. Go to Transport Properties panel
  2. Open Material Database
  3. Select air from the list
  4. Click Apply

Selecting material from the Material Database will fill all inputs in the Transport Properties panel. We are still able to overwrite these values at any time.

cr 17 transport properties@2x

20. Residence Time

In a steady-state cleanroom simulation, the flow field is assumed to be constant over time, making direct tracking of fluid impossible. To estimate residence time, the duration that fluid particles spend within the domain, a passive scalar model can be used as an indirect indicator.

A passive scalar is a variable that is transported by the flow but does not influence it (for example, dye concentration or fluid age). In this approach, the scalar is defined to increase linearly along the flow path, effectively representing how long the fluid has remained in the domain.

Method approach:

  • Define a Passive Scalar
    A new passive scalar named Residence Time is created. Its diffusivity is set to a very low non-zero value, (e.g., 1e-18) to effectively eliminate diffusion. Please note that zero value is not allowed for a passive scalar model.
  • Adding a Source Term
    In the Cell Zone panel, a source term of Residence Time is enabled for all cells and set to 1 [1/s]. This ensures the scalar value increases proportionally with time as fluid moves through the domain. Each cell adds one unit of “age” per second of flow residence.
  • Run and Monitor the Simulation The scalar field Residence Time is added to monitors. After convergence, the scalar distribution represents the mean residence time field. Areas with higher scalar values indicate regions where the flow exchanges more slowly or recirculates.

This approach transforms the steady-state solution into a virtual time-tracking system by using a passive scalar that accumulates continuously throughout the flow field. It provides an efficient alternative to transient simulations, enabling estimation of fluid residence time without the computational cost of time-dependent calculations.

21. Residence Time - Passive Scalar

Now, we will create a passive scalar representing Residence Time and assign it a negligible diffusivity.

  1. Go to Passive Scalars panel
  2. Press Add new passive scalar Equations button
  3. Change scalar name (double-click on a scalar name to start editing)
    scalar1Residence Time
  4. Set the diffusivity
    Diffusivity \({\sf [m^2/s]}\)1e-18
cr 18 passive scalar@2x

22. Residence Time - Source Term

In the Cell Zone panel, we will define the source term for the Residence Time field. In each cell, the fluid residence time will increase at a constant rate of 1 per second.
Additionally, we will add an implicit source to limit the maximum value of the residence time to 1e8 s. Beyond this threshold, the residence time will no longer increase, effectively acting as an upper limit.

  1. Go to Cell Zones panel
  2. Mark Source Term for all cells
  3. Expand Add/Remove fields
  4. Select the Residence_Time
  5. Specify the source rate
    Residence_Time Explicit \({\sf [1/s]}\)1
    Residence_Time Linear \({\sf [1/s]}\)-1e-8
cr 19 source term@2x

23. Porous Media - Filters

Now, we will apply porosity to the previously created cell zone to model the HEPA filters located after the inlet.

  1. Go to Cell Zones panel
  2. Check Porous Zone for the filters cell zone
  3. Use a default Darcy-Forchheimer model and set its parameters accordingly
    d \({\sf [\frac{1}{m^2}]}\)3e-103e-103e-7
    f \({\sf [\frac{1}{m}]}\)200002000020
cr 20 porous media@2x

24. Boundary Conditions - Floor

We will now specify the model’s boundary conditions.
To model the permeable floor, we will apply Porous Baffle boundary conditions to the floor interface.

  1. Go to Boundary Conditions panel
  2. Select floor boundary
  3. Change the pressure condition to Porous Baffle
  4. Define its parameter accordingly
    Thickness \({\sf [m]}\)0.05
    d \({\sf [\frac{1}{m^2}]}\)10000
cr 21 bc porous baffle@2x

25. Boundary Conditions - Inlet

To model the ventilation inlet, we will set the constant velocity using Velocity Inlet preset.

  1. Select inlet boundary
  2. Set the Velocity Inlet preset
  3. Set the surface normal velocity
    U Reference Value \({\sf [m/s]}\)2
cr 22 bc inlet@2x

26. Boundary Conditions - Inlet - Turbulence

We will also update the turbulent mixing length at the inlet.

  1. Switch to Turbulence tab
  2. Set the value
    \(\omega\) Mixing Length \({\sf [m]}\)0.07
cr 22 bc inlet turbulence@2x

27. Monitors - Volume Monitors

During the calculation, we can track fluid parameters or observe intermediate results using section planes or probe plots. Note that runtime post-processing must be defined before starting the calculations and cannot be modified afterward.

Firstly, we will define volume monitor to track maximum and average residence time in the clean room.

  1. Go to Monitors panel
  2. Expand Fields list for Maximum volume monitor
  3. Mark Residence Time
  4. Repeat this step for the Average volume monitor
cr 23 monitors volume@2x

28. Monitors - Create Slice (I)

Now, we will create two slices to preview the field map across the domain.

  1. Switch to Sampling tab
  2. Select Create Slice
  3. Set slice plane normal vector and its point
    Normal \({\sf [-]}\)100
    Point \({\sf [m]}\)200
cr 24 monitors slice 1@2x

29. Monitors - Create Slice (II)

Create the second slice.

  1. Select Create Slice
  2. Set slice plane normal vector and its point
    Normal \({\sf [-]}\)100
    Point \({\sf [m]}\)400
cr 25 monitors slice 2@2x

30. Monitors – Sampling (III)

Now, we need to specify the variables to be sampled.

  1. Expand Fields list
  2. Select the following parameters
    pressure p
    velocity U
    Residence Time Residence Ti…​
cr 26 monitors slice 3@2x

31. Run - Time Control

Finally, we can start our computation.

  1. Go to RUN panel
  2. Set the maximal Numbers of Iterations to 2000
cr 27 run time control@2x

32. Run - CPU

To speed up the calculation process, take advantage of parallel computing and increase the number of CPUs based on your PC’s capability. The free version allows you to use only one processor (serial mode). To get the full version, you can use the contact form to Request 30-day Trial

Estimated computation time for serial mode: 10 minutes

  1. Switch to CPU tab
  2. Click Run Simulation button
run cpu serial

33. Residuals

When the calculation is finished, we should see a similar residual plot. All the residual values have reached \(10^{-4}\) and the solver has automatically stopped the calculation. The residuals are the measure of how results change between iteration. Reaching a very low value indicates that we have found a steady-state solution and results do not change regardless of further computations.

  1. Preview the Residuals tab
cr 28 residuals@2x

34. Slice - Velocity Field

During the simulation, the Slices tab appears next to the Residuals. Under this tab, you can preview live results on the defined section planes.

  1. Change tab to Slices
  2. Select the Residence Time field
  3. Display results for the last iteration
  4. Click Adjust Range to Data
cr 29 slices@2x

35. Residence Time Plot

Now, we can monitor the average and maximum residence time within the entire cleanroom domain during the iterations. As the calculations converge, the maximum residence time stabilizes at approximately 55 s.

  1. Change tab to Residence_Time in volume
cr 30 residence time chart@2x

36. Postprocessing - ParaView

Once the computations have been completed, we can preview the stagnation region in the clean room using ParaView.

  1. Go to POSTPROCESSING panel
  2. Click on Run ParaView
cr 31 paraview@2x

37. ParaView - Load Results

Load the results into the program.

  1. Make sure you have your case selected clean_room.foam
  2. Click Apply to load results
  3. Select coloring variable to Solid Color
  4. Decrease the opacity
    Opacity \({\sf [-]}\)0.3
cr 32 pv load case@2x

38. ParaView - Create Clip

To identify regions where the air residence time exceeds a critical value, we will use the Clip filter. This filter allows us to threshold the part of the volume where a selected field variable falls outside a specified range. In this case, we will set the threshold to 45 seconds to highlight areas with higher residence time.

  1. Make sure your case is selected clean_room
  2. Create Clip
  3. Set Clip Type to Scalar
  4. Set Scalars to Residence_Time
  5. Define residence time threshold Value to 45
  6. Uncheck Invert option
  7. Apply changes
cr 33 pv clip@2x

39. ParaView - Residence Time Results

The area can be identified as shown in the image below.

cr 34 pv clip result@2x

40. ParaView - Surface LIC

To identify the flow pattern in the region where higher residence time persists, we will visualize simplified streamlines. For this purpose, we will create a slice crossing the area of interest and display it using Surface LIC.

Surface LIC is a visualization technique that maps the flow direction and pattern directly onto a surface using texture shading. It helps reveal the flow structure without generating separate streamline objects.

  1. Hide the previous Clip results
  2. Select clean_room
  3. Create Slice
  4. Set Origin in X axis 3.7
  5. Uncheck Show Plane option
  6. Apply changes
  7. Select coloring variable to Residence Time
  8. Change the display type to Surface LIC
cr 35 pv slice@2x

41. ParaView - Results

The results are shown in the image below. Areas with higher residence time are caused by flow recirculation and vortices near the inlet.

cr 36 pv slice result@2x

42. Advanced Postprocessing with ParaView

This concludes the tutorial, covering all the aspects we intended to showcase. For a finely tuned presentation of the results, you may take advantage of the more advanced features.

In ParaView, you can display streamlines, contour plots, vector fields, line or time plots, calculating volume or surface integrals and create animations.

To familiarize yourself with the ParaView capabilities, it’s worth checking out our video tutorial, Paraview CFD Tutorial - Advanced Postprocessing in ParaView, in which we demonstrate some of the most commonly used post-processing techniques.