Departamento de Ingeniería Química, Universidad de Concepción, Concepción 4030000, Chile.
Department of Chemical Engineering, Imperial College London, London SW7 2AZ, United Kingdom.
J Chem Inf Model. 2021 Mar 22;61(3):1244-1250. doi: 10.1021/acs.jcim.0c01324. Epub 2021 Feb 17.
In this work, we showcase SGTPy, a Python open-source code developed to calculate interfacial properties (interfacial concentration profiles and interfacial or surface tension) for pure fluids and fluid mixtures. SGTPy employs the Square Gradient Theory (SGT) coupled to the Statistical Associating Fluid Theory of Variable Range employing a Mie potential (SAFT-VR-Mie). SGTPy uses standard Python numerical packages (i.e., NumPy, SciPy) and can be used under Jupyter notebooks. Its features are the calculation of phase stability, phase equilibria, interfacial properties, and the optimization of the SGT and SAFT parameters for vapor-liquid, liquid-liquid and vapor-liquid-liquid equilibria for pure fluids and multicomponent mixtures. Phase equilibrium calculations include two-phase and multiphase flash, bubble and dew points, and the tangent plane distance. For the computation of interfacial properties, SGTPy incorporates several options to solve the interfacial concentration, such as the path technique, an auxiliary time function, and orthogonal collocation. Additionally, the SGTPy code allows the inclusion of subroutines from other languages (e.g., Fortran, and C++) through Cython and f2py Python tools, which opens the possibility for future extensions or recycling tested and optimized subroutines from other codes. Supporting Information includes a review of the theoretical expressions required to couple SAFT-VR-Mie equation of state with the SGT. The use and capabilities of SGTPy are illustrated through step by step examples written on Jupyter notebooks for the cases of pure fluids and binary and ternary mixtures in bi- and three- phasic equilibria. The SGTPy code can be downloaded from https://github.com/gustavochm/SGTPy.
在这项工作中,我们展示了 SGTPy,这是一个用 Python 开发的开源代码,用于计算纯流体和流体混合物的界面性质(界面浓度分布和界面或表面张力)。SGTPy 采用 Square Gradient Theory(SGT)与采用 Mie 势的 Statistical Associating Fluid Theory of Variable Range(SAFT-VR-Mie)相结合。SGTPy 使用标准的 Python 数值包(即 NumPy、SciPy),可以在 Jupyter notebooks 下使用。它的功能包括相稳定性、相平衡、界面性质的计算,以及 SGT 和 SAFT 参数的优化,适用于纯流体和多组分混合物的汽液、液液和汽液液平衡。相平衡计算包括两相和多相闪蒸、汽泡点和露点以及切平面距离。对于界面性质的计算,SGTPy 结合了几种解决界面浓度的选项,例如路径技术、辅助时间函数和正交配置。此外,SGTPy 代码允许通过 Cython 和 f2py Python 工具包含来自其他语言(如 Fortran 和 C++)的子程序,这为未来扩展或回收其他代码中经过测试和优化的子程序提供了可能性。支持信息包括将 SAFT-VR-Mie 状态方程与 SGT 耦合所需的理论表达式的综述。通过在 Jupyter notebooks 上为纯流体和二元和三元混合物在双相和三相平衡中的情况编写的逐步示例,说明了 SGTPy 的使用和功能。SGTPy 代码可以从 https://github.com/gustavochm/SGTPy 下载。