数据与计算发展前沿 ›› 2026, Vol. 8 ›› Issue (4): 19-29.

CSTR: 32002.14.jfdc.CN10-1649/TP.2026.04.002

doi: 10.11871/jfdc.issn.2096-742X.2026.04.002

• • 上一篇    下一篇

面向国产加速卡的OpenFOAM全流程异构计算框架研究

王天阔(),彭超,陈强,安敏*()   

  1. 郑州大学国家超级计算郑州中心河南 郑州 450001
  • 收稿日期:2025-10-20 出版日期:2026-08-20 发布日期:2026-08-21
  • 通讯作者: 安敏(E-mail:anmin@zzu.edu.cn
  • 作者简介:王天阔,郑州大学计算机与人工智能学院,硕士研究生,主要研究方向为高性能计算。
    本文中主要负责代码调试,实验验证以及论文的编写。
    WANG Tiankuo is a master’s student at the School of Computer and Artificial Intelligence, Zhengzhou University. His research interests include high-performance computing.
    In this paper, he is mainly responsible for code debugging, experimental validation, and paper writing.
    E-mail: tkwang@gs.zzu.edu.cn|安敏,郑州大学,国家超级计算郑州中心,博士,讲师,河南省通信学会、颗粒学会、化学工程学会等会员,国内外期刊审稿专家。主要研究方向为面向计算流体力学的高性能计算、人工智能与工程科学的交叉研究、多尺度模拟方法与算法。参与国家自然科学基金1项、发表学术3篇,其中2篇被SCI检索。
    本文中负责论文实验指导、文章润色。
    AN Min, Ph.D., is a lecturer at the National Supercomputing Center in Zhengzhou, Zhengzhou University. She is a member of the Henan Province Communication Society, Particle Society, Chemical Engineering Society, etc., and a reviewer expert for domestic and international journals. Her main research interests include high-performance computing for computational fluid dynamics, interdisciplinary research on artificial intelligence and engineering sciences, and multi-scale simulation methods and algorithms. She has participated in one project funded by the National Natural Science Foundation and published three academic papers, two of which have been indexed by SCI.
    In this paper, she is mainly responsible for experimental guidance and manuscript polishing.
    E-mail: anmin@zzu.edu.cn
  • 基金资助:
    国家自然科学基金项目(22208320);介科学与工程全国重点实验室开放基金(MESO-25-D03);河南省科技攻关项目(252102321086);光合基金A(202507010007)

Research on a Full-Process Heterogeneous Computing Framework for OpenFOAM on Domestic Accelerator Cards

WANG Tiankuo(),PENG Chao,CHEN Qiang,AN Min*()   

  1. Supercomputing Center in Zhengzhou, Zhengzhou University, Zhengzhou, Henan 450001, China
  • Received:2025-10-20 Online:2026-08-20 Published:2026-08-21

摘要:

【背景】 传统CPU计算模式已无法满足OpenFOAM对大规模流体仿真的算力需求,而现有GPU加速方案因频繁的数据传输存在性能瓶颈。【目的】 本研究旨在开发一个面向国产加速卡的OpenFOAM异构框架,通过实现方程离散和求解的全流程设备端计算,显著提升计算效率。【方法】 该框架基于OpenFOAM-v2112,引入了独立的设备端数据结构和计算逻辑,并通过重载离散函数,将整个计算流程无缝移植到国产加速卡。其架构采用组合设计,确保了良好的版本兼容性和可维护性,同时保留了原生求解器构建习惯。【结果】 在DTCHULL和Dambreak3D案例中,该框架在保证模拟精度的前提下,相较于原生CPU版本实现了2.64和72.43倍的显著加速。【结论】 该框架显著提升了OpenFOAM的计算性能,并为未来复杂物理模型的异构加速研究奠定了基础,展示了其在提升大规模CFD仿真效率上的潜力。【局限】 当前框架仅覆盖了InterFOAM求解器,且仅兼容简单的网格结构。

关键词: OpenFOAM, 异构计算, 国产加速卡, 全流程, 多相流

Abstract:

[Background] Traditional Central Processing Unit (CPU) computing models are increasingly inadequate to meet the massive computational demands of large-scale OpenFOAM simulations. Existing Graphics Processing Unit (GPU) acceleration methods, while faster, suffer from performance bottlenecks due to frequent data transfers between the host and the device. Addressing this gap is critical for advancing computational fluid dynamics (CFD) research and industrial applications. [Objectives] This study aims to develop a novel heterogeneous computing framework for OpenFOAM specifically targeting domestic Chinese accelerator cards. The core objective is to significantly boost computational efficiency by achieving full-process device-side computation for the entire process, encompassing equation discretization and solution. This approach seeks to minimize data movement and maximize the utilization of the accelerator’s parallel processing capabilities. [Methods] The developed framework is built on OpenFOAM-v2112, introducing a set of independent data structures and computational logic designed to reside entirely on the device. By systematically overloading OpenFOAM’s discretization functions, the entire computational workflow is seamlessly ported to the domestic accelerator card. The architecture utilizes a composite design pattern, ensuring excellent version compatibility and maintainability while preserving the familiar structure and conventions of native OpenFOAM solver development. [Results] The framework’s performance was rigorously validated using two representative benchmark cases: DTCHULL and Dambreak3D. The results demonstrate that the heterogeneous framework successfully maintains simulation accuracy while achieving a substantial speedup of 2.64 to 72.43 times compared to the native CPU version. [Conclusions] This heterogeneous framework significantly improves the computational performance in OpenFOAM simulations by enabling efficient device-side processing. It establishes a robust foundation for future research into the heterogeneous acceleration of complex physical models and demonstrates immense potential for improving the efficiency of large-scale CFD simulations. [Limitations] The current framework only covers the InterFOAM solver and is only compatible with simple mesh structures.

Key words: OpenFOAM, heterogeneous computing, domestic accelerator card, full process, multi-phase flow