Computer Science ›› 2020, Vol. 47 ›› Issue (1): 17-23.doi: 10.11896/jsjkx.190500009

• Computer Architecture • Previous Articles     Next Articles

Large-scale High-performance Lattice Boltzmann Multi-phase Flow Simulations Based on Python

XU Chuan-fu,WANG Xi,LIU Shu,CHEN Shi-zhao,LIN Yu   

  1. (College of Computer,National University of Defense Technology,Changsha 410073,China)
  • Received:2019-05-05 Published:2020-01-19
  • About author:XU Chuan-fu,born in 1980,Ph.D,associate professor,is member of China Computer Federation(CCF).His main research interests include parallel computing and applications.

Abstract: Due to the plenty of third-party libraries and development productivity,Python is becoming increasingly popular as a programming language in areas such as data science and artificial intelligence.Python has been providing fundamental support for scientific and engineering computing.For example,libraries such as NumPy and SciPy provide efficient data structures for multi-dimensional arrays and rich numerical functions.Traditionally,Python was used as a script language,gluing preprocessors,solvers and postprocessors and enhancing automation in numerical simulations.Recently,some foreign researchers implement their solvers using Python and parallelize their Python codes on high performance computers,with impressive results achieved.Because of its intrinsic features,implementation and optimization of high performance large-scale numerical simulations with Python are quite different with traditional language such as C/C++ and Fortran.This paper presented a large-scale parallel open source 3D Lattice Boltzmann multi-phase flow simulation code PyLBMFlow with Python,and investigated large-scale parallel computing and performance optimization for Python numerical applications.It designed LBM flow data structures and computational kernels with NumPy multi-dimensional arrays and universal functions.Through a range of optimization including reconstruction of boundary processing,it dramatically improves the efficiency of Python computing by about 100X,compared with the baseline version,on a CPU core.Furthermore,this paper designed a 3D decomposition method and implement hybrid MPI+OpenMP parallelization using mpi4py and Cython.Tests for 3D multi-phase(liquid and gases) problem(about 10 Billion lattices) simulating drop impact with gravity effect using D3Q19 Lattice Boltzmann discretization and Shan-Chen BGK single relaxation time collision model were presented,achieving a weak parallel efficiency of above 90% in going from 64 to 1024 compute nodes.

Key words: High performance Python, Lattice Boltzmann method, Multi-phase flow simulation, Parallel computing, Performance optimization

CLC Number: 

  • TP391
