gas_pressure_from_pz
Calculate reservoir pressure from P/Z values for gas material balance analysis. Essential for volumetric reserves estimation, aquifer influx detection, and drive mechanism identification in petroleum engineering.
Instructions
Calculate pressure from P/Z value.
MATERIAL BALANCE TOOL - Solves for pressure given a P/Z (pressure/Z-factor) value. Essential for gas material balance analysis where P/Z vs cumulative production is plotted. Uses iterative solution to find pressure that yields the specified P/Z value.
Parameters:
pz (float or list, required): P/Z value(s) in psia. Must be > 0. Can be scalar or array. Example: 5000.0 or [4000, 5000, 6000].
sg (float, required): Gas specific gravity (air=1.0). Valid: 0.55-3.0. Typical: 0.6-1.2. Example: 0.7.
degf (float, required): Reservoir temperature in °F. Valid: -460 to 1000. Typical: 100-400°F. Example: 180.0.
h2s (float, optional, default=0.0): H2S mole fraction (0-1). Typical: 0-0.05. Example: 0.0.
co2 (float, optional, default=0.0): CO2 mole fraction (0-1). Typical: 0-0.20. Example: 0.0.
n2 (float, optional, default=0.0): N2 mole fraction (0-1). Typical: 0-0.10. Example: 0.0.
zmethod (str, optional, default="DAK"): Z-factor method for calculation. Options: "DAK", "HY", "WYW", "BUR". DAK recommended.
P/Z Method Applications:
Volumetric Gas Reserves: P/Z vs Gp plot gives GIIP (Gas Initially In Place)
Aquifer Influx Detection: Deviation from straight line indicates water drive
Drive Mechanism Identification: Volumetric vs water drive vs gas cap
Production Forecasting: Extrapolate P/Z to abandonment pressure
Material Balance Principle: For volumetric gas reservoirs: P/Z = (Pi/Zi) × (1 - Gp/G) Where Gp = cumulative production, G = GIIP
A straight line on P/Z vs Gp indicates volumetric depletion. Deviation suggests water influx, changing pore volume, or gas cap expansion.
Solution Method: Iterative Newton-Raphson method to solve: P/Z - pz_target = 0 Converges rapidly for well-posed problems.
Returns: Dictionary with:
value (float or list): Pressure in psia (matches input pz shape)
method (str): Iterative solution method with Z-factor method
units (str): "psia"
inputs (dict): Echo of input parameters
Common Mistakes:
Using separator temperature instead of reservoir temperature
Not accounting for non-hydrocarbon fractions
Confusing P/Z (pressure/Z-factor) with pressure
Using wrong Z-factor method (must match method used in material balance)
Temperature in Celsius instead of Fahrenheit
Example Usage:
Result: Pressure ≈ 4500-5500 psia (depends on Z-factor at that pressure).
Note: P/Z method is fundamental to gas material balance. Always use the same Z-factor method throughout your analysis for consistency. Account for all non-hydrocarbon components as they affect Z-factor and thus P/Z values.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |