pyrestoolbox 3.8.3__tar.gz → 3.8.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/Cargo.lock +1 -1
  2. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/Cargo.toml +1 -1
  3. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/PKG-INFO +1 -1
  4. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyproject.toml +1 -1
  5. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/classes/classes.py +2 -2
  6. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/changelist.rst +14 -0
  7. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/examples.ipynb +17 -17
  8. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/gas.rst +77 -16
  9. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/index.rst +1 -1
  10. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/nodal.rst +1 -1
  11. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/nodal_examples.ipynb +12 -12
  12. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/oil.rst +2 -2
  13. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/gas/gas.py +53 -52
  14. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/matbal/matbal.py +3 -3
  15. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/nodal/nodal.py +82 -45
  16. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/validate/validate.py +2 -2
  17. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/critical_properties/mod.rs +4 -2
  18. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/gas_viscosity/mod.rs +3 -1
  19. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/pseudopressure.rs +72 -113
  20. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vlp/constants.rs +6 -0
  21. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vlp/march.rs +46 -15
  22. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vlp/mod.rs +12 -12
  23. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vlp/static_column.rs +20 -4
  24. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/.github/complexity-baseline.json +0 -0
  25. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/.github/scripts/check_complexity.py +0 -0
  26. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/.github/workflows/build-wheels.yml +0 -0
  27. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/.github/workflows/tests.yml +0 -0
  28. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/.gitignore +0 -0
  29. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/LICENSE +0 -0
  30. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/MANIFEST.in +0 -0
  31. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/README.rst +0 -0
  32. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/ResToolbox/privacy_policy.md +0 -0
  33. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/build_pure_python.py +0 -0
  34. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/clippy.toml +0 -0
  35. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/mcp/Dockerfile +0 -0
  36. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/mcp/README.md +0 -0
  37. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/mcp/pyproject.toml +0 -0
  38. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/mcp/pyrestoolbox_mcp/__init__.py +0 -0
  39. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/mcp/pyrestoolbox_mcp/serialize.py +0 -0
  40. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/mcp/pyrestoolbox_mcp/server.py +0 -0
  41. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/mcp/tests/test_server.py +0 -0
  42. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/__init__.py +0 -0
  43. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/_accelerator.py +0 -0
  44. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/brine/__init__.py +0 -0
  45. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/brine/_lib_dielectric.py +0 -0
  46. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/brine/_lib_maoduan_viscosity.py +0 -0
  47. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/brine/_lib_pitzer_params.py +0 -0
  48. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/brine/_lib_salting_library.py +0 -0
  49. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/brine/_lib_vle_engine.py +0 -0
  50. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/brine/appelo_volumes.py +0 -0
  51. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/brine/brine.py +0 -0
  52. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/brine/iapws_viscosity.py +0 -0
  53. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/brine/jones_dole_viscosity.py +0 -0
  54. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/brine/kestin_nacl_viscosity.py +0 -0
  55. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/brine/pr_vphi.py +0 -0
  56. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/brine/viscosity_route.py +0 -0
  57. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/brine/vphi_route.py +0 -0
  58. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/classes/__init__.py +0 -0
  59. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/constants/__init__.py +0 -0
  60. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/constants/constants.py +0 -0
  61. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/dca/__init__.py +0 -0
  62. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/dca/dca.py +0 -0
  63. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/brine.rst +0 -0
  64. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/dca.rst +0 -0
  65. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/img/bot.png +0 -0
  66. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/img/bot_PVTO.png +0 -0
  67. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/img/bot_img.png +0 -0
  68. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/img/dry_gas.png +0 -0
  69. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/img/grid_sat_df.png +0 -0
  70. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/img/influence.png +0 -0
  71. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/img/properties_df.png +0 -0
  72. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/img/sgof.png +0 -0
  73. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/img/swof.png +0 -0
  74. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/layer.rst +0 -0
  75. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/library.rst +0 -0
  76. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/matbal.rst +0 -0
  77. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/nodal_hydrate_demo.ipynb +0 -0
  78. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/plyasunov.rst +0 -0
  79. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/recommend.rst +0 -0
  80. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/sensitivity.rst +0 -0
  81. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/docs/simtools.rst +0 -0
  82. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/gas/__init__.py +0 -0
  83. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/gas/_hydrate.py +0 -0
  84. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/layer/__init__.py +0 -0
  85. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/layer/layer.py +0 -0
  86. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/library/__init__.py +0 -0
  87. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/library/component_library.xlsx +0 -0
  88. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/library/library.py +0 -0
  89. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/matbal/__init__.py +0 -0
  90. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/nodal/__init__.py +0 -0
  91. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/oil/__init__.py +0 -0
  92. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/oil/_compressibility.py +0 -0
  93. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/oil/_constants.py +0 -0
  94. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/oil/_correlations.py +0 -0
  95. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/oil/_density.py +0 -0
  96. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/oil/_harmonize.py +0 -0
  97. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/oil/_pvt_class.py +0 -0
  98. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/oil/_rate.py +0 -0
  99. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/oil/_separator.py +0 -0
  100. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/oil/_tables.py +0 -0
  101. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/oil/_utils.py +0 -0
  102. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/plyasunov/__init__.py +0 -0
  103. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/plyasunov/iapws_if97.py +0 -0
  104. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/plyasunov/plyasunov_model.py +0 -0
  105. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/plyasunov/water_properties.py +0 -0
  106. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/recommend/__init__.py +0 -0
  107. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/recommend/recommend.py +0 -0
  108. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/sensitivity/__init__.py +0 -0
  109. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/sensitivity/sensitivity.py +0 -0
  110. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/shared_fns/__init__.py +0 -0
  111. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/shared_fns/shared_fns.py +0 -0
  112. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/simtools/__init__.py +0 -0
  113. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/simtools/_aquifer.py +0 -0
  114. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/simtools/_decks.py +0 -0
  115. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/simtools/_pvt_tables.py +0 -0
  116. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/simtools/_relperm.py +0 -0
  117. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/simtools/_vfp.py +0 -0
  118. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/simtools/simtools.py +0 -0
  119. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/pyrestoolbox/validate/__init__.py +0 -0
  120. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/setup.cfg +0 -0
  121. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/setup.py +0 -0
  122. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/bessel.rs +0 -0
  123. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/brine_visc/mod.rs +0 -0
  124. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/brine_visc/salt.rs +0 -0
  125. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/brine_visc/water.rs +0 -0
  126. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/dca/hyperbolic.rs +0 -0
  127. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/dca/mod.rs +0 -0
  128. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/dca/ransac.rs +0 -0
  129. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/gwr.rs +0 -0
  130. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/lib.rs +0 -0
  131. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/matbal/mod.rs +0 -0
  132. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/matbal/objective.rs +0 -0
  133. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/oil/density.rs +0 -0
  134. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/oil/mod.rs +0 -0
  135. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/spycher_pruess/mod.rs +0 -0
  136. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/spycher_pruess/solubility.rs +0 -0
  137. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vle/alpha.rs +0 -0
  138. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vle/bip.rs +0 -0
  139. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vle/components.rs +0 -0
  140. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vle/eos.rs +0 -0
  141. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vle/flash.rs +0 -0
  142. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vle/fugacity.rs +0 -0
  143. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vle/k_init.rs +0 -0
  144. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vle/mod.rs +0 -0
  145. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vle/rachford_rice.rs +0 -0
  146. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vlp/friction.rs +0 -0
  147. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vlp/holdup_bb.rs +0 -0
  148. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vlp/holdup_gray.rs +0 -0
  149. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vlp/holdup_wg.rs +0 -0
  150. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vlp/ift.rs +0 -0
  151. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/vlp/pvt_helpers.rs +0 -0
  152. {pyrestoolbox-3.8.3 → pyrestoolbox-3.8.5}/src/zfactor/mod.rs +0 -0
