Skip to content

Assemble flow_comp with the TPFA linearizer - #7724

Open
GitPaean wants to merge 1 commit into
OPM:masterfrom
GitPaean:flowcomp-tpfa
Open

GitPaean wants to merge 1 commit into
OPM:masterfrom
GitPaean:flowcomp-tpfa

Conversation

@GitPaean

@GitPaean GitPaean commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Switch flow_comp from the element-context linearizer to the TPFA linearizer, as part of moving away from element-context assembly.

A new local residual for the PT-flash model computes the same transmissibility-based flux as the element-context assembly, so serial results are unchanged on the compositional test decks. The TPFA linearizer assembles total rates rather than rates per unit volume, so flow_comp no longer uses a volumetric residual. The well coupling already follows that setting, and the convergence check now divides by the cell volume so its tolerances keep their meaning. Because the linear solver now sees unscaled rows, results can move within the linear solver tolerance. On the test decks this shows up only in parallel runs, and stays within the test tolerances.

Also:

  • compositional wells support --separate-sparse-source-terms, which the TPFA linearizer provides;
  • the TPFA linearizer takes the PVT region from the problem, since CompositionalFluidState has no pvtRegionIndex();
  • flow_comp rejects decks with BCCON instead of running them with no-flow boundaries.

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

GitPaean commented Nov 23, 2026 •

Copy link
Copy Markdown
Member Author

jenkins build this please

https://ci.opm-project.org/job/opm-simulators-PR-builder/11266/

A new local residual for the PT-flash model computes the same
transmissibility-based flux as the element-context assembly. The TPFA
linearizer assembles total rates rather than rates per unit volume, so
flow_comp no longer uses a volumetric residual, and the convergence
check divides by the cell volume to keep its tolerances.

Compositional runs never read boundary conditions, so a deck with BCCON
used to run with no-flow boundaries. Such decks are now rejected.
@GitPaean
GitPaean marked this pull request as ready for review November 23, 2026 14:32
@GitPaean
GitPaean requested review from hnil, svenn-t and totto82 November 23, 2026 14:32
@GitPaean

Copy link
Copy Markdown
Member Author

jenkins build this please

This branch has not been deployed

No deployments
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