Back to all tutorials

Gas & Pollutant Dispersion - CFD Simulation CFD Software Tutorial

1. Introduction

This tutorial addresses the modeling of the dispersion of air pollutants, including Lagrangian particles. We will simulate the release of carbon dioxide and ash particles from a chimney into the atmosphere, investigating the dispersion of pollutants in the flowing air.

Throughout this tutorial, you will learn how to utilize species transport to model multiphase solver flow and simulate Lagrangian particles.

2. Download SimFlow

SimFlow is a general purpose CFD Software

To follow this tutorial, you will need SimFlow free version, you may download it via the following link:
Download SimFlow

3. Create Case

Open SimFlow and create a new case named chimney

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

4. Create Geometry - Chimney

Firstly, we need to Download GeometryChimney
The geometry will be imported in the same units as it was exported to the STEP format.

  1. Click Import Geometry
  2. Select geometry file chimney.step
  3. Click Open
ch 02 import geometry

5. Geometry - Chimney

The resulting geometry will be displayed in the graphics window.

  1. Click Fit View to zoom in the geometry
ch 03 geometry

6. Creating Face Group - Inlet 1

In this simulation, we are dealing with an external flow problem. The imported chimney geometry serves as an airflow obstacle and introduces a second phase into the domain. To define where the boundaries of the inlet mesh should be created, we will use the Face Groups.

  1. Select the inlet face by holding CTRL key and clicking on the geometry face in a 3D view. The selection should be marked in red
  2. Click on the Face Group button in the graphics context toolbar
  3. Press Esc key to clear the selection
ch 04 inlet

7. Rename Face Group

In the Geometry Panel, find the new Face Group under the chimney geometry. The first group, named default, contains all non-selected surfaces, which will become the chimney walls.

The new group represents the contaminant inlet to the domain. Rename this group to inlet.

  1. Select chimney geometry
  2. Expand Geometry Faces
  3. Change face group name (double-click on a group name to start editing)
    group_1 \(\rightarrow\) inlet
ch 05 face group name

8. Geometry - Refinements (I)

To achieve a denser mesh at the chimney outlet and in the region of contaminant dispersion, we will create two geometries to specify the areas for mesh refinement.

  1. Select Create Cylinder
  2. Rename it to refinement
  3. Set the cylinder origin:
    Origin \({\sf [m]}\)0068
  4. Set the cylinder dimensions:
    Length \({\sf [m]}\)20
    Radius \({\sf [m]}\)5
ch 06 refinement

9. Geometry - Refinements (II)

  1. Select Create Box
  2. Rename it to refinement_2
  3. Set the box origin and dimensions:
    Origin \({\sf [m]}\)0-1570
    Dimensions \({\sf [m]}\)803040
ch 07 refinement 2

10. Meshing Parameters - Chimney

To create the mesh, we need to specify the meshing options for the given geometry. For the chimney, we will refine the mesh near its faces.

  1. Go to Hex Meshing panel
  2. Select the chimney component
  3. Enable Mesh Geometry
  4. Set Refinement to Min 2 Max 2
ch 08 hex meshing chimney

11. Meshing Parameters - Refinement I

For the refinement geometry, we will set the mesh refinement inside the volume.

  1. Select the refinement component
  2. Enable Refine Geometry
  3. Set refinement Level to 3
ch 09 hex meshing refinement

12. Meshing Parameters - Refinement II

  1. Select the refinement_2 component
  2. Enable Refine Geometry
  3. Set refinement Level to 2
ch 10 refinement 2

13. Base Mesh - Domain

As we are considering an external flow, the area under consideration is limited by the size of the base mesh domain. For this purpose, we will use a Box base mesh type.

  1. Go to Base tab
  2. Set the base mesh size:
    Min \({\sf [m]}\)-50-500
    Min \({\sf [m]}\)20050150
  3. Define the number of divisions
    Division402030
ch 11 base mesh

14. Base Mesh Boundaries

