the current approach is not necessarily correct. When aquifer cells are
on the overlap layers, things are much more complicated.
But it mostly affects only the summary output of the numerical aquifers.
The well data should be fine.
`NEW_PROP_TAG` is now a definition and not just a declaration.
Eliminate superfluous declarations, include headers with definitions.
Make one necessary forward declaration explicit.
This commit adds a very early, alpha-quality implementation of the
"horizontal subdivision" strategy (N < 0) of the EQUIL directive.
This in turn enables more accurate derivations of the initial fluids
in place.
Interactions with SWATINIT are completely untested, and the initial
Rs/Rv derivations in this context are possibly incomplete. More
work is likely needed in this area, but this does at least enable
more widespread testing.
The purpose of this function is to determine the vertical extent of
a set of cells. Counting the number of cells in the region is not
its responsibility.
This commit splits out the per-cell initial state derivation to two
separate helper functions, equilibrateCellCentres() and cellLoop().
The latter manages the per-cell assignments to pertinent data
members and calls an arbitrary "equilbration method" that is
provided as a callback and which calculates per-cell phase
pressures, phase saturations and mixing ratios (Rs/Rv).
In turn, the equilibrateCellCentres() uses the cellLoop() to affect
the existing equilibration procedure within a cell using values at
the depths of the cell centres only.
This commit introduces a new helper class,
Opm::EQUIL::Details::PhaseSaturations<>
that subsumes the responsibility of the existing helper function
Opm::EQUIL::phaseSaturations<>()
and generalises that functionality to arbitrary depth points within
single cells. This is in preparation of adding support for the N<0
case of the initial fluid in place procedure defined in the EQUIL
keyword. The class consumes an already equlibrated pressure table
for the pertinent equilibration region, calculates capillary
pressure values and inverts Pc curves to derive saturation values.
If the capillary pressure curves are constant within a cell, then a
simple depth consideration with respect to the implied sharp phase
interface is used to derive saturation values. We also preserve
existing support for SWATINIT-type initialisation of the water
saturation field.
Switch InitialStateComputer<>::calcPressSatRsRv() over to using the
pressure and saturation helper classes instead of the original
helper functions since this provides additional control. Also
remove those helper functions to reduce risk of confusion over which
method to use. Update the unit tests accordingly.
This commit is the first step of several that implements ECLIPSE's
"accurate fluid-in-place" model initialization procedure based on
subdividing the vertical range/extent of individual cells. This
first step puts the O/G/W phase-pressure calculation into a helper
class,
Opm::EQUIL::Details::PressureTable<>
through which phase pressure values can be calculated at abritrary
depths rather than just at the cell centre depths. In other words,
this helper class extends and subsumes the responsibilities of the
existing helper functions
Opm::EQUIL::Details::PhasePressure::assign()
Opm::EQUIL::Details::PhasePressure::oil()
Opm::EQUIL::Details::PhasePressure::gas()
Opm::EQUIL::Details::PhasePressure::water()
We still use the same ODE-based evaluation procedure for the phase
pressures and the equilibrateOWG() helper function still computes
the phase pressure values at cell centre depths only.
That, in turn, corresponds to the "N = 0" case (steady state) of the
basic equilibration facility.
The InitialStateComputer::temperature_ array, previously used,
was of cartesian size, but used as if it only contained the
values of the cells of a region.
With this commit InitialStateComputer::temperature_ is a compressed local
array and we explicitly copy out only the region values when computing
RS/RV.
Closes#2423.
With the arrival of compressed field properties there is no need
to extract the global arrays just to compress them manually
afterwards. This change should remove commununication and
synchronization points.
the flags which I used are
```
-pedantic \
-Wall \
-Wextra \
-Wformat-nonliteral \
-Wcast-align
-Wpointer-arith \
-Wmissing-declarations \
-Wcast-qual \
-Wshadow
-Wwrite-strings \
-Wchar-subscripts \
-Wredundant-decls \
-fstrict-overflow \
-O3 \
-march=native \
-DNDEBUG=1
```
note that some heavy filtering is not the worst idea because DUNE is
far from not emiting any warnings with these flags.
Also, there were some pesky warnings in test_ecl_output which I don't
know how to fix:
```
tests/test_ecl_output.cc:218:73: warning: missing initializer for member ‘Opm::data::Connection::effective_Kh’ [-Wmissing-field-initializers]
```