The Python package fluidsim is introduced in this article as an extensible framework for Computational Fluid Mechanics (CFD) solvers. It is developed as a part of FluidDyn project (Augier et al., 2018), an effort to promote open-source and open-science collaboration within fluid mechanics community and intended for both educational as well as research purposes. Solvers in fluidsim are scalable, High-Performance Computing (HPC) codes which are powered under the hood by the rich, scientific Python ecosystem and the Application Programming Interfaces (API) provided by fluiddyn and fluidfft packages (Mohanan et al., 2018). The present article describes the design aspects of fluidsim, viz. use of Python as the main language; focus on the ease of use, reuse and maintenance of the code without compromising performance. The implementation details including optimization methods, modular organization of features and object-oriented approach of using classes to implement solvers are also briefly explained. Currently, fluidsim includes solvers for a variety of physical problems using different numerical methods (including finite-difference methods). However, this metapaper shall dwell only on the implementation and performance of its pseudo-spectral solvers, in particular the two- and three-dimensional Navier-Stokes solvers. We investigate the performance and scalability of fluidsim in a state of the art HPC cluster. Three similar pseudo-spectral CFD codes based on Python (Dedalus, SpectralDNS) and Fortran (NS3D) are presented and qualitatively and quantitatively compared to fluidsim. The source code is hosted at Bitbucket as a Mercurial repository bitbucket.org/fluiddyn/fluidsim and the documentation generated using Sphinx can be read online at fluidsim.readthedocs.io.
翻译:Python 软件包流体模型在本篇文章中被引入,作为计算流体机械(CFD)解析器的延伸框架。它是作为流体Dyn项目的一部分开发的(Augier等人,2018年),目的是促进流体机械界内部的开放源码和开放科学合作,同时用于教育和研究目的。流体模拟中的解析器是可缩放的,高性能计算机(HPC)代码,由富有的、科学的 Python 生态系统和由流体和流体系统(Mohanan等人,2018年)提供的应用流体流体流体流体流体(API)。本文章描述了流体源的开源和开源的开放源和开源的开放性能(Slickr) 。目前,流体流体解的解流体流体流体流体流体流体流体流体流体(Orality3) 和流体流体流体流体流体流体流体流体流体流体流体流体解数据文件(OD)只能用不同的流体、软体流体流体流体流体、流体流体流体流体流体流体、流体流体流体流体流体、流体流体流体流体流体流体流体流体、流体流体流体流体流体流体流体、流体流体流体流体流体流体流体、流体、流体流体流体流体流体流体流体流体、流体流体流体流体流体流体数据、流体数据、流体数据、流体流体流体流体、流体流体流体流体、流体流体流体流体流体流体流体流体流体流体、流体流体流体流体数据、流体、流体流体流体流体流体流体数据、流体、流体、流体、流体、流体、流体、流体、流体、流体、流体、流体、流体、流体、流体、流体、流体、流体、流体、流体、流体、流体、流体、流体、流体