arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.20899physics.plasm-phphysics.comp-ph
收藏

使用 Python 实现高性能计算磁流体动力学

High-Performance Computational Magnetohydrodynamics with Python

Chris Bard, John Dorelli

AI总结:

本文介绍基于 Python 的 AGATE 磁流体动力学模拟框架,采用模块化 Godunov 型有限体积方法并支持 GPU 加速,在基准测试中实现准确模拟和 40–60 倍性能提升。

摘要:

我们提出了 AGATE 模拟代码,这是一个主要为求解磁流体动力学(MHD)方程而开发的基于 Python 的框架,同时保持对其他方程组的适应性。该代码采用模块化、面向对象的架构,将接口规范与数值实现分离,允许用户自定义数值方法和物理模型。AGATE 建立在 Godunov 型有限体积格式之上,目前支持理想、Hall 和 Chew-Goldberger-Low(CGL)MHD 方程,并提供从 Numpy 到通过 NVIDIA CUDA 实现 GPU 计算的多种加速选项。性能测试表明,我们的 GPU 实现相比 CPU 版本实现了 40–60 倍的加速。通过成熟基准测试进行的全面验证,证实其能够准确再现不同 MHD 区域中的线性和非线性现象。这种模块化、性能和可扩展性的结合使 AGATE 适用于多种应用:从快速原型设计到生产模拟,从数值算法开发到物理教育。

英文摘要:

We present the AGATE simulation code, a Python-based framework developed primarily for solving the magnetohydrodynamics (MHD) equations while maintaining adaptability to other equation sets. The code employs a modular, object-oriented architecture that separates interface specifications from numerical implementations, allowing users to customize numerical methods and physics models. Built on a Godunov-type finite-volume scheme, AGATE currently supports the ideal, Hall, and Chew-Goldberger-Low (CGL) MHD equations, with multiple acceleration options ranging from Numpy to GPU-enabled computation via NVIDIA CUDA. Performance testing demonstrates that our GPU implementations achieve 40-60x speedups over CPU versions. Comprehensive validation through established benchmarks confirms accurate reproduction of both linear and nonlinear phenomena across different MHD regimes. This combination of modularity, performance, and extensibility makes AGATE suitable for multiple applications: from rapid prototyping to production simulations, and from numerical algorithm development to physics education.

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

↑