Lettuce:PyTorch-based晶格玻尔兹曼框架
Lettuce: PyTorch-based Lattice Boltzmann Framework
摘要:
格子玻尔兹曼方法(LBM)是计算流体力学及其它领域的一种有效模拟技术。它基于笛卡尔网格上的简单流和碰撞算法,该算法很容易与现代机器学习架构兼容。虽然越来越清楚的是,深度学习可以为经典模拟技术提供决定性的刺激,但最近的研究并没有解决机器学习和LBM之间可能存在的联系。在这里,我们介绍Letterfly,一个基于PyTorch的LBM代码,有三个目标。Letterfly能够以最少的源代码实现GPU加速计算,促进LBM模型的快速原型设计,并将LBM模拟与PyTorch的深度学习和自动微分功能集成在一起。作为将机器学习与LBM相结合的概念证明,开发了一种神经碰撞模型,在双周期剪切层上进行训练,然后转移到不同的流动,即衰减湍流。我们还强调了PyTorch的自动区分框架在流控制和优化方面的额外好处。为此,保持强迫各向同性湍流的频谱,而不进一步约束速度场。源代码可从https://github.com/lettucecfd/lettuce免费获得。
英文摘要:
The lattice Boltzmann method (LBM) is an efficient simulation technique for computational fluid mechanics and beyond. It is based on a simple stream-and-collide algorithm on Cartesian grids, which is easily compatible with modern machine learning architectures. While it is becoming increasingly clear that deep learning can provide a decisive stimulus for classical simulation techniques, recent studies have not addressed possible connections between machine learning and LBM. Here, we introduce Lettuce, a PyTorch-based LBM code with a threefold aim. Lettuce enables GPU accelerated calculations with minimal source code, facilitates rapid prototyping of LBM models, and enables integrating LBM simulations with PyTorch's deep learning and automatic differentiation facility. As a proof of concept for combining machine learning with the LBM, a neural collision model is developed, trained on a doubly periodic shear layer and then transferred to a different flow, a decaying turbulence. We also exemplify the added benefit of PyTorch's automatic differentiation framework in flow control and optimization. To this end, the spectrum of a forced isotropic turbulence is maintained without further constraining the velocity field. The source code is freely available from https://github.com/lettucecfd/lettuce.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。