@@ -152,7 +152,7 @@ dependencies = [
152
152
 
153
153
  [[package]]
154
154
  name = "pyrestoolbox-native"
155
- version = "3.8.3"
155
+ version = "3.8.5"
156
156
  dependencies = [
157
157
  "pyo3",
158
158
  "rug",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "pyrestoolbox-native"
3
- version = "3.8.3"
3
+ version = "3.8.5"
4
4
  edition = "2021"
5
5
  license = "GPL-3.0-or-later"
6
6
  description = "Rust acceleration extensions for pyResToolbox"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyrestoolbox
3
- Version: 3.8.3
3
+ Version: 3.8.5
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Rust
6
6
  Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
@@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "pyrestoolbox"
7
- version = "3.8.3"
7
+ version = "3.8.5"
8
8
  description = "pyResToolbox - A collection of Reservoir Engineering Utilities"
9
9
  license = {text = "GPL-3.0-or-later"}
10
10
  authors = [{name = "Mark W. Burgoyne", email = "mark.w.burgoyne@gmail.com"}]
@@ -25,7 +25,7 @@ Enum classes for method selection and class_dic registry.
25
25
  Enums
26
26
  -----
27
27
  z_method Z-factor calculation method (DAK, HY, BNS)
28
- c_method Critical property method (PMC, SUT, BUR, BNS)
28
+ c_method Critical property method (PMC, SUT, BNS)
29
29
  pb_method Bubble point method (STAN, VALMC, VELAR)
30
30
  rs_method Solution GOR method (VELAR, STAN, VALMC)
31
31
  bo_method Oil FVF method (MCAIN, STAN)
@@ -60,8 +60,8 @@ class z_method(Enum): # Gas Z-Factor calculation model
60
60
  class c_method(Enum): # Gas critical properties calculation method
61
61
  PMC = 0
62
62
  SUT = 1
63
- BUR = 2
64
63
  BNS = 3
64
+ BUR = 3 # Legacy alias for BNS
65
65
 
66
66
  class pb_method(Enum): # Bubble point calculation method
67
67
  STAN = 0
@@ -1,3 +1,17 @@
1
+ Changelist in 3.8.5:
2
+
3
+ - **NODAL: gas VLP uses the ``gas_pvt`` Z-factor and viscosity methods (results move when a GasPVT is passed).** ``fbhp``, ``fthp``, ``outflow_curve``, ``operating_point`` and the simtools VFP tables took only the gas SG and Sutton/Wichert-Aziz pseudo-criticals from a ``GasPVT``; the march always ran Hall-Yarborough Z with Lee-Gonzalez-Eakin viscosity, so ``zmethod='BNS'`` (or the GasPVT default, DAK with PMC) was silently ignored, as were H2 and He (which raised a warning). The march now evaluates Z and viscosity exactly as ``gas_pvt.z()`` and ``gas_pvt.viscosity()`` do, at every step and in the zero-rate static column, in Python and Rust (the Rust march builds the same Z/viscosity evaluator as ``gas_dmp``, so every method stays accelerated; the two paths agree to 1e-9 relative). Calls without ``gas_pvt`` are bit-identical. Example (THP 1000 psia, 5 MMscf/d, 100 bbl/d water, 5000 ft of 2.441 in tubing, 80-200 degF, SG 0.65), Beggs-Brill BHP: 1475.3 psia before, 1459.3 with ``GasPVT(sg=0.65)`` (DAK/PMC), 1508.2 with ``zmethod='BNS'``; WG 1444.8, 1444.1, 1446.2. Beggs-Brill moves most because the distributed-to-segregated boundary sits mid-well here and the gradient steps 27% across it. The pure-Python fallback is about 15 times slower with a ``gas_pvt`` (about 40 ms per ``fbhp``), since each step calls ``gas_z`` and ``gas_ug``. No documented example passes a ``gas_pvt`` to the VLP functions, so none moves; one nodal test that asserted a sweet ``GasPVT`` equals the ``gsg``-only answer now compares an HY/SUT ``GasPVT`` (within 4e-5).
4
+
5
+ - **NODAL: gas VLP results now approach the dry-gas answer continuously as the liquid rate goes to zero.** With no liquid every method returns the single-phase gas BHP, but a vanishing liquid rate did not: in a 5000 ft, 2.441 in well at 1000 psia THP and 5 MMscf/d (dry gas 1232 psia for all four methods), 1e-6 bbl/d of water gave WG 1294, GRAY 1243 and BB 1429 psia, and BB BHP fell as water rose from 0.001 to 1 bbl/d. The causes are in the correlations' low-liquid limits: the Woldesemayat-Ghajar drift-flux void fraction tends to u_sg/(u_sg + u_gm) because the drift velocity does not depend on the amount of liquid, leaving a stagnant liquid holdup u_gm/(u_sg + u_gm) at any liquid rate; Gray's holdup tends to exp(A); and Beggs-Brill holdup scales as lambda^0.58, so its friction parameter y = lambda/HL^2 grows without bound and the two-phase friction multiplier peaks near lambda = 1e-9. Hagedorn-Brown, whose holdup is floored at lambda, was already continuous. The gas segment march now blends each segment's gradient linearly between the method's own zero-liquid gradient and its two-phase gradient while the no-slip liquid fraction is below 1e-3 (``_LOW_LIQ_LAMBDA``, Rust ``LOW_LIQ_LAMBDA``). At zero liquid and at lambda >= 1e-3 results are unchanged; in between they are continuous and BHP rises monotonically with liquid rate. In the example, 1 bbl/d of water now gives WG 1237.5 (was 1298.5), GRAY 1233.3 (1245.8), BB 1241.2 (1335.7) and HB 1232.0 (1232.3) psia; 10 bbl/d gives WG 1300.8 (1312.7), GRAY 1263.3 (1269.2), BB 1324.9 (1338.9), HB 1234.7 (1235.3). Gas wells with a liquid-to-gas ratio above roughly 3 bbl/MMscf at flowing conditions, and every oil-well march, are unaffected. No frozen baseline or documented example moves.
6
+
7
+ Changelist in 3.8.4:
8
+
9
+ - **GAS: associated-gas hydrocarbon pseudo-criticals for BNS (``ag``).** Burgoyne, Nielsen & Stanko (2025) fitted two hydrocarbon Tc/Pc correlations, for gas condensates and for associated gas; only the condensate one was exposed. Every gas function that takes ``he`` (except ``gas_sg``, ``gas_hydrate`` and the recommenders, which use no critical properties) now also takes ``ag`` (keyword, appended last): ``gas_tc_pc``, ``gas_z``, ``gas_ug``, ``gas_cg``, ``gas_bg``, ``gas_den``, ``gas_thermal``, ``gas_ponz2p``, ``gas_grad2sg``, ``gas_dmp``, ``gas_rate_radial``, ``gas_rate_linear``, ``GasPVT`` and ``gas_matbal``. ``ag=True`` makes ``cmethod='BNS'`` return the associated-gas values (SG 0.75: Tc 397.7 against 401.2 degR, Pc 653.9 against 663.4 psia), and the hydrocarbon-inert BIPs follow the selected Tc, as in the regression. Other cmethods ignore it and a user ``tc``/``pc`` takes precedence. The resolved values reach the Rust paths through the existing hydrocarbon Tc/Pc override, so the Rust code is unchanged. With ``ag=True``, results match the reference BNS implementation (``AG=True``) to 5e-15 in Z and viscosity and 7e-13 Btu/lb-mol in enthalpy; with ``ag=False`` (the default) every result is bit-identical to 3.8.3 on both paths.
10
+
11
+ - **GAS: BNS hydrocarbon SG floor aligned with the reference implementation (results move slightly in one corner).** When the inert fractions imply a hydrocarbon lighter than methane, the hydrocarbon SG is floored at methane. pyrestoolbox used 16.043/28.97 (Python and Rust) where the reference BNS code uses 16.0425/28.97, the methane MW of the method's own correlations. Both now use 16.0425/28.97. Only floored cases move (for SG 0.65 with 20% CO2, 10% H2S, 2% N2 and 10% H2: Z by up to 1.2e-5, viscosity 2.2e-5, enthalpy 1.4e-4 relative); everything else is bit-identical. With this, Python and Rust match the reference BNS implementation to about 1e-14 in Z and viscosity for every composition, with ``ag`` on or off.
12
+
13
+ - **GAS: 'BNS' is the one documented name for the tuned Peng-Robinson method.** The docs and example notebooks used 'BUR' and 'BNS' interchangeably; they now use 'BNS' throughout. 'BUR' is still accepted as a silent alias for ``zmethod`` and ``cmethod``, and ``c_method.BUR`` is now an alias of ``c_method.BNS`` (it was a separate member that every code path treated as BNS), matching ``z_method``. Invalid-method errors list only canonical names. The ``gas_rate_radial`` and ``gas_rate_linear`` parameter tables now document ``h2`` and ``he``, and the stale ``'WYW'`` was dropped from the examples notebook's zmethod list.
14
+
1
15
  Changelist in 3.8.3:
2
16
 
3
17
  - **GAS: helium in the BNS Z-factor, viscosity and thermal model, in Python and Rust.** Every gas function that takes ``h2`` now also takes ``he`` (keyword, appended last so positional calls are unchanged): ``gas_z``, ``gas_ug``, ``gas_den``, ``gas_bg``, ``gas_cg``, ``gas_thermal``, ``gas_tc_pc``, ``gas_ponz2p``, ``gas_grad2sg``, ``gas_dmp``, ``gas_rate_radial``, ``gas_rate_linear``, ``gas_sg``, ``GasPVT``, ``gas_matbal``, ``gas_hydrate`` (water-content step only), ``recommend_gas_methods`` and ``recommend_methods``. Helium is a sixth BNS component with zero BIPs, regressed to 29,400 NIST points for pure helium (60-300 degF, 14.7-14,990 psia) with the LBC coefficients held: density 0.31% mean / 0.84% max, viscosity 0.70% / 3.1%. **Its critical temperature is a deliberately non-standard 6.35 degR (NIST 9.35 degR)**, because the BNS Tc also sets the Stiel-Thodos dilute viscosity, which is about 25% low at the true Tc; the docs carry a warning so it is not "corrected". A positive ``he`` forces BNS, as ``h2`` does. With ``he=0`` every result is unchanged (Rust within 3e-15, Python within 3e-15 except ``gas_cg``, whose finite-difference derivative moves by up to 8e-12); with helium, Python and Rust agree with the reference BNS implementation to about 1e-14 in Z and viscosity. The Rust ``gas_dmp_rust`` and ``gas_ponz2p_rust`` now take the inert fractions as one ``[co2, h2s, n2, h2, he]`` list (internal API). ``MW_HE`` (4.003, the BNS value) is added to ``constants``.
@@ -19,8 +19,8 @@
19
19
  "Gas property calculations supporting hydrocarbon + impurity mixtures (CO2, H2S, N2, H2).\n",
20
20
  "\n",
21
21
  "### Calculation Methods\n",
22
- "- **zmethod**: `'DAK'` (default), `'HY'`, `'WYW'`, `'BUR'`\n",
23
- "- **cmethod**: `'PMC'` (default), `'SUT'`, `'BUR'`"
22
+ "- **zmethod**: `'DAK'` (default), `'HY'`, `'BNS'`\n",
23
+ "- **cmethod**: `'PMC'` (default), `'SUT'`, `'BNS'`"
24
24
  ]
25
25
  },
