# Three-Dimensional Numerical Method for Simulating Large-Scale Free Water Surface by Massive Parallel Computing on a GPU

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Method

#### 2.1. Lattice Boltzmann Method

_{i}. Through solution and statistics of particle distribution function f

_{i}corresponding to various discrete velocities, the macroscopic variables of the fluid such as density $\rho =\sum {f}_{i}$ and momentum $\rho u=\sum {f}_{i}{e}_{i}$ of the fluid are obtained.

**r**and time $t$; $\{{F}_{\alpha}:\alpha =0,1,\dots ,18\}$ refers to the forcing term; $\{{m}_{\alpha}(\mathit{r},t):\alpha =0,1,\dots ,18\}$ refers to the moment of distribution functions (see reference [17] for details). The relationship among m, transfer matrix M, and distribution function f can be expressed as:

#### 2.2. Single-Phase Free Surface Lattice Boltzmann Model

#### 2.2.1. Mass Flow Computation

_{i}and f

_{inv(i)}, where e

_{inv(i)}= −e

_{i}, and $\mathsf{\Delta}{m}_{i}$ denotes the mass variable quantity on $i$ direction along the particle velocity [11].

#### 2.2.2. Reconstruction of Interface Cells

**u**refer to pressure and velocity at position

**x**, respectively. In addition, to balance the forces given by the gas pressure and velocity at interface, the distribution functions whose discrete velocity direction

**e**

_{i}satisfies

**e**

_{i}

_{·}

**n**< 0 shall be reconstructed [13], where

**n**refers to the surface normal direction and can be obtained by the second-order central difference approximation $\mathit{n}=\sum {s}_{i}{\mathit{e}}_{i}\epsilon (\mathit{x}+{\mathit{e}}_{i})$.

#### 2.2.3. Mass Allocation

**x**distributed to the cell at

**x**+

**e**

_{i}is [13]:

#### 2.3. Large Eddy Simulation Based on the LB Method

## 3. Testing and Discussion

#### 3.1. Sudden Whole Dam-Break Flow

#### 3.2. Partial Dam-Break Flow

#### 3.3. Simulation of Dam-Break Flow over a Triangular Step

#### 3.4. Simulation of Flood Discharge of an Arch Dam

#### 3.4.1. Analysis of Flow Patterns

#### 3.4.2. Analysis of Lattice Sensitivity

## 4. Conclusions

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## Appendix A. Parallel Computing of the SPFS-LB Model on a GPU

#### Appendix A.1. Technology of Parallel Computing on a GPU

**Figure A1.**Parallel program of the SPFS-LB model based on Compute Unified Device Architecture (CUDA).

#### Appendix A.2. Analysis of Parallel Computing

Lattice | GPU | CPU | ||
---|---|---|---|---|

128 | 256 | 512 | MLUPS | |

96 × 128 × 48 | 41.19 (33.48) | 51.26 (41.67) | 59.00 (47.96) | 1.23 |

192 × 256 × 96 | 40.92 (33.82) | 52.00 (42.98) | 60.03 (49.61) | 1.21 |

384 × 512 × 192 | 41.31 (33.86) | 52.82 (43.30) | 60.92 (49.93) | 1.22 |

## References

