Physics-Constrained Neural Network (PcNN): Phase Behavior Modeling for Complex Reservoir Fluids

Yiteng Li, Xupeng He, Zhen Zhang, Marwa AlSinan, Hyung Kwak, Hussein Hoteit

Research output: Chapter in Book/Report/Conference proceedingConference contribution


The highly nonlinear nature of equation-of-state-based (EOS-based) flash calculations encages high-fidelity compositional simulation, as most of the CPU time is spent on detecting phase stability and calculating equilibrium phase amounts and compositions. With the rapid development of machine learning (ML) techniques, they are growing to substitute classical iterative solvers for speeding up flash calculations. However, conventional data-driven neural networks fail to account for physical constraints, like chemical potential equilibrium (equivalent to fugacity equality in the PT flash formulation) and interphase/intraphase mass conservation. In this work, we propose a physics-constrained neural network (PcNN) that first conserves both fugacity equality and mass balance constraints. To ease the inclusion of fugacity equality, it is reformulated in terms of equilibrium ratios and then introduced with a relaxation parameter such that phase split calculations are extended to the single-phase regime. This makes it technologically feasible to incorporate the fugacity equality constraint into the proposed PcNN model without any computational difficulty. The workflow for the development of the proposed PcNN model includes four steps. Step 1: Perform the constrained Latin hypercube sampling (LHS) to generate representative mixtures covering a variety of fluid types, including wet gas, gas condensate, volatile oil, and black oil. Step 2: Conduct PT flash calculations using the Peng-Robinson (PR) EOS for each fluid mixture. A wide range of reservoir pressures and temperatures are considered, from which we sample the training data for each fluid mixture through grid search. Step 3: Build an optimized PcNN model by including the fugacity equality and mass conservation constraints in the loss function. Bayesian optimization is used to determine the optimal hyperparameters. Step 4: Validate the PcNN model. In this step, we conduct blind validation by comparing it with the iterative PT flash algorithm.
Original languageEnglish (US)
Title of host publicationDay 1 Tue, March 28, 2023
StatePublished - Mar 21 2023

Bibliographical note

KAUST Repository Item: Exported on 2023-03-24
Acknowledgements: We would like to thank Saudi Aramco for funding this research. We would also like to thank King Abdullah University of Science and Technology (KAUST) for providing a license for MATLAB.


Dive into the research topics of 'Physics-Constrained Neural Network (PcNN): Phase Behavior Modeling for Complex Reservoir Fluids'. Together they form a unique fingerprint.

Cite this