Wellbore flow
Steady hydrostatic + Swamee-Jain friction + opt-in transient drift-flux with DAK Z(p,T).
Steady-state hydrostatic + frictional pressure drop (`slurryHydrostatic.ts`: 0.052·ρ_eff·TVD + Σ ΔP_friction, with slurry+proppant ρ_eff cascade). `CouplingPanel` adds a damped fixed-point gas-yield correction for ballistic stages. **Phase 8 inc 2 — opt-in transient single-phase wellbore** via `transientWellbore.ts` (1-D segmented pipe, segregated implicit Euler on mass + momentum + energy: pressure tridiag from Thomas, velocity from momentum closure v_f = (B_f − Δp_f)/A_f, separate temperature tridiag with upwind convection + U-value heat loss; Swamee-Jain Darcy-Weisbach friction). Wired into `coupledNewtonStep` as `wellboreCoupling`; surfaces `wellboreState` / `bottomholePressurePa` / `surfaceRateM3PerS` / `wellboreBottomRateM3PerS` / `wellborePicardIterations` on the result. **Phase 8 inc 3 — two-way wellbore-storage feedback** via the same hook's `twoWay: true` flag: after each accepted Newton iter the wellbore's bottom-face volumetric rate (`v[N]·A_N`) is under-relaxed (α=0.5) into the kernel injection RHS via `pointSourceRhs`, so wellbore compressibility along the string attenuates the prescribed surface pump rate seen by the fracture during transients. Default `twoWay: false` (one-way kernel→wellbore, byte-identical to inc 2). **Phase 8 inc 1b — opt-in drift-flux multiphase preview** via the same step's `multiphase: { gasSuperficialMpsPerCell, phaseProps, closures? }` field. Pure Zuber-Findlay closures in `src/lib/wellbore/driftFlux.ts` (`voidFractionZuberFindlay` α = j_g/(C₀·j_m + V_d), `mixtureDensity` ρ_m = α·ρ_g+(1−α)·ρ_l, `mixtureViscosity` μ_m = α·μ_g+(1−α)·μ_l, `phaseVelocitiesFromSuperficial` slip) drive per-iter α / ρ_m / μ_m from `j_l ≈ |v_avg|`; cell density and face friction substitute the mixture in-place; `WellboreStepResult` surfaces REQUIRED `voidFractionPerCell` + `mixtureDensityKgPerM3PerCell` (null when off). **Flow-pattern map regime classifier** shipped via `classifyFlowPattern` + `flowPatternHistogram` (`driftFlux.ts`): per-cell α → bubbly/slug/churn/annular bucket, surfaced as a stacked-bar histogram inside `MultiphaseSettingsCard`. **Phase 8 inc 1c — gas-EOS-coupled c_t** via the same multiphase block's opt-in `gasEos: { zFactor?, dZdpInvPa?, molarMassKgPerMol?, tempK?, gasDensityFromEos? }` field: `gasIsothermalCompressibility` (ideal `c_g = 1/p`, real-gas Standing-Katz form) + `gasDensityIdeal` (`ρ_g = p·M/(Z·R·T)`) + `mixtureStorageCoefficient` (`(ρ·c_t)_m = α·ρ_g·c_g + (1−α)·ρ_l·c_l`) replace the liquid-only `ρ₀·c_l`. **Phase 8 inc 1d — baked-in Standing-Katz (DAK) Z(p, T)** via the gasEos block's `useStandingKatz: true` flag + optional `standingKatzOptions: { gasGravity?, h2sMolFraction?, co2MolFraction?, pseudoCriticalPressurePa?, pseudoCriticalTempK? }` (pure `src/lib/wellbore/standingKatz.ts` — Dranchuk-Abou-Kassem 1975 reduced-density Newton iteration + Sutton 1985 pseudo-criticals + Wichert-Aziz 1972 sour-gas correction). When active, each Picard iter re-derives `zFactor` and `dZdpInvPa` per cell from local p[i] and T (defaulting to T[i]), overriding any scalar `zFactor`/`dZdpInvPa` overrides; callers no longer need to supply Z at high-pressure / sour-gas conditions. Collapses byte-identically to the scalar-Z path in the low-pressure (ideal-gas) limit. IMPLEMENTED: hydrostatic head ↓ under gas-lift, slip-corrected friction, gas-slug convergence < 60 Picard iters with α∈(0,1) and ρ_m bounded by [ρ_g, ρ_l], single-phase byte-collapse at j_g = 0, four-regime flow-pattern map, full Builder UI (phaseProps + j_g + C₀ + V_d + regime histogram), gas-EOS-coupled mass-storage (ideal + real-gas Z-factor pathway), baked-in Standing-Katz/DAK Z(p, T) + Sutton + Wichert-Aziz sour-gas correction. DEFERRED: OLGA-class transient multiphase (out of scope). Drift-guards: `transientWellbore.test.ts` (14 — incl. 3 inc-1c + 2 inc-1d Standing-Katz wired-path tests) + `driftFlux.test.ts` (25 — incl. 7 inc-1c gas-EOS helper tests + 4 regime-classifier tests) + `standingKatz.test.ts` (10 — DAK envelope + Sutton + Wichert-Aziz + monotone branches) + `coupledStepWellbore.test.ts` (2) + `coupledStepWellboreTwoWay.test.ts` (3).
Drift-flux scaffold gas-EOS-coupled c_t shipped @ Phase 8 inc 1c; flow-pattern map shipped @ Phase 8 inc 1b; baked-in Standing-Katz (DAK) Z(p, T) + Sutton + Wichert-Aziz sour-gas correction shipped @ Phase 8 inc 1d (`standingKatz.ts`, `useStandingKatz: true` opt-in). All self-contained gates on this row are closed. OLGA-class transient multiphase solver remains out of scope.
- OLGA-class transient multiphase wellbore solver
- Phase 8 inc 1shipped
l→wellbore, byte-identical to inc 2). **Phase 8 inc 1b — opt-in drift-flux multiphase preview** via the same step's `multiphase: { gasSuperficialMpsPerCell, phaseProps, closures? }` field. Pure Zuber-Findlay closures in `src/lib/wellbore/d…
- Phase 8 inc 2shipped
ield correction for ballistic stages. **Phase 8 inc 2 — opt-in transient single-phase wellbore** via `transientWellbore.ts` (1-D segmented pipe, segregated implicit Euler on mass + momentum + energy: pressure tridiag from Thomas, velocity …
- Phase 8 inc 3shipped
lborePicardIterations` on the result. **Phase 8 inc 3 — two-way wellbore-storage feedback** via the same hook's `twoWay: true` flag: after each accepted Newton iter the wellbore's bottom-face volumetric rate (`v[N]·A_N`) is under-relaxed (…
- Phase 8 inc 1planned
scaffold gas-EOS-coupled c_t shipped @ Phase 8 inc 1c; flow-pattern map shipped @ Phase 8 inc 1b; baked-in Standing-Katz (DAK) Z(p, T) + Sutton + Wichert-Aziz sour-gas correction shipped @ Phase 8 inc 1d (`standingKatz.ts`, `useStandingKat…
| Rate | 10 – 120 bpm |
| Multiphase | α ∈ (0, 1) bubbly / slug / churn / annular |
| Pressure | Standing-Katz / DAK valid 0.1 ≤ p_r ≤ 30, 1.05 ≤ T_r ≤ 3 |
- OLGA-class transient multiphase (out of scope today)
- Highly inclined laterals where Beggs-Brill exceeds drift-flux validity