- Heinrich, P. Nonlinear Water Waves Generated by Submarine and Aerial Landslides. J. Waterw. PortCoast. Ocean Eng.
**1992**, 118, 249–266. [Google Scholar] [CrossRef] - Cai, F.; Cheng, Y.G.; Zhang, X.X. Method to guarantee accuracy of 3-D CFD simulation of water level in surge chamber. Wuhan Univ. J. (Eng. Sci. Ed.)
**2016**, 49, 390–396. (In Chinese) [Google Scholar] - Machiels, O.; Pirotton, M.; Pierre, A.; Dewals, B.; Erpicum, S. Experimental parametric study and design of Piano Key Weirs. J. Hydraul. Res.
**2014**, 52, 326–335. [Google Scholar] [CrossRef] - Zhang, X.H.; Long, W.F.; Lei, X.Z.; Zhang, X.W.; Xie, H.P.; Wang, J.P. Numerical simulation of flood inundation processes by 2D shallow water equations. Front. Archit. Civ. Eng. China
**2007**, 1, 107–113. [Google Scholar] [CrossRef] - Pan, J.F.; Feng, M.J.; Zheng, B.M.; Ming, T. Two-dimensional numerical simulation on spur dike circumfluence and local scour hole. J. Sichuan Univ. (Eng. Sci. Ed.)
**2005**, 37, 15–18. (In Chinese) [Google Scholar] - Hieu, P.D.; Katsutoshi, T.; Ca, V.T. Numerical simulation of breaking waves using a two-phase flow model. Appl. Math. Model.
**2004**, 28, 983–1005. [Google Scholar] [CrossRef] - Hirt, C.; Nichols, B. Volume of fluid (VOF) method for the dynamics of free boundaries. J. Comput. Phys.
**1981**, 39, 201–225. [Google Scholar] [CrossRef] - Sussman, M.; Smereka, P.; Osher, S. A Level Set Approach for Computing Solutions to Incompressible Two-Phase Flow. J. Comput. Phys.
**1994**, 114, 146–159. [Google Scholar] [CrossRef] - Shen, J.; Yang, X. A Phase-Field Model and Its Numerical Approximation for Two-Phase Incompressible Flows with Different Densities and Viscosities. Siam J. Sci. Comput.
**2010**, 32, 1159–1179. [Google Scholar] [CrossRef] - Dai, M.; Schmidt, D.P. Adaptive tetrahedral meshing in free-surface flow. J. Comput. Phys.
**2005**, 208, 228–252. [Google Scholar] [CrossRef] - Harlow, F.H.; Welch, J.E. Numerical calculation of time-dependent viscous incompressible flow of fluid with free surface. Phys. Fluids
**1965**, 8, 2182–2189. [Google Scholar] [CrossRef] - Kelly, D.M.; Chen, Q.; Zang, J. PICIN: A Particle-in-Cell Solver for Incompressible Free Surface Flows with Two-Way Fluid-Solid Coupling. Siam J. Sci. Comput.
**2015**, 37, B403–B424. [Google Scholar] [CrossRef] [Green Version] - Thürey, N. A Single-Phase Free-Surface Lattice Boltzmann Method. Master’s Thesis, Friedrich-Alexander-Universität of Erlangen-Nürnberg, Erlangen, Germany, 2003. [Google Scholar]
- Körner, C.; Thies, M.; Hofmann, T.; Thürey, N.; Rüde, U. Lattice Boltzmann Model for Free Surface Flow for Modeling Foaming. J. Stat. Phys.
**2005**, 121, 179–196. [Google Scholar] [CrossRef] - Aidun, C.K.; Clausen, J.R. Lattice-Boltzmann Method for Complex Flows. Annu. Rev. Fluid Mech.
**2010**, 42, 439–472. [Google Scholar] [CrossRef] - Zhang, C.Z.; Cheng, Y.G.; Li, Y.C. Lattice boltzmann model for two-dimensional shallow water flows realizing parallel computing on GPU. J. Hydrodyn. Ser. A
**2011**, 26, 194–200. (In Chinese) [Google Scholar] - Lallemand, P.; Luo, L.-S. Theory of the lattice Boltzmann method: Dispersion, dissipation, isotropy, Galilean invariance, and stability. Phys. Rev. E
**2000**, 61, 6546–6562. [Google Scholar] [CrossRef] [Green Version] - Manfred, K.; Jonas, T.; Luo, L.S. Large eddy simulation with a multiple-relaxation-time LBE model. Int. J. Mod. Phys. B
**2008**, 17, 33–39. [Google Scholar] [CrossRef] - Stoker, J.J.; Lindsay, R.B. Water Waves. Phys. Today
**1958**, 11, 28–30. [Google Scholar] [CrossRef] - Liu, H.; Zhou, J.G.; Burrows, R. Lattice Boltzmann simulations of the transient shallow water flows. Adv. Water Resour.
**2010**, 33, 387–396. [Google Scholar] [CrossRef] - Miller, S.; Chaudhry, M.H. Dam-break Flows in Curved Channel. J. Hydraul. Eng.
**1989**, 115, 1465–1478. [Google Scholar] [CrossRef] - Zhou, J.G.; Causon, D.M.; Mingham, C.G.; Ingram, D.M. Numerical Prediction of Dam-Break Flows in General Geometries with Complex Bed Topography. J. Hydraul. Eng.
**2004**, 130, 332–340. [Google Scholar] [CrossRef] - Tang, B.; Li, J.; Wang, T. Single-phase lattice Boltzmann model for free-surface flow. J. Tsinghua Univ.
**2008**, 48, 2017–2020. (In Chinese) [Google Scholar] - Zhao, X.; Zhang, X.Y.; Zhao, M.D. Hydraulics; China Electric Power Press: Beijing, China, 2009. [Google Scholar]

**Figure 2.**Water surface profile of a 1-D dam-break wave (60 s after dam failure), (

**a**) h = 1.75 m, (

**b**) h = 5 m.

**Figure 10.**Water surface and velocity of flood discharge of an arch dam (reservoir water level: 450 m).

**Table 1.**Comparison of the discharge coefficients between the simulated results and the empirical formula results.

Reservoir Water Level (m) | 445 | 450 | 455 | |
---|---|---|---|---|

Empirical formula results [24] | Side contraction coefficients | 0.958 | 0.929 | 0.889 |

H/H_{d} | 0.307 | 0.820 | 1.332 | |

Discharge coefficients | 0.419 | 0.487 | 0.530 | |

Simulated results | Discharge coefficients | 0.402 | 0.477 | 0.543 |

Relative error (%) | 4.1 | 2.1 | 2.6 |

_{d}refers to the design head, which is taken as 9.76 m according to the design data of the arc dam.

**Table 2.**Relative error between the simulated results and empirical formula results with different lattices.

Lattice | Δx | Discharge Coefficients | Relative Deviation | |
---|---|---|---|---|

Simulated Results | Empirical Formula Results [24] | |||

96 × 128 × 48 | 0.52 m | 0.470 | 0.487 | 3.5% |

192 × 256 × 96 | 0.39 m | 0.475 | 0.487 | 2.4% |

384 × 512 × 192 | 0.26 m | 0.477 | 0.487 | 2.1% |

© 2019 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**

Peng, Y.; Diao, W.; Zhang, X.; Zhang, C.; Yang, S.
Three-Dimensional Numerical Method for Simulating Large-Scale Free Water Surface by Massive Parallel Computing on a GPU. *Water* **2019**, *11*, 2121.
https://doi.org/10.3390/w11102121

**AMA Style**

Peng Y, Diao W, Zhang X, Zhang C, Yang S.
Three-Dimensional Numerical Method for Simulating Large-Scale Free Water Surface by Massive Parallel Computing on a GPU. *Water*. 2019; 11(10):2121.
https://doi.org/10.3390/w11102121

**Chicago/Turabian Style**

Peng, Yongqin, Wei Diao, Xujin Zhang, Chunze Zhang, and Shuqing Yang.
2019. "Three-Dimensional Numerical Method for Simulating Large-Scale Free Water Surface by Massive Parallel Computing on a GPU" *Water* 11, no. 10: 2121.
https://doi.org/10.3390/w11102121