In this work, we detail the GPU-porting of an in-house pseudo-spectral solver tailored towards large-scale simulations of interface-resolved simulation of drop- and bubble-laden turbulent flows. The code relies on direct numerical simulation of the Navier-Stokes equations, used to describe the flow field, coupled with a phase-field method, used to describe the shape, deformation, and topological changes of the interface of the drops or bubbles. The governing equations -Navier-Stokes and Cahn-Hilliard equations-are solved using a pseudo-spectral method that relies on transforming the variables in the wavenumber space. The code targets large-scale simulations of drop- and bubble-laden turbulent flows and relies on a multilevel parallelism. The first level of parallelism relies on the message-passing interface (MPI) and is used on multi-core architectures in CPU-based infrastructures. A second level of parallelism relies on OpenACC directives and cuFFT libraries and is used to accelerate the code execution when GPU-based infrastructures are targeted. The resulting multiphase flow solver can be efficiently executed in heterogeneous computing infrastructures and exhibits a remarkable speed-up when GPUs are employed. Thanks to the modular structure of the code and the use of a directive-based strategy to offload code execution on GPUs, only minor code modifications are required when targeting different computing architectures. This improves code maintenance, version control and the implementation of additional modules or governing equations.
翻译:本文详细阐述了一种面向GPU移植的内部伪谱求解器,该求解器专为液滴和气泡载带湍流的大尺度界面解析模拟而设计。该代码基于描述流场的Navier-Stokes方程的直接数值模拟,并与用于描述液滴或气泡界面的形状、变形及拓扑变化的相场方法相耦合。控制方程——Navier-Stokes方程和Cahn-Hilliard方程——采用伪谱法求解,该方法依赖于将变量转换到波数空间。该代码面向液滴和气泡载带湍流的大尺度模拟,并采用多层次并行策略。第一层并行基于消息传递接口(MPI),用于基于CPU基础设施的多核架构。第二层并行基于OpenACC指令和cuFFT库,用于在面向基于GPU的基础设施时加速代码执行。由此产生的多相流求解器能够在异构计算基础设施中高效运行,并在使用GPU时表现出显著的加速效果。得益于代码的模块化结构以及采用基于指令的策略将代码执行卸载到GPU上,在面向不同计算架构时仅需进行微小的代码修改。这提高了代码的可维护性、版本控制以及附加模块或控制方程的实现效率。