Skip to content

Msw refactoring after thermal msw#7043

Closed
GitPaean wants to merge 23 commits into
OPM:masterfrom
GitPaean:msw_refactoring_after_thermal_msw
Closed

Msw refactoring after thermal msw#7043
GitPaean wants to merge 23 commits into
OPM:masterfrom
GitPaean:msw_refactoring_after_thermal_msw

Conversation

@GitPaean

Copy link
Copy Markdown
Member

In the PR #6816, we create a FluidState for each segment.

This PR aims at reusing of the FluidState in the calculating the surface volume of the segment and calculate the fluid properties.

@GitPaean GitPaean added the manual:irrelevant This PR is a minor fix and should not appear in the manual label May 11, 2026
@GitPaean

Copy link
Copy Markdown
Member Author

jenkins build this opm-tests=1519 please

@GitPaean

Copy link
Copy Markdown
Member Author

jenkins build this opm-tests=1519 failure_report please

@GitPaean GitPaean force-pushed the msw_refactoring_after_thermal_msw branch 2 times, most recently from b672e30 to fbcb538 Compare June 23, 2026 13:15
@GitPaean

Copy link
Copy Markdown
Member Author

jenkins build this failure_report please

@GitPaean

Copy link
Copy Markdown
Member Author

This PR will change the results. Should be reviewed after the PR #6816 .

@GitPaean

Copy link
Copy Markdown
Member Author

The refactoring to reuse the created segment fluid state slightly impact the performance, for both thermal and non-thermal running for the cases tested, which is unfortunate.

GitPaean added 18 commits June 24, 2026 14:01
including adding tempearture as the primary variable for the MSW.

to calculate the enthalpy, for each segment, we generate a
SegmentFluidState.
to test the thermal equation solving for MSW
Multiply the MSW energy accumulation/flow/perforation terms by
energy_scaling_factor_ (the reservoir's BlackOilEnergyScalingFactor) so the
energy residual matches the mass-equation scale, improving well-system
conditioning and convergence; the connectionRates_ source term stays raw
since the reservoir scales the coupling centrally. The energy convergence
check now reuses the standard well tolerances instead of hand-tuned constants.
…ture

Fall back to first-perforation reservoir temperature when WINJTEMP is unset
instead of calling Well::inj_temperature() unconditionally.
Reuse surfaceToReservoirRate for the producing energy connection (now a
template over the fluid-state type, extending reservoir Eval on the fly),
hoist the segment volume and PVT parameter cache out of their phase loops.
and only applying the pressure and temperature derivative to energy
flux.
@GitPaean GitPaean force-pushed the msw_refactoring_after_thermal_msw branch from fbcb538 to 3e55f9d Compare June 24, 2026 12:01
GitPaean added 4 commits June 24, 2026 14:02
and using the calculation in createSegmentFluidState to calculate the
surface volume of the segments to reduce duplicated calculation.
@GitPaean

Copy link
Copy Markdown
Member Author

after comparison, #7199 can be the one better to work on. I am closing this one now.

@GitPaean GitPaean closed this Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:irrelevant This PR is a minor fix and should not appear in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant