Skip to content

flow: synchronize thermal intensive cache - #7378

Open
akva2 wants to merge 1 commit into
OPM:masterfrom
akva2:sync_temp_int_quants
Open

flow: synchronize thermal intensive cache#7378
akva2 wants to merge 1 commit into
OPM:masterfrom
akva2:sync_temp_int_quants

Conversation

@akva2

@akva2 akva2 commented Aug 31, 2026

Copy link
Copy Markdown
Member

This may possibly have been done on purpose, but it creates problem when restarting.

Currently, the intensive quantities are not updated after a new temperature has been solved by the sequential implicit temperature model. This means that the intensive quantities lag with one additional time level.

When doing restart, we rebuild the intensive quantities from primaries. The rebuilt intensive quantities do reflect the updated temperature, meaning we cannot reproduce the same simulator state after deserialization.

@akva2 akva2 added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Aug 31, 2026
@akva2

akva2 commented Aug 31, 2026

Copy link
Copy Markdown
Member Author

jenkins build this please

@akva2

akva2 commented Aug 31, 2026

Copy link
Copy Markdown
Member Author

jenkins build this failure_report please

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a state-consistency issue in the sequential implicit thermal (TEMP) workflow by ensuring intensive quantities are refreshed after the temperature solve, so cached temperature-dependent properties do not lag by one time level (notably affecting restart reproducibility).

Changes:

  • After completing the sequential implicit temperature model timestep, invalidate and recompute intensive quantities for timeIdx=0 to synchronize caches with the updated temperature.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread opm/simulators/flow/FlowProblem.hpp Outdated
@akva2
akva2 force-pushed the sync_temp_int_quants branch from 3044693 to fd181ac Compare August 31, 2026 12:00
@akva2

akva2 commented Aug 31, 2026

Copy link
Copy Markdown
Member Author

jenkins build this failure_report please

@GitPaean

GitPaean commented Aug 31, 2026

Copy link
Copy Markdown
Member

Does this make it possible to use finer or default tolerance for the following restarting case?

add_test_compare_restarted_simulation(
  CASENAME
    spe1_temp
  FILENAME
    SPE1CASE2_TEMP
  SIMULATOR
    flow
  DEV_SIMULATOR
    flow_blackoil_temp
  ABS_TOL
    ${abs_tol_restart}
  REL_TOL
    5.0e-2
  RESTART_STEP
    3
  DIR
    spe1
  TEST_ARGS
    --solver-max-time-step-in-days=1
)

Maybe even the bigger time steps?

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.

3 participants