PTFlash:用于等温两相平衡相平衡计算的深度学习框架
PTFlash : A deep learning framework for isothermal two-phase equilibrium calculations
摘要:
相平衡计算是多孔介质多组分多相流数值模拟的重要组成部分,占计算时间的最大份额。在这项工作中,我们引入了一个支持GPU的快速并行框架PTFlash,该框架使用PyTorch对等温两相闪存计算所需的算法进行矢量化,并可以促进广泛的下游应用。此外,为了进一步加速PTFlash,我们设计了两个特定于任务的神经网络,一个用于预测给定混合物的稳定性,另一个用于提供分布系数的估计值,这些分布系数是离线训练的,并通过回避稳定性分析和减少迭代次数来缩短计算时间以达到收敛。PTFlash的评估进行了三个案例研究,涉及烃,CO2和N2,其中的相平衡进行了测试,在大范围的温度,压力和组成条件下,使用Soave-Redlich-Kwong(SRK)状态方程。我们比较PTFlash与内部的热力学库,卡诺,写在C++和执行闪存计算一个接一个的CPU。结果表明,大规模计算的速度提高了两个数量级,同时保持完美的精度与卡诺提供的参考解决方案。
英文摘要:
Phase equilibrium calculations are an essential part of numerical simulations of multi-component multi-phase flow in porous media, accounting for the largest share of the computational time. In this work, we introduce a GPUenabled, fast, and parallel framework, PTFlash, that vectorizes algorithms required for isothermal two-phase flash calculations using PyTorch, and can facilitate a wide range of downstream applications. In addition, to further accelerate PTFlash, we design two task-specific neural networks, one for predicting the stability of given mixtures and the other for providing estimates of the distribution coefficients, which are trained offline and help shorten computation time by sidestepping stability analysis and reducing the number of iterations to reach convergence. The evaluation of PTFlash was conducted on three case studies involving hydrocarbons, CO 2 and N 2 , for which the phase equilibrium was tested over a large range of temperature, pressure and composition conditions, using the Soave-Redlich-Kwong (SRK) equation of state. We compare PTFlash with an in-house thermodynamic library, Carnot, written in C++ and performing flash calculations one by one on CPU. Results show speed-ups on large scale calculations up to two order of magnitudes, while maintaining perfect precision with the reference solution provided by Carnot.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。