26
26
  {
@@ -64,7 +64,7 @@
64
64
  "metadata": {},
65
65
  "outputs": [],
66
66
  "source": [
67
- "gas.gas_z(p=2350, sg=0.68, degf=180, co2=1.0, zmethod='BUR', cmethod='BUR')"
67
+ "gas.gas_z(p=2350, sg=0.68, degf=180, co2=1.0, zmethod='BNS', cmethod='BNS')"
68
68
  ]
69
69
  },
70
70
  {
@@ -82,7 +82,7 @@
82
82
  "source": [
83
83
  "gsg = gas.gas_sg(hc_mw=19.0, co2=0.05, h2s=0.10, n2=0, h2=0.20)\n",
84
84
  "print('Gas SG:', gsg)\n",
85
- "gas.gas_z(p=2350, sg=gsg, degf=180, co2=0.05, h2s=0.10, n2=0, h2=0.20, zmethod='BUR', cmethod='BUR')"
85
+ "gas.gas_z(p=2350, sg=gsg, degf=180, co2=0.05, h2s=0.10, n2=0, h2=0.20, zmethod='BNS', cmethod='BNS')"
86
86
  ]
87
87
  },
88
88
  {
@@ -103,7 +103,7 @@
103
103
  },
104
104
  {
105
105
  "cell_type": "markdown",
106
- "source": "### gas_sg - Mixture Gas Specific Gravity\n\nCalculate SG of a gas mixture containing impurities. Essential for BNS/BUR method inputs.",
106
+ "source": "### gas_sg - Mixture Gas Specific Gravity\n\nCalculate SG of a gas mixture containing impurities. Essential for BNS method inputs.",
107
107
  "metadata": {}
108
108
  },
109
109
  {
@@ -141,14 +141,14 @@
141
141
  },
142
142
  {
143
143
  "cell_type": "code",
144
- "source": "# BUR critical properties for a gas with 10% CO2 and 5% H2S\ngas.gas_tc_pc(sg=0.75, co2=0.10, h2s=0.05, cmethod='BUR')",
144
+ "source": "# BNS critical properties for a gas with 10% CO2 and 5% H2S\ngas.gas_tc_pc(sg=0.75, co2=0.10, h2s=0.05, cmethod='BNS')",
145
145
  "metadata": {},
146
146
  "execution_count": null,
147
147
  "outputs": []
148
148
  },
149
149
  {
150
150
  "cell_type": "code",
151
- "source": "# BUR auto-selects when H2 is present\ngas.gas_tc_pc(sg=0.6, h2=0.30)",
151
+ "source": "# BNS auto-selects when H2 is present\ngas.gas_tc_pc(sg=0.6, h2=0.30)",
152
152
  "metadata": {},
153
153
  "execution_count": null,
154
154
  "outputs": []
@@ -192,12 +192,12 @@
192
192
  },
193
193
  {
194
194
  "cell_type": "markdown",
195
- "source": "BUR/BNS Z-Factor across a pressure range for different gas compositions. The BNS model uses a tuned 5-component Peng Robinson EOS that natively handles CO2, H2S, N2, and H2 at any concentration up to pure inerts.",
195
+ "source": "BNS Z-Factor across a pressure range for different gas compositions. The BNS model uses a tuned 5-component Peng Robinson EOS that natively handles CO2, H2S, N2, and H2 at any concentration up to pure inerts.",
196
196
  "metadata": {}
197
197
  },
198
198
  {
199
199
  "cell_type": "code",
200
- "source": "import matplotlib.pyplot as plt\n\n# Compare Z-factor across pressures for different gas compositions using BUR\npressures = list(range(500, 10001, 500))\n\n# Pure methane (BUR)\nz_ch4 = gas.gas_z(p=pressures, sg=0.5539, degf=200, zmethod='BUR', cmethod='BUR')\n\n# 15% CO2 blend\nz_co2 = gas.gas_z(p=pressures, sg=0.7, degf=200, co2=0.15, zmethod='BUR', cmethod='BUR')\n\n# 20% H2 blend (auto-selects BUR)\nsg_h2 = gas.gas_sg(hc_mw=19.0, co2=0, h2s=0, n2=0, h2=0.20)\nz_h2 = gas.gas_z(p=pressures, sg=sg_h2, degf=200, h2=0.20, zmethod='BUR', cmethod='BUR')\n\n# Pure CO2\nz_pureco2 = gas.gas_z(p=pressures, sg=1.5196, degf=200, co2=1.0, zmethod='BUR', cmethod='BUR')\n\nplt.plot(pressures, z_ch4, label='Pure CH4')\nplt.plot(pressures, z_co2, label='15% CO2 blend')\nplt.plot(pressures, z_h2, label='20% H2 blend')\nplt.plot(pressures, z_pureco2, label='Pure CO2')\nplt.xlabel('Pressure (psia)')\nplt.ylabel('Z-Factor')\nplt.title('BNS Z-Factor: CO2 and H2 Blends')\nplt.legend()\nplt.grid(True)\nplt.show()",
200
+ "source": "import matplotlib.pyplot as plt\n\n# Compare Z-factor across pressures for different gas compositions using BNS\npressures = list(range(500, 10001, 500))\n\n# Pure methane (BNS)\nz_ch4 = gas.gas_z(p=pressures, sg=0.5539, degf=200, zmethod='BNS', cmethod='BNS')\n\n# 15% CO2 blend\nz_co2 = gas.gas_z(p=pressures, sg=0.7, degf=200, co2=0.15, zmethod='BNS', cmethod='BNS')\n\n# 20% H2 blend (auto-selects BNS)\nsg_h2 = gas.gas_sg(hc_mw=19.0, co2=0, h2s=0, n2=0, h2=0.20)\nz_h2 = gas.gas_z(p=pressures, sg=sg_h2, degf=200, h2=0.20, zmethod='BNS', cmethod='BNS')\n\n# Pure CO2\nz_pureco2 = gas.gas_z(p=pressures, sg=1.5196, degf=200, co2=1.0, zmethod='BNS', cmethod='BNS')\n\nplt.plot(pressures, z_ch4, label='Pure CH4')\nplt.plot(pressures, z_co2, label='15% CO2 blend')\nplt.plot(pressures, z_h2, label='20% H2 blend')\nplt.plot(pressures, z_pureco2, label='Pure CO2')\nplt.xlabel('Pressure (psia)')\nplt.ylabel('Z-Factor')\nplt.title('BNS Z-Factor: CO2 and H2 Blends')\nplt.legend()\nplt.grid(True)\nplt.show()",
201
201
  "metadata": {},
202
202
  "execution_count": null,
203
203
  "outputs": []
@@ -229,12 +229,12 @@
229
229
  },
230
230
  {
231
231
  "cell_type": "markdown",
232
- "source": "BUR viscosity uses a tuned LBC (Lohrenz-Bray-Clark) method instead of the default Lee-Gonzalez-Eakin, enabling viscosity calculations for CO2-rich and H2-rich gases.",
232
+ "source": "BNS viscosity uses a tuned LBC (Lohrenz-Bray-Clark) method instead of the default Lee-Gonzalez-Eakin, enabling viscosity calculations for CO2-rich and H2-rich gases.",
233
233
  "metadata": {}
234
234
  },
235
235
  {
236
236
  "cell_type": "code",
237
- "source": "# BUR/LBC viscosity for pure CO2\nprint('Pure CO2 viscosity:', gas.gas_ug(p=2000, sg=1.5196, degf=200, co2=1.0, zmethod='BUR', cmethod='BUR'))\n\n# Viscosity of a 20% H2 blend (BUR auto-selects)\nsg_h2mix = gas.gas_sg(hc_mw=19.0, co2=0, h2s=0, n2=0, h2=0.20)\nprint('20% H2 blend viscosity:', gas.gas_ug(p=2000, sg=sg_h2mix, degf=200, h2=0.20))\n\n# Viscosity comparison across pressure range for conventional vs H2 blend\npressures = list(range(500, 8001, 500))\nug_conv = gas.gas_ug(p=pressures, sg=0.7, degf=200)\nug_h2 = gas.gas_ug(p=pressures, sg=sg_h2mix, degf=200, h2=0.20, zmethod='BUR', cmethod='BUR')\nug_co2 = gas.gas_ug(p=pressures, sg=1.5196, degf=200, co2=1.0, zmethod='BUR', cmethod='BUR')\n\nplt.plot(pressures, ug_conv, label='Conventional gas (LEG)')\nplt.plot(pressures, ug_h2, label='20% H2 blend (LBC)')\nplt.plot(pressures, ug_co2, label='Pure CO2 (LBC)')\nplt.xlabel('Pressure (psia)')\nplt.ylabel('Viscosity (cP)')\nplt.title('Gas Viscosity: Conventional vs BNS/LBC Method')\nplt.legend()\nplt.grid(True)\nplt.show()",
237
+ "source": "# BNS/LBC viscosity for pure CO2\nprint('Pure CO2 viscosity:', gas.gas_ug(p=2000, sg=1.5196, degf=200, co2=1.0, zmethod='BNS', cmethod='BNS'))\n\n# Viscosity of a 20% H2 blend (BNS auto-selects)\nsg_h2mix = gas.gas_sg(hc_mw=19.0, co2=0, h2s=0, n2=0, h2=0.20)\nprint('20% H2 blend viscosity:', gas.gas_ug(p=2000, sg=sg_h2mix, degf=200, h2=0.20))\n\n# Viscosity comparison across pressure range for conventional vs H2 blend\npressures = list(range(500, 8001, 500))\nug_conv = gas.gas_ug(p=pressures, sg=0.7, degf=200)\nug_h2 = gas.gas_ug(p=pressures, sg=sg_h2mix, degf=200, h2=0.20, zmethod='BNS', cmethod='BNS')\nug_co2 = gas.gas_ug(p=pressures, sg=1.5196, degf=200, co2=1.0, zmethod='BNS', cmethod='BNS')\n\nplt.plot(pressures, ug_conv, label='Conventional gas (LEG)')\nplt.plot(pressures, ug_h2, label='20% H2 blend (LBC)')\nplt.plot(pressures, ug_co2, label='Pure CO2 (LBC)')\nplt.xlabel('Pressure (psia)')\nplt.ylabel('Viscosity (cP)')\nplt.title('Gas Viscosity: Conventional vs BNS/LBC Method')\nplt.legend()\nplt.grid(True)\nplt.show()",
238
238
  "metadata": {},
239
239
  "execution_count": null,
240
240
  "outputs": []
@@ -267,7 +267,7 @@
267
267
  },
268
268
  {
269
269
  "cell_type": "code",
270
- "source": "# Gas compressibility for pure CO2 and H2 blend using BUR\nprint('Cg pure CO2:', gas.gas_cg(p=2000, sg=1.5196, degf=200, co2=1.0, zmethod='BUR', cmethod='BUR'))\n\nsg_h2 = gas.gas_sg(hc_mw=19.0, co2=0, h2s=0, n2=0, h2=0.20)\nprint('Cg 20% H2 blend:', gas.gas_cg(p=2000, sg=sg_h2, degf=200, h2=0.20, zmethod='BUR', cmethod='BUR'))",
270
+ "source": "# Gas compressibility for pure CO2 and H2 blend using BNS\nprint('Cg pure CO2:', gas.gas_cg(p=2000, sg=1.5196, degf=200, co2=1.0, zmethod='BNS', cmethod='BNS'))\n\nsg_h2 = gas.gas_sg(hc_mw=19.0, co2=0, h2s=0, n2=0, h2=0.20)\nprint('Cg 20% H2 blend:', gas.gas_cg(p=2000, sg=sg_h2, degf=200, h2=0.20, zmethod='BNS', cmethod='BNS'))",
271
271
  "metadata": {},
272
272
  "execution_count": null,
273
273
  "outputs": []
@@ -300,7 +300,7 @@
300
300
  },
301
301
  {
302
302
  "cell_type": "code",
303
- "source": "# Bg for pure CO2 using BUR\nprint('Bg pure CO2:', gas.gas_bg(p=3000, sg=1.5196, degf=200, co2=1.0, zmethod='BUR', cmethod='BUR'))\n\n# Bg for 20% H2 blend\nsg_h2 = gas.gas_sg(hc_mw=19.0, co2=0, h2s=0, n2=0, h2=0.20)\nprint('Bg 20% H2 blend:', gas.gas_bg(p=3000, sg=sg_h2, degf=200, h2=0.20, zmethod='BUR', cmethod='BUR'))",
303
+ "source": "# Bg for pure CO2 using BNS\nprint('Bg pure CO2:', gas.gas_bg(p=3000, sg=1.5196, degf=200, co2=1.0, zmethod='BNS', cmethod='BNS'))\n\n# Bg for 20% H2 blend\nsg_h2 = gas.gas_sg(hc_mw=19.0, co2=0, h2s=0, n2=0, h2=0.20)\nprint('Bg 20% H2 blend:', gas.gas_bg(p=3000, sg=sg_h2, degf=200, h2=0.20, zmethod='BNS', cmethod='BNS'))",
304
304
  "metadata": {},
305
305
  "execution_count": null,
306
306
  "outputs": []
@@ -323,7 +323,7 @@
323
323
  },
324
324
  {
325
325
  "cell_type": "code",
326
- "source": "# Gas density for pure CO2 using BUR\nprint('Pure CO2 density:', gas.gas_den(p=2000, sg=1.5196, degf=200, co2=1.0, zmethod='BUR', cmethod='BUR'))\n\n# Gas density for 20% H2 blend - much lighter than conventional gas\nsg_h2 = gas.gas_sg(hc_mw=19.0, co2=0, h2s=0, n2=0, h2=0.20)\nprint('20% H2 blend density:', gas.gas_den(p=2000, sg=sg_h2, degf=200, h2=0.20, zmethod='BUR', cmethod='BUR'))\n\n# Conventional gas density for comparison\nprint('Conventional gas density:', gas.gas_den(p=2000, sg=0.75, degf=200))",
326
+ "source": "# Gas density for pure CO2 using BNS\nprint('Pure CO2 density:', gas.gas_den(p=2000, sg=1.5196, degf=200, co2=1.0, zmethod='BNS', cmethod='BNS'))\n\n# Gas density for 20% H2 blend - much lighter than conventional gas\nsg_h2 = gas.gas_sg(hc_mw=19.0, co2=0, h2s=0, n2=0, h2=0.20)\nprint('20% H2 blend density:', gas.gas_den(p=2000, sg=sg_h2, degf=200, h2=0.20, zmethod='BNS', cmethod='BNS'))\n\n# Conventional gas density for comparison\nprint('Conventional gas density:', gas.gas_den(p=2000, sg=0.75, degf=200))",
327
327
  "metadata": {},
328
328
  "execution_count": null,
329
329
  "outputs": []
@@ -414,7 +414,7 @@
414
414
  },
415
415
  {
416
416
  "cell_type": "code",
417
- "source": "# Pseudopressure for pure CO2 using BUR\nprint('dmp pure CO2:', gas.gas_dmp(p1=1000, p2=3000, degf=200, sg=1.5196, co2=1.0, zmethod='BUR', cmethod='BUR'))\n\n# Pseudopressure for 20% H2 blend (BUR auto-selects)\nsg_h2 = gas.gas_sg(hc_mw=19.0, co2=0, h2s=0, n2=0, h2=0.20)\nprint('dmp 20% H2 blend:', gas.gas_dmp(p1=1000, p2=3000, degf=200, sg=sg_h2, h2=0.20))",
417
+ "source": "# Pseudopressure for pure CO2 using BNS\nprint('dmp pure CO2:', gas.gas_dmp(p1=1000, p2=3000, degf=200, sg=1.5196, co2=1.0, zmethod='BNS', cmethod='BNS'))\n\n# Pseudopressure for 20% H2 blend (BNS auto-selects)\nsg_h2 = gas.gas_sg(hc_mw=19.0, co2=0, h2s=0, n2=0, h2=0.20)\nprint('dmp 20% H2 blend:', gas.gas_dmp(p1=1000, p2=3000, degf=200, sg=sg_h2, h2=0.20))",
418
418
  "metadata": {},
419
419
  "execution_count": null,
420
420
  "outputs": []
@@ -463,7 +463,7 @@
463
463
  },
