Skip to content

MINT — Validation Report

Every correlation, its validation status, and the evidence. Updated 6 Aug 2026 · 436 tests · branch joleks

Nobody else in this market publishes this. That is the point — this file becomes the public /validation page. An engineer who can see exactly how far we have proven each model will trust the ones we have proven and treat the rest with the caution they deserve.


Validation levels

Level Meaning
🟢 VALIDATED Reproduces a published worked example to the precision the source prints
🔵 DIAGNOSED Deviates from a published example, and the deviation is isolated to a named cause with evidence
🟡 BEHAVIOUR No published reference checked yet. Tested for physical correctness — monotonicity, limits, inverses, stability
⚪ UNTESTED Implemented, not yet exercised

Honest framing: 🟡 is not "probably fine." Behaviour tests caught eleven real bugs in this codebase, including a factor-of-10⁶ unit error and a correlation that inflated its output 2.7×. But they cannot tell you whether Standing's constants are right. Only 🟢 can.


Summary

Count
🟢 Validated against published numbers 7
🔵 Diagnosed 1
🟡 Behaviour-tested 48
⚪ Untested 0

Inflow — oil

Model Level Evidence Accuracy
Vogel 🟢 Guo 2nd ed, Ex 3.6 qmax 978 stb/day exact · all 7 published curve points within 5 psi
Fetkovich 🟢 Guo 2nd ed, Ex 3.6 all 7 points within 2 psi · AOF 900 stb/day exact
Fetkovich multi-rate fit 🟢 Guo 2nd ed, Ex 3.6 recovers published n = 1.0 and C = 0.0001 from raw test points, rel 1e-3
Composite (linear + Vogel) 🟢 Guo 2nd ed, Ex 3.5 Well B J* = 0.3156 stb/day-psi, rel 1e-3
Productivity Index 🟡 — straight line, endpoints, monotonic
Jones (Darcy + non-Darcy) 🟡 — round-trips, endpoints, AOF from quadratic root
Darcy PSS / steady 🟡 — J scales linearly with kh; skin reduces, stimulation increases
Darcy transient 🟡 — rejects times too short for infinite-acting flow
Joshi horizontal 🟡 — geometry term positive, physical J
Babu-Odeh horizontal 🟡 — physical J, rejects bad drainage geometry
Jones multi-rate fit 🟡 — recovers known a, b to 1e-6 from synthetic points
Vogel AOF least-squares fit 🟡 — fits through origin

Inflow — gas

Model Level Evidence Accuracy
Back Pressure (Rawlins-Schellhardt) 🟡 — round-trips exactly; n=0.5 gives lower AOF than n=1
Back Pressure (pseudo-pressure) 🟡 — endpoints, monotonic
Forchheimer / LIT (p²) 🟡 — round-trips exactly; a=0 reduces to pure Darcy
Forchheimer (pseudo-pressure) 🟡 — endpoints
Darcy gas 🟡 — AOF scales exactly ×10 with k ×10; skin ordering correct
Modified Isochronal 🟡 — reproduces the stabilised anchor point to 1e-6
C&n multi-rate fit 🟡 — recovers known C, n to 1e-6
Forchheimer multi-rate fit 🟡 — recovers known a, b to 1e-6
Pseudo-pressure m(p) 🟡 — monotonic, inverts to 1e-3, super-linear as expected

Outflow — VLP

Model Level Evidence Accuracy
Poettmann-Carpenter 🟢 Guo 2nd ed, Ex 4.2 BHP 1701 vs 1699 psia — 0.1% · 14 of 14 printed intermediates within 2%
Static gas column 🟢 average-T-and-z method (Guo Ch.4, analytic) traverse at vanishing gas rate reproduces the closed form to 0.2% — correlation-independent anchor for the whole gas path
Guo-Ghalambor (four-phase) 🟢 Guo 2nd ed, Ex 4.4 pwf 1658 vs 1682 psia (1.4%) — within the book's own self-disagreement: its printed groups through its printed equation give 1660. Found a misprint in the 2nd ed (cosθ placement in Eqs 4.33-34); the spreadsheet's printed M, N back-solve exactly to the 2005 formulation, which we implement. a, b, c, e match to print precision
Sagar-Doty-Schmidt thermal 🔵 SPE 19702 (no worked example printed) closed form matches RK4 integration of the paper's own ODE to 1e-4 K over 4000 steps; wellhead T rises with rate; gas annulus insulates; F_c inside the paper's Fig. 4 band at database-average conditions
Hagedorn-Brown 🔵 Guo 2nd ed, Ex 4.6 traverse +9.4% on the raw run. Cause isolated: oil density (ours 49.6 vs book-implied 45.4 lb/ft³). Pin density, change nothing else → 3188 vs 3157 psia, 1.0%. Hydraulics correct; residual is PVT.
Beggs-Brill (+ Payne) 🟡 — flow patterns identified, holdup ≥ no-slip, inclination sign correct, stable across 16 velocity combinations
Fancher-Brown 🟡 — is the lower bound on every other correlation, as designed
Pressure traverse integrator 🟢 via P-C and H-B above step refinement converges <2% from 100 m → 10 m

⚠️ Note on Ex 4.6: at GLR 75 scf/bbl the bubble point is 340 psia, so the well is undersaturated over 97% of its length. That example is a hydrostatic-column test, not a real multiphase test. A high-GOR published example is needed before Hagedorn-Brown can go 🟢.

PVT — oil

Correlation Level Evidence
Standing Rs / Pb / Bo 🟡 Rs↔Pb mutual inverses to 1e-3; Rs = 78.42 scf/stb matched Guo Ex 4.2 exactly inside the P-C validation
Glaso Rs / Pb / Bo 🟡 mutual inverses
Petrosky-Farshad Rs / Pb / Bo 🟡 mutual inverses (sign bug found and fixed here)
Vasquez-Beggs Rs / Pb / Bo 🟡 mutual inverses; separator correction changes result; API-30 branch switch verified
Al-Marhoun Rs / Pb 🟡 mutual inverses
Lasater Pb 🟡 physical range; zero GOR → zero Pb
Beal / Beggs-Robinson / Glaso / Egbogah dead viscosity 🟡 falls with T, rises as oil gets heavier, plausible range
Chew-Connally / Beggs-Robinson saturated viscosity 🟡 dissolved gas thins the oil (sign check)
Vasquez-Beggs undersaturated viscosity 🟡 rises above Pb, continuous at Pb
Vasquez-Beggs / Petrosky-Farshad / McCain Co 🟡 1e-7–1e-4 /psi, falls with pressure
Oil density (material balance) 🔵 9% above Guo Ex 4.6's implied value — under investigation, see H-B row

PVT — gas & water

Correlation Level Evidence
Hall-Yarborough z 🟡 residual driven to <1e-8 at the root across 30 (Tpr, Ppr) pairs; agrees with DAK within 1.6%
Dranchuk-Abou-Kassem z 🟡 independent cross-check on Hall-Yarborough
Sutton pseudo-criticals 🟡 physical range for natural gas
Wichert-Aziz sour correction 🟡 lowers Tpc and Ppc; exact no-op for sweet gas
Lee-Gonzalez-Eakin viscosity 🟡 0.005–0.10 cP range
McCain Bw / μw / Rsw / Cw / density 🟡 all monotonic in the right direction; Fahrenheit-vs-Rankine bug found and fixed here

System

Component Level Evidence
Nodal solve 🟢 closed-form analytic case to 1e-9 · axis-independence: identical answer at 12 and 1000 grid points · verified on a real U-shaped VLP producing 3 intersections, correct stable one selected
Units layer 🟢 round-trips every quantity through every display system to 1e-12 · affine temperature and gauge/absolute pressure explicitly tested
Applicability envelopes 🟢 published ranges asserted against the literature values (e.g. Vasquez-Beggs 15.3–59.3 °API)

New since last update — behaviour-tested

Module Models Level
Matching engine shared regression, VLP α/β, IPR productivity 🟡 recovers known multipliers to 1e-6 from synthetic data
PVT lab matching PROSPER's Regression function, correlation ranking 🟡 recovers 1.12/1.04 multipliers exactly; ranking identifies the fitting correlation at <1e-6%
Skin Karakas-Tariq, MacLeod, Brons-Marting, Cinco-Ley, gravel pack 🟡 signs, limits and monotonicity pinned
VLP Duns-Ros, Orkiszewski, Gray 🟡 all above the no-slip floor, stable over a 96-point sweep

