# Clean Room Ventilation - CFD Simulation

Source: https://help.sim-flow.com/tutorials/clean-room
Last updated: 2026-10-14

[Video](https://help.sim-flow.com/tutorials/images/clean-room.mp4)

## 1. Introduction

This tutorial guides you through the process of simulating a clean room ventilation system using [SimFlow CFD software](https://sim-flow.com/download/cfd-simulation-software/). To follow this tutorial, you can download [the free version of SimFlow](https://sim-flow.com/download-simflow/).

**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](https://help.sim-flow.com/tutorials/images/launcher-clean_room.png)

## 3. Import Geometry

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

Download Geometries[Equipment](https://help.sim-flow.com/tutorials/downloads/clean-room/equipment.stl)[Filters](https://help.sim-flow.com/tutorials/downloads/clean-room/filters.stl)[Floor](https://help.sim-flow.com/tutorials/downloads/clean-room/floor.stl)[Inlet](https://help.sim-flow.com/tutorials/downloads/clean-room/inlet.stl)[Outlet](https://help.sim-flow.com/tutorials/downloads/clean-room/outlet.stl)

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](https://help.sim-flow.com/tutorials/images/clean-room/cr-01-import-geometry@2x.png)

## 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 geometry is correctly defined in meters, no rescaling is required.

1. Ensure STL geometry units are set to *meter*
2. Click **OK**

![cr 02 geometry units@2x](https://help.sim-flow.com/tutorials/images/clean-room/cr-02-geometry-units@2x.png)

## 5. Geometry - Clean Room

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

- Clean room furniture (equipment)
- Ventilation inlets
- Ventilation outlets
- Floor – 2D surface

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

![cr 03 geometry@2x](https://help.sim-flow.com/tutorials/images/clean-room/cr-03-geometry@2x.png)

## 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](https://help.sim-flow.com/tutorials/images/clean-room/cr-04-hex-meshing-1@2x.png)

## 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. Enable *Create Cell Zone*
4. Set *Refinement* to
   *Min* *1*
   *Max* *1*

![cr 05 hex meshing filters@2x](https://help.sim-flow.com/tutorials/images/clean-room/cr-05-hex-meshing-filters@2x.png)

## 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 that 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](https://help.sim-flow.com/tutorials/images/clean-room/cr-06-hex-meshing-floor@2x.png)

## 9. Meshing Parameters - Inlet

For the *inlet* and *outlet*, apply mesh refinement near their surfaces to level 1, ensuring accurate resolution of airflow entering and leaving the clean room.

1. Select the *inlet* component
2. Enable *Mesh Geometry*
3. Set *Refinement* to
   *Min* *1*
   *Max* *1*

![cr 07 hex meshing inlet@2x](https://help.sim-flow.com/tutorials/images/clean-room/cr-07-hex-meshing-inlet@2x.png)

## 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](https://help.sim-flow.com/tutorials/images/clean-room/cr-08-hex-meshing-outlet@2x.png)

## 11. Base Mesh - Domain

To define the clean room 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]}\)*`0``0``0`
   *Max \({\sf [m]}\)*`5.5``8``3.2`
3. Mark *Lock Cell Size*
4. Define the number of divisions along one axis — the remaining directions will adjust automatically
   *Division*`55``80``32`

![cr 09 hex meshing base@2x](https://help.sim-flow.com/tutorials/images/clean-room/cr-09-hex-meshing-base@2x.png)

## 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 Point*`3``2``2`

You can specify the point location directly in the 3D view. Hold the `CTRL` key and drag the arrows to move the point to the desired location.

![cr 10 hex meshing point@2x](https://help.sim-flow.com/tutorials/images/clean-room/cr-10-hex-meshing-point@2x.png)

## 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 the full version, [Request 30-day Trial](https://license.sim-flow.com/trial)

1. Switch to *Mesh* tab
2. Go to *Settings*
3. Set *Cells Between Levels* to `2`
4. Start the meshing process with the **Mesh** button

![cr 11 hex meshing mesh@2x](https://help.sim-flow.com/tutorials/images/clean-room/cr-11-hex-meshing-mesh@2x.png)

## 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 clean room, 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. Hide mesh faces for the *boundaries*

![cr 12 mesh@2x](https://help.sim-flow.com/tutorials/images/clean-room/cr-12-mesh@2x.png)

## 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 the **Ctrl** key, select the following boundaries
   *floor*
   *floor_slave*
2. Select *Create Cyclic Interface*

![cr 13 mesh interface@2x](https://help.sim-flow.com/tutorials/images/clean-room/cr-13-mesh-interface@2x.png)

## 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](https://help.sim-flow.com/tutorials/images/clean-room/cr-14-mesh-boundaries@2x.png)

## 17. Simulation Type

Clean room 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 a single-phase, steady-state simulation of incompressible turbulent flow.

![Simulation Panel](https://help.sim-flow.com/assets/images/go-to-simulation-panel@2x.png)

![Step 1](https://help.sim-flow.com/assets/images/solvers-selection/simpleFoam/01_single_phase@2x.png)

![Step 2](https://help.sim-flow.com/assets/images/solvers-selection/simpleFoam/02_low_speed@2x.png)

![Step 3](https://help.sim-flow.com/assets/images/solvers-selection/simpleFoam/03_steady-state@2x.png)

![Step 4](https://help.sim-flow.com/assets/images/solvers-selection/simpleFoam/04_apply@2x.png)

## 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](https://help.sim-flow.com/tutorials/images/clean-room/cr-16-turbulence@2x.png)

## 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 a 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](https://help.sim-flow.com/tutorials/images/clean-room/cr-17-transport-properties@2x.png)

## 20. Residence Time

In a steady-state clean room 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 a 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)
   *scalar1* → `Residence Time`
4. Set the diffusivity
   *Diffusivity \({\sf [m^2/s]}\)*`1e-18`

![cr 18 passive scalar@2x](https://help.sim-flow.com/tutorials/images/clean-room/cr-18-passive-scalar@2x.png)

## 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](https://help.sim-flow.com/tutorials/images/clean-room/cr-19-source-term@2x.png)

## 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. Check *Porous Zone* for the *filters* cell zone
2. Use the default Darcy-Forchheimer model and set its parameters accordingly
   *d \({\sf [\frac{1}{m^2}]}\)*`3e-10``3e-10``3e-7`
   *f \({\sf [\frac{1}{m}]}\)*`20000``20000``20`

![cr 20 porous media@2x](https://help.sim-flow.com/tutorials/images/clean-room/cr-20-porous-media@2x.png)

## 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 parameters accordingly
   *Thickness \({\sf [m]}\)*`0.05`
   *d \({\sf [\frac{1}{m^2}]}\)*`10000`

![cr 21 bc porous baffle@2x](https://help.sim-flow.com/tutorials/images/clean-room/cr-21-bc-porous-baffle@2x.png)

## 25. Boundary Conditions - Inlet

To model the ventilation inlet, we will set the constant velocity using the *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](https://help.sim-flow.com/tutorials/images/clean-room/cr-22-bc-inlet@2x.png)

## 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](https://help.sim-flow.com/tutorials/images/clean-room/cr-22-bc-inlet-turbulence@2x.png)

## 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 postprocessing must be defined before starting the calculations and cannot be modified afterward.

Firstly, we will define a 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](https://help.sim-flow.com/tutorials/images/clean-room/cr-23-monitors-volume@2x.png)

## 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 [-]}\)*`1``0``0`
   *Point \({\sf [m]}\)*`2``0``0`

![cr 24 monitors slice 1@2x](https://help.sim-flow.com/tutorials/images/clean-room/cr-24-monitors-slice-1@2x.png)

## 29. Monitors - Create Slice (II)

Create the second slice.

1. Select *Create Slice*
2. Set slice plane normal vector and its point
   *Normal \({\sf [-]}\)*`1``0``0`
   *Point \({\sf [m]}\)*`4``0``0`

![cr 25 monitors slice 2@2x](https://help.sim-flow.com/tutorials/images/clean-room/cr-25-monitors-slice-2@2x.png)

## 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](https://help.sim-flow.com/tutorials/images/clean-room/cr-26-monitors-slice-3@2x.png)

## 31. Run - Time Control

Finally, we can start our computation.

1. Go to *RUN* panel
2. Set the maximal *Number of Iterations* to `2000`

![cr 27 run time control@2x](https://help.sim-flow.com/tutorials/images/clean-room/cr-27-run-time-control@2x.png)

## 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](https://license.sim-flow.com/trial)

Estimated computation time for serial mode: 10 minutes

1. Switch to *CPU* tab
2. Click **Run Simulation** button

![run cpu serial](https://help.sim-flow.com/tutorials/images/run-cpu-serial.png)

## 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 iterations. 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](https://help.sim-flow.com/tutorials/images/clean-room/cr-28-residuals@2x.png)

## 34. Slice - Residence Time

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](https://help.sim-flow.com/tutorials/images/clean-room/cr-29-slices@2x.png)

## 35. Residence Time Plot

Now, we can monitor the average and maximum residence time within the entire clean room 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](https://help.sim-flow.com/tutorials/images/clean-room/cr-30-residence-time-chart@2x.png)

## 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](https://help.sim-flow.com/tutorials/images/clean-room/cr-31-paraview@2x.png)

## 37. ParaView - Load Results

Load the results into the program.

1. Click **Apply** to load results
2. Select coloring variable to *Solid Color*
3. Decrease the opacity
   *Opacity \({\sf [-]}\)*`0.3`

![cr 32 pv load case@2x](https://help.sim-flow.com/tutorials/images/clean-room/cr-32-pv-load-case@2x.png)

## 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](https://help.sim-flow.com/tutorials/images/clean-room/cr-33-pv-clip@2x.png)

## 39. ParaView - Residence Time Results

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

![cr 34 pv clip result@2x](https://help.sim-flow.com/tutorials/images/clean-room/cr-34-pv-clip-result@2x.png)

## 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](https://help.sim-flow.com/tutorials/images/clean-room/cr-35-pv-slice@2x.png)

## 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](https://help.sim-flow.com/tutorials/images/clean-room/cr-36-pv-slice-result@2x.png)

## 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, calculate 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 postprocessing techniques.

[Paraview CFD Tutorial - Advanced Postprocessing in ParaView](https://www.youtube.com/watch?v=5M6VgXyHB60&list=PLy7xPqn9xXckoD2gZgPpv8mrxillJ9PWU&index=21)
