Utilities Overview

Introduction

Utility functions provide foundational mathematical and conversion tools that support all petroleum engineering calculations. These functions are not specific to any engineering domain but are essential building blocks used across PVT, DCA, VFP, IPR, and other areas.


Available Utility Categories

Unit Conversion

Petroleum engineering uses a mix of field units (psi, bbl, ft, °F) and SI units (Pa, m³, m, °C). The unit converter handles conversions across all common unit systems.

Key conversions:

Conversion From To
Pressure psi kPa, bar, atm
Volume bbl m³, ft³, gal
Length ft m, in, cm
Temperature °F °C, °R, K
Flow rate STB/d m³/d, bbl/hr
Viscosity cp Pa·s, mPa·s
Permeability mD m², D
API gravity °API specific gravity

📖 Full Documentation: Unit Conversions


Interpolation

Interpolation functions evaluate values between data points. These are critical for:

  • PVT table lookup — interpolating fluid properties at arbitrary pressures
  • Pump curves — finding head, efficiency, power at any flow rate
  • Relative permeability — evaluating kr at any saturation
  • Type curves — matching production data to dimensionless solutions
Method Description Best For
Linear Piecewise straight lines Monotonic data, simple tables
Cubic spline Smooth curves through data points Smooth physical properties
Proximal Nearest neighbor Categorical or step data
Step Piecewise constant Rate schedules, digital data

Available operations for each interpolation method:

Operation Description Application
Interpolation Value at any point Table lookup
Differentiation Derivative at any point Rate of change, slope
Integration Area under curve Cumulative quantities
Integration (bounded) Area between two points Production in interval
Intersection Where curve crosses a value Finding specific conditions

📖 Full Documentation: Interpolation Methods


Mathematical Functions

Function Description Used In
Exponential integral Ei(x)Ei(x) Ei(x)=xettdtEi(x) = -\int_{-x}^{\infty} \frac{e^{-t}}{t}dt PTA (line source solution)
Data differentiation Numerical derivative of discrete data DCA diagnostics, PTA analysis

Role in Engineering Workflows

Loading diagram...

Best Practices

Unit Conversion

  1. Always specify units in function inputs and outputs
  2. Convert at boundaries — convert to internal units at input, to display units at output
  3. API/SG convention — remember that higher API = lighter oil = lower SG
  4. Temperature scales — absolute temperatures (°R, K) are required for gas law calculations

Interpolation

  1. Choose the right method — cubic spline for smooth data, linear for step changes
  2. Watch for extrapolation — results outside the data range may be unreliable
  3. Monotonicity — check if the physical property should be monotonic (e.g., Pb increases with Rs)
  4. Sufficient data points — cubic spline requires at least 3 points

Utility Details

Engineering Applications

  • PVT Overview — Fluid properties requiring interpolation and unit conversion
  • DCA Overview — Decline analysis using interpolation for diagnostics
  • PTA Overview — Uses Ei function for line source solution

References

  1. Oilfield Review (2001). "Oilfield Units and Conversions." Schlumberger.

  2. Press, W.H., Teukolsky, S.A., Vetterling, W.T., and Flannery, B.P. (2007). Numerical Recipes: The Art of Scientific Computing, 3rd Edition. Cambridge University Press.

  3. de Boor, C. (1978). A Practical Guide to Splines. Springer.

  4. SPE Style Guide (2020). "SI Metric Conversion Factors." Society of Petroleum Engineers.

  5. McCain, W.D. Jr. (1990). The Properties of Petroleum Fluids, 2nd Edition. PennWell Books.

An unhandled error has occurred. Reload X