High performance Python']Python for direct numerical simulations of turbulent flows

被引:31
|
作者
Mortensen, Mikael [1 ]
Langtangen, Hans Petter
机构
[1] Univ Oslo, Moltke Moes Vei 35, N-0851 Oslo, Norway
关键词
CFD; !text type='Python']Python[!/text; Cython; DNS; Slab; Pencil; FFT; MPI;
D O I
10.1016/j.cpc.2016.02.005
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
Direct Numerical Simulations (DNS) of the Navier Stokes equations is an invaluable research tool in fluid dynamics. Still, there are few publicly available research codes and, due to the heavy number crunching implied, available codes are usually written in low-level languages such as C/C++ or Fortran. In this paper we describe a pure scientific Python pseudo-spectral DNS code that nearly matches the performance of C++ for thousands of processors and billions of unknowns. We also describe a version optimized through Cython, that is found to match the speed of C++. The solvers are written from scratch in Python, both the mesh, the MPI domain decomposition, and the temporal integrators. The solvers have been verified and benchmarked on the Shaheen supercomputer at the KAUST supercomputing laboratory, and we are able to show very good scaling up to several thousand cores. A very important part of the implementation is the mesh decomposition (we implement both slab and pencil decompositions) and 3D parallel Fast Fourier Transforms (FFT). The mesh decomposition and FFT routines have been implemented in Python using serial FFT routines (either NumPy, pyFFTW or any other serial FFT module), NumPy array manipulations and with MPI communications handled by MPI for Python (mpi4py). We show how we are able to execute a 3D parallel FFT in Python for a slab mesh decomposition using 4 lines of compact Python code, for which the parallel performance on Shaheen is found to be slightly better than similar routines provided through the FFTW library. For a pencil mesh decomposition 7 lines of code is required to execute a transform. (C) 2016 Elsevier B.V. All rights reserved.
引用
收藏
页码:53 / 65
页数:13
相关论文
共 50 条
  • [21] Eddylicious: A Python']Python package for turbulent inflow generation
    Mukha, Timofey
    Liefvendahl, Mattias
    [J]. SOFTWAREX, 2018, 7 : 112 - 114
  • [22] Direct numerical simulations of parallel/series reactions in turbulent flows
    Jaberi, FA
    James, S
    Mashayek, F
    [J]. CHEMICAL ENGINEERING COMMUNICATIONS, 1999, 173 : 215 - 244
  • [23] Direct numerical simulations of temporally decelerating turbulent pipe flows
    Young Mo Lee
    Wongwan Jung
    Jae Hwa Lee
    Jooha Kim
    [J]. Journal of Mechanical Science and Technology, 2018, 32 : 3713 - 3726
  • [24] Direct numerical simulations of temporally decelerating turbulent pipe flows
    Lee, Young Mo
    Jung, Wongwan
    Lee, Jae Hwa
    Kim, Jooha
    [J]. JOURNAL OF MECHANICAL SCIENCE AND TECHNOLOGY, 2018, 32 (08) : 3713 - 3726
  • [25] Direct numerical simulations of turbulent flows over superhydrophobic surfaces
    Martell, Michael B.
    Perot, J. Blair
    Rothstein, Jonathan P.
    [J]. JOURNAL OF FLUID MECHANICS, 2009, 620 : 31 - 41
  • [26] Numerical python
    Dubois, Paul F.
    Hinsen, Konrad
    Hugunin, James
    [J]. 1996, (10):
  • [27] Matched regulation of gastrointestinal performance in the Burmese python']python, Python']Python molurus
    Cox, Christian L.
    Secor, Stephen M.
    [J]. JOURNAL OF EXPERIMENTAL BIOLOGY, 2008, 211 (07): : 1131 - 1140
  • [28] TFInterpy: A high-performance spatial interpolation Python']Python package
    Chen, Zhiwen
    Zhong, Baorong
    [J]. SOFTWAREX, 2022, 20
  • [29] Parallelization of the Hierarchical Search in Python']Python for High Performance Embedded Systems
    Panagiotis, Radoglou Grammatikis
    Evdoxia, Manganopoulou
    Minas, Dasygenis
    [J]. 2016 5TH INTERNATIONAL CONFERENCE ON MODERN CIRCUITS AND SYSTEMS TECHNOLOGIES (MOCAST), 2016,
  • [30] Toolbox of image processing for numerical python']python
    Silva, AG
    Lotufo, RD
    Machado, RC
    [J]. XIV BRAZILIAN SYMPOSIUM ON COMPUTER GRAPHICS AND IMAGE PROCESSING, PROCEEDINGS, 2001, : 402 - 402