464
464
  {
465
465
  "cell_type": "code",
466
- "source": "# Radial gas flow rate for pure CO2 using BUR\nprint('Pure CO2 rate:', gas.gas_rate_radial(\n k=5, h=50, pr=2000, pwf=750, r_w=0.3, r_ext=1500, degf=180,\n sg=1.5196, co2=1.0, zmethod='BUR', cmethod='BUR', D=0.01, S=5\n))\n\n# Radial gas flow rate for 20% H2 blend\nsg_h2 = gas.gas_sg(hc_mw=19.0, co2=0, h2s=0, n2=0, h2=0.20)\nprint('20% H2 blend rate:', gas.gas_rate_radial(\n k=5, h=50, pr=2000, pwf=750, r_w=0.3, r_ext=1500, degf=180,\n sg=sg_h2, h2=0.20, zmethod='BUR', cmethod='BUR', D=0.01, S=5\n))",
466
+ "source": "# Radial gas flow rate for pure CO2 using BNS\nprint('Pure CO2 rate:', gas.gas_rate_radial(\n k=5, h=50, pr=2000, pwf=750, r_w=0.3, r_ext=1500, degf=180,\n sg=1.5196, co2=1.0, zmethod='BNS', cmethod='BNS', D=0.01, S=5\n))\n\n# Radial gas flow rate for 20% H2 blend\nsg_h2 = gas.gas_sg(hc_mw=19.0, co2=0, h2s=0, n2=0, h2=0.20)\nprint('20% H2 blend rate:', gas.gas_rate_radial(\n k=5, h=50, pr=2000, pwf=750, r_w=0.3, r_ext=1500, degf=180,\n sg=sg_h2, h2=0.20, zmethod='BNS', cmethod='BNS', D=0.01, S=5\n))",
467
467
  "metadata": {},
468
468
  "execution_count": null,
469
469
  "outputs": []
@@ -496,7 +496,7 @@
496
496
  },