Artificial Lift - continuous gas lift

Component Level Evidence
Injection requirement, Eqs. 13.1-13.2 DIAGNOSED Production Engineering Ex. 13.1: interpolation gives 3,072 scf/STB and injection GLR 2,772 scf/STB. The book prints (2,772)(632) = 1,720,000; correct multiplication is 1,751,904 scf/d. MINT returns the equation result and documents the source error.
Injection-depth-aware VLP BEHAVIOUR bounded traverses recombine to the unchanged full-well answer; injected free gas affects only the tubing above the mandrel; existing VLP regression suite remains green
Performance/economic sweep BEHAVIOUR finds interior max-rate point on a rolling synthetic curve; economic optimum can sit below max-rate optimum; failed cases remain visible; real PVT-to-VLP-to-nodal test lifts a dead well to a stable point
Ex. 13.1 full operating point DIAGNOSED not reproducible as printed: its Vogel IPR gives 1,391 psia at injection depth at 632 STB/d, not the reported 698 psia; three referenced spreadsheets and their PVT/thermal inputs are absent
Valve spacing, Eqs. 13.49/13.53 DIAGNOSED Production Engineering Ex. 13.5 is internally inconsistent: its printed inputs give 2,238.91 ft then 3,759.05 ft, not 2,245 then 3,004 ft. The independent Production Systems Eq. 11.22 / Ex. 11.5 fixture reproduces all six depths within 2 ft.
Unbalanced-bellows mechanics PUBLISHED EXAMPLE Production Engineering Ex. 13.7 valve 1: 817 psig dome pressure at depth, 683 psig at 60 °F after temperature/z correction, and 918 psig test-rack opening pressure reproduced.
Unloading sequence BEHAVIOUR opening/closing hysteresis is stateful; failed transfer and still-open shallower valves are explicit diagnostics
Existing mandrels ALGORITHMIC ordered one-to-one assignment globally minimizes total absolute depth error under the caller's tolerance; infeasible hardware returns no misleading partial design
Valve port capacity PUBLISHED EXAMPLE Production Engineering Eq. 13.56 / Ex. 13.6 reproduces 0.1684 in² required area and 0.4631 in diameter; ideal-gas critical ratio and choked-capacity plateau are independently pinned
Port catalog selection ALGORITHMIC smallest adequate caller-supplied diameter is selected; undersized ports, area margin, supported gas rate, and infeasible catalogs are tested explicitly; no vendor catalog is embedded
API RP 11V2 tested-Cv/Xt flow PUBLISHED EXAMPLE full standard Appendix A reproduced at 496 MSCF/day, including Fk·Xt choking and expansion factor
API RP 11V2 probe analysis PUBLISHED EXAMPLE Appendix C reproduced at 606.71 psi/in bellows load rate and 0.098 in maximum effective stem travel
API RP 11V2 physical test conformance EXTERNAL EVIDENCE calculations are implemented; apparatus geometry, calibration, accuracy, procedure, facility/operator, specimen drawings, and Data Forms 1-4 must come from the executing laboratory

The twelve bugs these tests caught

# Where What Severity
1 legacy pdt.py Nodal compared IPR and VLP by row index on different axes operating point was never the intersection
2 legacy gas.py Hall-Yarborough Newton residual computed outside the loop never converged, one step only
3 legacy gas.py Route '/ calculate_viscosity' — leading space 404 since written
4 legacy fwater.py Rankine passed where McCain specifies Fahrenheit every water number wrong
5 legacy gas.py Module-level lists appended per request results drifted between users
6 pvt/oil.py rs_petrosky_farshad used −X where the inverse needs +X Rs inflated 2.7×
7 ipr/gas_models.py m(p) SI→field divided instead of multiplied factor of 10⁶ on every gas rate
8 ipr/pseudo_pressure.py Table missing the origin spurious floor under every AOF
9 ipr/oil_models.py Rejected n = 1.0000000000000084 from a clean fit valid model refused
10 vlp/poettmann_carpenter.py Mass on a per-stb-liquid basis where Guo works per stb-oil column 25% light
11 vlp/poettmann_carpenter.py Free-gas volume dropped the z-factor; Moody/Fanning friction confusion 5% and 4× respectively
12 vlp/correlations.py Duns-Ros slip inversion took (vm − v_s) where the root needs (v_s − vm) returned the gas complement, holdup saturated at 1.0 with gas flowing

