oil_density
Calculate oil density at reservoir conditions using pressure, temperature, API gravity, gas-oil ratio, gas specific gravity, and formation volume factor for gradient calculations and pressure analysis.
Instructions
Calculate oil density (ρo) at reservoir conditions.
CRITICAL PVT PROPERTY - Computes oil density from PVT properties using mass balance approach. Essential for gradient calculations, well pressure analysis, and material balance calculations.
Parameters:
p (float or list, required): Pressure(s) in psia. Must be > 0. Can be scalar or array. Example: 3000.0.
api (float, required): Oil API gravity in degrees. Valid: 0-100. Example: 35.0.
degf (float, required): Reservoir temperature in °F. Valid: -460 to 1000. Example: 180.0.
rs (float or list, required): Solution GOR at pressure p in scf/stb. Must match p shape. Example: 600.0 or [400, 600, 800].
sg_g (float, required): Gas specific gravity (air=1). Valid: 0-3. Typical: 0.6-1.2. Example: 0.75.
bo (float or list, required): Oil formation volume factor at pressure p in rb/stb. Must match p shape. Calculate using oil_formation_volume_factor tool first. Example: 1.25 or [1.15, 1.25, 1.30].
Calculation Method: Density = (Stock tank oil mass + Dissolved gas mass) / Reservoir volume ρo = (sg_o × 62.372 + 0.01357 × Rs × sg_g) / Bo
Where:
sg_o = oil specific gravity (calculated from API)
62.372 = water density at standard conditions (lb/cuft)
0.01357 = gas density conversion factor
Typical Ranges:
Light oils: 40-50 lb/cuft
Medium oils: 50-55 lb/cuft
Heavy oils: 55-65 lb/cuft
Returns: Dictionary with:
value (float or list): Density in lb/cuft (matches input p shape)
method (str): "Standard"
units (str): "lb/cuft"
inputs (dict): Echo of input parameters
Common Mistakes:
Using stock tank density instead of reservoir density
Not providing matching rs and bo arrays
Using wrong bo value (must be at same pressure as p)
Confusing density (mass/volume) with specific gravity (dimensionless)
Example Usage:
Result: Density ≈ 48-52 lb/cuft for typical medium gravity oil.
Note: Always calculate Bo first using oil_formation_volume_factor tool, then use matching rs and bo values for accurate density calculation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |