Phasepy is a Python based package for fluid phase equilibria and interfacial properties calculation from equation of state (EoS). Phasepy uses several tools (i.e., NumPy, SciPy, Pandas, Matplotlib) allowing use Phasepy under Jupyter Notebooks. Phasepy models phase equilibria with the traditional ϕ-γ and ϕ-ϕ approaches, where ϕ (fugacity coefficient) can be modeled as a perfect gas, virial gas or EoS fluid, whereas γ (activity coefficient) can be described by conventional models (NRTL, Wilson, Redlich-Kister expansion, and the group contribution modified-UNIFAC). Interfacial properties are based on the square gradient theory couple to ϕ-ϕ approach. The available EoSs are the cubic EoS family extended to mixtures through the quadratic, modified-Huron-Vidal, and Wong-Sandler mixing rules. Phasepy allows to analyze phase stability, compute phase equilibria, interfacial properties, and optimize their parameters for vapor-liquid, liquid-liquid, and vapor-liquid-liquid equilibria for multicomponent mixtures. Phasepy implementation, and robustness are illustrated for binary and ternary mixtures.
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 .
Interfacial properties such as interfacial profiles, surface activity, wetting transitions, and interfacial tensions along the three-phase line are described for a Type IIIa binary mixture. The methodological approach combines the square gradient theory coupled to the statistical associating fluid theory for Mie potentials of variable range, and coarse-grained molecular dynamics simulations using the same underlying potential. The water + n-hexane mixture at three-phase equilibrium is chosen as a benchmark test case. The results show that the use of the same molecular representation for both the theory and the simulations provides a complementary picture of the aforementioned mixture, with an excellent agreement between the molecular models and the available experimental data. Interfacial tension calculations are extended to temperatures where experimental data are not available. From these extrapolations, it is possible to infer a first order wetting transition at 347.2 K, where hexane starts to completely wet the water/vapor interface. Similarly, the upper critical end point is estimated at 486.3 K. Both results show a very good agreement to the available experimental information. The concentration profiles confirm the wetting behavior of n-hexane along with a strong positive surface activity that increases with temperature, contrasting the weak positive surface activity of water that decreases with temperature.
A procedure for deriving thermodynamically consistent data-driven equations of state (EoS) for fluids is presented. The method is based on fitting the Helmholtz free energy using artificial neural networks to obtain a closed-form relationship between the thermophysical properties of fluids (FE-ANN EoS). As a proof-of-concept, an FE-ANN EoS is developed for the Mie fluids, starting from a database obtained by classical molecular dynamics simulations. The FE-ANN EoS is trained using first- (pressure and internal energy) and second-order (e.g., heat capacities, Joule–Thomson coefficients) derivative data. Additional constraints ensure that the data-driven model fulfills thermodynamically consistent limits and behavior. The results for the FE-ANN EoS are shown to be as accurate as the best available analytical model while being developed in a fraction of the time. The robustness of the “digital” equation of state is exemplified by computing physical behavior it has not been trained on, for example, fluid phase equilibria. Furthermore, the model’s internal consistency is successfully assessed using Brown’s characteristic curves.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
hi@scite.ai
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.