Previously, we exported an unordered map containing all names of
wells that are not present in the local part of the grid.
As we envision to have wells that are distributed across multiple
processors, this information does not seem to be enough. We need
to be able to set up communication for each well. To do this we need
to find out who handles perforations of each well.
We now export a full list of well name together with a boolean
indicating whether it perforates local cells (vector of pair of string
and bool).
This is in preparation of adding support for outputting the network
node pressure quantity, GPR, to the summary file. In particular,
'GroupValues' is renamed to 'GroupAndNetworkValues' and has new
individual datamembers for the former group-level data and the new
node-level data.
Update BlackoilWellModel::groupData() and CollectToIORank
accordingly and bring the parallel restart facility in line with the
new layout.
FiedlPropsManager::keys() list the FieldProperties needed by the
TransCalculator, but these cannot be queried the normal way as this
raises exceptions and results in a deadlock. Hence we use the new
funtionality to get also the unsupported ones, by passing true to
get_double_field_data.
This commit switches the helper function
WellGroupHelpers::updateGuideRateForGroups<>()
to include efficiency factors in the potential rates at grouptree
levels below a particular group. We furthermore switch the helper
function
WellGroupHelpers::updateGuideRatesForWells<>()
to not include efficiency factors at all.
The motivation for this change is that efficiency factors always
apply to the level we're accumulating rate values into rather than
to the rate values themselves.
As the ErrorGuard also dumps warnings we now always dump
it (previously only on error) to get these messages in the
console.
If there are error encountered, we log a meaningful error
message (the real cause was missing previously) and do a
graceful exit after MPI_Finalize.
This commit adds support for reporting the simulator's guiderate
values at the well and group levels to the output layer through the
wellData() and groupData() member functions. We add several new
member functions that collectively assemble the values and assign
them to objects of type Opm::data::GuideRateValue for subsequent
output to the summary and restart files.
In particular
getGuideRateValues(const Well&) const
getGuideRateValues(const Group&) const
retrieve the guiderate values for all phases for those individual
wells and groups for which the guideRate_ data member defines a
value. The most complicated function of this commit is
calculateAllGroupGuideRates
which aggregates those individual contributions from the well (leaf)
level up to the root of the group tree (the FIELD group). This
process uses an ancillary array ('up') to keep track of the parent
groups of all wells and all groups, and to ensure that we only visit
each parent group once (sort+unique on subsets of the 'up' array).
We do not currently support outputting guiderates for reservoir
voidage volume (GuideRateModel::Target::RES).
This commit creates a single implementation function for deriving
'RateVector' objects that go into the guiderate calculation. In
particular, we now use the same implementation function for both the
well and the group levels. While here, also expose the group level
derivation as a free function and reimplement the FractionCalculator
version in terms of this free function. Finally, remove the
previous attempt at such a free function taking only the group name.
This function no longer exists in isolation and is only accessible
through the FractionCalculator.
This is in preparation of reporting guiderate values to the output
layer (summary and restart files).
This commit adds two new predicate member functions
bool hasWellRates(well_name) const
bool hasProductionGroupRates(group_name) const
that enable querying the existence of the corresponding flow rate
values for wells and group production.
This is in preparation of reporting the simulator's guiderate values
to the summary and restart files.
Especially, grab a copy of the "oldControl" to avoid reading through
a reference for which the underlying object is reset in
setCurrent*GroupControl()
This in turn avoids generating confusing diagnostic messages of the
form
Switching production control mode for group G from FLD to FLD
These codes are reimplemented in the ebos simulator and should
be reused, instead. This commit factilitates this and starts
reusing the logging setup code in ebos. Hence reduces code duplication.
We resort to consistently use unique_ptrs in EclBaseVanguard for
the data read from ECL files or set externally. This means that
during the simulation EclBaseVanguard owns this data and not Main
or the ebos setup functions. This ownership transfer becomes
transparent due to std::move.
This came up when trying to fix the parallel runs of ebos and during
that removing some code duplication.
A resubmission of commit 8e4f748 in PR #2403 and PR #2444 and continues
the work in #2690 implementing Python bindings to the flow simulator.
The Python step() method advances the simulator one report step. Before
calling step() for the first time, step_init() must have been called.
A resubmission of commit 11eaa3d7 in PR #2403 and PR #2443 and continues
the work in #2555 implementing Python bindings to the flow simulator.
The step_init() method initializes the simulation. It is required for the
Python script to run step_init() before calling the step() method (which
will be implemented in a later commit).
Clarify usage of member variables in FlowMainEbos.hpp by prefixing with
this->.
Also rebased PR on the current master, and updated
flow_ebos_oilwater_brine.cpp according to the PR.
Make Opm::FlowMainEbos capture the variables argc, argv, outputCout, and
outputFiles. Passing the variables to the constructor and saving them as
class variables in Opm::FlowMainEbos makes the implementation of the
Python interface simpler. For example, the step_init() method does not
need to ask Opm::Main about the values of the variables when it needs to
run execute() in FlowMainEbos.
Another advantage of this refactoring could be that less variables needs
to be passed around from Opm::Main, to flow_ebos_xxx.cpp, and then again
to FlowMainEbos.
That was removed before in lieu of the fraction of cells that
violate CNV.
This change should make the results as before unless somebody changes
maxStrictIter or RelaxedMaxPvFraction
We hold a shared pointer to the umpfack solver that gets reset
whenever the matrix is changed. When applying the decomposition
we will be recomputed if the solver pointer is null.
Previously we used relaxed tolerance once a certain number of Newton
steps was exceeded. Now we check for all cells violating CNV locally
and if their pore volume is less than a certaun fraction (default 3%)
we use the relaxed tolerance (default: 1e9)
Original idea originated from Norce.
With multisegment wells we allocate WellContributions::hx and hy with
`CudaMallocHost`. Yet we tried to deallocate them with
`delete[]`. This caused segementation faults e.g. for
model1/MSW_MODEL_1. Now we use `CudaFreeHost` for freeing if we used
CUDA.
Closes#2719