# Heterogeneous Computing (CPU–GPU) for Pollution Dispersion in an Urban Environment

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Methodology

#### 2.1. Simulation Engines

#### 2.1.1. CPU-Based Solver

#### 2.1.2. CPU–GPU-Based Solver

#### 2.2. Tracer Module

## 3. Study Case

## 4. Results

## 5. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## Abbreviations

CPU | Central Processing Unit |

Heterogeneous Computing GPU | Graphic Processing Unit |

CFD | Computational Fluid Dynamics |

HPC | High Performance Computing |

SPMD | Single Program – Multiple Data |

SIP | Strongly Implicit Procedure |

CUDA | Compute Unified Device Architecture |

MPI | Message Passing Interface |

VOF | Volume Of Fluid |

PEF | Point Emission Flag |

LEF | Linear Emission Flag |

DOFs | Degrees Of Freedom |

## References

- Chio, C.P. Assesing vanadium and arsenic exposure of people living near a petrochemical complex with two-stage dispersion models. J. Hazard. Mater.
**2014**, 271, 98–107. [Google Scholar] [CrossRef] [PubMed] - Sarigiannis, D.A. Total exposure to airborne particulate matter in cities: The effect of biomass combustion. Sci. Total. Environ.
**2014**, 493, 795–805. [Google Scholar] [CrossRef] [PubMed] - Vardoulakis, S. Modelling air quality in streets canyons: A review. Atmos. Environ.
**2003**, 37, 155–182. [Google Scholar] [CrossRef] [Green Version] - Cheng, X. Numerical studies on flow fields around buildings in a street canyon and cross-road. Adv. Atmos. Sci.
**2005**, 22, 290–299. [Google Scholar] - Colvile, R.N. The transport sector as a source of air pollution. Atmos. Environ.
**2001**, 35, 1537–1565. [Google Scholar] [CrossRef] [Green Version] - Lateb, M. On the use of numerical modelling for near-field pollutant dispersion in urban environments—A review. Environ. Pollut.
**2016**, 208, 271–283. [Google Scholar] [CrossRef] [Green Version] - Toparlar, Y. A review on the CFD analysis of urban microclimate. Renew. Sustain. Energy Rev.
**2017**, 80, 1613–1640. [Google Scholar] [CrossRef] - Pullen, J. A comparison of contaminant plume statistics from a Guassian puff and urban CFD model for two large cities. Atmos. Environ.
**2005**, 39, 1049–1068. [Google Scholar] [CrossRef] - Riddle, A. Comparison between FLUENT and ADMS for atmospheric dispersion modelling. Atmos. Environ.
**2004**, 38, 1029–1038. [Google Scholar] [CrossRef] - Kirk, D.; Hwu, W. Programming Massively Parallel Processors: A Hands-on Approach; Morgan Kaufmann: Burlington, MA, USA, 2010. [Google Scholar]
- Owens, J.D. A Survey of General-Purpose Computation on Graphics Hardware. Comput. Graph. Forum
**2007**, 26, 80–113. [Google Scholar] [CrossRef] [Green Version] - Barrachina, S. Exploiting the capabilities of modern GPUs for dense matrix computations. Concurr. Comput. Pract. Exp.
**2009**, 21, 2457–2477. [Google Scholar] [CrossRef] - Ezzatti, P. Using graphics processors to accelerate the computation of the matrix inverse. J. Supercomput.
**2011**, 58, 429–437. [Google Scholar] [CrossRef] [Green Version] - Afzal, A. Parallelization Strategies for Computational Fluid Dynamics Software: State of the Art Review. Arch. Comput. Methods Eng.
**2017**, 24, 337–363. [Google Scholar] [CrossRef] - Fan, Z. GPU Cluster for High Performance Computing. In Proceedings of the 2004 ACM/IEEE Conference on Supercomputing, Pittsburgh, PA, USA, 6–12 November 2004; pp. 47–59. [Google Scholar]
- Valero-Lara, P. Accelerating Solid-Fluid Interaction using Lattice-Boltzmann and Immersed Boundary Coupled Simulations on Heterogeneous Platforms. Procedia Comput. Sci.
**2014**, 29, 50–61. [Google Scholar] [CrossRef] [Green Version] - Valero-Lara, P. Accelerating solid–fluid interaction based on the immersed boundary method on multicore and GPU architectures. J. Supercomput.
**2014**, 70, 799–815. [Google Scholar] [CrossRef] - Valero-Lara, P. Accelerating fluid–solid simulations (Lattice-Boltzmann and Immersed-Boundary) on heterogeneous architectures. J. Comput. Sci.
**2015**, 10, 249–261. [Google Scholar] [CrossRef] [Green Version] - Valero-Lara, P. Multi-Domain Grid Refinement for Lattice-Boltzmann Simulations on Heterogeneous Platforms. In Proceedings of the 2015 IEEE 18th International Conference on Computational Science and Engineering, Porto, Portugal, 21–23 October 2015; pp. 1–8. [Google Scholar]
- Griebel, M. A multi-GPU accelerated solver for the three-dimensional two-phase incompressible Navier-Stokes equations. Comput. Sci. Res. Dev.
**2010**, 25, 65–73. [Google Scholar] [CrossRef] - Thibault, J.; Senocak, I. CUDA Implementation of a Navier-Stokes Solver on Multi-GPU Desktop Platforms for Incompressible Flows. In Proceedings of the 47th AIAA Aerospace Sciences Meeting Including the New Horizons Forum and Aerospace Exposition, Orlando, FL, USA, 5–8 January 2009. [Google Scholar]
- Zhu, X. AFiD-GPU: A versatile Navier-Stokes Solver for Wall-Bounded Turbulent Flows on GPU Clusters. Comput. Phys. Commun.
**2017**, 229, 199–210. [Google Scholar] [CrossRef] [Green Version] - Emelyanoz, V.N. Development of Advanced Computational Fluid Dynamics Tools and their Application to Simulation of Internal Turbulent Flows. Prog. Flight Phys.
**2015**, 7, 247–268. [Google Scholar] - Usera, G. A parallel block-structured finite volume method for flows in complex geometries with sliding interfaces. Flow Turbul. Combust.
**2008**, 81, 471–495. [Google Scholar] [CrossRef] - Mendina, M. A general purpose parallel block-structured open source incompressible flow solver. Clust. Comput.
**2014**, 17, 231–241. [Google Scholar] [CrossRef] - Igounet, P. GPU Acceleration of the caffa3d.MB Model. In Proceedings of the Computational Science and Its Applications—ICCSA 2012, Salvador de Bahia, Brazil, 18–21 June 2012; pp. 530–542. [Google Scholar]
- Ferziger, J.; Peric, M. Computational Methods for Fluid Dynamics; Springer: Berlin, Germany, 2002. [Google Scholar]
- Liao, c. Simulating flows with moving rigid boundary using immersed-boundary method. Comput. Fluids
**2010**, 39, 152–167. [Google Scholar] [CrossRef] - Lilek, Z. An implicit finite volume method using nonmatching block structured grid. Numer. Heat Transf.
**1997**, 32 Pt B, 385–401. [Google Scholar] [CrossRef] - Lange, C.F. Local block refinement with a multigrid solver. Int. J. Numer. Methods Fluids
**2002**, 38, 21–41. [Google Scholar] [CrossRef] - Draper, M. A Large Eddy Simulation Actuator Line Model framework to simulate a scaled wind energy facility and its application. J. Wind Eng. Ind. Aerodyn.
**2018**, 182, 146–159. [Google Scholar] [CrossRef] - Steinman, D. Variability of CFD Solutions for Pressure and Flow in a Giant Aneurysm: The SBC2012 CFD Challenge. J. Biomech. Eng.
**2018**, 135. [Google Scholar] [CrossRef] - Fernández, G. Numerical Simulation of atmospheric pollutants dispersion in an urban environment. In Proceedings of the Tenth International Conference on Computational Fluid Dynamics, Barcelona, Spain, 9–13 July 2018. [Google Scholar]
- Ezzati, P. Towards a Finite Volume model on a many-core platform. Int. J. High Perform. Syst. Archit.
**2012**, 4, 78–88. [Google Scholar]

