Conversation
tjb-ltk
requested review from
OmarDuran,
dkachuma,
frankfeifan,
jhuang2601,
joshua-white and
rrsettgast
as code owners
September 17, 2026 14:43
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.
This PR removes the restriction (thermal models) of no perforations being allowed in the top well element, incorporating the single phase fix in @npillardou PR 3973 and then extending to compositional models. The fix retains the constant temperature boundary condition at top well element but now includes terms for allowing convective heat transfer from the top element into the reservoir cell.
Integrated tests are included for single phase and compositional models. The compositional model also activates the well estimator to arrive at a good initial estimate for the well solution.
An additional fix is include for compositional. There was an error in the residual scaling for well equations in thermal. This was introduced in the refactor merge. When the well boundary condition is BHP, the well doesn't have a rate constraint to use for the residual scaling in the component balance equations. When a well is controlled by BHP scaling the balance equation residual is not necessarily needed since the mass inj/prod is computed directly from the BHP constraint value.