arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.16032physics.flu-dynphysics.comp-ph
收藏

WaterLily.jl:一种用于动态物体周围不可压缩粘性流动的可微分且后端无关的 Julia 求解器

WaterLily.jl: A differentiable and backend-agnostic Julia solver for incompressible viscous flow around dynamic bodies

Gabriel D. Weymouth, Bernat Font

AI总结:

本文提出 WaterLily.jl,一个基于 Julia 的不可压缩粘性流求解器,采用浸入边界法处理动态复杂几何体,支持 CPU/GPU 多后端并具备自动微分可微分能力,性能可比肩 C 和 Fortran 低级求解器。

摘要:

将计算流体力学(CFD)求解器集成到优化和机器学习框架中,受到经典计算语言僵化性以及更灵活高级语言性能缓慢的阻碍。在这项工作中,我们介绍了 WaterLily.jl:一个用 Julia 语言编写的开源不可压缩粘性流动求解器。采用浸入边界法来施加固体边界对流过具有任意运动的复杂几何体的影响。该小型代码库是多维、多平台且后端无关的,即它支持串行和多线程 CPU 执行,以及不同供应商的 GPU。此外,纯 Julia 实现使求解器能够使用自动微分实现完全可微分。在 CPU 后端上,每个时间步和网格点的计算成本随着网格尺寸的增加而保持不变,并且我们测量到在超级计算机 GPU 上相比串行 CPU 执行可获得高达两个数量级的加速。这使得在研究规模问题上,其性能可与用 C 和 Fortran 编写的低级 CFD 求解器相媲美,为机器学习研究前沿开辟了令人兴奋的潜在未来应用。

英文摘要:

Integrating computational fluid dynamics (CFD) solvers into optimization and machine-learning frameworks is hampered by the rigidity of classic computational languages and the slow performance of more flexible high-level languages. In this work, we introduce WaterLily.jl: an open-source incompressible viscous flow solver written in the Julia language. An immersed boundary method is used to enforce the effect of solid boundaries on flow past complex geometries with arbitrary motions. The small code base is multidimensional, multiplatform and backend-agnostic, ie. it supports serial and multithreaded CPU execution, and GPUs of different vendors. Additionally, the pure-Julia implementation allows the solver to be fully differentiable using automatic differentiation. The computational cost per time step and grid point remains constant with increasing grid size on CPU backends, and we measure up to two orders of magnitude speed-up on a supercomputer GPU compared to serial CPU execution. This leads to comparable performance with low-level CFD solvers written in C and Fortran on research-scale problems, opening up exciting possible future applications on the cutting edge of machine-learning research.

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

↑