Decline Curve Analysis Functions
Classic and unconventional decline models, decline diagnostics, rate conversions and field production profiles.
83 functions
PO.DCA.Arps.Rate(Qi, Di, b, time)
Calculates rate using Arps (1945) decline curve, [L3/T]. Units of volume [L3] and time [T] must be consistent. Use b=0 for exponential, 0<b<1 for hyperbolic, b=1 for harmonic.
PO.DCA.Arps.Prod(Qi, Di, b, time)
Calculates cumulative production using Arps (1945) decline curve, [L3]. Units of volume [L3] and time [T] must be consistent. Use b=0 for exponential, 0<b<1 for hyperbolic, b=1 for harmonic.
PO.DCA.Arps.Time(Qi, Di, b, Q_econ)
Time to reach an economic rate limit for Arps decline, [T]. Returns the time when the production rate falls to the specified economic limit.
PO.DCA.Arps.EUR(Qi, Di, b, Q_econ)
Estimated Ultimate Recovery (EUR) to an economic rate limit for Arps decline, [L3]. Returns cumulative production up to the time the rate reaches the economic limit.
PO.DCA.Arps.Fit(times, rates)
Fit Arps decline to rate-time data and return parameters as a column array [Qi, Di, b].
PO.DCA.Arps.WFit(times, rates, weights)
Fit Arps decline to rate-time data with weights and return parameters as a column array [Qi, Di, b].
PO.DCA.ModHyp.Rate(Qi, Di, Dlim, b, time)
Calculates rate using modified hyperbolic production decline curve. Units of volume [L3] and time [T] must be consistent.
PO.DCA.ModHyp.Prod(Qi, Di, Dlim, b, time)
Calculates cumulative production using modified hyperbolic production decline curve. Units of volume [L3] and time [T] must be consistent.
PO.DCA.ModHyp.Time(Qi, Di, Dlim, b, Q_econ)
Time to reach an economic rate limit for modified hyperbolic decline, [T]. Returns the time when the production rate falls to the specified economic limit.
PO.DCA.ModHyp.EUR(Qi, Di, Dlim, b, Q_econ)
Estimated Ultimate Recovery (EUR) to an economic rate limit for modified hyperbolic decline, [L3]. Returns cumulative production up to the time the rate reaches the economic limit.
PO.DCA.ModHyp.Fit(times, rates)
Fit Modified Hyperbolic decline to rate-time data and return parameters as a column array [Qi, Di, Dlim, b].
PO.DCA.ModHyp.WFit(times, rates, weights)
Weighted fit of Modified Hyperbolic decline to rate-time data and return parameters as a column array [Qi, Di, Dlim, b].
PO.DCA.THM.Rate(Qi, Di, bi, bf, telf, time)
Calculates production rate using Transient Hyperbolic Model. Units of volume [L3] and time [T] must be consistent.
PO.DCA.THM.Prod(Qi, Di, bi, bf, telf, time)
Calculates cumulative production using Transient Hyperbolic Model. Units of volume [L3] and time [T] must be consistent.
PO.DCA.THM.Time(Qi, Di, bi, bf, telf, Q_econ)
Time to reach an economic rate limit for Transient Hyperbolic Model, [T].
PO.DCA.THM.EUR(Qi, Di, bi, bf, telf, Q_econ)
Estimated Ultimate Recovery (EUR) to an economic rate limit for Transient Hyperbolic Model, [L3].
PO.DCA.THM.Fit(times, rates)
Fit Transient Hyperbolic Model to rate-time data and return parameters as a column array [Qi, Di, bi, bf, telf].
PO.DCA.THM.WFit(times, rates, weights)
Weighted fit of Transient Hyperbolic Model to rate-time data and return parameters as a column array [Qi, Di, bi, bf, telf].
PO.DCA.PLE.Rate(Qi0, Di0, Dinf, n, time)
Calculates production rate using Power Law Exponential (PLE) rate decline model. Units of volume [L3] and time [T] must be consistent.
PO.DCA.PLE.Prod(Qi0, Di0, Dinf, n, time)
Calculates cumulative production using Power Law Exponential (PLE) rate decline model. Units of volume [L3] and time [T] must be consistent.
PO.DCA.PLE.Time(Qi0, Di0, Dinf, n, Q_econ)
Time to reach an economic rate limit for Power Law Exponential (PLE) decline, [T]. Returns the time when the production rate falls to the specified economic limit.
PO.DCA.PLE.EUR(Qi0, Di0, Dinf, n, Q_econ)
Estimated Ultimate Recovery (EUR) to an economic rate limit for Power Law Exponential (PLE) decline, [L3]. Returns cumulative production up to the time the rate reaches the economic limit.
PO.DCA.PLE.Fit(times, rates)
Fit Power Law Exponential (PLE) decline to rate-time data and return parameters as a column array [Qi_intercept, Di_intercept, D_inf, n].
PO.DCA.PLE.WFit(times, rates, weights)
Weighted fit of Power Law Exponential (PLE) decline to rate-time data and return parameters as a column array [Qi_intercept, Di_intercept, D_inf, n].
PO.DCA.SEDM.Rate(Qi, tau, n, time)
Calculates production rate using Stretched Exponential decline model. Units of volume [L3] and time [T] must be consistent.
PO.DCA.SEDM.Prod(Qi, tau, n, time)
Calculates cumulative production using Stretched Exponential decline model. Units of volume [L3] and time [T] must be consistent.
PO.DCA.SEDM.Time(Qi, tau, n, Q_econ)
Time to reach an economic rate limit for Stretched Exponential decline, [T].
PO.DCA.SEDM.EUR(Qi, tau, n, Q_econ)
Estimated Ultimate Recovery (EUR) to an economic rate limit for Stretched Exponential decline, [L3].
PO.DCA.SEDM.Fit(times, rates)
Fit Stretched Exponential decline to rate-time data and return parameters as a column array [Qi, Tau, N].
PO.DCA.SEDM.WFit(times, rates, weights)
Weighted fit of Stretched Exponential decline to rate-time data and return parameters as a column array [Qi, Tau, N].
PO.DCA.EEDM.Rate(Qi, BetaL, BetaE, n, time)
Calculates production rate using Extended Exponential Decline Model (EEDM). Units of volume [L3] and time [T] must be consistent.
PO.DCA.EEDM.Prod(Qi, BetaL, BetaE, n, time)
Calculates cumulative production using Extended Exponential Decline Model (EEDM). Units of volume [L3] and time [T] must be consistent.
PO.DCA.EEDM.Time(Qi, BetaL, BetaE, n, Q_econ)
Time to reach an economic rate limit for Extended Exponential Decline Model (EEDM), [T].
PO.DCA.EEDM.EUR(Qi, BetaL, BetaE, n, Q_econ)
Estimated Ultimate Recovery (EUR) for Extended Exponential Decline Model (EEDM). Returns Q0/BetaL (approximate EUR based on terminal decline), [L3].
PO.DCA.EEDM.Fit(times, rates)
Fit Extended Exponential Decline Model (EEDM) to rate-time data and return parameters as a column array [Q0, BetaL, BetaE, n].
PO.DCA.EEDM.WFit(times, rates, weights)
Weighted fit of Extended Exponential Decline Model (EEDM) to rate-time data and return parameters as a column array [Q0, BetaL, BetaE, n].
PO.DCA.Duong.Rate(q1, Qinf, a, m, time)
Calculates rate using Duong decline model, [L3/T]. Units of volume [L3] and time [T] must be consistent.
PO.DCA.Duong.Prod(q1, Qinf, a, m, time)
Calculates cumulative production using Duong decline model, [L3]. Units of volume [L3] and time [T] must be consistent.
PO.DCA.Duong.Time(q1, Qinf, a, m, Q_econ)
Time to reach an economic rate limit for Duong decline, [T]. Returns the time when the rate falls to the specified limit.
PO.DCA.Duong.EUR(q1, Qinf, a, m, Q_econ)
Estimated Ultimate Recovery (EUR) to an economic rate limit for Duong decline, [L3].
PO.DCA.Duong.Fit(times, rates)
Fit Duong decline to rate-time data and return parameters as a column array [q1, qInf, a, m].
PO.DCA.Duong.WFit(times, rates, weights)
Weighted fit of Duong decline to rate-time data and return parameters as a column array [q1, qInf, a, m].
PO.DCA.LGM.Rate(K, a, n, time)
Calculates production rate using Logistic Growth Model (LGM). Units of volume [L3] and time [T] must be consistent.
PO.DCA.LGM.Prod(K, a, n, time)
Calculates cumulative production using Logistic Growth Model (LGM). Units of volume [L3] and time [T] must be consistent.
PO.DCA.LGM.Time(K, a, n, Q_econ)
Time to reach an economic rate limit for Logistic Growth Model (LGM), [T].
PO.DCA.LGM.EUR(K, a, n, Q_econ)
Estimated Ultimate Recovery (EUR) for Logistic Growth Model (LGM). Returns K (carrying capacity), [L3].
PO.DCA.LGM.Fit(times, rates)
Fit Logistic Growth Model (LGM) to rate-time data and return parameters as a column array [K, a, n].
PO.DCA.LGM.WFit(times, rates, weights)
Weighted fit of Logistic Growth Model (LGM) to rate-time data and return parameters as a column array [K, a, n].
PO.DCA.AKB.Rate(Qi, alpha, beta, time)
Calculates production rate using Ansah-Knowles-Buba (2000) semi-analytical decline model for bounded reservoirs. Units of volume [L3] and time [T] must be consistent.
PO.DCA.AKB.Prod(Qi, alpha, beta, time)
Calculates cumulative production using Ansah-Knowles-Buba (2000) semi-analytical decline model for bounded reservoirs. Units of volume [L3] and time [T] must be consistent.
PO.DCA.AKB.Time(Qi, alpha, beta, Q_econ)
Time to reach an economic rate limit for Ansah-Knowles-Buba (2000) decline, [T]. Returns the time when the production rate falls to the specified economic limit.
PO.DCA.AKB.EUR(Qi, alpha, beta, Q_econ)
Estimated Ultimate Recovery (EUR) to an economic rate limit for Ansah-Knowles-Buba (2000) decline, [L3]. Returns cumulative production up to the time the rate reaches the economic limit.
PO.DCA.AKB.Fit(times, rates)
Fit Ansah-Knowles-Buba (2000) decline to rate-time data and return parameters as a column array [Qi, Alpha, Beta].
PO.DCA.AKB.WFit(times, rates, weights)
Weighted fit of Ansah-Knowles-Buba (2000) decline to rate-time data and return parameters as a column array [Qi, Alpha, Beta].
PO.DCA.Diag.Bourdet(x_values, y_values, t, L)
Calculates the Bourdet (smoothed) derivative at point t. Used for flow regime identification and production diagnostics.
PO.DCA.Diag.Beta(time, rate, t, L)
Computes the beta diagnostic β = t×D(t) for flow regime identification. β≈0.5: linear flow, β≈0.25: bilinear, β≈1.0: boundary-dominated.
PO.DCA.Diag.bParam(time, rate, t, L)
Computes the time-varying Arps b-parameter. b=0: exponential, 0<b<1: hyperbolic, b=1: harmonic, b>1: transient (unconventional).
PO.DCA.Arps.D(Qi, Di, b, time)
Calculates instantaneous decline rate D(t) for Arps decline, [1/T]. D(t) = Di/(1+b×Di×t). Computed numerically.
PO.DCA.ModHyp.D(Qi, Di, Dlim, b, time)
Calculates instantaneous decline rate D(t) for Modified Hyperbolic decline, [1/T]. Computed numerically.
PO.DCA.PLE.D(Qi0, Di0, Dinf, n, time)
Calculates instantaneous decline rate D(t) for Power Law Exponential (PLE) model, [1/T]. D(t) = D∞ + n×Di0×t^(n-1). Computed numerically.
PO.DCA.SEDM.D(Qi, tau, n, time)
Calculates instantaneous decline rate D(t) for Stretched Exponential model, [1/T]. D(t) = (n/τ)×(t/τ)^(n-1). Computed numerically.
PO.DCA.EEDM.D(Qi, BetaL, BetaE, n, time)
Calculates instantaneous decline rate D(t) for Extended Exponential Decline Model (EEDM), [1/T]. Computed analytically.
PO.DCA.Duong.D(q1, Qinf, a, m, time)
Calculates instantaneous decline rate D(t) for Duong model, [1/T]. Computed numerically.
PO.DCA.LGM.D(K, a, n, time)
Calculates instantaneous decline rate D(t) for Logistic Growth Model (LGM), [1/T]. Computed analytically.
PO.DCA.THM.D(Qi, Di, bi, bf, telf, time)
Calculates instantaneous decline rate D(t) for Transient Hyperbolic Model, [1/T]. Computed analytically.
PO.DCA.AKB.D(Qi, alpha, beta, time)
Calculates instantaneous decline rate D(t) for Ansah-Knowles-Buba (2000) decline, [1/T]. Computed numerically.
PO.DCA.Convert.NominalToEffective(Dn)
Converts nominal (continuous) decline rate to effective (periodic) decline rate. De = 1 - exp(-Dn).
PO.DCA.Convert.EffectiveToNominal(De)
Converts effective (periodic) decline rate to nominal (continuous) decline rate. Dn = -ln(1 - De).
PO.DCA.Convert.AnnualToMonthly(Da)
Converts annual effective decline rate to monthly effective decline rate using compound conversion.
PO.DCA.Convert.MonthlyToAnnual(Dm)
Converts monthly effective decline rate to annual effective decline rate using compound conversion.
PO.DCA.Convert.DailyToAnnual(Dd)
Converts daily effective decline rate to annual effective decline rate using compound conversion.
PO.DCA.Data.OutlierFlag(time, rate, window, nSigma)
Flags outliers using rolling window Z-score analysis. Returns TRUE for data points that are outliers based on local statistics.
PO.DCA.Data.Clean(time, rate, window, nSigma)
Cleans production data by interpolating over outlier points. Returns cleaned rate array with outliers replaced by interpolated values.
PO.Stats.SSE(observed, predicted)
Computes the sum of squared errors (SSE) between observed and predicted rate sequences. Returns a scalar value.
PO.Stats.WSSE(observed, predicted, weights)
Computes the weighted SSE between observed and predicted sequences.
PO.Stats.LogSSE(observed, predicted)
Computes the sum of squared errors (SSE) in log-space between observed and predicted rate sequences. Small positive epsilon added before taking logs to avoid log(0).
PO.Stats.WLogSSE(observed, predicted, weights)
Computes the weighted log-space SSE between observed and predicted sequences. Small positive epsilon added before taking logs to avoid log(0).
PO.Stats.RMSE(observed, predicted)
Computes the root mean squared error (RMSE) between observed and predicted sequences. RMSE = sqrt(SSE/n).
PO.Stats.R2(observed, predicted)
Computes the coefficient of determination (R²) between observed and predicted sequences. R² = 1 - SSE/TSS. Returns 1.0 for perfect fit.
PO.FPP.Field.Rate(t_buildup, t_plateau, Q_plateau, Di, b, t)
Calculates field production rate at time t using buildup-plateau-decline model. Linear ramp during buildup, constant rate during plateau, Arps decline after. Supports exponential (b=0), hyperbolic (0<b<1), and harmonic (b=1) decline.
PO.FPP.Field.Prod(t_buildup, t_plateau, Q_plateau, Di, b, t)
Calculates cumulative field production at time t using buildup-plateau-decline model. Integrates rate over buildup, plateau, and decline phases. Supports exponential (b=0), hyperbolic (0<b<1), and harmonic (b=1) decline.
PO.FPP.Sched.Rate(timeSeries, profile, schedule, t)
Calculates aggregated field rate from drilling schedule. Uses convolution of well profile with drilling schedule.
PO.FPP.Sched.Prod(timeSeries, profile, schedule, t)
Calculates cumulative field production from drilling schedule. Uses trapezoidal integration of aggregated rate profile.