[1]ANDERSON J D.Computational Fluid Dynamics[M].McGraw-Hill,1995:1-30.
[2]SUCCI S,BENZI R,HIGUERA F.The lattice Boltzmann equation:A new tool for computational fluid dynamics[J].Physica D:Nonlinear Phenomena,1991,47(1):219-230.
[3]DAWSON S P,CHEN S,DOOLEN G D.Lattice Boltzmann computations for reaction-di_usion equations[J].The Journal of Chemical Physics,1993,98(2):1514-1523.
[4]SHAN X,CHEN H.Lattice Boltzmann model for simulating flows with multiple phases and components[J].Physics Review E,1993,47(3):1815-1819.
[5]ZHAO Y,WANG L,QIU F,et al.Melting and flowing in multiphase environment[J].Computers and Graphics,2006,30(4):519-528.
[6]BOSL W J,DVORKIN J,NUR A.A study of porosity and permeability using a lattice Boltzmann simulation[J].Geophysical Research Letters,1998,25(9):1475-1478.
[7]BAILEY P,MYRE J,WALSH S D,et al.Accelerating lattice Boltzmann fluid flow simulations using graphics processors[C]∥Internation al Conference on Parallel Processing.2009:550-557.
[8]BIFERALE L,MANTOVANI F,PIVANTI M,et al.Optimization of Multi-Phase Compressible Lattice Boltzmann Codes on Massively Parallel Multi-Core Systems[J].Procedia Computer Science,2011,4(4):994-1003.
[9]MOUNTRAKIS L,LORENZ E,MALASPINAS O,et al.Parallel performance of an IB-LBM suspension simulation framework[J].Journal of Computational Science,2015,9:45-50.
[10]WILLIAMS S,CARTER J,OLIKER L,et al.Optimization of a lattice boltzmann computation on state-of-the-art multicore platforms[J].Journal of Parallel and Distributed Computing,2009,69(9):762-777.
[11]PANANILATH I,ACHARYA A,VASISTA V,et al.An optimizing code generator for a class of lattice-boltzmann computations[J].ACM Transactions on Architecture and Code Optimization,2015,12(2):1-14.
[12]FEICHTINGER C,HABICH J,KESTLER H,et al.Perform- ance modeling and analysis of heterogeneous lattice boltzmann simulations on cpu-gpu clusters[J].Parallel Computing,2015,46(C):1-13.
[13]LI D,XU C,WANG Y,et al.Parallelizing and optimizing large-scale 3d multi-phase flow simulations on the tianhe-2 supercomputer[J].Concurrency and Computation:Practice and Expe-rience,2016,28:1678-1692.
[14]NumPy Official. http://www.numpy.org. Scipy Official. http://www.scipy.org.
[16]MORTENSEN M,LANGTANGEN H P.High performance Python for direct numerical simulations of turbulent flows[J].Computer Physics Communications,2016,203:53-65.
[17]VINCENT P,WITHERDENY F,VERMERIRE B,et al.Towards Green Aviation with Python at Petascale∥IEEE International Conference for High Performance Computing and Data analytic.2016:1-11.
[18]LIAO X,XIAO L,YANG C.Milkyway-2 supercomputer:system and application[J].Frontier of Computer Science,2004,8(3):345-356.
[1] CHEN Jun-wu, YU Hua-shan. Strategies for Improving Δ-stepping Algorithm on Scale-free Graphs [J]. Computer Science, 2022, 49(6A): 594-600.
[2] CHEN Xin, LI Fang, DING Hai-xin, SUN Wei-ze, LIU Xin, CHEN De-xun, YE Yue-jin, HE Xiang. Parallel Optimization Method of Unstructured-grid Computing in CFD for DomesticHeterogeneous Many-core Architecture [J]. Computer Science, 2022, 49(6): 99-107.
[3] CHEN Le, GAO Ling, REN Jie, DANG Xin, WANG Yi-hao, CAO Rui, ZHENG Jie, WANG Hai. Adaptive Bitrate Streaming for Energy-Efficiency Mobile Augmented Reality [J]. Computer Science, 2022, 49(1): 194-203.
[4] FU Tian-hao, TIAN Hong-yun, JIN Yu-yang, YANG Zhang, ZHAI Ji-dong, WU Lin-ping, XU Xiao-wen. Performance Skeleton Analysis Method Towards Component-based Parallel Applications [J]. Computer Science, 2021, 48(6): 1-9.
[5] HE Ya-ru, PANG Jian-min, XU Jin-long, ZHU Yu, TAO Xiao-han. Implementation and Optimization of Floyd Parallel Algorithm Based on Sunway Platform [J]. Computer Science, 2021, 48(6): 34-40.
[6] LI Fan, YAN Xing, ZHANG Xiao-yu. Optimization of GPU-based Eigenface Algorithm [J]. Computer Science, 2021, 48(4): 197-204.
[7] E Hai-hong, ZHANG Tian-yu, SONG Mei-na. Web-based Data Visualization Chart Rendering Optimization Method [J]. Computer Science, 2021, 48(3): 119-123.
[8] ZHANG Xiao, ZHANG Si-meng, SHI Jia, DONG Cong, LI Zhan-huai. Review on Performance Optimization of Ceph Distributed Storage System [J]. Computer Science, 2021, 48(2): 1-12.
[9] HU Rong, YANG Wang-dong, WANG Hao-tian, LUO Hui-zhang, LI Ken-li. Parallel WMD Algorithm Based on GPU Acceleration [J]. Computer Science, 2021, 48(12): 24-28.
[10] MA Meng-yu, WU Ye, CHEN Luo, WU Jiang-jiang, LI Jun, JING Ning. Display-oriented Data Visualization Technique for Large-scale Geographic Vector Data [J]. Computer Science, 2020, 47(9): 117-122.
[11] CHEN Guo-liang, ZHANG Yu-jie, . Development of Parallel Computing Subject [J]. Computer Science, 2020, 47(8): 1-4.
[12] YANG Wang-dong, WANG Hao-tian, ZHANG Yu-feng, LIN Sheng-le, CAI Qin-yun. Survey of Heterogeneous Hybrid Parallel Computing [J]. Computer Science, 2020, 47(8): 5-16.
[13] XU Jiang-feng and TAN Yu-long. Research on HBase Configuration Parameter Optimization Based on Machine Learning [J]. Computer Science, 2020, 47(6A): 474-479.
[14] LV Xiao-jing, LIU Zhao, CHU Xue-sen, SHI Shu-peng, MENG Hong-song, HUANG Zhen-chun. Extreme-scale Simulation Based LBM Computing Fluid Dynamics Simulations [J]. Computer Science, 2020, 47(4): 13-17.
[15] YANG Zong-lin, LI Tian-rui, LIU Sheng-jiu, YIN Cheng-feng, JIA Zhen, ZHU Jie. Streaming Parallel Text Proofreading Based on Spark Streaming [J]. Computer Science, 2020, 47(4): 36-41.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!