Skip to content

compositional equilibration with COMPVD - #7373

Draft
GitPaean wants to merge 16 commits into
OPM:masterfrom
GitPaean:compvd_equilibration
Draft

compositional equilibration with COMPVD#7373
GitPaean wants to merge 16 commits into
OPM:masterfrom
GitPaean:compvd_equilibration

Conversation

@GitPaean

Copy link
Copy Markdown
Member

No description provided.

@GitPaean GitPaean added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Aug 28, 2026
@GitPaean
GitPaean force-pushed the compvd_equilibration branch 2 times, most recently from b1bee28 to ba75c0e Compare August 31, 2026 11:53
The linear solver leaves the rows of ghost cells untouched, so their
primary variables must be fetched from the owning processes before the
intensive quantities are recomputed. A virtual postSolutionUpdate hook
between the two steps of the base updateSolution carries the sync, so
the sequence itself stays in one place.
The scatter resized the distributed data to hold every value of a
multi-valued keyword such as ZMF, but left the keyword information at
one value per cell, so numValuePerCell(), numCells() and compress()
read the distributed field as a scalar one.
Type 1 integrates the whole column with the single EOS root chosen from
the datum side of the contact. With the contact inside the region that
root can be the wrong one of a three-root cubic on the far side, but
the warning only covered a depth-invariant ZMFVD; a varying one was
initialized in silence. A genuinely two-phase column needs item 10 = 3,
which splits the integration at the contact.
Cover the supported EQUIL envelope on the verified 1D column: a
continuous liquid with the composition following ZMFVD (item 10 = 1), a
gas cap over a liquid leg with the contact pressure at the saturation
pressure of the contact liquid (item 10 = 3), two independently
equilibrated EQLNUM regions, and the error on a missing ZMFVD. The
pressures are anchored to the reference-simulator values the
implementation was verified against.
EQUIL_1D_ZMFVD initializes a continuous liquid column (EQUIL item 10
defaulted) and EQUIL_1D_ZMFVD_OIL a gas cap over a liquid leg with the
contact pressure at the saturation pressure (item 10 = 3), covering the
supported envelope of the compositional equilibration end to end.
COMPVD was refused outright, and a water-oil contact inside the region
with it. Read the composition from either COMPVD or ZMFVD, take the
phase COMPVD states for the EOS root of a single-phase region, and give
the water its own hydrostatic column: connate saturation above the
contact, full saturation below, and a pressure integrated from the
contact rather than derived from the hydrocarbon one.

A datum below the water-oil contact states the water pressure, not the
hydrocarbon pressure, so the integration starts there and hands the
hydrocarbon its pressure at the contact.
A COMPVD table that names the vapour phase for some rows and the liquid
phase for others describes a gas zone over a liquid one, meeting at the
gas-oil contact. Build a composition from the rows of each phase and
give the gas zone its own hydrostatic column, continuous with the
liquid one at the contact, instead of forcing the whole region onto the
EOS root of the datum's side.
A composition-versus-depth table states the composition where it was
measured; continuing its slope past the shallowest or deepest row
invents a fluid. A customer deck whose vapour rows span 2550 to 2573.5
m was extrapolated up to 2454 m, where the methane fraction reached
0.796 against the 0.7495 of the shallowest row, and the density error
that followed left the top of the column 0.13 bar off the reference.
Clamping brings it to 0.05 bar, the same as the deck without the
shallower row.
Below the water-oil contact the pore space holds water alone, but the
cell pressure came from the oil pressure function, which carried the
lighter hydrocarbon gradient into the water zone. On a customer deck
the deepest cell came out 0.65 bar below the reference run, and the
error grew with depth.

The water pressure is already integrated to place the contact. Use it
for the cells below the contact as well. The same deck now matches the
reference to 0.00003 bar there.
Successive substitution on its own does not always converge: two of six
compositional test decks abort during initialization at the hundred
iteration limit, and the user is left with no result and no hint that
another method would work.

Newton switches back to successive substitution when it fails, so the
combined method reaches everything the plain one reaches. The two decks
now initialize and match their reference runs to 0.0005 bar, and the
four that already ran are unchanged.
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