Using RigCompletionDataGridCell as key in a map causes cells with identical local IJK to be treated as same global cell. Use reservoir grid cell index (size_t) as key to be able to handle cells correctly.
* Removed choice of different scaling
* Always use current pressure delta
* Use the maximum of an epsilon value and the absolute value of the matrix to well pressure drop as the scaling factor
* Remove file name suffixes and update information table in export file.
The oil-water capillary pressure is a non-increasing function of
water saturation so we need to ensure that we use the capillary
pressure value at the minimum tabulated water saturation. Add
special purpose code to enforce this rule. This adds a certain
amount of computational overhead because we now compute function
values at two saturation points instead of just one for the case of
pure vertical scaling. Most of the time those extra function values
will just be subsequently discarded.
Note that this is a bit of hack, because it relies on the fact that
the current implementation assigns
TableEndPoints::disp = TableEndPoints::low
in the case of two-point horizontal scaling. We may wish to make
that rule more explicit.
These were meant for consistency checking, but would occasionally
fail due to round-off error when doing arithmetic on values
converted from 'float' to 'double'. The actual scaling procedure
does not rely on those relations as long as we ensure that 'fmax' is
the maximum function value, so add a measure of robustness here.
Note that this is at best a work-around for a deeper problem and
that a more refined solution would probably be needed here.
This commit ensures that we use the scaled connate water/gas
saturations (SWL/SGL) in place of the scaled capillary pressure
saturations (SWLPC/SGLPC) when the latter are undefined (set to a
sentinel value; -1.0E+20). We would previously fall directly back
to the connate saturations from the input table in this case and
this would lead to inconsistent curves for the scaled capillary
pressure functions.
This commit introduces a new (private) predicate function
ECLFluxCalc::phaseIsActive(const ECLPhaseIndex phase) const
that identifies whether or not 'phase' is active in the current
simulation model/result set. This enables returning an empty result
vector from flux() and/or masssflux() in the case of the caller
requesting fluxes for inactive phases. That, in turn, mirrors the
behaviour of ECLGraph::flux() on inactive phases and promotes
uniform phase treatment in calling code irrespective of using stored
or calculated flux values.