497
497
  {
498
498
  "cell_type": "code",
499
- "source": "# Linear gas flow rate for pure CO2 using BUR\nprint('Pure CO2 linear rate:', gas.gas_rate_linear(\n k=0.1, area=50, length=200, pr=2000, pwf=250, degf=180,\n sg=1.5196, co2=1.0, zmethod='BUR', cmethod='BUR'\n))\n\n# Linear gas flow rate for 20% H2 blend\nsg_h2 = gas.gas_sg(hc_mw=19.0, co2=0, h2s=0, n2=0, h2=0.20)\nprint('20% H2 blend linear rate:', gas.gas_rate_linear(\n k=0.1, area=50, length=200, pr=2000, pwf=250, degf=180,\n sg=sg_h2, h2=0.20, zmethod='BUR', cmethod='BUR'\n))",
499
+ "source": "# Linear gas flow rate for pure CO2 using BNS\nprint('Pure CO2 linear rate:', gas.gas_rate_linear(\n k=0.1, area=50, length=200, pr=2000, pwf=250, degf=180,\n sg=1.5196, co2=1.0, zmethod='BNS', cmethod='BNS'\n))\n\n# Linear gas flow rate for 20% H2 blend\nsg_h2 = gas.gas_sg(hc_mw=19.0, co2=0, h2s=0, n2=0, h2=0.20)\nprint('20% H2 blend linear rate:', gas.gas_rate_linear(\n k=0.1, area=50, length=200, pr=2000, pwf=250, degf=180,\n sg=sg_h2, h2=0.20, zmethod='BNS', cmethod='BNS'\n))",
500
500
  "metadata": {},
501
501
  "execution_count": null,
502
502
  "outputs": []
@@ -22,7 +22,7 @@ pyResToolBox uses class objects to track calculation options through the functio
22
22
 
23
23
  + 'DAK': Dranchuk & Abou-Kassem (1975) using from Equations 2.7-2.8 from 'Petroleum Reservoir Fluid Property Correlations' by W. McCain et al. - Slowest, Most Accurate
24
24
  + 'HY': Hall & Yarborough (1973) - Second Fastest
25
- + 'BUR'/'BNS': Tuned Peng Robinson EOS model, Burgoyne, Nielsen & Stanko (2025), `SPE-229932-MS <https://doi.org/10.2118/229932-MS>`_, extended with helium in 3.8.3 - Fast, reliable, and able to handle wide range of mixture types including CO2, H2S, N2, H2 and He at concentrations up to pure inerts. More information about the method can be found `here <https://github.com/mwburgoyne/5_Component_PengRobinson_Z-Factor>`_
25
+ + 'BNS': Tuned Peng Robinson EOS model, Burgoyne, Nielsen & Stanko (2025), `SPE-229932-MS <https://doi.org/10.2118/229932-MS>`_, extended with helium in 3.8.3 - Fast, reliable, and able to handle wide range of mixture types including CO2, H2S, N2, H2 and He at concentrations up to pure inerts. More information about the method can be found `here <https://github.com/mwburgoyne/5_Component_PengRobinson_Z-Factor>`_
26
26
  * - cmethod
27
27
  - c_method
28
28
  - Method for calculating gas critical properties. Defaults to 'PMC'
@@ -30,7 +30,7 @@ pyResToolBox uses class objects to track calculation options through the functio
30
30
 
31
31
  + 'SUT': Sutton with Wichert & Aziz non-hydrocarbon corrections
32
32
  + 'PMC': Piper, McCain & Corredor (1999) correlation, using equations 2.4 - 2.6 from 'Petroleum Reservoir Fluid Property Correlations' by W. McCain et al.
33
- + 'BUR': Correlation tuned to return the critical properties of the pure hydrocarbon component of a mixture, required for the 'BUR' (tuned Peng Robinson) Z-Factor method. More information about the method can be found `here <https://github.com/mwburgoyne/5_Component_PengRobinson_Z-Factor>`_
33
+ + 'BNS': Correlation tuned to return the critical properties of the pure hydrocarbon component of a mixture, required for the 'BNS' (tuned Peng Robinson) Z-Factor method. Gas-condensate correlation by default; set ``ag=True`` for the associated-gas correlation (see *Associated gas in BNS*). More information about the method can be found `here <https://github.com/mwburgoyne/5_Component_PengRobinson_Z-Factor>`_
34
34
  * - hydmethod
35
35
  - hyd_method
36
36
  - Method for calculating gas hydrate formation temperature. Defaults to 'TOWLER'.
@@ -77,6 +77,16 @@ Calculating gas Z-Factor of pure methane using DAK and PMC for critical properti
77
77
  - **SUT / PMC**: ``tc`` and ``pc`` are the *mixture* pseudo-critical values. They replace the correlation output entirely.
78
78
  - **BNS**: ``tc`` and ``pc`` are the *inert-free hydrocarbon* pseudo-critical values. They replace only the hydrocarbon pseudo-component in the EOS; inert Tc/Pc (CO2, H2S, N2, H2, He) remain the BNS internal per-component constants.
79
79
 
80
+ Associated gas in BNS
81
+ ---------------------
82
+
83
+ BNS characterises the hydrocarbon part of the gas as one pseudo-component whose Tc and Pc come from the hydrocarbon specific gravity. Burgoyne, Nielsen & Stanko (2025) fitted two such correlations: one for gas condensates (the default) and one for associated gas, which gives a lower Pc at every specific gravity and a Tc within about 1.5% of the condensate value (lower below a hydrocarbon SG of about 1.2, higher above). Set ``ag=True`` to use the associated-gas correlation. It applies only with ``cmethod='BNS'`` and is ignored by other methods; a user-supplied ``tc`` or ``pc`` takes precedence. The hydrocarbon-inert binary interaction parameters are functions of the hydrocarbon Tc, so they follow the selected correlation, as in the regression behind the method. Results match the reference implementation (``AG=True`` in the `5_Component_PengRobinson_Z-Factor <https://github.com/mwburgoyne/5_Component_PengRobinson_Z-Factor>`_ repository) to about 1e-14 in Z and viscosity.
84
+
85
+ >>> gas.gas_tc_pc(sg=0.75, cmethod='BNS')
86
+ (401.2348975509288, 663.436579436262)
87
+ >>> gas.gas_tc_pc(sg=0.75, cmethod='BNS', ag=True)
88
+ (397.7239050745307, 653.8703430787151)
89
+
80
90
  Helium in BNS
81
91
  ~~~~~~~~~~~~~
82
92
 
@@ -126,7 +136,7 @@ Calculating gas Z-Factor of pure CO2
126
136
 
127
137
  .. code-block:: python
128
138
 
129
- >>> gas.gas_z(p=2350, sg=0.68, degf = 180, co2 = 1.0, zmethod='BUR', cmethod='BUR')
139
+ >>> gas.gas_z(p=2350, sg=0.68, degf = 180, co2 = 1.0, zmethod='BNS', cmethod='BNS')
130
140
  0.5258309021348752
131
141
 
132
142
  Calculating gas sg, and then gas Z-Factor of a mixture of 5% CO2, 10% H2S, 0% N2 and 20% H2 (remainder natural gas with MW = 19).
@@ -134,7 +144,7 @@ Calculating gas sg, and then gas Z-Factor of a mixture of 5% CO2, 10% H2S, 0% N2
134
144
  .. code-block:: python
135
145
 
136
146
  >>> gsg = gas.gas_sg(hc_mw = 19.0, co2 = 0.05, h2s = 0.10, n2 = 0, h2 = 0.20)
137
- >>> gas.gas_z(p=2350, sg=gsg, degf = 180, co2 = 0.05, h2s = 0.10, n2 = 0, h2 = 0.20, zmethod='BUR', cmethod='BUR')
147
+ >>> gas.gas_z(p=2350, sg=gsg, degf = 180, co2 = 0.05, h2s = 0.10, n2 = 0, h2 = 0.20, zmethod='BNS', cmethod='BNS')
138
148
  0.9048153036714465
139
149
 
140
150
 
@@ -234,10 +244,13 @@ For ``cmethod='BNS'``, the returned values describe the *inert-free hydrocarbon*
234
244
  - Molar fraction of Nitrogen. Defaults to zero if undefined
235
245
  * - h2
236
246
  - float
237
- - Molar fraction of Hydrogen. Defaults to zero if undefined. If positive fraction, cmethod will override to 'BUR'
247
+ - Molar fraction of Hydrogen. Defaults to zero if undefined. If positive fraction, cmethod will override to 'BNS'
238
248
  * - he
239
249
  - float
240
250
  - Molar fraction of Helium. Defaults to 0. Keyword, last in the signature (new in 3.8.3). Like h2, a positive fraction forces zmethod and cmethod to 'BNS'; see *Helium in BNS*
251
+ * - ag
252
+ - bool
253
+ - BNS only. If True, the hydrocarbon pseudo-component Tc and Pc come from the associated-gas correlation instead of the default gas-condensate one; see *Associated gas in BNS*. Defaults to False. Keyword, last in the signature (new in 3.8.4). User-supplied tc/pc take precedence
241
254
  * - cmethod
242
255
  - string or c_method
243
256
  - Method for calculating gas critical parameters. `Calculation Methods and Class Objects`_.
@@ -326,10 +339,13 @@ A float or list / array can be used for p, returning corresponding 1-D array of
326
339
  - Molar fraction of Nitrogen. Defaults to zero if undefined
327
340
  * - h2
328
341
  - float
329
- - Molar fraction of Hydrogen. Defaults to zero if undefined. zmethod and cmethod get overriden to 'BUR' if positive fraction.
342
+ - Molar fraction of Hydrogen. Defaults to zero if undefined. zmethod and cmethod get overridden to 'BNS' if positive fraction.
330
343
  * - he
331
344
  - float
332
345
  - Molar fraction of Helium. Defaults to 0. Keyword, last in the signature (new in 3.8.3). Like h2, a positive fraction forces zmethod and cmethod to 'BNS'; see *Helium in BNS*
346
+ * - ag
347
+ - bool
348
+ - BNS only. If True, the hydrocarbon pseudo-component Tc and Pc come from the associated-gas correlation instead of the default gas-condensate one; see *Associated gas in BNS*. Defaults to False. Keyword, last in the signature (new in 3.8.4). User-supplied tc/pc take precedence
333
349
  * - tc
334
350
  - float
335
351
  - Critical gas temperature (deg R, or K if metric=True). Uses cmethod correlation if not specified. For BNS, overrides only the hydrocarbon pseudo-component Tc (inert Tc stay at BNS internal constants)
@@ -371,7 +387,7 @@ pyrestoolbox.gas.gas_ug
371
387
 
372
388
  gas_ug(p, sg, degf, zmethod ='DAK', cmethod = 'PMC', co2 = 0, h2s = 0, n2 = 0, h2 = 0, tc = 0, pc = 0, zee = 0, ugz = False, metric = False, he = 0) -> float or np.array
373
389
 
374
- Returns gas viscosity (cP) using Lee, Gonzalez & Eakin (1966) correlation unless the 'BUR' method for Z-Factor is selected in which case a tuned LBC method is used.
390
+ Returns gas viscosity (cP) using Lee, Gonzalez & Eakin (1966) correlation unless the 'BNS' method for Z-Factor is selected in which case a tuned LBC method is used.
375
391
  A float or list / array can be used for p, returning corresponding 1-D array of gas viscosities. The cmethod will be used to calculate critical gas parameters unless tc and/or pc are explicitly set to be non-zero. This option enables users to use pre-calculate gas critical properties and so avoid repeated duplicated critical property calculations when compute time is an issue
376
392
  Furnishing a positive value for zee means it will be used instead of calculating Z, and setting ugz to True will return the viscosity * Z product instead of viscosity alone
377
393
 
@@ -409,10 +425,13 @@ Furnishing a positive value for zee means it will be used instead of calculating
409
425
  - Molar fraction of Nitrogen. Defaults to zero if undefined
410
426
  * - h2
411
427
  - float
412
- - Molar fraction of Hydrogen. Defaults to zero if undefined. Overrides methods to 'BUR' if positive fraction.
428
+ - Molar fraction of Hydrogen. Defaults to zero if undefined. Overrides methods to 'BNS' if positive fraction.
413
429
  * - he
414
430
  - float
415
431
  - Molar fraction of Helium. Defaults to 0. Keyword, last in the signature (new in 3.8.3). Like h2, a positive fraction forces zmethod and cmethod to 'BNS'; see *Helium in BNS*
432
+ * - ag
433
+ - bool
434
+ - BNS only. If True, the hydrocarbon pseudo-component Tc and Pc come from the associated-gas correlation instead of the default gas-condensate one; see *Associated gas in BNS*. Defaults to False. Keyword, last in the signature (new in 3.8.4). User-supplied tc/pc take precedence
416
435
  * - tc
417
436
  - float
418
437
  - Critical gas temperature (deg R, or K if metric=True). Uses cmethod correlation if not specified. For BNS, overrides only the hydrocarbon pseudo-component Tc (inert Tc stay at BNS internal constants)
@@ -492,10 +511,13 @@ A float or list / array can be used for p, returning corresponding 1-D array of
492
511
  - Molar fraction of Nitrogen. Defaults to zero if undefined
493
512
  * - h2
494
513
  - float
495
- - Molar fraction of Hydrogen. Defaults to zero if undefined. If positive fraction, cmethod will override to 'BUR'
514
+ - Molar fraction of Hydrogen. Defaults to zero if undefined. If positive fraction, cmethod will override to 'BNS'
496
515
  * - he
497
516
  - float
498
517
  - Molar fraction of Helium. Defaults to 0. Keyword, last in the signature (new in 3.8.3). Like h2, a positive fraction forces zmethod and cmethod to 'BNS'; see *Helium in BNS*
518
+ * - ag
519
+ - bool
520
+ - BNS only. If True, the hydrocarbon pseudo-component Tc and Pc come from the associated-gas correlation instead of the default gas-condensate one; see *Associated gas in BNS*. Defaults to False. Keyword, last in the signature (new in 3.8.4). User-supplied tc/pc take precedence
499
521
  * - tc
500
522
  - float
501
523
  - Critical gas temperature (deg R, or K if metric=True). Uses cmethod correlation if not specified. For BNS, overrides only the hydrocarbon pseudo-component Tc (inert Tc stay at BNS internal constants)
@@ -572,10 +594,13 @@ A float or list / array can be used for p, returning corresponding 1-D array of
572
594
  - Molar fraction of Nitrogen. Defaults to zero if undefined
573
595
  * - h2
574
596
  - float
575
- - Molar fraction of Hydrogen. Defaults to zero if undefined. If positive fraction, cmethod will override to 'BUR'
597
+ - Molar fraction of Hydrogen. Defaults to zero if undefined. If positive fraction, cmethod will override to 'BNS'
576
598
  * - he
577
599
  - float
578
600
  - Molar fraction of Helium. Defaults to 0. Keyword, last in the signature (new in 3.8.3). Like h2, a positive fraction forces zmethod and cmethod to 'BNS'; see *Helium in BNS*
601
+ * - ag
602
+ - bool
603
+ - BNS only. If True, the hydrocarbon pseudo-component Tc and Pc come from the associated-gas correlation instead of the default gas-condensate one; see *Associated gas in BNS*. Defaults to False. Keyword, last in the signature (new in 3.8.4). User-supplied tc/pc take precedence
579
604
  * - tc
580
605
  - float
581
606
  - Critical gas temperature (deg R, or K if metric=True). Uses cmethod correlation if not specified. For BNS, overrides only the hydrocarbon pseudo-component Tc (inert Tc stay at BNS internal constants)
@@ -651,10 +676,13 @@ A float or list / array can be used for p, returning corresponding 1-D array of
651
676
  - Molar fraction of Nitrogen. Defaults to zero if undefined
652
677
  * - h2
653
678
  - float
654
- - Molar fraction of Hydrogen. Defaults to zero if undefined. If positive fraction, cmethod will override to 'BUR'
679
+ - Molar fraction of Hydrogen. Defaults to zero if undefined. If positive fraction, cmethod will override to 'BNS'
655
680
  * - he
656
681
  - float
657
682
  - Molar fraction of Helium. Defaults to 0. Keyword, last in the signature (new in 3.8.3). Like h2, a positive fraction forces zmethod and cmethod to 'BNS'; see *Helium in BNS*
683
+ * - ag
684
+ - bool
685
+ - BNS only. If True, the hydrocarbon pseudo-component Tc and Pc come from the associated-gas correlation instead of the default gas-condensate one; see *Associated gas in BNS*. Defaults to False. Keyword, last in the signature (new in 3.8.4). User-supplied tc/pc take precedence
658
686
  * - tc
659
687
  - float
660
688
  - Critical gas temperature (deg R, or K if metric=True). Uses cmethod correlation if not specified. For BNS, overrides only the hydrocarbon pseudo-component Tc (inert Tc stay at BNS internal constants)
@@ -742,6 +770,9 @@ Departure enthalpy for lean hydrocarbon gas carries a systematic bias of about
742
770
  * - he
743
771
  - float
744
772
  - Molar fraction of Helium. Defaults to 0. Keyword, last in the signature (new in 3.8.3). Like h2, a positive fraction forces zmethod and cmethod to 'BNS'; see *Helium in BNS*
773
+ * - ag
774
+ - bool
775
+ - BNS only. If True, the hydrocarbon pseudo-component Tc and Pc come from the associated-gas correlation instead of the default gas-condensate one; see *Associated gas in BNS*. Defaults to False. Keyword, last in the signature (new in 3.8.4). User-supplied tc/pc take precedence
745
776
  * - tc
746
777
  - float
747
778
  - Overrides the hydrocarbon pseudo-component Tc (deg R, or K if metric=True). Inert Tc stay at BNS internal constants
@@ -890,10 +921,13 @@ A float or list / array can be used for poverz, returning corresponding 1-D arra
890
921
  - Molar fraction of Nitrogen. Defaults to zero if undefined
891
922
  * - h2
892
923
  - float
893
- - Molar fraction of Hydrogen. Defaults to zero if undefined. If positive fraction, cmethod will override to 'BUR'
924
+ - Molar fraction of Hydrogen. Defaults to zero if undefined. If positive fraction, cmethod will override to 'BNS'
894
925
  * - he
895
926
  - float
896
927
  - Molar fraction of Helium. Defaults to 0. Keyword, last in the signature (new in 3.8.3). Like h2, a positive fraction forces zmethod and cmethod to 'BNS'; see *Helium in BNS*
928
+ * - ag
929
+ - bool
930
+ - BNS only. If True, the hydrocarbon pseudo-component Tc and Pc come from the associated-gas correlation instead of the default gas-condensate one; see *Associated gas in BNS*. Defaults to False. Keyword, last in the signature (new in 3.8.4). User-supplied tc/pc take precedence
897
931
  * - tc
898
932
  - float
899
933
  - Critical gas temperature (deg R, or K if metric=True). Uses cmethod correlation if not specified. For BNS, overrides only the hydrocarbon pseudo-component Tc (inert Tc stay at BNS internal constants)
@@ -970,10 +1004,13 @@ Returns gas specific gravity consistent with observed gas gradient. Calculated t
970
1004
  - Molar fraction of Nitrogen. Defaults to zero if undefined
971
1005
  * - h2
972
1006
  - float
973
- - Molar fraction of Hydrogen. Defaults to zero if undefined. If positive fraction, cmethod will override to 'BUR'
1007
+ - Molar fraction of Hydrogen. Defaults to zero if undefined. If positive fraction, cmethod will override to 'BNS'
974
1008
  * - he
975
1009
  - float
976
1010
  - Molar fraction of Helium. Defaults to 0. Keyword, last in the signature (new in 3.8.3). Like h2, a positive fraction forces zmethod and cmethod to 'BNS'; see *Helium in BNS*
1011
+ * - ag
1012
+ - bool
1013
+ - BNS only. If True, the hydrocarbon pseudo-component Tc and Pc come from the associated-gas correlation instead of the default gas-condensate one; see *Associated gas in BNS*. Defaults to False. Keyword, last in the signature (new in 3.8.4). User-supplied tc/pc take precedence
977
1014
  * - tc
978
1015
  - float
979
1016
  - Critical gas temperature (deg R, or K if metric=True). Uses cmethod correlation if not specified. For BNS, overrides only the hydrocarbon pseudo-component Tc (inert Tc stay at BNS internal constants)
@@ -1052,10 +1089,13 @@ Integrates the equation: m(p) = 2 * p / (ug * z)
1052
1089
  - Molar fraction of Nitrogen. Defaults to zero if undefined
1053
1090
  * - h2
1054
1091
  - float
1055
- - Molar fraction of Hydrogen. Defaults to zero if undefined. If positive fraction, cmethod will override to 'BUR'
1092
+ - Molar fraction of Hydrogen. Defaults to zero if undefined. If positive fraction, cmethod will override to 'BNS'
1056
1093
  * - he
1057
1094
  - float
1058
1095
  - Molar fraction of Helium. Defaults to 0. Keyword, last in the signature (new in 3.8.3). Like h2, a positive fraction forces zmethod and cmethod to 'BNS'; see *Helium in BNS*
1096
+ * - ag
1097
+ - bool
1098
+ - BNS only. If True, the hydrocarbon pseudo-component Tc and Pc come from the associated-gas correlation instead of the default gas-condensate one; see *Associated gas in BNS*. Defaults to False. Keyword, last in the signature (new in 3.8.4). User-supplied tc/pc take precedence
1059
1099
  * - tc
1060
1100
  - float
1061
1101
  - Critical gas temperature (deg R, or K if metric=True). Uses cmethod correlation if not specified. For BNS, overrides only the hydrocarbon pseudo-component Tc (inert Tc stay at BNS internal constants)
@@ -1197,6 +1237,9 @@ A ``gas_pvt`` object can be provided instead of individual gas composition param
1197
1237
  * - h2s
1198
1238
  - float
1199
1239
  - Molar fraction of H2S. Defaults to zero if undefined
1240
+ * - h2
1241
+ - float
1242
+ - Molar fraction of Hydrogen. Defaults to zero if undefined. If positive fraction, zmethod and cmethod are set to 'BNS'
1200
1243
  * - S
1201
1244
  - float
1202
1245
  - Skin. Defaults to zero if undefined
@@ -1208,10 +1251,16 @@ A ``gas_pvt`` object can be provided instead of individual gas composition param
1208
1251
  - Gas SG relative to air, Defaults to 0.75 if undefined
1209
1252
  * - gas_pvt
1210
1253
  - GasPVT
1211
- - GasPVT object. If provided, sg/co2/h2s/n2/h2/he/zmethod/cmethod/tc/pc are extracted from it
1254
+ - GasPVT object. If provided, sg/co2/h2s/n2/h2/he/ag/zmethod/cmethod/tc/pc are extracted from it
1212
1255
  * - metric
1213
1256
  - bool
1214
1257
  - If True, inputs/outputs use Eclipse METRIC units. Defaults to False
1258
+ * - he
1259
+ - float
1260
+ - Molar fraction of Helium. Defaults to 0. Keyword, last in the signature (new in 3.8.3). Like h2, a positive fraction forces zmethod and cmethod to 'BNS'; see *Helium in BNS*
1261
+ * - ag
1262
+ - bool
1263
+ - BNS only. If True, the hydrocarbon pseudo-component Tc and Pc come from the associated-gas correlation instead of the default gas-condensate one; see *Associated gas in BNS*. Defaults to False. Keyword, last in the signature (new in 3.8.4). User-supplied tc/pc take precedence
1215
1264
 
1216
1265
  .. list-table:: Returns
1217
1266
  :widths: 10 15 40
@@ -1358,15 +1407,24 @@ A ``gas_pvt`` object can be provided instead of individual gas composition param
1358
1407
  * - h2s
1359
1408
  - float
1360
1409
  - Molar fraction of H2S. Defaults to zero if undefined
1410
+ * - h2
1411
+ - float
1412
+ - Molar fraction of Hydrogen. Defaults to zero if undefined. If positive fraction, zmethod and cmethod are set to 'BNS'
1361
1413
  * - sg
1362
1414
  - float
1363
1415
  - Gas SG relative to air, Defaults to 0.75 if undefined
1364
1416
  * - gas_pvt
1365
1417
  - GasPVT
1366
- - GasPVT object. If provided, sg/co2/h2s/n2/h2/he/zmethod/cmethod/tc/pc are extracted from it
1418
+ - GasPVT object. If provided, sg/co2/h2s/n2/h2/he/ag/zmethod/cmethod/tc/pc are extracted from it
1367
1419
  * - metric
1368
1420
  - bool
1369
1421
  - If True, inputs/outputs use Eclipse METRIC units. Defaults to False
1422
+ * - he
1423
+ - float
1424
+ - Molar fraction of Helium. Defaults to 0. Keyword, last in the signature (new in 3.8.3). Like h2, a positive fraction forces zmethod and cmethod to 'BNS'; see *Helium in BNS*
1425
+ * - ag
1426
+ - bool
1427
+ - BNS only. If True, the hydrocarbon pseudo-component Tc and Pc come from the associated-gas correlation instead of the default gas-condensate one; see *Associated gas in BNS*. Defaults to False. Keyword, last in the signature (new in 3.8.4). User-supplied tc/pc take precedence
1370
1428
 
1371
1429
  .. list-table:: Returns
1372
1430
  :widths: 10 15 40
@@ -1934,6 +1992,9 @@ Stores gas composition and method choices. Pre-computes critical temperature and
1934
1992
  * - he
1935
1993
  - float
1936
1994
  - Molar fraction of Helium. Defaults to 0. Keyword, last in the signature (new in 3.8.3). Like h2, a positive fraction forces zmethod and cmethod to 'BNS'; see *Helium in BNS*
1995
+ * - ag
1996
+ - bool
1997
+ - BNS only. If True, the hydrocarbon pseudo-component Tc and Pc come from the associated-gas correlation instead of the default gas-condensate one; see *Associated gas in BNS*. Defaults to False. Keyword, last in the signature (new in 3.8.4). User-supplied tc/pc take precedence
1937
1998
  * - zmethod
1938
1999
  - string or z_method
1939
2000
  - Method for Z-factor calculation. Defaults to 'DAK'
@@ -46,7 +46,7 @@ Example notebooks
46
46
  =========================== ====================================================
47
47
  File Content
48
48
  =========================== ====================================================
49
- examples.ipynb Worked examples across the modules plus BNS/BUR demonstrations
49
+ examples.ipynb Worked examples across the modules plus BNS demonstrations
50
50
  nodal_examples.ipynb Multi-segment nodal framework examples
51
51
  nodal_hydrate_demo.ipynb VLP, VFPPROD, nodal solutions and hydrate analysis
52
52
  =========================== ====================================================
@@ -426,7 +426,7 @@ Returns flowing bottom hole pressure (psia, or barsa if metric=True) using the s
426
426
  - 'gas' or 'oil'
427
427
  * - gas_pvt
428
428
  - GasPVT
429
- - Gas PVT object. If provided, extracts gas composition (sg, co2, h2s, n2, h2, he) and method selections for IPR calculations
429
+ - Gas PVT object. If provided, the gas-well VLP march evaluates Z and gas viscosity with its methods and composition (as ``gas_pvt.z()`` and ``gas_pvt.viscosity()``: DAK with PMC by default, or HY or BNS as configured, impurities and H2/He included), and IPR calculations use the same. Without it the march uses Hall-Yarborough Z on Sutton pseudo-criticals of ``gsg`` with Lee-Gonzalez-Eakin viscosity
430
430
  * - oil_pvt
431
431
  - OilPVT
432
432
  - Oil PVT object. If provided for oil wells, extracts api, sgsp, pb, rsb
@@ -12,7 +12,7 @@
12
12
  "- **2, 3, and 4 segment** completions\n",
13
13
  "- **Inflow (IPR)** and **outflow (VLP)** curves with operating point solutions\n",
14
14
  "- Multiple VLP methods: Hagedorn-Brown (HB), Beggs & Brill (BB), Woldesemayat-Ghajar (WG)\n",
15
- "- BUR gas PVT method (tuned 5-component Peng-Robinson EOS)"
15
+ "- BNS gas PVT method (tuned 5-component Peng-Robinson EOS)"
16
16
  ]
