PetProPy
PetProPy is the fundamental package for petroleum, chemical engineering, and other similar industries. This package is useful for determining the Physical Properties of Gas, Oil, and Water.
Table of Contents
Installation
You can install PetProPy using pip:
pip install petpropy
Usage
Here is a quick example of how to use PetProPy to calculate the compressibility factor of gas at a given temperature and pressure:
INPUT
import matplotlib.pyplot as plt
import numpy as np
from petpropy import z_g
pressures = np.arange(500, 10500, 500)
temperature = 654
temp_critica = 485.9
pres_critica = 680
z_factor = z_g.dranchuk_purvis_robinson(pressures, temperature,pres_critica, temp_critica)
print(z_factor)
plt.plot(pressures, z_factor)
plt.xlabel('Pressures')
plt.ylabel('Z Factor')
plt.show()
OUTPUT
[0.89438476 0.78880765 0.7035361 0.6662592 0.67374447 0.70713281
0.75391071 0.80757742 0.86484302 0.92400223 0.98413323 1.04471578
1.10544521 1.16613807 1.22668188 1.28700724 1.34707163 1.40684971
1.46632734 1.52549774]
Pressures vs Z Factor (FOR MORE INFORMATION)
Theory
In the analysis of reservoir behavior, calculation of reserves and equipment design, knowledge of the physical properties of fluids is required. The set of tests necessary to determine these properties is called Pressure-Volume-Temperature (PVT) analysis, and consists of determining the relationships between pressure, volume and temperature for a particular mixture of hydrocarbons (liquids and gases).
Click to expand the theory section
Gas Properties
The properties of gases are calculated using the different correlations, for example:
- Weight Molecular Gas
- Specific Gravity Gas
- Pseudocritical Properties Gas
- Kay W.D.
- Stewart W.F., Burkhardt S.F. & Voo D.
- Brown G.G., Katz D.L., Oberfell G.G. & Alden R.C.
- Gas Compressibility Factor Z
- Correction of Whichert & Aziz
- Standing M.B. & Katz D.L.
- Papay J.
- Hall K.R. & Yarborough L.
- Brill J.P. & Beggs H.D.
- Dranchuk P.M., Purvis R.A. & Robinson D.B
- Dranchuk P.M. & Abou-Kassem J.H.
- Gopal V.N.
- Gas Volumetric Factor
- Gas Compressibility
- Gas Viscosity
- Lee A.L., Gonzalez M.H. & Eakin B.E.
- Gas Density
Oil Properties
The properties of oils are calculated using the different correlations, for example:
- Specific Gravity Oil
- Bubble Pressure
- Standing M.B.
- Lasater J.A.
- Vazquez M.E. & Beggs H.D.
- Glaso O.
- TOTAL C.F.P.
- Al-Marhoun M.A.
- Dokla M.E. & Osman M.E.
- Petrosky G.E. & Farshad F.F.
- Kartoatmodjo T. & Schmidt Z.
- Solution Gas-Oil Ratio
- Standing M.B.
- Lasater J.A.
- Vazquez M.E. & Beggs H.D.
- Glaso O.
- TOTAL C.F.P.
- Al-Marhoun M.A.
- Dokla Petrosky G.E. & Farshad F.F.
- Kartoatmodjo T. & Schmidt Z.
- Oil Volumetric Factor
- Standing M.B.
- Vazquez M.E. & Beggs H.D.
- Glaso O.
- TOTAL C.F.P.
- Al-Marhoun M.A.
- Dokla M.E. & Osman M.E.
- Petrosky G.E. & Farshad F.F.
- Kartoatmodjo T. & Schmidt Z.
- Total Volumetric Factor
- Glaso O.
- Al-Marhoun M.A.
- Oil Compressibility
- Vazquez M.E. & Beggs H.D.
- Petrosky G.E. & Farshad F.F.
- Kartoatmodjo T. & Schmidt Z.
- McCain W.D., Rollins J.B. & Villena-Lanzi A.J.
- Oil Viscosity
- Dead Oil Viscosity
- Beal C.
- Beggs H.B. & Robinson J.R.
- Glaso O.
- Egbogah E.O.
- Kartoatmodjo T. & Schmidt Z.
- Saturated Oil Viscosity
- Chew J.N. & Connally C.A.
- Beggs H.D. & Robinson J.R.
- Kartoatmodjo T. & Schmidt Z.
- Unsaturated Oil Viscosity
- Beal C.
- Vazquez M.E. & Beggs H.D.
- Kartoatmodjo T. & Schmidt Z.
- Dead Oil Viscosity
- Oil Density
- Gas-Oil Interfacial Tension
- Baker O. & Swerdloff W.
Water Properties
- Solution Gas-Water Ratio
- Culberson O.L. & McKetta J.J.
- McCoy R.L.
- Water Volumetric Factor
- McCain W.D.
- McCoy R.L.
- Water Compressibility
- Dodson C.R. & Standing M.B.
- Osif T.L.
- Ramey H.J.
- Water Viscosity
- Van Wingen N.
- Matthews C.S. & Russel D.G.
- McCain W.D.
- McCoy R.L.
- Water Density
- McCain W.D.
- Gas-Water Interfacial Tension
- Jennings H.Y. & Newman G.H.
Dependencies
PetProPy requires the following Python (=>3.12) libraries:
- NumPy
- Pandas
pip install -r requirements.txt
License
This project is licensed under the GNU Lesser General Public License v3.0 - see the LICENSE file for details.
API Documentation
For detailed API documentation, please refer to the official documentation.
Metadata
Release files for petpropy 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| petpropy-1.0.4.tar.gz | 33.2 kB | Without provenance | Details for petpropy-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| petpropy-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for petpropy-1.0.4-py3-none-any.whl |
Total release size: 86.3 kB
Release files / petpropy-1.0.4.tar.gz
| Download URL | petpropy-1.0.4.tar.gz |
|---|---|
| Size | 33.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c12e832d739e2f08eed3602fa1feef4f4ca0338d740950889eb565966f33751
|
|
BLAKE2b-256 checksum How to use checksums |
264f8a108f5ee04c088a31c269f833e656c2bee612143180a158681f2fb6d50d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.2
|
Release files / petpropy-1.0.4-py3-none-any.whl
| Download URL | petpropy-1.0.4-py3-none-any.whl |
|---|---|
| Size | 53.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
78888d4ec045c92a38eb8d254510620785483ff3e47b4281a60504b5345808a7
|
|
BLAKE2b-256 checksum How to use checksums |
f3743c59f6c482ee6f035c149220e7473479612f4b546506664428f6c48eddde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.2
|
Security for petpropy 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.