The reasoning behind this to make it possible to initialize the case
without SWATINIT in order to compute the same defaulted THPRES values as
Ecl. The initialization needs to be re-computed to account for SWATINIT
in the simulations.
this fixes some valgrind errors while doing the twophase capability
for flow_ebos: In all previously tested cases, these errors were
probably non-fatal because the memory illegally accessed here is
likely to be allocated (but after this function was finished it
contained garbage).
note that I'm not completely sure if this patch is semantically
correct, so I'd appreciate some input who understands it. (what is
"z"?)
When the group has wells both under individual control and group
control, since the well rates under individual control changes each
iteration, the well targets for this kind of group need to be updated
each iteration.
When we change to use implicit well potentials later, which is supposed
to be more accurate, we probably should always (unless we decided not to)
update the well targets each iteration.
it is for WellCollection, which is logically wrong. It should be done in
the group level, while things will be different for multi-level groups.
The current implementation basically works for current needs, that we
only have one group.
forced and only_group basically mean two opposite things. Having both of
them in the same context will be really confusing and error-prone.
And also, we do not do anything forcedly. We do things base on what
setup tells us to do.
Only_group may not be the final name, while deinitely a better one than
forced.
For the WellModel from the simulator to use. Not decided totally,
well_collection might need to be updated during the simualtion due
to the update the target of wells.
Current understanding. Two ways might prevent to return the guide_rate here
1. preventing the well from group control with keyword WGRUPCON
2. the well violating some limits and working under limits. We do not have strategy
to handle this situation yet.
Very hacky way here. The logic of the code is that only
a well is specified under GRUP control, it is under group
control. Which is not the case observed from the result.
From the result, if we specify group control with GCONPROD
and WCONPROD for a well, it looks like the well will be
under group control. TODO: make the logic correct here
instead of using `false` here.