17
17
  },
18
18
  {
@@ -102,7 +102,7 @@
102
102
  "- 8,000 ft of 2.441\" tubing\n",
103
103
  "- 2,000 ft of 4.892\" casing below the tubing shoe\n",
104
104
  "\n",
105
- "Uses BUR gas PVT with 5% CO2."
105
+ "Uses BNS gas PVT with 5% CO2."
106
106
  ]
107
107
  },
108
108
  {
@@ -111,8 +111,8 @@
111
111
  "metadata": {},
112
112
  "outputs": [],
113
113
  "source": [
114
- "# Define GasPVT with BUR method\n",
115
- "gpvt_1 = gas.GasPVT(sg=0.70, co2=0.05, zmethod='BUR', cmethod='BUR')\n",
114
+ "# Define GasPVT with BNS method\n",
115
+ "gpvt_1 = gas.GasPVT(sg=0.70, co2=0.05, zmethod='BNS', cmethod='BNS')\n",
116
116
  "print(f'Gas Tc = {gpvt_1.tc:.1f} deg R, Pc = {gpvt_1.pc:.1f} psia')\n",
117
117
  "print(f'Z @ 3000 psia, 220F = {gpvt_1.z(3000, 220):.4f}')\n",
118
118
  "print(f'Viscosity @ 3000 psia, 220F = {gpvt_1.viscosity(3000, 220):.4f} cP')"
@@ -169,7 +169,7 @@
169
169
  "- 3,000 ft of 2.441\" tubing — building angle (30 deg deviation)\n",
170
170
  "- 4,000 ft of 4.892\" casing — high angle (60 deg deviation)\n",
171
171
  "\n",
172
- "BB and WG are suitable for deviated wells. Uses BUR gas PVT."
172
+ "BB and WG are suitable for deviated wells. Uses BNS gas PVT."
173
173
  ]
174
174
  },