Now, we need to assign individual names to each side of the base mesh to define different conditions on each side. We will use symmetry as a boundary type for simplified slip conditions on the side and top boundaries.

  1. Define boundary names accordingly
    X- inlet
    X+ outlet
    Y- boundaries
    Y+ boundaries
    Z- bottom
    Z+ top
  2. Define boundary types accordingly
    Y- Symmetry
    Y+ Symmetry
    Z- Wall
ch 12 boundaries

15. Material Point

The material point indicates on which side of the geometry the mesh is to be retained. We are simulating flow around the chimney, so our material point needs to be located inside the base mesh but outside the chimney.

  1. Go to Point tab
  2. Specify location inside base mesh but outside chimney geometry
    Material Point00120
ch 13 material point

16. 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.

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

  1. Switch to Mesh tab
  2. Start the meshing process with Mesh button
ch 14 meshing

17. Mesh

After the meshing process is finished, the mesh should appear on the screen. To control the mesh quality inside the domain, we can enable cross-section view.

  1. Select Section View
  2. Mark Section View
  3. Set section plane normal along Y axis
  4. Click Mesh Center to locate the section plane in the center of the model
ch 15 mesh

18. Domain Extrusion - Sides (I)

With SimFlow, you can modify the existing mesh domain by extending the volume through boundary extrusion. This allows the size of successive mesh cells to be graded. For this tutorial, we will extend the domain on each side.

At the beginning, extrude the sides of the boundaries.

  1. Expand the Options list for the boundaries
  2. Select Extrude option
ch 16 extrude boundaries

19. Domain Extrusion - Sides (II)

Selected boundaries will be extended by 100 meters in the normal direction. The additional mesh will be split into 10 rows of cells in the extrusion direction with a grading of 1.1.

  1. Set the following parameters accordingly:
    Number of Layers10
    Expansion Ratio1.1
    ExtrudeNormal
    Thickness100
  2. Click Extrude
ch 17 extrude boundaries 2

20. Domain Extrusion - Inlet and Top

  1. Repeat the extrude operation with the same parameters for the Inlet and Top boundaries.
ch 18 extrude top inlet

21. Domain Extrusion - Outlet (I)

For extrusion of the Outlet boundary, we will use a different set of parameters.

  1. Expand the Options list for the outlet
  2. Select Extrude option
ch 19 extrude outlet

22. Domain Extrusion - Outlet (II)

The outlet boundary will be extended by 300 meters, spliting an extra volume on 25 rows of cells with an expansion ratio of 1.05.

  1. Set the following parameters accordingly:
    Number of Layers25
    Expansion Ratio1.05
    ExtrudeNormal
    Thickness300
  2. Click Extrude
ch 20 extrude outlet 2

23. Mesh Investigation

Using the expansion ratio allows you to significantly enlarge the domain without significantly increasing the number of cells.

Now, we can disable the section view.c

  1. Uncheck the Section View option
  2. Close the toolbox by clicking the Section View icon
ch 21 mesh section

24. Select Solver - Reacting Parcel

We want to analyze compressible turbulent flow with lagrangian particles. For this purpose, we will use the Reacting Parcel (reactingParcelFoam) solver.

  1. Go to SETUP panel
  2. Select Transient type and Compressible flow filter
  3. Check the models: Species and Lagrangian
  4. Select Reacting Parcel solver
  5. Click Select button to confirm
ch 22 solver

25. Combustion - Mechanism

We are going to model a dispersion of carbon dioxide in the atmosphere. Therefore, we will need three species to model this: nitrogen, oxygen and carbon dioxide.

  1. Go to Combustion panel
  2. Add missing species by typing its chemical formula:
    Add SpeciesCO2
  3. Check if all necessary species are listed
ch 23 species

26. Combustion Model

We are not going to model any chemical reaction. We will disable combustion for our simulation.

  1. Go to Combustion tab
  2. Uncheck Enable Combustion option
ch 24 combustion

27. Chemistry Model

We will also disable Chemistry in our analysis.

  1. Go to Chemistry tab
  2. Uncheck Enable Chemistry option
ch 25 chemistry

28. Discrete Phase - Composition

