This is to handle the case of an injector changing its injected (and
therefore preferred) phase (e.g., in WCONINJE or WCONINJH) at the
same report step as a WELPI CTF rescaling, but logically after the
WELPI action is applied.
For instance, this happens in the following setup:
WCONINJH
INJ2 WATER OPEN 5500 /
/
DATES
1 'JAN' 2020 /
/
WELPI
'INJ2' 0.1E5 /
/
WCONINJH
INJ2 GAS OPEN 701627 /
/
DATES
1 'FEB' 2020 /
/
In this case, the WELPI for 'INJ2' is supposed to be interpreted as
the water-phase PI (preferred phase is 'WATER' when we read WELPI),
but since the injecting phase is reset to 'GAS' at the same report
step we risk misinterpreting the PI as pertaining to the 'GAS' phase
when calculating the well's effective/dynamic PI in the simulator if
we just use Well::getPreferredPhase().
Switch the the well's input PI from an optional<double> to an
optional<struct> that captures both the input PI value (SI units)
and the preferred phase when processing the WELPI data. Provide a
way to query that information from the simulator and update unit
tests accordingly.