Affiliation:
1. King Abdullah University of Science and Technology
2. Saudi Aramco
Abstract
AbstractThe 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.
Reference37 articles.
1. A generalized machine learning-assisted phase-equilibrium calculation model for shale reservoirs;Chen;Fluid Phase Equilibria,2022
2. Fevang, Ø., Singh, K., & Whitson, C. H. (2000). Guidelines for choosing compositional and black-oil models for volatile oil and gas-condensate reservoirs. SPE Annual Technical Conference and Exhibition.
3. Firoozabadi, A., & Pan, H. (2000). Fast and robust algorithm for compositional modeling: Part i-stability analysis testing. SPE Annual Technical Conference and Exhibition.
4. A tutorial on Bayesian optimization;Frazier,2018
5. Gaganis, V., & Varotsis, N. (2012). Machine Learning Methods to Speed up Compositional Reservoir Simulation (SPE 154505). 74th EAGE Conference and Exhibition Incorporating EUROPEC 2012, cp–293.