welltest_pta.bourdet_derivative
- welltest_pta.bourdet_derivative(dt, dp, L=0.2, use_smooth=True)[source]
Compute the Bourdet logarithmic pressure derivative.
Uses the three-point window formulation:
\[\left.\frac{d\,\Delta p}{d\,\ln \Delta t}\right|_i \approx \frac{\Delta p_{j_+} - \Delta p_{j_-}} {\ln\Delta t_{j_+} - \ln\Delta t_{j_-}}\]where \(j_-\) and \(j_+\) are the nearest indices to \(i\) with \(|\ln \Delta t_j - \ln \Delta t_i| \ge L\). The smoothing parameter \(L\) (typically 0.05–0.4) controls noise rejection.
- Parameters:
dt (
ndarray) – Elapsed shut-in time (or producing time) in hours, monotonically increasing, starting strictly above zero (usedt[0] = 1e-6if needed).dp (
ndarray) – Pressure change \(\Delta p = p(t) - p(t=0)\) (psi).L (
float) – Logarithmic smoothing window (default 0.2). Larger = smoother.use_smooth (
bool) – If True (default) returns the absolute value (typical for log–log plots). Set False to keep the signed derivative.
- Returns:
Arrays of elapsed time and derivative values where the central- difference formula was evaluable. Length ≤
len(dt) - 2.- Return type:
dt_out, deriv_out