mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Refactor Phase Saturation Derivation Procedure
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 contained in: