A numerical Python model of gas liquid flow in petroleum wells
Abstract
The primary objective of this thesis is to develop a Python script for predicting reservoirproduction in petroleum wells, based on an existing MATLAB script. This transition ismotivated by Python’s cost-effectiveness and open-source nature, offering a free alternativeto the commercially licensed MATLAB. There are three codes: one main code that hasbeen translated from the MATLAB script, and two supplementary scripts that are built onthe main code. The study investigates the interplay between key parameters, such as well-head pressure, gas fraction, mixture velocity, and boiling pressures, utilizing three distinctPython scripts. The main script iteratively evaluates varying wellhead pressures, while twosupplementary scripts explore the effects of boiling pressure on reservoir production and therelationship between gas velocity and pressure gradient. This thesis comprises three keyaspects:
• The first aspect of the thesis focuses on validating the Python model against theo-retical expectations for single-phase flow conditions. Results demonstrate the model’saccuracy, highlighting its capacity to simulate realistic fluid dynamics within the well.
• The second aspect examines the influence of wellhead pressures on gas fraction, mix-ture velocity, and boiling pressures. Findings indicate that higher wellhead pressurescorrelate with lower gas fractions and reduced mixture velocities, aligning with fluidbehavior in multiphase flow.
• In the third part, the study explores the interaction between boiling pressures, well-head pressures, and reservoir production. The results reveal complex trends, whereincreasing boiling pressure initially enhances production due to reduced hydrostaticpressure, but at higher pressures, frictional pressure becomes dominant, diminishingproduction.
Overall, this thesis provides a robust framework for understanding gas-liquid flow dynamicsin petroleum wells, demonstrating the effectiveness of Python for digital modeling in theenergy sector. The insights gained contribute to optimizing well operations and enhancingproduction efficiency. Due to the availability of Python, further development of the modelsis encouraged. The primary objective of this thesis is to develop a Python script for predicting reservoirproduction in petroleum wells, based on an existing MATLAB script. This transition ismotivated by Python’s cost-effectiveness and open-source nature, offering a free alternativeto the commercially licensed MATLAB. There are three codes: one main code that hasbeen translated from the MATLAB script, and two supplementary scripts that are built onthe main code. The study investigates the interplay between key parameters, such as well-head pressure, gas fraction, mixture velocity, and boiling pressures, utilizing three distinctPython scripts. The main script iteratively evaluates varying wellhead pressures, while twosupplementary scripts explore the effects of boiling pressure on reservoir production and therelationship between gas velocity and pressure gradient. This thesis comprises three keyaspects:
• The first aspect of the thesis focuses on validating the Python model against theo-retical expectations for single-phase flow conditions. Results demonstrate the model’saccuracy, highlighting its capacity to simulate realistic fluid dynamics within the well.
• The second aspect examines the influence of wellhead pressures on gas fraction, mix-ture velocity, and boiling pressures. Findings indicate that higher wellhead pressurescorrelate with lower gas fractions and reduced mixture velocities, aligning with fluidbehavior in multiphase flow.
• In the third part, the study explores the interaction between boiling pressures, well-head pressures, and reservoir production. The results reveal complex trends, whereincreasing boiling pressure initially enhances production due to reduced hydrostaticpressure, but at higher pressures, frictional pressure becomes dominant, diminishingproduction.
Overall, this thesis provides a robust framework for understanding gas-liquid flow dynamicsin petroleum wells, demonstrating the effectiveness of Python for digital modeling in theenergy sector. The insights gained contribute to optimizing well operations and enhancingproduction efficiency. Due to the availability of Python, further development of the modelsis encouraged.