We will consider a second type of pollutants, which involves solid particles such as ash emitted from the chimney. To initiate this process, we will define the solid phase of the Lagrangian particles in the Discrete Phase panel.

  1. Go to Discrete Phase panel
  2. Extend Add/Remove list
  3. Check Solid phase
ch 26 composition

29. Discrete Phase - Material

Now, select the ash as a material of particles.

  1. Switch tab to Solid
  2. Extend Add/Remove list
  3. Check ash phase and uncheck the others
ch 27 ash

30. Discrete Phase - Properties

It remained to define the initial temperature of the particles.

  1. Switch tab to Properties
  2. Define ash temperature
    \(T_0\) \({\sf [K]}\)500
  3. Define devolatilization temperature
    \(T_devol\) \({\sf [K]}\)550
ch 28 temperature

31. Discrete Phase - Injection

We will now define the injection of the discrete phase through the chimney inlet boundary. We assume a constant flow rate of 100 kg of ash over 100 s, with the particle velocity equal to the gas velocity escaping from the chimney.

  1. Go to Injection tab
  2. Create Boundary Injector
  3. Set the total mass of the particles
    Total Mass \({\sf [kg]}\)200
  4. Set the duration of injecting particles
    Duration \({\sf [s]}\)200
  5. Select the boundary to be injected from
    Boundarychimney_inlet
  6. Define the inlet velocity of the particles
    \(U_0\) \({\sf [m/s]}\)005
ch 29 injection

32. Discrete Phase - Distribution

We will now define a normal distribution of the discrete phase size.

  1. Go to Distribution tab
  2. Set Distribution to Normal
  3. Set distribution parameters accordingly
    Max \({\sf [m]}\)2e-06
    Max \({\sf [m]}\)3e-04
    \(\mu\) \({\sf [m]}\)1.1e-04
    \(\sigma\) \({\sf [m]}\)7e-05
ch 30 injection distribution

33. Discrete Phase - Models

We need to define which models will be used in this simulation. We select the Sphere Drag model to account for the drag force acting on the droplets. The Ranz-Marshall heat transfer model is used to consider heat transfer between the particles and surrounding gas.

  1. Switch to Models tab
  2. Set the drag model as Sphare Drag
  3. Set the heat transfer model as Ranz-Marshall
ch 31 particles models

34. Radiation

We will disable radiation for our simulation.

  1. Go to Radiation panel
  2. Uncheck Enable Radiation option
ch 32 radiation

35. 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
ch 33 turbulencepng

36. Boundary Conditions - Chimney Inlet

Now, we will define the inlet and outlet boundary conditions. At the first, we will set constant flow rate of CO2 from the chimney.

  1. Go to Boundary Conditions panel
  2. Select chimney_inlet boundary
  3. Set the Mass Flow Inlet character
  4. Set the flow rate
    U Flow Rate \({\sf [kg/s]}\)100
ch 34 bc chimney flow

37. Boundary Conditions - Chimney Inlet - Thermal

  1. Go to Thermal boundary conditions tab
  2. Set the temperature: T Inlet Value \({\sf [K]}\)500
ch 35 bc chimney thermal

38. Boundary Conditions - Chimney Inlet - Species

Define the phase shares of the escaped gas. The sum of all shares must be equal to 1.

  1. Switch tab to Species
  2. Set the inlet phase:
    O20
    N20
    CO21
ch 36 bc species

39. Boundary Conditions - Air Inlet

To model the wind in the atmosphere, we will use a Free Stream condition.
The rest parameters leave by the default as an Air (Species: 23% of O2 and 77% of N2) with a temperature of 300K.

  1. Select inlet boundary
  2. Set the Free Stream character
  3. Switch tab to Flow
  4. Set pressure type to Fixed Flux Pressure
  5. Define free stream velocity:
    U Freestream Value \({\sf [m/s]}\)500
ch 37 bc inlet

40. Boundary Conditions - Outlet

