Parallel Scheme for Multi-Layer Refinement Non-Uniform Grid Lattice Boltzmann Method Based on Load Balancing
Abstract
:1. Introduction
2. Multilayer Grid Lattice Boltzmann Method
2.1. LBM
2.1.1. Governing Equation
2.1.2. Boundary Conditions
- (a)
- Straight boundary.
- (b)
- Curved boundary.
2.2. Local Grid-Refinement Method
3. Parallel Strategy and Algorithm
3.1. Meshing Strategy Based on Load Balancing
Algorithm 1 Multi-layer grid-meshing algorithm based on load balancing |
Input: computational grid (number of grid layers: N, each layer of grid is denoted as k); number of processes set in parallel environment np; |
Output: result of computational domain’s meshing; |
|
3.2. Multi-Layer Grid LBM Parallel Algorithm
- Data partitioning: Try to consider the load-balancing grid partitioning methods to achieve the goal of the balanced use of storage space and fewer communications between processors. Decompose the entire computational domain into several computational sub-domains with as regular shapes as possible and map the boundary conditions and initial conditions of each sub-domain to each computing node in the parallel environment.
- Separate calculation: For the node to which each computing area belongs, calculate the flow and collision substeps of fluid particles on the grids inside the region, and calculate the macroscopic physical quantity.
- Optimize communication: Each computing node conducts data exchange and information transfer on the intersection boundary with its neighboring nodes through certain coupling rules to organize parallel computing and maximize the computing communication ratio.
- Global operation: Combine the local results of each processor to achieve the final solution of the entire original problem.
Algorithm 2 Multi-layer grid LBM parallel algorithm based on MPI |
Input: computational grid (number of grid layers: N, Each layer of grid is denoted as k); Initial information of the flow field (density, speed, pressure, Reynolds number, etc.); Output: flow field calculation results;
|
4. Numerical Simulations
4.1. Flow Past an Elliptical Cylinder in Two-Dimensional
4.2. Flow Past a Sphere in Three-Dimensional
5. Performance Evaluation
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Boon, J.P. The lattice boltzmann equation for fluid dynamics and beyond. Eur. J. Mech. B Fluids 2003, 22, 101. [Google Scholar] [CrossRef]
- Yu, D. Viscous Flow Computations with the Lattice-Boltzmann Equation Method. Ph.D. Thesis, University of Florida, Gainesville, FL, USA, 2002; p. 4260. [Google Scholar]
- Chen, S.; Chen, H.; Martnez, D.; Matthaeus, W. Lattice Boltzmann model for simulation of magnetohydrodynamics. Phys. Rev. Lett. 1991, 67, 3776. [Google Scholar] [CrossRef] [PubMed]
- Qian, Y.H.; d’Humières, D.; Lallemand, P. Lattice BGK models for Navier-Stokes equation. Europhys. Lett. 1992, 17, 479. [Google Scholar] [CrossRef]
- d’Humières, D. Generalized lattice-Boltzmann equations, rarefied gas dynamics. Prog. Aeronaut. Astronaut. 1992, 159, 450–458. [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. [Google Scholar] [CrossRef] [Green Version]
- Agarwal, A.; Gupta, S.; Prakash, A. A comparative study of three-dimensional discrete velocity set in LBM for turbulent flow over bluff body. J. Braz. Soc. Mech. Sci. Eng. 2021, 43, 39. [Google Scholar] [CrossRef]
- Wellein, G.; Zeiser, T.; Hager, G.; Donath, S. On the single processor performance of simple lattice Boltzmann kernels. Comput. Fluids 2006, 35, 910–919. [Google Scholar] [CrossRef]
- Körner, C.; Pohl, T.; Rüde, U.; Thürey, N.; Zeiser, T. Parallel lattice Boltzmann methods for CFD applications. In Numerical Solution of Partial Differential Equations on Parallel Computers; Springer: Berlin/Heidelberg, Germany, 2006; pp. 439–466. [Google Scholar]
- Guo, W.; Jin, C.; Li, J. High performance lattice Boltzmann algorithms for fluid flows. In Proceedings of the 2008 International Symposium on Information Science and Engineering, Shanghai, China, 20–22 December 2008; Institute of Electrical and Electronics Engineers: Piscataway, NJ, USA, 2008; Volume 1, pp. 33–37. [Google Scholar]
- Liu, G.; Zhang, J.; Zhang, Q. A high-performance three-dimensional lattice Boltzmann solver for water waves with free surface capturing. Coast. Eng. 2021, 165, 103865. [Google Scholar] [CrossRef]
- Williams, S.; Carter, J.; Oliker, L.; Shalf, J.; Yelick, K. Lattice Boltzmann simulation optimization on leading multicore platforms. In Proceedings of the 2008 IEEE International Symposium on Parallel and Distributed Processing, Miami, FL, USA, 14–18 April 2008; Institute of Electrical and Electronics Engineers: Piscataway, NJ, USA, 2008; pp. 1–14. [Google Scholar]
- Lacoursière, C. A parallel block iterative method for interactive contacting rigid multibody simulations on multicore PCs. In International Workshop on Applied Parallel Computing; Springer: Berlin/Heidelberg, Germany, 2006; pp. 956–965. [Google Scholar]
- Donath, S.; Iglberger, K.; Wellein, G.; Zeiser, T.; Nitsure, A.; Rude, U. Performance comparison of different parallel lattice Boltzmann implementations on multi-core multi-socket systems. Int. J. Comput. Sci. Eng. 2008, 4, 3–11. [Google Scholar] [CrossRef]
- Ma, H.; Zhao, Y. An approach to distribute the marker points on non-spherical particle/boundary surface within the IBM-LBM framework. Eng. Anal. Bound. Elem. 2019, 108, 254–266. [Google Scholar] [CrossRef]
- Asmuth, H.; Olivares-Espinosa, H.; Nilsson, K.; Ivanell, S. The actuator line model in lattice Boltzmann frameworks: Numerical sensitivity and computational performance. J. Phys. Conf. Ser. 2019, 1256, 012022. [Google Scholar] [CrossRef]
- Ye, H.; Shen, Z.; Xian, W.; Zhang, T.; Tang, S.; Li, Y. OpenFSI: A highly efficient and portable fluid–structure simulation package based on immersed-boundary method. Comput. Phys. Commun. 2020, 256, 107463. [Google Scholar] [CrossRef]
- Filippova, O.; Hänel, D. Grid refinement for lattice-BGK models. J. Comput. Phys. 1998, 147, 219–228. [Google Scholar] [CrossRef]
- Maeyama, H.; Imamura, T.; Osaka, J.; Kurimoto, N. Unsteady aerodynamic simulations by the lattice Boltzmann method with near-wall modeling on hierarchical Cartesian grids. Comput. Fluids 2022, 233, 105249. [Google Scholar] [CrossRef]
- Lin, C.L.; Lai, Y.G. Lattice Boltzmann method on composite grids. Phys. Rev. E 2000, 62, 2219. [Google Scholar] [CrossRef] [PubMed]
- Dupuis, A.; Chopard, B. Theory and applications of an alternative lattice Boltzmann grid refinement algorithm. Phys. Rev. E 2003, 67, 066707. [Google Scholar] [CrossRef]
- Ezzatneshan, E. Study of unsteady separated fluid flows using a multi-block lattice Boltzmann method. Aircr. Eng. Aerosp. Technol. 2020, 93, 139–149. [Google Scholar] [CrossRef]
- Hsu, F.S.; Chang, K.C.; Smith, M. Multi-block adaptive mesh refinement (AMR) for a lattice Boltzmann solver using GPUs. Comput. Fluids 2018, 175, 48–52. [Google Scholar] [CrossRef]
- Jiao, H.; Wu, G.X. Effect of Reynolds number on amplitude branches of vortex-induced vibration of a cylinder. J. Fluids Struct. 2021, 105, 103323. [Google Scholar] [CrossRef]
- Guzik, S.M.; Weisgraber, T.H.; Colella, P.; Alder, B.J. Interpolation methods and the accuracy of lattice-Boltzmann mesh refinement. J. Comput. Phys. 2014, 259, 461–487. [Google Scholar] [CrossRef]
- Hasert, M.; Masilamani, K.; Zimny, S.; Klimach, H.; Qi, J.; Bernsdorf, J.; Roller, S. Complex fluid simulations with the parallel tree-based lattice Boltzmann solver Musubi. J. Comput. Sci. 2014, 5, 784–794. [Google Scholar] [CrossRef]
- Neumann, P.; Neckel, T. A dynamic mesh refinement technique for Lattice Boltzmann simulations on octree-like grids. Comput. Mech. 2013, 51, 237–253. [Google Scholar] [CrossRef]
- Schornbaum, F.; Rude, U. Massively parallel algorithms for the lattice Boltzmann method on nonuniform grids. SIAM J. Sci. Comput. 2016, 38, C96–C126. [Google Scholar] [CrossRef]
- Kotsalos, C.; Latt, J.; Chopard, B. Palabos-npFEM: Software for the simulation of cellular blood flow (digital blood). arXiv 2020, arXiv:2011.04332. [Google Scholar]
- Krause, M.J.; Kummerländer, A.; Avis, S.J.; Kusumaatmaja, H.; Dapelo, D.; Klemens, F.; Gaedtke, M.; Hafen, N.; Mink, A.; Trunk, R.; et al. OpenLB—Open source lattice Boltzmann code. Comput. Math. Appl. 2021, 81, 258–288. [Google Scholar] [CrossRef]
- Schmieschek, S.; Shamardin, L.; Frijters, S.; Krüger, T.; Schiller, U.D.; Harting, J.; Coveney, P.V. LB3D: A parallel implementation of the Lattice-Boltzmann method for simulation of interacting amphiphilic fluids. Comput. Phys. Commun. 2017, 217, 149–161. [Google Scholar] [CrossRef]
- Patronis, A.; Richardson, R.A.; Schmieschek, S.; Wylie, B.J.; Nash, R.W.; Coveney, P.V. Modeling patient-specific magnetic drug targeting within the intracranial vasculature. Front. Physiol. 2018, 9, 331. [Google Scholar] [CrossRef]
- Vardhan, M.; Gounley, J.; Hegele, L.; Draeger, E.W.; Randles, A. Moment representation in the lattice Boltzmann method on massively parallel hardware. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, Denver, CO, USA, 17–19 November 2019; pp. 1–21. [Google Scholar]
- Jäger, S.; Ludwig, A. Efficient model for the prediction of dendritic grain growth using the lattice Boltzmann method coupled with a cellular automaton algorithm. IOP Conf. Ser. Mater. Sci. Eng. 2019, 529, 012028. [Google Scholar] [CrossRef]
- Sharma, K.V.; Straka, R.; Tavares, F.W. Current status of Lattice Boltzmann Methods applied to aerodynamic, aeroacoustic, and thermal flows. Prog. Aerosp. Sci. 2020, 115, 100616. [Google Scholar] [CrossRef]
- Sridhar, V.; Ramesh, K.; Gnaneswara Reddy, M.; Azese, M.N.; Abdelsalam, S.I. On the entropy optimization of hemodynamic peristaltic pumping of a nanofluid with geometry effects. Waves Random Complex Media 2022, 1–21. [Google Scholar] [CrossRef]
- Alsharif, A.M.; Abdellateef, A.I.; Elmaboud, Y.A.; Abdelsalam, S.I. Performance enhancement of a DC-operated micropump with electroosmosis in a hybrid nanofluid: Fractional Cattaneo heat flux problem. Appl. Math. Mech. 2022, 43, 931–944. [Google Scholar] [CrossRef]
- Thumma, T.; Mishra, S.R.; Abbas, M.A.; Bhatti, M.M.; Abdelsalam, S.I. Three-dimensional nanofluid stirring with non-uniform heat source/sink through an elongated sheet. Appl. Math. Comput. 2022, 421, 126927. [Google Scholar] [CrossRef]
- Liu, Z.; Chen, R.; Xu, L. Parallel unstructured finite volume lattice Boltzmann method for high-speed viscid compressible flows. Int. J. Mod. Phys. C 2022, 33, 2250066. [Google Scholar] [CrossRef]
- Yu, D.; Mei, R.; Luo, L.S.; Shyy, W. Viscous flow computations with the method of lattice Boltzmann equation. Prog. Aerosp. Sci. 2003, 39, 329–367. [Google Scholar] [CrossRef]
- Ma, Y.; Wang, Y.; Xie, M. Multiblock adaptive mesh refinement for the SN transport equation based on lattice Boltzmann method. Nucl. Sci. Eng. 2019, 193, 1219–1237. [Google Scholar] [CrossRef]
- Perumal, D.A.; Dass, A.K. Multiplicity of steady solutions in two-dimensional lid-driven cavity flows by lattice Boltzmann method. Comput. Math. Appl. 2011, 61, 3711–3721. [Google Scholar] [CrossRef] [Green Version]
- Guo, K.; Cui, X.; Liu, M. A coupled lattice Boltzmann-Volume penalization for flows past fixed solid obstacles with local mesh refinement. Math. Probl. Eng. 2018, 2018, 6732082. [Google Scholar] [CrossRef] [Green Version]
- McNamara, G.R.; Zanetti, G. Use of the Boltzmann equation to simulate lattice-gas automata. Phys. Rev. Lett. 1988, 61, 2332. [Google Scholar] [CrossRef]
- Guo, Z.; Zheng, C.; Shi, B. An extrapolation method for boundary conditions in lattice Boltzmann method. Phys. Fluids 2002, 14, 2007–2010. [Google Scholar] [CrossRef]
- Bouzidi, M.H.; Firdaouss, M.; Lallemand, P. Momentum transfer of a Boltzmann-lattice fluid with boundaries. Phys. Fluids 2001, 13, 3452–3459. [Google Scholar] [CrossRef]
- Lallemand, P.; Luo, L.S. Lattice Boltzmann method for moving boundaries. J. Comput. Phys. 2003, 184, 406–421. [Google Scholar] [CrossRef]
- Yu, D.; Mei, R.; Shyy, W. A unified boundary treatment in lattice boltzmann method. In Proceedings of the 41st Aerospace Sciences Meeting and Exhibit, Reno, NV, USA, 6–9 January 2003. [Google Scholar]
- Fakhari, A.; Lee, T. Numerics of the lattice Boltzmann method on nonuniform grids: Standard LBM and finite-difference LBM. Comput. Fluids 2015, 107, 205–213. [Google Scholar] [CrossRef]
- Zhang, Y.; Xie, J.; Li, X.; Ma, Z.; Zou, J.; Zheng, Y. A multi-block adaptive solving technique based on lattice Boltzmann method. Mod. Phys. Lett. B 2018, 32, 1840052. [Google Scholar] [CrossRef]
- Schönherr, M.; Kucher, K.; Geier, M.; Stiebler, M.; Freudiger, S.; Krafczyk, M. Multi-thread implementations of the lattice Boltzmann method on non-uniform grids for CPUs and GPUs. Comput. Math. Appl. 2011, 61, 3730–3743. [Google Scholar] [CrossRef] [Green Version]
- Perumal, D.A.; Kumar, G.V.; Dass, A.K. Lattice Boltzmann simulation of viscous flow past elliptical cylinder. CFD Lett. 2012, 4, 127–139. [Google Scholar]
- Gilmanov, A.; Sotiropoulos, F.; Balaras, E. A general reconstruction algorithm for simulating flows with complex 3D immersed boundaries on Cartesian grids. J. Comput. Phys. 2003, 191, 660–669. [Google Scholar] [CrossRef]
- Xu, L.; Li, J.; Chen, R. A scalable parallel unstructured finite volume lattice Boltzmann method for three-dimensional incompressible flow simulations. Int. J. Numer. Methods Fluids 2021, 93, 2744–2762. [Google Scholar] [CrossRef]
Re | 3 | 30 | 50 | 60 |
---|---|---|---|---|
Present work | 0 | 0.348 | 0.665 | 0.896 |
D. Arumuga Perumal’s work [49] | 0 | 0.344 | 0.678 | 0.875 |
Re | 100 | 150 |
---|---|---|
Present work (Cd) | 1.944 | 1.721 |
D. Arumuga Perumal’s work (Cd) [52] | 1.942 | 1.725 |
Threads | |||||
---|---|---|---|---|---|
1 | 52.383 | 41.220 | 14.257 | 14.791 | 96.39% |
2 | 101.112 | 81.766 | 27.813 | 29.112 | 95.54% |
4 | 180.832 | 156.617 | 47.740 | 54.645 | 87.36% |
8 | 340.136 | 261.097 | 80.835 | 94.340 | 85.68% |
16 | 606.061 | 458.716 | 128.051 | 166.389 | 76.96% |
Number of Grids | Threads | Times (s) | Weak Scalability |
---|---|---|---|
500,156 | 1 | 66.73 | 100% |
2,000,642 | 4 | 68.03 | 98.08% |
8,002,496 | 16 | 75.06 | 88.90% |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Liu, Z.; Ruan, J.; Song, W.; Zhou, L.; Guo, W.; Xu, J. Parallel Scheme for Multi-Layer Refinement Non-Uniform Grid Lattice Boltzmann Method Based on Load Balancing. Energies 2022, 15, 7884. https://doi.org/10.3390/en15217884
Liu Z, Ruan J, Song W, Zhou L, Guo W, Xu J. Parallel Scheme for Multi-Layer Refinement Non-Uniform Grid Lattice Boltzmann Method Based on Load Balancing. Energies. 2022; 15(21):7884. https://doi.org/10.3390/en15217884
Chicago/Turabian StyleLiu, Zhixiang, Jun Ruan, Wei Song, Liping Zhou, Weiqi Guo, and Jingxiang Xu. 2022. "Parallel Scheme for Multi-Layer Refinement Non-Uniform Grid Lattice Boltzmann Method Based on Load Balancing" Energies 15, no. 21: 7884. https://doi.org/10.3390/en15217884
APA StyleLiu, Z., Ruan, J., Song, W., Zhou, L., Guo, W., & Xu, J. (2022). Parallel Scheme for Multi-Layer Refinement Non-Uniform Grid Lattice Boltzmann Method Based on Load Balancing. Energies, 15(21), 7884. https://doi.org/10.3390/en15217884