论文标题
PTFLASH:等温两相平衡计算的深度学习框架
PTFlash : A deep learning framework for isothermal two-phase equilibrium calculations
论文作者
论文摘要
相位平衡计算是多孔介质中多组分多相流量的数值模拟的重要组成部分,这是计算时间中最大的份额。在这项工作中,我们介绍了一个gpuenable,快速和并行的框架,PTFLASH,该框架矢量化了使用Pytorch进行等温两相闪光计算所需的算法,并且可以促进广泛的下游应用程序。此外,为了进一步加速PTFLASH,我们设计了两个特定于任务的神经网络,一个用于预测给定混合物的稳定性,另一种用于提供分布系数的估计,它们是离线训练的,并通过辅助稳定性分析并减少迭代次数来缩短计算时间,以缩短计算时间。对PTFLASH的评估是对涉及碳氢化合物CO 2和N 2的三个案例研究进行的,为此,使用SOAVE-REDLICH-KWONG(SRK)方程,在较大的温度,压力和组成条件下对相位平衡进行了测试。我们将PTFLASH与内部热力学库Carnot进行比较,Carnot用C ++编写,并在CPU上一一进行闪存计算。结果表明,大规模计算的加速度最高可达两个幅度,同时使用Carnot提供的参考解决方案保持完美的精度。
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.