At the outlet, we will apply an Outflow boundary condition. To prevent reverse flow, we will set an Inlet-Outlet condition that behaves like a zero gradient when air is escaping, and it blocks the reverse flow by imposing zero velocity when entering the domain.

  1. Select outlet
  2. Set the Outflow character
  3. Change velocity type
    U TypeInlet-Outlet
ch 38 bc outlet

41. Boundary Conditions - Top

For the top boundary, we will use the same Free Stream condition as for the inlet.

  1. Select top boundary
  2. Set the Free Stream character
  3. Define free stream velocity:
    U Freestream Value \({\sf [m/s]}\)500
ch 39 bc top

42. Initial Conditions

At the initial state, we assume a constant velocity on the domain filled by the air.

  1. Go to Initial Conditions panel
  2. Set the initial velocity
    U500
ch 40 initial

43. Monitors – Sampling

During calculation, we can observe intermediate results on a section plane. To sample data on a plane, we need to define the plane and also select fields that will be sampled. Note, runtime post-processing can only be configured before starting calculations and cannot be changed later on.

  1. Go to Monitors panel
  2. Switch to Sampling tab
  3. Select Create Slice
  4. Set slice plane normal vector
    Normal \({\sf [-]}\)010
  5. Expand Fields list
  6. Select velocity U, temperature T and phase CO2
ch 41 monitors

44. Run - Time Control

For any simulation, it is very convenient to let the solver automatically determine the proper time step value. To use this option, we need to define time step constraints by providing the initial time step (adjusted by the solver during computations) and maximal time step value. The rest of the parameters we can leave the default.

  1. Go to RUN panel
  2. Set the Simulation Time [s] to 100
  3. Change Time Stepping to Automatic
  4. Set initial and maximum timesteps (solver will start computation with the initial value and adjust it in the next iterations not exceeding the maximum value)
    Initial \(\Delta t\) \({\sf [s]}\)0.1
    Max \(\Delta t\) \({\sf [s]}\)0.5
ch 42 run time

45. 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: {time}

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

46. Residuals

When the calculation is finished, we should see a similar residual plot.

  1. Go to Residuals tab
ch 45 residuals

47. Slice - Velocity Field

Slices tab appears next to the Residuals . Under this tab, we can preview results on the defined section plane.

  1. Change tab to Slices
  2. Select the phase CO2
  3. Expand data range options
  4. Select Custom Range
  5. Provide the range to Min0 and Max0.01
  6. Click OK
ch 46 co2 map

48. Postprocessing - ParaView

Once the computations have been completed, we can perform advanced visualization of the results using ParaView.

  1. Go to POSTPROCESSING panel
  2. Click on Run ParaView
ch 47 paraview

49. ParaView - Load Results

Load the results into the program.

  1. Make sure you have your case selected chimney.foam
  2. Click Apply to load results
  3. Reduce the opacity to 0.3
  4. Play the animation using Play button
  5. Results they will be shown in the 3D graphic window
ch 48 pv load res

50. ParaView - Extract Particles Block

In order to display the particles in a different scheme, it is necessary to first extract them from the overall results.

  1. Select baseline results chimney.foam
  2. Select Extract Block
  3. Check lagrangian group
  4. Confirm with the Apply button
  5. Double-click on its name and rename it to particles
  6. Select contour coloring variable to mass0
ch 49 pv particles

51. ParaView - Slice

We will create the cross-section through the computational domain to display the CO2 distribution.

  1. Mark the baseline results chimney.foam
  2. Select Slice
  3. Set the plane normal along Y axis using Y Normal button
  4. Uncheck Show Plane
  5. Press Apply
  6. From the drop-down coloring menu select CO2
ch 50 pv slice

52. ParaView - Rescale

Scale the CO2 results to get a range of up to 1% carbon dioxide contribution.

  1. Click on Rescale to Custom Data Range
  2. Set the range from 0 to 0.01
  3. Confirm by clicking Rescale
ch 51 pv slice rescale

53. ParaView - Results

Orient the view parallel the XZ plane and play with animation buttons to investigate the time history of the flow.

ch 52 pv final results

54. 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.