What would move things to 🟢

  1. High-GOR VLP example → Hagedorn-Brown and Beggs-Brill
  2. Guo Ch.2 PVT tables → Standing, Vasquez-Beggs, Glaso and the gas correlations
  3. Guo Ex 6.2 nodal → whole-chain validation
  4. Resolve the 9% oil density gap → unblocks every VLP number
  5. TUFFP data bank → the 1,712-case multiphase bank; the one validation asset money can buy

What we do not claim

  • ±15% on multiphase ΔP is state of the art. Published comparison studies put single-correlation MAPE between 12.7% and 57.5% depending on fluid. Anyone claiming better across a broad dataset is overfitting.
  • Correlations outside their published envelope are extrapolations. MINT flags this at the point of use and names the offending variable — see the applicability badges.
  • No number here was tuned against PROSPER, whitson, or any competitor's output. Validation is against published worked examples and, in future, field data.

Blocked on source quality — Petalas-Aziz (1998)

Not implemented. The paper in books/petalas1998.pdf is a scan whose OCR has destroyed the exponents in the friction correlations.

Two independent extractors (pypdf, pdfplumber) return the same damage:

Eq. 10   f, = 0.452fF'                       <- exponent on f_sL lost
Eq. 12   f; = (0.004 + 0.5 x 10m6R e,)Fry    <- exponent on Fr_L lost

