Apply the SSHIFT volume shift to the density and the viscosity - #5322
Draft
GitPaean wants to merge 3 commits into
Draft
Apply the SSHIFT volume shift to the density and the viscosity#5322GitPaean wants to merge 3 commits into
GitPaean wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Applies parsed SSHIFT values to compositional phase-density calculations without altering fugacity coefficients.
Changes:
- Stores component volume shifts in the fluid system.
- Subtracts mixture volume shift when calculating density.
- Adds volume-shift regression tests.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
CMakeLists_files.cmake |
Registers the new test. |
GenericOilGasWaterFluidSystem.hpp |
Propagates and applies SSHIFT. |
PTFlashParameterCache.hpp |
Calculates phase volume shift. |
test_volume_shift.cpp |
Tests density and fugacity behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Member
Author
|
jenkins build this failure_report please |
GitPaean
force-pushed
the
sshift_standalone
branch
from
August 28, 2026 19:26
4edcb32 to
6e5994f
Compare
GitPaean
force-pushed
the
sshift_standalone
branch
2 times, most recently
from
September 4, 2026 15:26
5845ce4 to
a2fa8ff
Compare
GitPaean
requested
a balanced review from Copilot
and removed request for
Copilot
September 4, 2026 15:27
GitPaean
force-pushed
the
sshift_standalone
branch
2 times, most recently
from
September 8, 2026 08:18
92d6bb8 to
3e23f37
Compare
Member
Author
|
jenkins build this opm-simulators=7391 failure_report please |
GitPaean
force-pushed
the
sshift_standalone
branch
from
September 8, 2026 12:13
00892be to
4881bf3
Compare
GitPaean
force-pushed
the
sshift_standalone
branch
from
September 8, 2026 13:02
7e01946 to
bc077a6
Compare
Pass the parsed component SSHIFT coefficients to the fluid system and cache each phase's volume translation, sum_c x_c s_c b_c. Use the corrected molar volume for density and the molar-density input to the LBC correlation. Reject corrected volumes that are non-positive or NaN. Keep the cached EOS molar volume unshifted for fugacity calculations. At equal phase pressure and temperature, the translation factors cancel from the equilibrium ratios, preserving the phase split. Add tests for density, viscosity, equilibrium ratios, AD derivatives, parsed SSHIFT values and invalid volumes. Saturation updates are handled in opm-simulators PR #7391.
Clear the static component list in init() so a later initialization can register a different configuration. Without this reset, addComponent() rejects new registrations once the list is full, leaving the previous component properties and SSHIFT coefficients active.
Default to zero translation for fluid systems without volumeShift(). This restores compilation of the CO2/brine flash, cubic-EOS finite-guard and SSI/Newton fallback tests. Let checkFluidSystem() accept an initializer and run it before creating the state and cache. Register the generic fluid system's components for each scalar/AD check, preserving the reset in init(). Validation: six focused opm-common tests and both compositional well tests pass. SIMPLE_COMP_SSHIFT completes with flow_comp3_2p.
Member
Author
|
jenkins build this opm-simulators=7391 failure_report please |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SSHIFT was parsed and stored but never reached the equation of state. Against a reference run of the same deck, the gas density was 3.7 percent high and the liquid 10 percent low.
The shift now sits on the component parameters, and the density subtracts it from the molar volume.
The parameter cache keeps the unshifted volume, because the fugacity coefficients are computed from it. A volume shift cancels out of the equilibrium ratios, so it must leave the phase split untouched. Subtracting it there would change the coefficients and move the split.