We support both standard and multisegmented wells, but do not output
every known PLT array. Notably missing are
- WELLPLT
- Brine flow rate (CONSRAT)
- Phase flow rates through tubing (CONxTUB)
Computing CONNXT for multisegmented wells is somewhat involved, and
requires sorting the connections according to branch number,
segments, and tubing lengths. We use an ancillary structure, an
array of indices into a WellConnections object, along with a custom
predicate to perform this sorting.
As an implementation detail, we handle PLT data for multisegmented
wells as an extension of the PLT data for regular/standard wells.
This extension is realised through dynamic polymorphism.
Add unit tests to cover PLT data for both well types.
this means getting rid of the Opm::filesystem namespace
and directly using std::filesystem, as well as dropping
some of the compat code for the tr filesystem.
we still need the FileSystem.hpp/cpp files though as unique_path
is not part of std::filesystem.
This commit promotes the 'aquifer' data member of 'RestartValue' to
first class status. In particular, this means that users must
provide aquifer data, albeit possibly empty, when constructing the
RestartValue object for input or output.
This is in preparation of using more dynamic aquifer quantities from
the simulator layer as part of the restart I/O.
This commit adds a new data member
Well::Status dynamicStatus
to the data::Well object. This member records the simulator's
notion of a well's open/shut/stop status and is especially needed to
support WECON-type status changes once the simulator maintains both
open and shut wells.
While here, also change multiple summary primitives to not look up
the same values repeatedly.
This commit switches to getting the output files' connection
transmissibility factor from Opm::data::Connection instead of
Opm::Connection. This is in preparation for implementing the WELPI
feature, in which the CTFs are occasionally adjusted based on the
dynamic simulation state.
This commit adds a level of indirection to the existing group-level
data (active controls and guiderates), and adds a new 'NodeData'
level to the 'data::' protocol for transporting values from the
simulator to the output layer.
Update all call sites and users accordingly.
since we still support g++-7, where filesystem is marked experimental,
we introduce a wrapper header and expose the namespace to use
as Opm::filesystem.
for gcc we unconditionally link with libstdc++fs in the python bindings.
the setup.py stuff links as c code, not c++ code, so it is not
automatically added on any gcc version. this might prove unportable
later.
This commit introduces a new protocol for communicating a well's
active constraint (i.e., its current target control mode) between
the running simulator and the restart file. In particular, we add a
new type
Opm::data::CurrentControl
whose data members indicate if the well is a producer or injector
and, depending on that state, carries information about the
pertinent active control mode. The 'prod' member should be defined
for producing wells and the 'inj' member should be defined for
injectors. Default-constructed objects of this type are 'invalid'
and not output to the restart file. Add a CurrentControl member to
the Opm::data::Well type to enable communicating this information
using existing restart interfaces.
Expand existing unit tests to exercise the new data member.
This commit implements a new file writing function
void Opm::RftIO::write()
that is intended to replace the current RFT output functionality
defined in terms of private class 'RFT' in EclipseIO.cpp. We
support the basic RFT output consisting of
- Timestamp (elapsed and date)
- WELLETC metadata including all unit conventions
- Connection cell (I,J,K), connection cell hostgrid (blank for
main grid only), connection cell centre depth, connection cell
pressure, and connection cell water and gas saturations
Connections in inactive cells are omitted. Note that unit of
measure strings aren't implemented in terms of UnitSystem::name()
due to the strings being padded on the left for centering effect.
Add unit tests to exercise the new writer.
This commit switches the `test_RFT` unit test to using the `ERft`
class introduced in commit 24a8efb2 (PR #699). This is the first
step towards reimplementing the RFT file output in terms of class
EclOutput. The downside to doing this is that we can no longer use
the node-based queries of libecl and have to implement a wrapper on
top of the raw vectors to be able to ask for the pressure in a given
connection's cell.
This commit, a preparation for restoring cumulative quantities from
a restart file, reinitialises Summary::prev_time_elapsed in the case
of simulation restart and adds a check to
Summary::write_timestep()
which throws if the input argument 'secs_elapsed' is prior to the
previously recorded elapsed time. The latter is a change in the
behaviour of write_timestep(), but ensures that we don't integrate
rate quantities across a very large timestep in the case of
simulation restart and also prevents double accumulation.
Update impacted unit tests accordingly, and move FIRST_SIM's START
date into the RUNSPEC section where it belongs.