Accelerating flash calculation through deep learning methods

Yu Li, Tao Zhang, Shuyu Sun, Xin Gao

TL;DR

Researchers have developed a deep learning approach to replace the computationally expensive iterative solvers used in "flash calculations"—the process of determining how chemical mixtures split into vapor and liquid phases. By training a neural network on experimental data, the team achieved a staggering 2051x speedup over traditional methods while maintaining high accuracy and avoiding the common convergence failures that plague standard thermodynamic solvers.

What Problem Does This Paper Address?

In industries like petroleum engineering, carbon sequestration, and chemical manufacturing, engineers need to simulate how complex mixtures (like oil and gas) behave under different temperatures and pressures. This requires Vapor-Liquid Equilibrium (VLE) or "flash calculations."

Traditionally, these calculations rely on Equations of State (EOS) and iterative algorithms like the Successive Substitution Method (SSM) or Newton’s method. These methods are "guess-and-check" procedures: you guess the composition, check if the chemical potentials (fugacities) match, and repeat.

The problem is twofold:

  1. Computational Cost: In large-scale reservoir simulations, these iterations happen millions of times, consuming the vast majority of CPU time.
  2. Stability: Iterative solvers often fail to converge or get stuck in "unphysical" solutions, especially near critical points or with complex mixtures.

Methods

The authors propose replacing the iterative loop with a Deep Neural Network (DNN) that acts as a direct "predictor."

  • The Architecture: They settled on a fully connected network with 5 hidden layers and 100 nodes per layer.
  • The Inputs: Eight physical parameters, including critical pressure ($P_c$), critical temperature ($T_c$), and the acentric factor ($\omega$) for each component in a binary mixture, plus the system's overall temperature and pressure.
  • The Outputs: The mole fractions of the liquid ($X$) and vapor ($Y$) phases.
  • Modern DL Techniques: To handle a relatively small and noisy dataset, the authors employed several "best practice" techniques:
  • Xavier Initialization: To prevent signal vanishing/explosion during training.
  • Dropout and Weight Decay (L2 Regularization): To prevent the model from simply memorizing the training data (overfitting).
  • Batch Normalization: To accelerate convergence by 10x.
  • Activation Functions: They tested 12 different functions, finding that ReLU and ELU provided the best balance of accuracy and stability.

The paper compares this DL approach against three benchmarks: the standard SSM, the faster Newton’s method, and the Sparse Grids Method (a type of mathematical surrogate model).

Datasets

The model was trained and validated using experimental data from the Korea Thermophysical Properties Data Bank (KDB).

  • Scope: Binary mixtures of alkanes ($C_1$ to $C_7$), such as Methane-Propane or Ethane-Pentane.
  • Size: A total of 1,332 data points.
  • Quality: The authors noted the experimental data has an inherent mean relative error of about 20%, which serves as a natural "noise" floor for the model's accuracy.

Key Insights and Ideas

  • The "Convergence Guarantee": Unlike Newton's method, which requires a very good initial guess to avoid crashing, the neural network provides a result instantly for any input within its trained range. It effectively "smooths out" the mathematical instabilities of traditional thermodynamics.
  • Diminishing Returns on Complexity: One of the most interesting findings was that adding more layers didn't help. A 20-layer network performed significantly worse than a 5-layer network. For physical regressions like VLE, "deeper" isn't always better; it often just leads to overfitting on noisy experimental data.
  • Repeated Utility: While traditional methods start from scratch for every single calculation, the DL model's "offline" training time (about 10 minutes) is a one-time cost. Once trained, the "online" prediction is nearly instantaneous.

Key Results

  • Massive Acceleration: The DL model was 2051.6 times faster than the traditional SSM and roughly 1000 times faster than Newton’s method.
  • Accuracy: The model matched experimental data well, with relative errors often below 5% for certain mixtures. Crucially, it performed better than SSM in several complex scenarios where the traditional method produced large errors.
  • Efficiency: The DL model outperformed the Sparse Grids Method, which is often considered the gold standard for surrogate modeling, by being both faster to evaluate and more accurate.

Limitations and Future Work

  • Data Scarcity: The authors acknowledge that 1,332 points is a small dataset for deep learning. Overfitting remains a constant threat, and the model's accuracy is currently capped by the quality of the KDB database.
  • Generalization: The current model is specific to binary alkane mixtures ($C_1-C_7$). Extending this to mixtures with dozens of components (like real crude oil) will require significantly more data or "physics-informed" architectures.
  • Hybrid Approaches: The authors suggest that future work could involve using DL to provide a "first guess" for a rigorous EOS solver, combining the speed of AI with the thermodynamic consistency of classical physics.

Summary updated

Abstract

In the past two decades, researchers have made remarkable progress in accelerating flash calculation, which is very useful in a variety of engineering processes. In this paper, general phase splitting problem statements and flash calculation procedures using the Successive Substitution Method are reviewed, while the main shortages are pointed out. Two acceleration methods, Newton's method and the Sparse Grids Method are presented afterwards as a comparison with the deep learning model proposed in this paper. A detailed introduction from artificial neural networks to deep learning methods is provided here with the authors' own remarks. Factors in the deep learning model are investigated to show their effect on the final result. A selected model based on that has been used in a flash calculation predictor with comparison with other methods mentioned above. It is shown that results from the optimized deep learning model meet the experimental data well with the shortest CPU time. More comparison with experimental data has been conducted to show the robustness of our model.
BibTeX
@article{li2019accelerating,
  author = {Yu Li and Tao Zhang and Shuyu Sun and Xin Gao},
  title = {{Accelerating flash calculation through deep learning methods}},
  journal = {Journal of Computational Physics},
  year = {2019},
  url = {https://openreview.net/forum?id=2K3FV4TbBc},
}

Loading related content...

Figure