How petbox-dev/dca works
petbox-dca is a typed petroleum-engineering library for forecasting production with decline-curve models and deriving associated gas or water phases. The main workflow is to select a primary model, evaluate its rate or cumulative production over time, optionally attach a yield model for another phase, and evaluate that phase; interval-volume helpers support reporting. The standalone Bourdet function provides derivative smoothing for diagnostics. The excerpts show the shared evaluation and phase-composition interfaces, but not every model implementation, so uncertain internal wiring is omitted.
Main entry points: base.py Decline Interface · __init__.py Package API · associated.py Yield Models · primary.py Decline Models
Components 11
Public API
- Package API
petbox/dca/__init__.py - Production Outputs
petbox/dca/base.py
Primary Forecast
- Decline Interface
petbox/dca/base.py - Decline Models
petbox/dca/primary.py
Associated Phases
- Phase Interfaces
petbox/dca/base.py - Yield Models
petbox/dca/associated.py
Numerics and Diagnostics
- Numerical Integration
petbox/dca/base.py - SciPy
- Bourdet Smoothing
petbox/dca/bourdet.py - NumPy
Other components
- Engineer
Connections 16
- Engineer → Package API: uses
- Package API → Decline Interface: exports
- Package API → Decline Models: exports
- Package API → Phase Interfaces: exports
- Package API → Yield Models: exports
- Package API → Bourdet Smoothing: exports
- Decline Models → Decline Interface: extends
- Decline Interface → Decline Models: dispatches
- Decline Interface → Numerical Integration: integrates
- Numerical Integration → SciPy: calls
- Decline Interface → Production Outputs: returns
- Decline Interface → Phase Interfaces: attaches
- Yield Models → Phase Interfaces: implements
- Yield Models → Decline Interface: reads rate
- Bourdet Smoothing → NumPy: computes with
- Engineer → Bourdet Smoothing: uses