**Figure 1.**caffa3d.MBRi iteration scheme, Usera et al. (2008) [24].

**Figure 4.**Simulation domain seen from above. Black structure is the representation of the present structure.

**Figure 5.**Simulation domain isometric view. The black structure is the representation of the present structure.

**Figure 6.**(

**a**) Emitting cells in red for the point sources; (

**b**) linear sources emitting cells inside the domain.

**Figure 7.**SO${}_{2}$ instant concentration ($\mathsf{\mu}$g/m${}^{3}$) at 60 m above ground (10 m below emission). (

**a**) Results obtained with caffa3d, and (

**b**) with the GPU-using version.

**Figure 8.**$CO$ mean concentration ($\mathsf{\mu}$g/m${}^{3}$) at ground level, (

**a**) results obtained with caffa3d, and (

**b**) with the GPU-using version.

${\mathit{N}}^{\mathit{o}}$ | Solver | Regions | Platform |
---|---|---|---|

1 | CPU-only | 20 | ClusterUy |

2 | CPU-only | 4 | ClusterUy |

3 | CPU-only | 4 | Medusa |

4 | CPU–GPU | 4 | ClusterUy |

5 | CPU–GPU | 4 | Medusa |

6 | CPU–GPU | 2 | ClusterUy |

**Table 2.**Computation time in seconds for different procedures of the code (only ClusterUy simulations).

Code Part | 4 Regions (CPU) | 20 Regions (CPU) | 2 Regions (GPU) | 4 Regions (GPU) |
---|---|---|---|---|

Main Time Loop | 28,497.815 | 12,582.724 | 4026.620 | 2625.393 |

1 Timestep | 56.996 | 25.165 | 8.053 | 5.251 |

Outer Iterations Loop | 56.882 | 25060 | 7.970 | 5.149 |

Momentum Computation | 1.372 | 0.597 | 0.159 | 0.128 |

Tracers Computation | 3.238 | 1.476 | 0.331 | 0.207 |

${\mathit{N}}^{\mathit{o}}$ | Solver | Regions | Platform | Time |
---|---|---|---|---|

1 | CPU-only | 20 | ClusterUy | 388 |

2 | CPU-only | 4 | ClusterUy | 806 |

3 | CPU-only | 4 | Medusa | 790 |

4 | CPU–GPU | 4 | ClusterUy | 95 |

5 | CPU–GPU | 4 | Medusa | 94 |

6 | CPU–GPU | 2 | ClusterUy | 124 |

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Fernandez, G.; Mendina, M.; Usera, G.
Heterogeneous Computing (CPU–GPU) for Pollution Dispersion in an Urban Environment. *Computation* **2020**, *8*, 3.
https://doi.org/10.3390/computation8010003

**AMA Style**

Fernandez G, Mendina M, Usera G.
Heterogeneous Computing (CPU–GPU) for Pollution Dispersion in an Urban Environment. *Computation*. 2020; 8(1):3.
https://doi.org/10.3390/computation8010003

**Chicago/Turabian Style**

Fernandez, Gonzalo, Mariana Mendina, and Gabriel Usera.
2020. "Heterogeneous Computing (CPU–GPU) for Pollution Dispersion in an Urban Environment" *Computation* 8, no. 1: 3.
https://doi.org/10.3390/computation8010003