EclDefaultMaterial: Make sure that the water saturation is at least the connate water saturation

I thought this would not make a difference if the tables are
extrapolated by constants, but apparantly it makes a difference for
endpoint scaling.
This commit is contained in:
Andreas Lauser 2015-08-13 17:31:56 +02:00
parent 10dc683c75
commit be4593841f

View File

@ -293,7 +293,9 @@ public:
Scalar Swco = params.Swl();
Evaluation Sw = FsToolbox::template toLhs<Evaluation>(fluidState.saturation(waterPhaseIdx));
Evaluation Sw =
Toolbox::max(Evaluation(Swco),
FsToolbox::template toLhs<Evaluation>(fluidState.saturation(waterPhaseIdx)));
Evaluation Sg = FsToolbox::template toLhs<Evaluation>(fluidState.saturation(gasPhaseIdx));
Evaluation Sw_ow = Sg + Sw;