Depth-Averaged Non-Hydrostatic Hydrodynamic Model Using a New Multithreading Parallel Computing Method
Abstract
:1. Introduction
2. Mathematical Model
2.1. Governing Equations
2.2. Initial Condition and Boundary Condition
3. Numerical Solution
4. Parallel Computing Method
4.1. Parallelization Analysis
4.2. Domain Decomposition and Virtual Grid Technique
4.3. Step-Wise Parallel Computing Method Procedure
- (1)
- The main thread creates two sub-threads: Thread A and thread B. Both threads are responsible for the computation of Subdomain A and Subdomain B, respectively.
- (2)
- (3)
- All variables in the subdomains are initialized after each time step begins. The virtual grids are assigned by reading the containers. Take Thread A as an example, where the assignment of virtual grid A(N’) of Subdomain A1 is achieved by reading box 2. Subdomain A2, A3, etc. are processed in a similar way.
- (4)
- Each sub-thread executes the serial program module (Figure 2) to calculate all the results of the real grids in each subdomain.
- (5)
- The calculated results of the boundary grids are written to the corresponding containers. Again, take Thread A as an example: The calculated results of A(N) of Subdomain A1 are written to box 1, thus providing data support to Thread B for the next time step’s computation. Subdomain A2, A3, etc. are processed in a similar way.
- (6)
- Finally, the current computational results are saved and Steps 3–5 are repeated to start the next time step’s computation. The process repeats until all the velocity and water level at each time step in the whole domain have been obtained.
4.4. Key Techniques and Program Codes
5. Model Verification
5.1. Solitary Wave Propagation over a Constant Water Depth Channel
5.2. Madsen’s Solitary Wave Experiment
5.3. Beji’s Sinusoidal Wave Experiment
5.4. Nadaoka’s Sinusoidal Wave Experiment
5.5. Computing Efficiency Analysis
6. Conclusions
Acknowledgments
Author Contributions
Conflicts of Interest
References
- Beji, S.; Battjes, J.A. Experimental investigation of wave propagation over a bar. Coast. Eng. 1993, 19, 151–162. [Google Scholar] [CrossRef]
- Chang, K.A.; Hsu, T.J.; Liu, P.L.F. Vortex generation and evolution in water waves propagating over a submerged rectangular obstacle Part I. Solitary waves. Coast. Eng. 2001, 44, 13–36. [Google Scholar] [CrossRef]
- Blenkinsopp, C.E.; Chaplin, J.R. The effect of crest submergence on wave breaking over submerged slopes. Coast. Eng. 2008, 55, 967–974. [Google Scholar] [CrossRef]
- Peregrine, D.H. Long waves on a beach. J. Fluid Mech. 1967, 27, 815–827. [Google Scholar] [CrossRef]
- Beji, S.; Battjes, J.A. Numerical simulation of nonlinear wave propagation over a bar. Coast. Eng. 1994, 23, 1–16. [Google Scholar] [CrossRef]
- Casulli, V.; Stelling, G. Numerical simulation of 3D quasi-hydrostatic, free-surface flows. J. Hydraul. Eng. 1998, 124, 678–686. [Google Scholar] [CrossRef]
- Zhou, J.G.; Stansby, P.K. An arbitrary Lagrangian-Eulerian σ (ALES) model with non-hydrostatic pressure for shallow water flow. Comput. Method Appl. Mech. Eng. 1998, 178, 199–214. [Google Scholar] [CrossRef]
- Stelling, G.; Zijlema, M. An accurate and efficient finite-difference algorithm for non-hydrostatic free-surface flow with application to wave propagation. Int. J. Numer. Meth. Fluids 2003, 43, 1–23. [Google Scholar] [CrossRef]
- Bai, Y.F.; Cheung, K.F. Depth-integrated free-surface flow with a two-layer non-hydrostatic formulation. Int. J. Numer. Meth. Fluids 2012, 69, 411–429. [Google Scholar] [CrossRef]
- Bai, Y.F.; Cheung, K.F. Depth-integrated free-surface flow with parameterized non-hydrostatic pressure. Int. J. Numer. Meth. Fluids 2013, 71, 403–421. [Google Scholar] [CrossRef]
- Yuan, H.; Wu, C.H. A two-dimensional vertical non-hydrostatic σ model with an implicit method for free-surface flows. Int. J. Numer. Meth. Fluids 2004, 44, 811–835. [Google Scholar] [CrossRef]
- Yuan, H.; Wu, C.H. An implicit three-dimensional fully non-hydrostatic model for free-surface flows. Int. J. Numer. Meth. Fluids 2004, 46, 709–733. [Google Scholar] [CrossRef]
- Namin, M.M.; Lin, B.; Falconer, R.A. An implicit numerical algorithm for solving non-hydrostatic free-surface flow problems. Int. J. Numer. Meth. Fluids 2001, 35, 341–356. [Google Scholar] [CrossRef]
- Guo, C.; Chen, X.; Vlasenko, V.; Stashchuk, N. Numerical investigation of internal solitary waves from the Luzon Strait: Generation process, mechanism and three-dimensional effects. Ocean Model. 2011, 38, 203–216. [Google Scholar] [CrossRef]
- Shen, C.Y.; Evans, T.E.; Oba, R.M.; Finette, S. Three-dimensional hindcast simulation of internal soliton propagation in the Asian Seas International Acoustics Experiment area. J. Geophys. Res. 2009, 114, C01014. [Google Scholar] [CrossRef]
- Yuan, H.; Wu, C.H. Fully nonhydrostatic modeling of surface waves. J. Eng. Mech. 2006, 132, 447–456. [Google Scholar] [CrossRef]
- Bai, Y.; Cheung, K.F. Dispersion and nonlinearity of multi-layer non-hydrostatic free-surface flow. J. Fluid Mech. 2013, 726, 226–260. [Google Scholar] [CrossRef]
- Young, C.C.; Wu, C.H.; Liu, W.C.; Kuo, J.T. A higher-order non-hydrostatic σ model for simulating non-linear refraction–diffraction of water waves. Coast. Eng. 2009, 56, 919–930. [Google Scholar] [CrossRef]
- Stelling, G.; Busnelli, M. Numerical simulation of the vertical structure of discontinuous flows. Int. J. Numer. Meth. Fluids 2001, 37, 23–43. [Google Scholar] [CrossRef]
- Guo, X.; Kang, L.; Jiang, T. A new depth-integrated non-hydrostatic model for free surface flows. Sci. China Technol. Sci. 2013, 56, 824–830. [Google Scholar] [CrossRef]
- Jankowski, J.A. Parallel implementation of a non-hydrostatic model for free surface flows with semi-Lagrangian advection treatment. Int. J. Numer. Meth. Fluids 2009, 59, 1157–1179. [Google Scholar] [CrossRef]
- Hérault, A.; Bilotta, G.; Dalrymple, R.A. SPH on GPU with CUDA. J. Hydraul. Res. 2010, 48, 74–79. [Google Scholar] [CrossRef]
- Bleichrodt, F.; Bisseling, R.H.; Dijkstra, H.A. Accelerating a barotropic ocean model using a GPU. Ocean Model. 2012, 41, 16–21. [Google Scholar] [CrossRef]
- Nesterov, O. A simple parallelization technique with MPI for ocean circulation models. J. Parallel Distrib. Comput. 2010, 70, 35–44. [Google Scholar] [CrossRef]
- Zijlema, M.; Stelling, G.; Smit, P. SWASH: An operational public domain code for simulating wave fields and rapidly varied flows in coastal waters. Coast. Eng. 2011, 58, 992–1012. [Google Scholar] [CrossRef]
- Keulegan, G.H.; Patterson, G.W. Mathematical theory of irrotional translation waves. J. Res. Natl. Bur. Stand. 1940, 24, 47–101. [Google Scholar] [CrossRef]
- Orlanski, I. Simple boundary-condition for unbounded hyperbolic flows. J. Comput. Phys. 1976, 21, 251–269. [Google Scholar] [CrossRef]
- Keller, H.B. A new difference scheme for parabolic problems. In Numerical Solutions of Partial Differential Equations II; Hubbard, B., Ed.; Academic Press: New York, NY, USA, 1971; pp. 327–350. [Google Scholar]
- Yamazaki, Y.; Kowalik, Z.; Cheung, K.F. Depth-integrated, non-hydrostatic model for wave breaking and run-up. Int. J. Numer. Meth. Fluids 2009, 61, 473–497. [Google Scholar] [CrossRef]
- Yorsef, S. Iterative Methods for Sparse Linear Systems, 2nd ed.; SIAM Publications: Philadelphia, PA, USA, 2003. [Google Scholar]
- Madsen, O.S.; Mei, C.C. The transformation of a solitary wave over uneven bottom. J. Fluid Mech. 1969, 39, 781–791. [Google Scholar] [CrossRef]
- Nadaoka, K.; Beji, S.; Nakagawa, Y. A fully-dispersive nonlinear wave model and its numerical solutions. In Proceedings of the International Conference on Coastal Engineering, Kobe, Japan, 23–28 October 1994; pp. 427–441.
- Guo, X.; Kang, L. Depth-integrated, non-hydrostatic model using a new alternating direction implicit scheme. J. Hydraul. Res. 2013, 51, 368–379. [Google Scholar]
- Zijlema, M.; Stelling, G.S. Further experiences with computing non-hydrostatic free-surface flows involving water waves. Int. J. Numer. Meth. Fluids 2005, 48, 169–197. [Google Scholar] [CrossRef]
Test | Time Step (s) | Space Step (m) | Time of Serial Computing (s) | Time of Parallel Computing (s) | 1 Increase Rate of Efficiency (%) |
---|---|---|---|---|---|
5.1 | Δt = 0.005 | Δx = 1 | 1.37 | 0.85 | 0.38 |
Δx = 2 | 0.72 | 0.43 | 0.39 | ||
Δx = 4 | 0.31 | 0.22 | 0.28 | ||
5.2 | Δt = 0.001 | Δx = 0.025 | 5.42 | 3.72 | 0.31 |
Δx = 0.05 | 2.75 | 1.81 | 0.34 | ||
Δx = 0.1 | 1.37 | 0.89 | 0.35 | ||
5.3 | Δt = 0.005 | Δx = 0.025 | 80.12 | 62.36 | 0.22 |
Δx = 0.05 | 40.53 | 31.09 | 0.23 | ||
Δx = 0.1 | 22.89 | 15.64 | 0.32 | ||
5.4 | Δt = 0.01 | Δx = 0.05 | 9.25 | 6.87 | 0.26 |
Δx = 0.1 | 4.75 | 3.47 | 0.27 | ||
Δx = 0.2 | 2.37 | 1.69 | 0.29 |
Model | Number of Computational Cores | Average CPU Time per Time Step per Grid (μs) |
---|---|---|
The proposed model | 2 | 0.73 |
SWASH | 2 | 0.78 |
Guo’s model | 1 | 1.68 |
Zijlema’s model | 1 | 15 |
© 2017 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
Kang, L.; Jing, Z. Depth-Averaged Non-Hydrostatic Hydrodynamic Model Using a New Multithreading Parallel Computing Method. Water 2017, 9, 184. https://doi.org/10.3390/w9030184
Kang L, Jing Z. Depth-Averaged Non-Hydrostatic Hydrodynamic Model Using a New Multithreading Parallel Computing Method. Water. 2017; 9(3):184. https://doi.org/10.3390/w9030184
Chicago/Turabian StyleKang, Ling, and Zheng Jing. 2017. "Depth-Averaged Non-Hydrostatic Hydrodynamic Model Using a New Multithreading Parallel Computing Method" Water 9, no. 3: 184. https://doi.org/10.3390/w9030184
APA StyleKang, L., & Jing, Z. (2017). Depth-Averaged Non-Hydrostatic Hydrodynamic Model Using a New Multithreading Parallel Computing Method. Water, 9(3), 184. https://doi.org/10.3390/w9030184