This project implements a Black-Oil reservoir model in Python to simulate the behavior of oil, gas, and water phases under standard black-oil assumptions. It is intended for educational purposes and as a foundation for future reservoir simulation development.
- Python 3.10+ (It is not recommended to use the latest version)
- Dependencies listed in
requirements.txt(numpy, pandas, barril)
Clone the repository and create a virtual environment:
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txtThen run the main script
python main.pymain.py– main execution scriptrequirements.txt– project dependenciesvenv/– virtual environment
Below are the thermodynamic correlations/equations used and their respective authors:
- Gas Specific Gravity (Defined Relative to Dry Air at Standard Conditions)
- Pseudoreduced Pressure and Temperature (Defined from Pseudocritical Properties)
- Pseudocritical pressure and temperature (R. P. Sutton Correlation, 1985)
- Gas Density (Real Gas Equation of State)
- Gas Compressibility Factor (Papay Correlation, 1985)
- Gas Reduced Isothermal Compressibility (Derived from the Real Gas Equation of State)
- Gas Formation Volume Factor (Calculated from the Real Gas Equation of State under Standard Conditions)
- Gas Expansion Factor (Inverse of Gas Formation Volume Factor)
- Gas Viscosity (Lee et al. Correlation, 1966)
- Oil Specific Gravity (Defined Relative to Water)
- API Gravity (Derived from Oil Specific Gravity)
- Bubble-Point Pressure (Standing Correlation, 1947)
- Solution Gas–Oil Ratio (Standing Correlation, 1947; constant above the bubble-point pressure)
- Oil Isothermal Compressibility (Standing Correlation above the bubble-point pressure; definition-based below the bubble-point pressure)
- Oil Formation Volume Factor (Exponential model above the bubble-point pressure; Standing Correlation, 1947 below the bubble-point pressure)
- Total Formation Volume Factor (Equal to the oil formation volume factor above the bubble-point pressure; includes liberated gas contribution below the bubble-point pressure)
- Oil Density (Exponential model above the bubble-point pressure; formation-volume-factor-based definition below the bubble-point pressure)
- Dead Oil Viscosity (Beal–Standing Correlation, 1981)
- Saturated Oil Viscosity (Standing Correlation, 1981; valid below the bubble-point pressure)
- Undersaturated Oil Viscosity (Beal–Standing Correlation, 1981; valid above the bubble-point pressure)
- Water Density (Salinity-Based Correlation at Standard Conditions)
- Gas–Water Solubility Ratio (Pressure and temperature dependent correlation)
- Water Isothermal Compressibility (Pressure, temperature, and salinity dependent correlation, valid for pressures between 1000 and 20000 psia, temperatures between 200 and 270 °F, and salinity up to 200 mg/L)
- Water Formation Volume Factor (Definition accounting for thermal expansion and pressure effects)
- Water Viscosity (Temperature and salinity dependent correlation at atmospheric pressure with pressure correction)