Skip to content

Discuss barium-rich formation-water mixing, scale risk and mitigation - #193

Draft
EvenSol wants to merge 1 commit into
masterfrom
agent/barium-formation-water-mixing
Draft

EvenSol wants to merge 1 commit into
masterfrom
agent/barium-formation-water-mixing

Conversation

@EvenSol

@EvenSol EvenSol commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Purpose

Mixing two formation waters can create barite risk even when the individual waters are undersaturated. This executed companion notebook discusses the mechanisms, evaluates a full mixing envelope and compares practical solutions.

Changes

  • New notebooks/flowassurance/barium_rich_formation_water_mixing.ipynb, version 1.0.0: three explicitly synthetic, charge-balanced formation-water analyses; native NeqSim PITZER_BINARY screening of BaSO4, SrSO4, CaSO4 and calcite; mixing, T/P/pH/composition and sulfate-feed sensitivities; independent inventory bounds and quadratic check.
  • Discussion of first-contact location, local mixing fronts, segregation, sulfate/Ba removal, inhibitor qualification, deposition versus precipitation, NORM characterization, removal and monitoring.
  • README, examples catalog, dedicated maintenance shard and index count updated. No Java/API changes.

Representative screening results

At 60 °C / 50 bara and specified pH 6.5: A+B maximum barite SI 2.451 at fraction A 0.38. A+C sulfate-poor control remains below zero (maximum −1.973). At 50:50, the native frozen-speciation screen gives 532.941 mg/L BaSO4 versus an absolute analytical-inventory upper bound of 679.825 mg/L. These are not field deposition rates or approved mixing limits.

Validation

  • Inspected master and source-built NeqSim 3.25.0 at 54d6be9c794cec093fbfa0e347fa54f5250881db; 3,675 source/resource/POM files verified against connector-read Git blob identities. JAR SHA-256 806fb3404843a12d29fb7d559d953895493c7d9f3cdfacdc2d27dacfe95bafc6.
  • Fresh Python process, repository in-process executor: all 10 code cells execute top to bottom with stored outputs, zero notebook exceptions/stderr. Python 3.12.14 / Java 17.0.20; dependency versions and Java class origin retained.
  • Charge closure, per-case tracked-free-ion balance ≤1e-12 mol/L, complementarity ≤1e-3 SI, limiting-ion bounds, deterministic replay, independent barite root and grid refinement pass. 101→401 points changes maximum SI by 1.804929e-5.
  • python -m unittest discover -s scripts -p test_check_notebook.py: 6 passed.
  • scripts/check_notebook.py with --require-main-source, focused ledger/catalog: 0 errors, 0 warnings. All 330 main-catalog links checked against the authoritative remote tree plus the new notebook. Python AST, ≤100-character code lines, compact Colab-safe math and retained-output checks pass.
  • nbconvert Jupyter HTML + MathJax 3.2.2 SVG: 21 math expressions, all Markdown/result tables and both original PNG figures visually inspected; nine-page WeasyPrint review.
  • Hosted Colab dependency installation/source-build path not exercised locally; the documented audited-source/JAR override was used.
  • Repository-wide GitHub CI: pending at publication.

Qualification limits and improvement issue

PITZER_BINARY is an equivalent-ionic-strength trace-ion screen with frozen approximate speciation and molarity products; it is not full mixed-electrolyte Pitzer. No experimental precipitation validation, deposition kinetics, inhibitor dose, gas/CO2 flash, Ba/Sr solid solution or NORM calculation is claimed. A successful numerical solve does not qualify model accuracy.

The full SystemPitzer Na–Ba–Cl–SO4 precipitation attempt correctly fails closed on missing interaction coverage. Its diagnostic is caught only for that known condition and retained separately. Filed and verified equinor/neqsim#4351; coordinate through #3144. No unsupported full-model output is used.

Open in Colab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant