Instead of making well rates zero for wells that are not controlled by
surface volume, we initialize them to a small value with the correct
sign (positive for injectors, negative for producers).
The pvt interface is extended to handle wet-gas systems:
1. rvSat is added as a function in the PVT interface
2. SinglePvtLiveGas computes the pvt values and its derivatives
3. The old rbub variable is changed to rsSat for clearity
4. The new interface is tested in test_blackoilfluid with data from
liveoil.DATA and wetgas.DATA
The second input of initBlackoilStateFromDeck that computes surface
volumes based on gas/oil ratio is changed from
BlackoilPropertiesInterface to Props. To avoid duplication with the old
initBlackoilStateFromDeck its name is changed to
initBlackoilSurfvolUsingRS.
Add new function is added that computes saturation from surface volumes
solving z = As for each cell. This function is used to compute an
intial guess to the saturations in initState_impl.hpp.
Otherwise the compiler will probably give us a warning that these
pragmas are unknown. By default that warning is disabled with our
own build system, but we also want to be able to link to our library
without incorporating the entire build system too.
If a function is used by a template but this template is not
instantiated, the function will still be defined in the header
of a module but it won't be callable because it is in an anonymous
namespace and thus we get a warning.
This only happens in Clang; GCC consider functions referenced from
templates as used.
fixup! Don't warn about functions not emitted
for some of these files this is needed to make to keep it compiling
after the next patch because the new ErrorMacros.hpp file will no
longer implicitly includes <iostream>. for the remaining files it is
just good style.
While at it, the includes for most of these files have been ordered in
order of decreasing abstraction level.
Do not use the well's comp_frac member, only rely on the control's distr
member for initialization. This forced a change to WellsManager's
initialization of the distr member.
This is a minor bugfix to account for the presence of shut wells
(characterised by "ctrls[w]->current < 0"). The existing code would
lead to indexing outside the "ctrls" array in the context of a shut
well.
Bhp is now initialized to bhp target for bhp-controlled wells.
Mobilities and pvt properties are now calculated from
well perforation pressure and injection specifications for
injectors, producers still use cell properties as before.