Skip to content

Fix Simandoux Sw exponent and mud-filtrate salinity input#12

Open
dougchristie wants to merge 1 commit into
toddheitmann:masterfrom
dougchristie:fix/water-saturation-equations
Open

Fix Simandoux Sw exponent and mud-filtrate salinity input#12
dougchristie wants to merge 1 commit into
toddheitmann:masterfrom
dougchristie:fix/water-saturation-equations

Conversation

@dougchristie
Copy link
Copy Markdown

Two latent bugs in petropy/log.py, both present since the initial commit (1b54d5e):

  1. Simandoux water saturation used (d**2 + e) ** 0.2; the closed-form solution of the Simandoux quadratic requires a square root (** 0.5). With the fix, Simandoux correctly reduces to Archie when Vclay = 0 (verified numerically: 0.41667 == 0.41667; the old 0.2 produced 0.705). The matching docstring formula was corrected from a square to a square root.
  2. rmf68 (mud-filtrate resistivity normalized to 68 F) was scaled by rws (formation-water surface resistivity) instead of rmfs (mud-filtrate surface resistivity), corrupting filtrate salinity, density, and neutron response. Now uses rmfs.

🤖 Generated with Claude Code

- Simandoux water saturation used (d**2 + e) ** 0.2; the closed-form
  quadratic solution requires a square root (** 0.5). With the fix,
  Simandoux correctly reduces to Archie when Vclay = 0.
- Correct the matching Simandoux docstring to use a square root
  instead of a square so the documented equation matches the code.
- rmf68 (mud-filtrate resistivity at 68 F) was scaled by rws (water)
  instead of rmfs (filtrate), corrupting filtrate salinity, density,
  and neutron response. Now uses rmfs.

Both bugs date to the initial commit (1b54d5e).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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