Thermodynamically Consistent Neural Networks for a Universal Fluid Gibbs Free Energy Equation of State

Xurui Li, Zhiguo Gan, Jiaming Zhang, Hongxi Zeng, Diannan LuarXiv 2026 · arXiv

This paper presents a significant step forward in the intersection of chemical engineering and machine learning. By moving away from traditional "black-box" neural networks and embedding fundamental physical laws directly into the model's architecture, the authors have developed a "universal" Equation of State (EoS) that is both accurate and physically robust.

TL;DR

The researchers developed GEoS, a neural network-based Equation of State that predicts fluid properties by learning the residual Gibbs free energy. By embedding thermodynamic constraints (like mechanical stability) directly into the training process, the model achieves state-of-the-art accuracy across diverse chemical species and generalizes remarkably well to molecules it has never seen before.

What Problem Does This Paper Address?

Equations of State (EoS) are the bedrock of chemical engineering, used to predict how fluids behave under different temperatures and pressures. For over 150 years, we’ve relied on cubic equations (like Peng-Robinson) or more complex frameworks (like SAFT). However, cubic equations often fail for polar fluids or high-pressure liquids, while high-accuracy models like PC-SAFT require extensive experimental data to fit specific parameters for every new molecule.

Recent machine learning (ML) approaches have tried to fill this gap, but they often suffer from two issues:

  1. Physical Inconsistency: They might predict impossible states, such as negative compressibility.
  2. Poor Generalization: They often struggle to predict properties for molecules outside their training set.

This paper tackles these by using Gibbs free energy as a starting point, which allows the model to derive other properties (like density) through thermodynamically consistent derivatives.

Methods

The authors introduce Thermodynamically Consistent Neural Networks (TCNNs). The core workflow is illustrated in Figure 1:

Workflow of the GEoS model: from database sampling to thermodynamic modeling and final property calculation.

Key methodological highlights include:

  • Gibbs Energy Framework: Unlike most models that focus on Helmholtz energy, GEoS uses Gibbs free energy. This is advantageous because its natural variables—temperature ($T$) and pressure ($P$)—are the ones most easily controlled and measured in industrial settings.
  • Automatic Differentiation: The model predicts the fugacity coefficient ($\ln \phi$). Other properties, like the compressibility factor ($Z$), are calculated by taking the derivative of the network's output with respect to its inputs using automatic differentiation. This ensures the relationships between properties are mathematically exact.
  • Physics-Informed Loss Functions: The training isn't just about matching data points. The loss function includes "penalty terms" that enforce physical laws, such as the mechanical stability criterion $(\partial p / \partial V)_T < 0$.
  • Residual Architecture: The model uses a residual neural network (ResNet) structure to separately compute fugacity coefficients for gas and liquid phases, as shown in Figure 3.
The GEoS model architecture, utilizing residual blocks to embed molecular features, temperature, and pressure.

Datasets

  • Training: The model was trained on a relatively small but high-quality dataset of 101 substances from the CoolProp database. To ensure the model learned the entire fluid surface, the authors used a region-based sampling strategy (Figure 2) covering gas, liquid, supercritical, and saturation regions.
  • Testing: To prove "universality," the model was tested on a massive independent set from the ThermoData Engine (TDE), containing 74,078 liquid-phase points for 399 substances and 9,665 gas-phase points for 82 substances. Crucially, none of these substances were in the training set.
The region-based sampling strategy used to create a robust training dataset across the fluid phase diagram.

Key Insights and Ideas

  • Learning the "Underlying Law": Even though it was trained on only 101 molecules, GEoS generalized to hundreds of others. The authors used UMAP (a dimensionality reduction technique) to show that most test molecules were in "extrapolation" regions, meaning the model didn't just memorize data—it learned the underlying physics of fluid behavior.
  • Generalization to Unseen Atoms: The model successfully predicted properties for bromine-containing compounds, even though bromine was entirely absent from the training set.
  • Validation via Intermolecular Potentials: By fitting Lennard-Jones potentials to the GEoS predictions, the authors showed that the model's "internal logic" aligns with classical molecular physics, providing a bridge between deep learning and molecular theory.

Key Results

GEoS significantly outperformed both traditional cubic equations and previous state-of-the-art ML models:

  • Gas-Phase Density: Achieved an Average Absolute Relative Deviation (AARD) of 5.25%, outperforming the translated-consistent Peng-Robinson (tc-PR) at 6.52%.
  • Liquid-Phase Density: Achieved an AARD of 3.96%, which is vastly superior to the van der Waals equation (41.49%) and competitive with highly specialized models like SPT-PC-SAFT.
  • Robustness: Unlike some ML models that produced wild errors ($R^2 < 0$), GEoS maintained high stability across the entire test set.

Limitations and Future Work

While GEoS is a powerful "universal" model, the authors noted some anomalies in the low-pressure liquid phase and ultra-high-pressure regions. To mitigate this for industrial use, they suggest using GEoS to "generate" data to fit standard PC-SAFT parameters, combining ML's predictive power with the proven consistency of classical equations.

Future work aims to expand the training set and, more importantly, extend the model to mixtures, which would involve predicting partial fugacity coefficients—a critical requirement for real-world chemical process simulation.

Summary updated

Abstract

Over the past three centuries, many thermodynamics researchers have worked to develop fluid equations of state with both high accuracy and broad applicability, proposing various theoretical frameworks and models. Building on these efforts, this study uses Gibbs free energy as the starting point and introduces thermodynamically consistent neural networks to construct a fluid equation of state based on Gibbs free energy (GEoS). This approach establishes a novel machine learning framework that provides a unified representation of fluid states. GEoS performs well on the vapor- and liquid-phase density test sets, with average absolute relative deviations (AARDs) of 5.25% and 3.96%, respectively. It outperforms conventional volume-translated cubic equations of state and existing machine learning models, demonstrating its effectiveness. Further analysis using the UMAP dimensionality reduction method shows that most molecules in the test set belong to extrapolation systems, confirming the strong generalization ability of the model. Finally, the test results show that the PC-SAFT equation fitted using GEoS maintains high predictive accuracy, providing a reliable basis for its practical application in industry.
BibTeX
@misc{li2026thermodynamically,
  author = {Xurui Li and Zhiguo Gan and Jiaming Zhang and Hongxi Zeng and Diannan Lu},
  title = {{Thermodynamically Consistent Neural Networks for a Universal Fluid Gibbs Free Energy Equation of State}},
  year = {2026},
  eprint = {2611.26183},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.26183},
}
Figure