当前位置: X-MOL 学术Comput. Phys. Commun. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
CPL library — A minimal framework for coupled particle and continuum simulation
Computer Physics Communications ( IF 7.2 ) Pub Date : 2020-05-01 , DOI: 10.1016/j.cpc.2019.107068
E.R. Smith , D.J. Trevelyan , E. Ramos-Fernandez , A. Sufian , C. O’Sullivan , D. Dini

We present an open-source library for coupling particle codes, such as molecular dynamics (MD) or the discrete element method (DEM), and grid based computational fluid dynamics (CFD). The application is focused on domain decomposition coupling, where a particle and continuum software model different parts of a single simulation domain with information exchange. This focus allows a simple library to be developed, with core mapping and communication handled by just four functions. Emphasis is on scaling on supercomputers, a tested cross-language library, deployment with containers and well-documented simple examples. Building on this core, a template is provided to facilitate the user development of common features for coupling, such as averaging routines and functions to apply constraint forces. The interface code for LAMMPS and OpenFOAM is provided to both include molecular detail in a continuum solver and model fluids flowing through a granular system. Two novel development features are highlighted which will be useful in the development of the next generation of multi-scale software: (i) The division of coupled code into a smaller blocks with testing over a range of processor topologies. (ii) The use of coupled mocking to facilitate coverage of various parts of the code and allow rapid prototyping. These two features aim to help users develop coupled models in a test-driven manner and focus on the physics of the problem instead of just software development. All presented code is open-source with detailed documentation on the dedicated website (cpl-library.org) permitting useful aspects to be evaluated and adopted in other projects. Program summary: Program Title: CPLLIBRARY Program Files doi: http://dx.doi.org/10.17632/9dh8w97d2x.1 Licensing provisions: GPLv3 Programming languages: Fortran/C/C++/Python External routines/libraries: Message Passing Interface (MPI) Nature of problem: Coupling of particle and continuum software to enable simulations not possible with either code alone. In particular, handling communication and interaction of computational fluid dynamics (CFD) software with either molecular dynamics (MD) or discrete element method (DEM) solvers on high performance computing (HPC) platforms. Solution method: A shared library with a minimal set of functions to enable coupling, together with an entire infrastructure to facilitate development of validated coupled software. This includes a minimal Python interface to encourage mock testing, libraries to help develop coupled tools along with pre-coupled examples including OpenFOAM, LAMMPS, Flowmol (Smith, 2014) and interactive plotting using wxPython and matplotlib. Unusual features: Minimal interface with simple setup. A CPL_Mocks framework to facilitate debugging and test driven development. Communication established between independent executables using MPI_Open_Port, reducing required changes to core source code. Coupled codes track the git repository with validation through continuous integration testing and deployment on DockerHub. All communication based on MPI_Cart and MPI_Graph so optimisation is possible through MPI implementation on supercomputers.

中文翻译:

CPL 库——耦合粒子和连续介质模拟的最小框架

我们提供了一个用于耦合粒子代码的开源库,例如分子动力学 (MD) 或离散元方法 (DEM),以及基于网格的计算流体动力学 (CFD)。该应用程序侧重于域分解耦合,其中粒子和连续体软件通过信息交换对单个仿真域的不同部分进行建模。这一重点允许开发一个简单的库,核心映射和通信仅由四个函数处理。重点是在超级计算机上进行扩展、经过测试的跨语言库、使用容器进行部署和记录良好的简单示例。在此核心的基础上,提供了一个模板,以方便用户开发用于耦合的通用功能,例如应用约束力的平均例程和函数。LAMMPS 和 OpenFOAM 的接口代码都包括在连续求解器中的分子细节和流经颗粒系统的模型流体。突出显示了两个新颖的开发功能,它们将在下一代多尺度软件的开发中有用:(i) 将耦合代码划分为更小的块,并在一系列处理器拓扑上进行测试。(ii) 使用耦合模拟来促进代码的各个部分的覆盖并允许快速原型设计。这两个功能旨在帮助用户以测试驱动的方式开发耦合模型,并专注于问题的物理,而不仅仅是软件开发。所有提供的代码都是开源的,在专用网站 (cpl-library.org) 上有详细的文档,允许在其他项目中评估和采用有用的方面。程序摘要:程序名称:CPLLIBRARY 程序文件 doi:http://dx.doi.org/10.17632/9dh8w97d2x.1 许可条款:GPLv3 编程语言:Fortran/C/C++/Python 外部例程/库:消息传递接口(MPI) ) 问题性质:粒子和连续体软件的耦合,以实现单独使用任一代码无法进行的模拟。特别是,在高性能计算 (HPC) 平台上处理计算流体动力学 (CFD) 软件与分子动力学 (MD) 或离散元法 (DEM) 求解器的通信和交互。解决方法:一个共享库,具有最少的函数集以实现耦合,以及一个完整的基础设施,以促进经过验证的耦合软件的开发。这包括一个最小的 Python 接口来鼓励模拟测试,帮助开发耦合工具以及预耦合示例的库,包括 OpenFOAM、LAMMPS、Flowmol(Smith,2014)和使用 wxPython 和 matplotlib 的交互式绘图。不寻常的功能: 最小的界面,简单的设置。一个便于调试和测试驱动开发的 CPL_Mocks 框架。使用 MPI_Open_Port 在独立可执行文件之间建立通信,减少对核心源代码的必要更改。耦合代码通过在 DockerHub 上进行持续集成测试和部署来跟踪 git 存储库并进行验证。所有通信都基于 MPI_Cart 和 MPI_Graph,因此可以通过超级计算机上的 MPI 实现进行优化。最小的界面,简单的设置。一个便于调试和测试驱动开发的 CPL_Mocks 框架。使用 MPI_Open_Port 在独立可执行文件之间建立通信,减少对核心源代码所需的更改。耦合代码通过 DockerHub 上的持续集成测试和部署来跟踪 git 存储库并进行验证。所有通信都基于 MPI_Cart 和 MPI_Graph,因此可以通过超级计算机上的 MPI 实现进行优化。最小的界面,简单的设置。一个便于调试和测试驱动开发的 CPL_Mocks 框架。使用 MPI_Open_Port 在独立可执行文件之间建立通信,减少对核心源代码的必要更改。耦合代码通过 DockerHub 上的持续集成测试和部署来跟踪 git 存储库并进行验证。所有通信都基于 MPI_Cart 和 MPI_Graph,因此可以通过超级计算机上的 MPI 实现进行优化。
更新日期:2020-05-01
down
wechat
bug