In the Wells struct, production rate control targets must be negative
(and injection rate control targets are always positive).
In the WellsGroup classes, there are separate variables for injection
and production, and all rates are positive. Therefore, upon adding or
modification of a production rate control, the negated value must
be used.
This installs a measure of safety on the part of the interface in that
the caller is free to dispose of the wells object upon returning from
the WellsManager constructor.
Basis functions, quadratures and velocity interpolation are basic versions,
not handling any higher than DG(1) for now. These are currently in helper
classes and functions. The code in the main solver class is written with
the aim of supporting DG(n) generally.
In DUNE 2.2 FieldVector::size changed from being a member to being a
method. A compatibility warning is issued if you include the relevant
headers.
This warning can be silenced for DUNE modules by using passing the
option --enable-fieldvector-size-is-method to ./configure. This patch
effectively does the same, but through a macro definition.
The CompressibleTpfa class always passes a non-null `forces->wells'
object to the constructor, assembly, and reconstruction routines but
uses ``forces->wells->W == 0'' to signify a simulation model without
wells. This is, arguably, an error in the CompressibleTpfa class but
one that does not require a lot of work to support in the
cfs_tpfa_residual module.
Insert the extra tests in an effort to honour the ``liberal in what you
accept, strict in what you produce'' principle.
The user will legitimately want to run models that do not specify wells
(e.g., using boundary conditions). While we do not yet fully support
that configuration (no wells), we absolutely must not crash by
dereferencing null pointers or generating pointers into ::empty()
std::vector<>s.
This commit installs the required guards needed to avoid said failure
mode.
Now you can actually shut and open wells with WELOPEN. The following
caveats apply:
- this may interact improperly with group controls,
- dynamic usage of WCONINJE/WCONPROD should not be mixed with WELOPEN.