Skip to content

Fix water mass conservation in the zero solubility model - #7485

Open
Johnny-Kao wants to merge 2 commits into
geodynamics:mainfrom
Johnny-Kao:fix/zero-solubility-water-conservation
Open

Johnny-Kao wants to merge 2 commits into
geodynamics:mainfrom
Johnny-Kao:fix/zero-solubility-water-conservation

Conversation

@Johnny-Kao

@Johnny-Kao Johnny-Kao commented Nov 25, 2026 •

Copy link
Copy Markdown

I noticed that the zero solubility model adds the bound and free water fractions directly, even though they are defined relative to different masses.

This slightly increases the total water content during fluid release. This PR corrects the calculation and updates the existing regression test and documentation.

(This is for FYI - for transparency purpose) Details and test results

The mass conservation formulation introduced in #6366 accounts for the bound water fraction relative to the solid mass. However, the equilibrium free water calculation does not apply the same conversion.

Using the existing test from #6486:

Quantity Before Corrected
Total water mass fraction after fluid release 0.0166890 0.0166221
Final porosity 0.0248263 0.0247276

The corrected values agree with the analytical mass balance. The Debug build, all 45 unit tests, and 14 related regression tests passed after updating the affected reference outputs (native CI). The official indentation check also passed (format CI).

Before your first pull request:

For all pull requests:

I used GPT to investigate the source code, identify the inconsistency first. Then I prepared the changes for this PR.

For changes of existing features:

  • I have tested the change in the official Debug test environment on GitHub Actions.
  • I have updated the existing testcase and its reference outputs.
  • I have added a changelog entry in doc/modules/changes.

@Johnny-Kao
Johnny-Kao marked this pull request as ready for review November 25, 2026 16:44
@gassmoeller

Copy link
Copy Markdown
Member

@danieldouglas92 I think you know most about this code, could you take a look at this PR?

This branch has not been deployed

No deployments
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.

2 participants