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 | PTA (line source solution) | |
| Data differentiation | Numerical derivative of discrete data | DCA diagnostics, PTA analysis |
Role in Engineering Workflows
Best Practices
Unit Conversion
- Always specify units in function inputs and outputs
- Convert at boundaries — convert to internal units at input, to display units at output
- API/SG convention — remember that higher API = lighter oil = lower SG
- Temperature scales — absolute temperatures (°R, K) are required for gas law calculations
Interpolation
- Choose the right method — cubic spline for smooth data, linear for step changes
- Watch for extrapolation — results outside the data range may be unreliable
- Monotonicity — check if the physical property should be monotonic (e.g., Pb increases with Rs)
- Sufficient data points — cubic spline requires at least 3 points
Related Documentation
Utility Details
- Unit Conversions — Complete conversion reference
- Interpolation Methods — Spline and interpolation functions
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
Oilfield Review (2001). "Oilfield Units and Conversions." Schlumberger.
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.
de Boor, C. (1978). A Practical Guide to Splines. Springer.
SPE Style Guide (2020). "SI Metric Conversion Factors." Society of Petroleum Engineers.
McCain, W.D. Jr. (1990). The Properties of Petroleum Fluids, 2nd Edition. PennWell Books.