175
175
  {
@@ -226,7 +226,7 @@
226
226
  "- 3,000 ft of 2.441\" tubing — tangent section (55 deg)\n",
227
227
  "- 4,000 ft of 4.892\" casing — near-horizontal (80 deg)\n",
228
228
  "\n",
229
- "Uses WG method (well-suited for all inclinations) and BUR gas PVT."
229
+ "Uses WG method (well-suited for all inclinations) and BNS gas PVT."
230
230
  ]
231
231
  },
232
232
  {
@@ -548,9 +548,9 @@
548
548
  "metadata": {},
549
549
  "source": [
550
550
  "---\n",
551
- "## Example 9: Gas Well with H2 Blend — BUR Method Auto-Selection\n",
551
+ "## Example 9: Gas Well with H2 Blend — BNS Method Auto-Selection\n",
552
552
  "\n",
553
- "When hydrogen is present, GasPVT automatically selects BUR/BNS for both z-factor and critical property methods. \n",
553
+ "When hydrogen is present, GasPVT automatically selects BNS for both z-factor and critical property methods. \n",
554
554
  "3-segment well with 10% H2 in the gas."
555
555
  ]
556
556
  },
@@ -560,7 +560,7 @@
560
560
  "metadata": {},
561
561
  "outputs": [],
562
562
  "source": [
563
- "# GasPVT with H2 — auto-selects BNS/BUR\n",
563
+ "# GasPVT with H2 — auto-selects BNS\n",
564
564
  "gpvt_h2 = gas.GasPVT(sg=0.55, co2=0.02, h2=0.10)\n",
565
565
  "print(f'Z-method: {gpvt_h2.zmethod}')\n",
566
566
  "print(f'C-method: {gpvt_h2.cmethod}')\n",
@@ -592,7 +592,7 @@
592
592
  "print(f\"Operating BHP: {result_h2['bhp']:.0f} psia\")\n",
593
593
  "\n",
594
594
  "plot_nodal(result_h2, well_type='gas',\n",
595
- " title='Example 9: Gas + 10% H2 Well — 3 Segments (BUR Auto-Selected)');"
595
+ " title='Example 9: Gas + 10% H2 Well — 3 Segments (BNS Auto-Selected)');"
596
596
  ]
597
597
  },
598
598
  {
@@ -792,7 +792,7 @@
792
792
  "\n",
793
793
  "| Example | Well Type | Segments | Trajectory | VLP Method | Key Feature |\n",
794
794
  "|---------|-----------|----------|------------|------------|-------------|\n",
795
- "| 1 | Gas | 2 | Vertical | BB | Basic multi-segment, BUR PVT |\n",
795
+ "| 1 | Gas | 2 | Vertical | BB | Basic multi-segment, BNS PVT |\n",
796
796
  "| 2 | Gas | 3 | Deviated | BB | Build + high-angle sections |\n",
797
797
  "| 3 | Gas | 4 | Near-horizontal | WG | 4-segment trajectory, WG method |\n",
798
798
  "| 4 | Gas | 1 vs 3 | Vertical vs Deviated | BB | VLP comparison overlay |\n",
@@ -800,7 +800,7 @@
800
800
  "| 6 | Oil | 3 | Deviated | BB | Deviated oil with OilPVT |\n",
801
801
  "| 7 | Oil | 4 | Near-horizontal | BB | 4-segment horizontal oil |\n",
802
802
  "| 8 | Gas | 3 | Deviated | HB/BB/WG/GRAY | Method comparison |\n",
803
- "| 9 | Gas+H2 | 3 | Deviated | BB | H2 blend, BUR auto-selection |\n",
803
+ "| 9 | Gas+H2 | 3 | Deviated | BB | H2 blend, BNS auto-selection |\n",
804
804
  "| 10 | Gas | 4 | Deviated | WG | THP sensitivity |\n",
805
805
  "| 11 | Oil | 2 vs 4 | Vertical vs Deviated | BB | Side-by-side nodal comparison |\n",
806
806
  "| 12 | Gas | 2/3/4 | Progressive deviation | BB | fbhp table comparison |"