When an ACTIONX has evaluated to True we inspect the keyword payload and if it
contains WELPI we query the well model for current wellpi values and pass that
along as context to the Schedule::applyAction()
You can use EclCpGridVanguard::setExternalLoadBalancer() to
set an external funtion that creates a vector of integers (containing
the partition for each cell) from the grid. If it is set then this
information will be used for loadbalancing, otherwise ZOLTAN.
We introduce a new parameter --enable-distributed-wells=<true|false>
for this. During startup we check that the model either only has
standard wells or that multisegement wells are actively interpreted
as standard wells (by way of passing --enable-multisegment-wells=false
as an option).
The B matrix is basically a component-wise multiplication
with a vector followed by a parallel reduction. We do that
reduction to all ranks computing for the well to save the
broadcast when applying C^T.
Only after rank zero does the filtering the schedule the well
definitions in there are guarateed to have no perforations to inactive
cells. Therefore we broadcast the schedule another time to publish
this to all processes.
Previously, we did the filtering locally on these processes bit that
did also remove perforations to cells that are active globally but
not locally. That seems very hard to work with when allowing
distributed wells.
It would remove perforated cells from wells that cross the local
domain's border. That would make it impossible to figure out the
first connection. In addition we would not be able to check that
the connections exist (as rank 0 would have the complete information
-> inconsistency).
- The edit manipulations from EDITNNC have already been applied to the NNC data
from opm-common
- The NNC data structures are guaranteed to be ordered, both with cell1 <= cell2
and the NNCs are in ascending order
- The NNC output to EGRID / INIT files is based on std::vector<NNCdata>
Currently the simulator creats the polyhedreal grid from an eclGrid from opm-common
TODO
- make it possible to create the grid directly from DGF or MRST format
- fix issue on norne.
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.
As part of support the RPR__xxx summary keywords the ecloutputblackoilmodule.hh
file hase been refactored significantly:
- std::optional<> is used to manage the calculate once initial values.
- several small functions are extracted from the outputFipLog() function.
- std::array<> is used instead of ScalarBuffer to manage containers over all
FipTypes.
- SummaryConfig nodes for the requested summary output is stored in the class.
- A small struct RegionSum is created to hold the region summed properties.
For PINCH(5)==ALL, we take the minimum of MULTZ+ and ignore MULTZ-.
We also prepare for PINCH(5)==TOP taking only the toplevel MULTZ+
value.
For non-vertical directions we use both MULTZ+ and MULTZ-
We used a method isGlobalIdxOnThisRank to determine whether to write
an entry for a summary keyword (like BPR). Unfortunately, this did
exactly what the name suggested, but we actually passed a cartesian
index to it. That meant that a lower cartesian index might have found on
many processes (with different cartesian index and hence resulting in
wrong values), while higher for ones no process would have been found
with it (resulting in writing zeros).
With this commit we store a sorted list of cartesian indices and query
that in the renamed and restructured function isCartesianidxOnThisRank.
Most probably this broke during refactoring.
Closes#2665
This will process the same faces in serial and parallel.
Hence it make the silent assumption that we only process faces
from low cartesian index to high cartesian index hold again.
This should fix PINCH MULTZ ALL in parallel.
Remove left parenthesis character left over from transitioning to
the type-based parameter system. The '(' produced a build failure
which only manifested in debug builds.
Thanks to Håkon Hægland for bringing the issue to our attention.
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.
Before this we had a set of external*_ variabales (unique_ptrs), a set of
internal_*_ variables (unique_ptrs) and another set of pointers that
point to the pointers actually used. That seemed a bit much. With this
commit skip the internal variables and use unique_ptrs for all
others. In the constructor either the external*_ gets moved or the
objects are directly created as unique_ptrs.
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.
This commit ensures that we don't issue misleading warning about
output creation directives such as
BASIC
FREQ
RESTART
that could be, and typically are, put into keywords like RPTRST and
RPTSCHED. Previously, we would interpret these directives as names
of cell vectors and we would get very confusing diagnostic messages
of the form
Keyword 'BASIC' is unhandled for output to file
which suggests that 'BASIC' is unsupported despite the output system
supporting the directive for quite some time. While here, also
apply the same reasoning to the vectors we always output such as
SWAT, SGAS, or PRESSURE.
This commit makes the 'groupData()' function return a
map<string, Opm::data::GroupData>
object instead of a
map<string, Opm::data::GroupConstraints>
object. The 'GroupData' structure adds a level of indirection to
the current per-group summary quantities that are directly assigned
by the simulator. While here, also move the assignment of the
current group constraints/control values out to a separate helper
to reduce the body of the per-group loop in 'groupData()'.
This is in preparation of adding support for reporting group-level
production/injection guiderates (Gx[IP]GR) to the summary file.
That way we can use the same code for both the 'writeOutput' and
the 'evalSummaryState' member functions. While here, also change
the declared types of 'wellData' and 'groupData' to 'auto' in
preparation of API updates for collecting group- and well level
guiderate data.
Finally, apply 'const' where possible.
Up to now We always assumed that cardDims[i]>1 holds. which it does for most
of the cases. But when e.g. simulating a vertical stack of 5 cells
flow would report the transmissibilities in the Z direction in TRANX
and output TRANZ as zero. Similar problems should be there for 2D grids.
With this commit we actually check whether there can be neighbours in
the X and Z direction to prevent this behavior.
Without this, rank 0 gets an empty case name, resulting in
buggy VTK output with filenames containing the genereric stem
"sim" rather than the case name as stem.
`NEW_PROP_TAG` is now a definition and not just a declaration.
Eliminate superfluous declarations, include headers with definitions.
Make one necessary forward declaration explicit.
This commit adds a very early, alpha-quality implementation of the
"horizontal subdivision" strategy (N < 0) of the EQUIL directive.
This in turn enables more accurate derivations of the initial fluids
in place.
Interactions with SWATINIT are completely untested, and the initial
Rs/Rv derivations in this context are possibly incomplete. More
work is likely needed in this area, but this does at least enable
more widespread testing.
The purpose of this function is to determine the vertical extent of
a set of cells. Counting the number of cells in the region is not
its responsibility.
This commit splits out the per-cell initial state derivation to two
separate helper functions, equilibrateCellCentres() and cellLoop().
The latter manages the per-cell assignments to pertinent data
members and calls an arbitrary "equilbration method" that is
provided as a callback and which calculates per-cell phase
pressures, phase saturations and mixing ratios (Rs/Rv).
In turn, the equilibrateCellCentres() uses the cellLoop() to affect
the existing equilibration procedure within a cell using values at
the depths of the cell centres only.
This commit introduces a new helper class,
Opm::EQUIL::Details::PhaseSaturations<>
that subsumes the responsibility of the existing helper function
Opm::EQUIL::phaseSaturations<>()
and generalises that functionality to arbitrary depth points within
single cells. This is in preparation of adding support for the N<0
case of the initial fluid in place procedure defined in the EQUIL
keyword. The class consumes an already equlibrated pressure table
for the pertinent equilibration region, calculates capillary
pressure values and inverts Pc curves to derive saturation values.
If the capillary pressure curves are constant within a cell, then a
simple depth consideration with respect to the implied sharp phase
interface is used to derive saturation values. We also preserve
existing support for SWATINIT-type initialisation of the water
saturation field.
Switch InitialStateComputer<>::calcPressSatRsRv() over to using the
pressure and saturation helper classes instead of the original
helper functions since this provides additional control. Also
remove those helper functions to reduce risk of confusion over which
method to use. Update the unit tests accordingly.
This commit is the first step of several that implements ECLIPSE's
"accurate fluid-in-place" model initialization procedure based on
subdividing the vertical range/extent of individual cells. This
first step puts the O/G/W phase-pressure calculation into a helper
class,
Opm::EQUIL::Details::PressureTable<>
through which phase pressure values can be calculated at abritrary
depths rather than just at the cell centre depths. In other words,
this helper class extends and subsumes the responsibilities of the
existing helper functions
Opm::EQUIL::Details::PhasePressure::assign()
Opm::EQUIL::Details::PhasePressure::oil()
Opm::EQUIL::Details::PhasePressure::gas()
Opm::EQUIL::Details::PhasePressure::water()
We still use the same ODE-based evaluation procedure for the phase
pressures and the equilibrateOWG() helper function still computes
the phase pressure values at cell centre depths only.
That, in turn, corresponds to the "N = 0" case (steady state) of the
basic equilibration facility.
Since unique_ptr<T, Deleter> takes two arguments it cannot strictly
speaking be used via a template template parameter that takes one,
even though the second has a default. GCC allows this anyway, but
not clang.
this was actually broken by an upstream change from return-by-reference
to return-by-value, but we were lucky, the return value was
kept in memory until end of block it seems.
now the serializer is 'standard', as in we only require basic types
+ stl containers. this should make the actual implementation pretty
pluggable. will ease replacing our serialization routines
with those in Dune 2.7 later.
this shall be used by users when they have a vector of types
with a serializeOp template. it cannot (at least not right now)
be part of the regular operator() as some vectors should go
directly to the underlying serializer (trivial types).
we can possibly find some traits magic for this later.