Package: pyrestoolbox
pyrestoolbox-----------------------------
A collection of Reservoir Engineering Utilities
-----------------------------This set of functions focuses on those that the author uses often while
crafting programming solutions. These are the scripts that are often
copy/pasted from previous work - sometimes slightly modified - resulting
in a trail of slightly different versions over the years. Some attempt
has been made here to make this implementation flexible enough such that
it can be relied on as-is going forward.Includes functions to perform simple calculations including;Inflow for oil and gasPVT Calculations for oilPVT calculation for gasReturn critical parameters for typical componentsCreation of Black Oil Table informationCreation of layered permeability distribution consistent with a
Lorenze heterogeneity factorExtract problem cells information from Intesect (IX) print filesGeneration of AQUTAB include file influence functions for use in
ECLIPSECreation of Corey and LET relative permeability tables in Eclipse
formatCalculation of Methane and CO2 saturated brine propertiesApologies in advance that it is only in oilfield
units with no current plans to add universal multi-unit support.Changelist in 1.4.2:Corrected CO2 solubility calculations when two roots in CO2 liquid phaseChangelist in 1.4.1:Added calculation of Ezrokhi coefficients for brine density and viscosity with dissolved CO2Changelist in 1.4.0:Introduced CO2 saturated brine calculations using Spycher & Pruess modified SRK EOS methodRectified an error introduced in Gas Z-Factor calculations due to errant indentationChangelist in 1.3.9:Tweaks to speed DAK and Hall & Yarborough Z-Factor calculationsChangelist in 1.3.8:Fix bug in Hall & Yarborough Z-Factor calculationChangelist in 1.3.5:Fix bug in ECL deck zip/check recursionChangelist in 1.3.4:Extend ECL deck zip/check function to handle IX formatted decks, and support zipping multiple decks at once.Changelist in 1.3.2:Added robust Rachford Rice solver in Simulation HelpersMoved relative permeability functions and simulation helpers to seperate .simtools moduleChangelist in 1.2.0Added Component Critical Property LibraryChangelist in v1.1.4:Attempting to fix reported issue with required dependencies not installing correctlyChangelist in v1.1:Fix API to SG calculation (141.4 vs 141.5)Added lower limit to first rho_po estimate for Oil Density with McCain method to avoid negative values with high RsAdded oil_sg and oil_api functionsModified HY Z-Factor solve algorithm to improve robustnessModified DAK Z-Factor solve algorithm to improve robustnessAdded Gas Z-Factor correlation from Wang, Ye & Wu (2021)Removed 'LIN' Z-Factor method due to significant errors above 12,000 psi. Use WYW method instead if speed needed.Head to the project site for more information & documentation;https://github.com/mwburgoyne/pyResToolboxStart by importing the package;
from pyrestoolbox import pyrestoolbox as rtbFunction List includesGas Flow Rate RadialGas Flow Rate LinearOil Flow Rate RadialOil Flow Rate LinearGas Tc & Pc CalculationGas Z-FactorCalculationGas ViscosityGas Viscosity * ZGas CompressibilityGas Formation Volume FactorGas DensityGas Water of CondensationConvert P/Z to PConvert Gas Gradient to SGDelta PseudopressureGas Condensate FWS SGComponent Critical Properties LibraryOil Density from MWOil Critical Properties with TwuIncrememtal GOR post SeparationOil Bubble Point PressureOil GOR at PbOil GOR at POil CompressibilityOil DensityOil Formation Volume FactorOil ViscosityGenerate Black Oil Table dataEstimate soln gas SG from oilEstimate SG of gas post separatorCalculate weighted average surface gas SGOil API to SGOil SG to APICalculate suite of methane saturated brine propertiesCalculate suite of CO2 saturated brine propertiesLorenz coefficient from Beta valueLorenz coefficient from flow fractionLorenz coefficient to flow fractionLorenz coefficient to permeability arraySummarize IX convergence errors from PRT fileCreate Aquifer Influence FunctionsSolve Rachford Rice for user specified feed Zis and Ki'sCreate sets of rel perm tables