Those exponents are not decoration; they are the correlation. The structure is readable (dispersed-bubble bounds via Gregory slug holdup, stratified momentum balance with Taitel-Dukler geometry, Kelvin-Helmholtz stability, Barnea's steep-downhill annular transition), but a mechanistic model assembled with guessed exponents returns plausible numbers that are wrong — the exact failure mode the "never implement from memory" rule exists to prevent, and which has caught more than twenty bugs in this repo including a misprint in Guo's own textbook.

To unblock: a text-layer copy of Petalas, N. & Aziz, K., "A Mechanistic Model for Multiphase Flow in Pipes" (CIM 98-39 / J. Cdn. Pet. Tech. 39(6), 2000). OnePetro or the Petroleum Society archive. Drop it in books/ and it builds the same day, the same way Sagar-Doty-Schmidt and Ansari did.


Blocked on source — sand-control completions

Not implemented: wire-wrapped screen and slotted-liner completion pressure drop. Both books in books/ discuss sand control conceptually (frac-pack, gravel sizing, proppant conductivity) but print no completion pressure-drop model for either. Implementing them would be from memory, which is the one thing this engine does not do.

To unblock: Golan & Whitson, Well Performance (2nd ed.) Ch. 4, or Furui, Zhu & Hill on screen completions. Either in books/ and both models build the same day.

It is the ONLY model in the engine without a source line. The equation

s_g = k h L_g / (k_g n pi r_p^2)

is the standard gravel-pack skin and its behaviour is correct — skin rises with tunnel length, falls with shot density and gravel permeability, and the existing tests exercise it — but the citation needs verifying against a source before any number from it goes into a customer-facing report. Everything else in this engine can name where it came from; this cannot, and that inconsistency is worth closing rather than leaving implicit.


Resolved: compositional traverse across the phase boundary

The known limitation recorded when CompositionalFluid landed — a traverse crossing the saturation pressure would not converge — is fixed, and the test that pinned it has been inverted rather than deleted.

Cause. A depth step straddling the phase boundary chases a fixed point that moves underneath it: properties jump at the boundary, so the iteration oscillates.

Fix: adaptive sub-stepping. A step that fails to converge is retried in halves, up to max_substeps (default 16). This does not make the iteration cleverer — it makes the discontinuity smaller relative to the step, until it falls inside one sub-step and the rest are smooth. It is why this works where more damping does not: damping slows every segment to solve one, sub-stepping pays only where the trouble is.

Evidence it is correct, not merely convergent — the answer is step-size independent through the boundary:

outer step BHP (psia)
150 m 1864.9
75 m 1868.4
40 m 1866.0

0.2% across a 4x refinement. (A 300 m step gives 1824.7 and that is not a sub-stepping failure — ten steps for a 3000 m well is too coarse to resolve the column at all.)

Black oil is untouched: the demo well still returns Pwf 4594.24 psia, bit-identical, in 82 ms. Sub-stepping only triggers on non-convergence, so it costs nothing where it is not needed. max_substeps=1 restores the old behaviour and a test asserts it, so the mechanism's effect is attributable rather than assumed.

Also: the EOS flash is now memoised on 1 kPa / 0.05 K bins. A traverse asks for thousands of flashes at nearly-identical states and an EOS flash is three orders of magnitude dearer than a correlation. Boundary-crossing traverse 125 s -> 40 s, same answers to the decimal. The bins are 1e-4 of a reservoir pressure, far below any correlation's own accuracy, and rounding also makes properties piecewise-constant near convergence, which helps the iteration terminate rather than hurting it.


Gas-lift operations Quicklook — behavior-tested

Phase 3 implements source-backed screening behavior from Takacs, Gas Lift Manual (2005), Chapter 10, printed pp. 421-434:

  • recent, synchronized, calibrated, stabilized well-test evidence gate;
  • coincident pressure-gradient and local-temperature changes at valve depth;
  • distinct between-valve tubing-leak candidates;
  • synchronized surface patterns for backpressure, supply instability, injection restriction, high-gas/low-CHP, and heading/cycling;
  • combined findings that retain alternatives and missing confirmation; and
  • daily Phase 1 optimisation replay mapping with coverage-aware lookback accounting.

Validation grade: behavior-tested, not field-confirmed. Synthetic fixtures exercise every implemented pattern, restraint behavior, missing-data gate, unit boundary, and opportunity-accounting identity. No diagnostic threshold was fitted to competitor output. Confirmed field diagnoses require independent survey, production-log, pressure-test, equipment-response, or operating-record evidence. API RP 11V5 procedures are not claimed because the standard is not in the local source library. RP 19G5 (2019) is also now withdrawn; the current consolidated target is API RP 19GLHB R2025 with Addenda 1-3. Commercial conformance work should use that licensed package and treat 11V5/19G5 as historical or contract-specific crosswalks. The Phase 3 report defines the required field package, independent ground truth, frozen-threshold holdout process, and acceptance metrics.

Tooling closure on 2026-08-11: the full 785-test suite passes, including the 52 persistence/auth/project tests against a suite-isolated temporary SQLite database. Ruff 0.12.7 passes all Phase 3 files.


ESP v1 - published-example and analytically validated

Phase 4 uses vendor-neutral, user-entered pump curves. Takacs, Electrical Submersible Pumps Manual, Section 2.2.2.6 Eqs. 2.17-2.19 and Example 2.5 validate speed scaling: the published 3,500-rpm point scales to 1,000 bpd, 16 ft, and 18.5 hp at 2,917 rpm with efficiency unchanged.

Production Engineering Chapter 14 Example 14.1 validates hydraulic sizing: approximately 2,263 ft reference-liquid head, 37.7 required stages, and 38 selected stages. Exact SI hydrostatics give about 3,005 ft minimum setting depth versus the source's 2,997 ft using its rounded 0.433 psi/ft freshwater gradient; the source-rounding difference is documented and not tuned away.

Cable voltage drop and three-phase power loss are analytically anchored to Takacs Eqs. 3.18-3.19 and 5.17-5.18. Gauge head back-calculation is anchored to the pressure/head identity. Free-gas, viscosity, solids, temperature, clearance, and motor-loading limits are caller/manufacturer inputs. No vendor catalogue or correction curve is copied, reconstructed, or silently assumed.

Closure evidence: 77 focused tests, 815 full-suite tests, and Ruff on all Phase 4 files. Validation does not constitute manufacturer certification or field-confirmed equipment diagnosis.


Static flow assurance - source-available Phase 5 scope

API RP 14E Section 2.5(a), Eq. 2.14 anchors the erosional-velocity screen. Tests reproduce the published field-unit identity, exercise actual/allowable velocity status, and require an explicit factor basis. Solids-producing service is unavailable unless the caller supplies a documented solids-service factor; the engine does not invent a universal sand derating.

Turner et al. (1969) Eq. 6 uses the field-adjusted coefficient 1.912; Coleman et al. (1991) Eq. 3 deliberately removes Turner's 20% field increase and uses 1.593 for the reported low-pressure population. Tests keep those identities distinct and reproduce the Lea/Nickens/Wells worked example: approximately 11.30 ft/s for Coleman and 13.56 ft/s for Turner. Velocity margin, mass-conserving actual-to-standard critical-rate conversion, and Coleman's low-pressure applicability warning are also covered.

Belfroid et al. (2008) Eq. 1 is implemented in its primary-paper SI form with inclination measured from horizontal. A separately named belfroid_api19glhb method implements the different field-unit identity in API RP 19GLHB Addendum 2 Eq. 66; the two are not silently conflated. Nagoo et al. (2018) Eq. 1 is implemented directly in SI and requires local inclination from vertical plus hydraulic diameter. An ordered profile calculation applies the selected method along measured depth and reports the controlling node. Tests cover exact equation identity, angle conventions, geometry requirements, the Addendum 2 Figure 18.1 directional behavior, and profile ordering. These remain screening criteria, not field-confirmed unloading diagnoses.

Regime-depth output groups only contiguous labels already returned by the VLP traverse. Ordering, unknown labels, and single-node bands are behavior-tested; no new flow-pattern correlation, transient slug model, or severe-slugging prediction is claimed.

Refreshed closure evidence: 859 full-suite tests, 65 versioned API operations, 116 focused artificial-lift/flow-assurance tests, and Ruff pass on all Phase 5 and touched boundary files. The API RP 19GLHB R2025 base package is now present and its software-scope disposition is complete. This does not replace the manufacturer, facility, calibrated-field, or independent diagnostic evidence required for an installation or blanket conformance claim.


Artificial-lift and flow-assurance release proof

Phase 6 validates delivery and integration contracts rather than adding a new engineering model. After the base-package extension, all 116 focused artificial-lift/flow-assurance cases and the complete 859-test repository suite pass. The generated OpenAPI schema contains 22 Sowah-track operations within 65 versioned operations. Scoped Ruff passes for the complete lift/assurance implementation, its API and unit boundaries, release smoke harness, and associated tests.

The production topology was built and exercised at /app against an isolated SQLite database. All 15 smoke screens rendered without console errors, failed requests, or HTTP errors. This proves application wiring and browser behavior; it does not upgrade behavior-tested engineering models to field-confirmed or manufacturer-certified status.

Integration is not yet proven against John's newer main line. The local origin/main reference has 54 commits not in this branch, and a read-only merge audit predicts conflicts in shared API/schema/unit boundaries. Those files require deliberate reconciliation followed by the same complete proof sequence. No merge or result claim may silently select one side wholesale.


API RP 19GLHB R2025 software disposition

The complete base handbook and Addenda 1-3 are now available. The applicable continuous-lift, operations, automation/allocation, deliquification, and high-pressure boundaries are dispositioned in art_lift_fa/api-rp-19glhb-disposition.md.

The Section 12 unloading-readiness screen behavior-tests the 1 bbl/min liquid displacement limit, approximately 2%-25% initial injection-rate guidance, controlled ramp, adjustable injection control, casing/tubing pressure monitoring, and surface-capacity evidence. The Section 11 valve cross-check reproduces Table 11.12 valve 1 at approximately 1,139 psig test-rack opening pressure.

Refreshed evidence: 859 complete-suite tests, 22 Sowah-track API operations, 65 versioned API operations, and scoped Ruff pass. This is a software-scope validation statement. Manufacturer API 19G1/19G2 records, facilities, calibrated field procedures, independent diagnostic labels, and out-of-scope intermittent/dual/high-pressure designs are not certified by these tests.