opm-output's data::Wells interface changed to no longer just accept a
dump of opm-core's WellState object. Update WellState to restore itself
from this new interface rather than reading the dumped vectors as-is.
since the unit code within opm-parser is now a drop-in replacement,
this simplifies things and make them less error-prone.
unfortunately, this requires quite a few PRs. (most are pretty
trivial, though.)
- api changes in newer versions
- do not manually destroy the preconditioner. this is, and has always
been, owned by the ksp object and dies with its destruction.
the purpose of this is to get a more defined behaviour when doing the
gravity correction/upstream cell determination in the flux term.
I consider this to be just a kludge, so if anyone has a better idea of
what the composition for the non-existing gas and oil phases is,
please tell me. (note that generic compositional models do not exhibit
this issue because the composition of all fluids is always fully
defined because each component is assumed to dissolve in every phase.)
For these wells access its well_cells might read of the bounds
an array if they are the last wells in the struct. Therefore
we cannnot initialiue first_cell and the well control is uninitialized,
to.
With this commit theses wells are now detected and theor bhp, thp, and well_rates
are initialized to zero.
This reverts commit 09205dfa074af24b381595d02c15e799523ddb2b.
We cannot use the index as it might change for a well between different
report steps. Unfortunately the only persistent way to identify wells
over all report steps in the schedule seems to be the well name.
Before this commit we tried to compute whether a well is represented on
the processor using the grid information. Due to the overlap region and
possible completion on deactivated cells of the global grid this is not
even possible. E.g. we cannot distinguish whether a completion is just
not represented on the domain of a process or the corresponding cell is
not active in the simulation.
With this commit we refactor to passing the well manager an explicit
list of name of wells that should be completely neglected. This information
can easily by computed after the loadbalancer has computed partitions.
since
f(x) = 1 + 0.5*g(x)*g(x)
the derivative is
f'(x) = 0 + 2*0.5*g(x) * g'(x) = g(x)*g'(x)
note that the previous incorrect values do not affect the quality of
the obtained results (if the tolerance of the non-linear solver is
chosen to be small enough), but it may have deteriorated convergence
rates.
when well is closed due to rate economic limits, based on the auto
shut-in configuration, the well can be STOP or SHUT.
When well is closed due to all the connections are closed, it should be
SHUT.
In opm-material the wetting phase is the reference phase for two-phase
problems i.e water for oil-water system, but for flow it is always oil.
Add oil capillary pressure value to shift the reference phase to oil
- Use std::vector<HydroCarbonState> instead of std::vector<int>
- Use the initializer list to initialize members in constructors
- Fix indent
- Return OilOnly for cases without gas to avoid potential trouble
further down the line
The following hydroCarbonState are used
enum HydroCarbonState {
GasOnly = 0,
GasAndOil = 1,
OilOnly = 2
};
Cells almost filled with water are treated as a GasAndOil state
The hydroCarbonState is used to store the hydroCarbonState
State 1: Gas only
State 2: Gas and Oil
State 3: Oil only
An empty vector is return at initialization as
no default values are provided by the blackoilstate.
@bska We're merging as-is for now, and we've made a note to replace `shared_ptr` and maintain (and document!) this property. Those changes will obviously be internal and you won't notice a difference.
- Handle shut wells
- Use the groups control type to determine which phase to calculate
the guide rates from. i.e for a ORAT controlled group, calculate the
guide rates from the oil phase well potentials etc.
The default guide rates are caculated using the well potentials.
The well potentials are calculated in the simulator and given as input
to the wellsManager.
Have removed the SimulatorState base class, and instead replaced with
the SimulationDatacontainer class from opm-common. The SimulatorState
objects were typcially created with a default constructor, and then
explicitly initialized with a SimulatorState::init() method. For the
SimulationDataContainer RAII is employed; the init( ) has been removed -
and there is no default constructor.
the dissolution factors used for the viscosities were always zero so
far. this was not discovered earlier because flow is completely
unaffected by this since the only place where this class is used in
flow is the equilibration code and the equilibration code does not
need phase viscosities.
thanks to @atgeirr for finding this.
the opm-material classes are the ones which are now used by
opm-autodiff and this patch makes it much easier to keep the opm-core
and opm-autodiff results consistent. Also, the opm-material classes
seem to be a bit faster than the opm-core ones (see
https://github.com/OPM/opm-autodiff/pull/576)
I ran the usual array of tests with `flow`: SPE1, SPE3, SPE9 and Norne
all produce the same results at the identical runtime (modulo noise)
and also "Model 2" seems to work.
Upstream (opm-parser) now provides a better Equil + EquilRecord, and
simultaneously deprecated EquilWrapper. This patch fixes the resulting
breakage.
One important note: The new Equil does not expose integers for live
oil/wet gas initialization procedure methods, but rather booleans
through constRs/constRv methods. This is how the variable behaves
according to the Eclipse reference manual (EQUIL keyword section).
Code has been updated to reflect this.
1. Added method setCellDataComponent()
2. Removed setFirstSat()
Implemented saturation initialisation using setCellDataComponent()
instead of setFirstSat(). This way the template<class Props> has been
removed from the SimulatorState class.
opm-parser#677 changes the return types for the Deck family of classes.
This patch fixes all broken code from that patch set.
https://github.com/OPM/opm-parser/pull/677