Skip to content

fix: Initialize open wells before time-zero output - #4163

Open
victorapm wants to merge 1 commit into
developfrom
fix/paludettomag1/initial-well-state
Open

victorapm wants to merge 1 commit into
developfrom
fix/paludettomag1/initial-well-state

Conversation

@victorapm

Copy link
Copy Markdown
Contributor

In summary, this PR:

  • Initialize open wells before time-zero output so pressure and stored fluid are available.
  • Honor initial well and perforation schedules and validate phase-rate constraints.
  • Preserve deferred initialization for initially closed wells.
  • Add open/closed initialization regressions; compositional, single-phase, thermal, and scheduling tests pass.

Additional details

Initially open wells were previously initialized during the first coupled solver step. At time zero, their pressure and component-density fields could therefore remain zero. This also omitted fluid already stored in the wells from the initial reservoir-plus-well inventory, making subsequent mass-balance comparisons misleading.

This patch initializes open wells after the reservoir fluid state and well separator models are available, using the existing well-initialization path. It evaluates the well and perforation schedules at time zero and validates the active well constraints before initialization. That validation establishes the phase indices needed by phase-rate controls.

Wells that are closed initially retain their deferred initialization until opening. New regressions verify that open wells have populated pressure and component densities before any solver step, while an initially closed well remains uninitialized.

Validation passed: testOpenClosePerf, testReservoirCompositionalMultiphaseMSWells, testReservoirSinglePhaseMSWells, and testThermalReservoirCompositionalMultiphaseMSWells.

@victorapm victorapm added ci: run integrated tests Allows to run the integrated tests in GEOS CI ci: run code coverage enables running of the code coverage CI jobs labels Oct 12, 2026
@victorapm victorapm added the ci: run device builds Allows to run the device (CUDA/HIP) builds label Oct 12, 2026
@victorapm victorapm self-assigned this Oct 12, 2026
@tjb-ltk

tjb-ltk commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

There needs to be a test showing the problem. Initialization of the wellbore during first opening can be done a few ways, including a well estimator. Its not clear what is specifically being addressed in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci: run code coverage enables running of the code coverage CI jobs ci: run device builds Allows to run the device (CUDA/HIP) builds ci: run integrated tests Allows to run the integrated tests in GEOS CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants