TY - GEN

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

AU - Li, Yiteng

AU - He, Xupeng

AU - Zhang, Zhen

AU - AlSinan, Marwa

AU - Kwak, Hyung

AU - Hoteit, Hussein

N1 - 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.

PY - 2023/3/21

Y1 - 2023/3/21

N2 - 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.

AB - 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.

UR - http://hdl.handle.net/10754/690548

UR - https://onepetro.org/spersc/proceedings/23RSC/1-23RSC/D011S004R004/518331

U2 - 10.2118/212209-ms

DO - 10.2118/212209-ms

M3 - Conference contribution

BT - Day 1 Tue, March 28, 2023

PB - SPE

ER -