mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Vertical Scaling [PCOW]: Use Value at Minimum Saturation
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.
This commit is contained in:
parent
be160a5c63
commit
4be1685604
@ -2532,6 +2532,9 @@ unscaledFunctionValues(const ECLGraph& G,
|
||||
ret.resize(uep.size());
|
||||
|
||||
for (auto n = uep.size(), i = 0*n; i < n; ++i) {
|
||||
ret[i].disp.sat = uep[i].disp;
|
||||
ret[i].disp.val = evalSF(static_cast<int>(i), ret[i].disp.sat);
|
||||
|
||||
ret[i].max.sat = uep[i].high;
|
||||
ret[i].max.val = evalSF(static_cast<int>(i), ret[i].max.sat);
|
||||
}
|
||||
|
@ -1357,6 +1357,11 @@ private:
|
||||
return host.wat_->pcow(regID, { sat })[0];
|
||||
});
|
||||
|
||||
// Special case treatment of PCOW. Maximum value at minimum S.
|
||||
for (auto& fval : *eps.vertfuncval) {
|
||||
fval.max.val = std::max(fval.disp.val, fval.max.val);
|
||||
}
|
||||
|
||||
eps.vertscaling = Create::Vertical::
|
||||
fromECLOutput(G, init, opt, ep,
|
||||
*eps.vertfuncval);
|
||||
|
Loading…
Reference in New Issue
Block a user