arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1807.01769cs.CEphysics.comp-phphysics.flu-dyn
收藏

FluidSim:用于高性能CFD仿真的模块化、面向对象Python包

FluidSim: modular, object-oriented Python package for high-performance CFD simulations

Ashwin Vishnu Mohanan, Cyrille Bonamy, Miguel Calpe Linares, Pierre Augier

摘要:

本文介绍了Python包fluidsim,它是计算流体力学(CFD)求解器的可扩展框架。它是作为FluidDyn项目的一部分开发的(Augier等人,2018年),努力促进流体力学社区内的开源和开放科学合作,并用于教育和研究目的。fluidsim中的求解器是可扩展的高性能计算(HPC)代码,这些代码由丰富的科学Python生态系统和fluiddyn和fluidfft包提供的应用程序编程接口(API)提供支持(Mohanan等人,2018年)。本文介绍了fluidsim的设计方面,即使用Python作为主要语言;重点是代码的易用性,重用和维护,而不影响性能。文中还简要介绍了求解器的实现细节,包括优化方法、特征的模块化组织和使用类实现求解器的面向对象方法。目前,fluidsim包括使用不同数值方法(包括有限差分法)的各种物理问题的求解器。然而,这篇元论文将只讨论其伪谱解算器的实现和性能,特别是二维和三维Navier-Stokes解算器。我们调查的性能和可扩展性的fluidsim在一个国家的最先进的HPC集群。介绍了基于Python(Dedalus,SpectralDNS)和Fortran(NS 3D)的三个类似的伪谱CFD代码,并与fluidsim进行了定性和定量比较。源代码托管在Bitbucket作为Mercurial存储库bitbucket.org/fluiddyn/fluidsim,使用Sphinx生成的文档可以在fluidsim.readthedocs.io上在线阅读。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