Commit Graph

388 Commits

Author SHA1 Message Date
Joakim Hove
9fe4be5ebf Rename data::WellRates -> data::Wells 2021-06-12 09:33:05 +02:00
Bård Skaflestad
a1fd22d578 Make Aquifer Data a First Class RestartValue
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.
2021-05-28 17:41:29 +02:00
Bård Skaflestad
15150bee50 Add Communication Support for Dynamic Aquifer Data
This commit introduces 'MessageBuffer' read and write operations for
the CarterTracyData and FetkovichData structures in preparation of
communicating these substructures from parallel processes to the IO
rank.  This is foundational work for retrieving more of the dynamic
quantities pertaining to aquifers from the simulation layer.
2021-05-28 17:41:29 +02:00
Jostein Alvestad
d1eafd6919 removed comments and removed unnecessary include-headers 2021-05-26 09:02:46 +02:00
Jostein Alvestad
1086c60825 first version of restart output for WLIST keyword, plus related parser code changes 2021-05-25 10:37:29 +02:00
Bård Skaflestad
6c1c753764 Add Numeric Aquifer Restart Output
This commit generates the IAQN and RAQN restart vectors pertaining
to numeric aquifers.  The arrays are sized according to the number
of records in the input AQUNUM keyword.  RAQN is a mix of static and
dynamic information, including the cumulative total inflow volume of
water from the aquifer into the model.  IAQN is exclusively static
information.

We add new members to 'AggregateAquiferData' and ensure that the
numeric aquifer arrays remain empty when no numeric aquifers exist
in the model.  Add unit tests for these new arrays and update
existing unit tests to account for new dimension items.
2021-05-19 23:07:05 +02:00
Bård Skaflestad
5a81df350c Identify Numeric Aquifer Restart Array Items
In particular, identify most the items in the IAQN and RAQN arrays.
While here, also make INTEHEAD Items for numeric aquifers public.
2021-05-19 22:42:58 +02:00
Bård Skaflestad
c76f1364c2 Don't Output Gas Lift Parameters Unless Active
This commit checks that gas lift is active before outputting a
positive value in INTEHEAD[EACHNC].  Unless gas lift is activated
through keyword LIFTOPT, that item in INTEHEAD must be zero.
2021-05-02 00:17:05 +02:00
Arne Morten Kvarving
b063fcd089 remove some unnecessary includes
from tests and a few schedule classes
2021-04-27 12:55:45 +02:00
Arne Morten Kvarving
c99c8e1193 fixed: initialize data
can cause uninitialized data usage when default constructed
2021-04-21 09:33:24 +02:00
Bård Skaflestad
ef5a74392e Address Review Comments
Use SummaryState::get() with default, std::size instead of distance,
and a named constant for the aquifer model type.
2021-04-14 20:58:19 +02:00
Bård Skaflestad
d43e358d01 Activate Aquifer Restart Output
This commit hooks the aquifer restart output facility (output arrays
{I,S,X}AAQ and {I,S,A}CAQ) up to the general "RestartIO" module.  If
a simulation run uses analytic aquifers we construct an aquifer
output object at simulation start and store this in an optional<> in
the internal implementation object.  Otherwise the optional holds
nullopt.  We expand RestartIO::save() to take such an optional by
reference and aggregate/output aquifer information, directly after
the well information, if the optional holds a value.  Update callers
accordingly.
2021-04-14 20:58:19 +02:00
Bård Skaflestad
a36b8bd4bb Centralise Aquifer Dimension Handling in INTEHEAD
This commit switches the INTEHEAD factory function to passing
dimensions related to aquifers by means of the 'AquiferDims'
structure.  While here, also update description and names of a few
aquifer-related INTEHEAD items to reflect more recent understanding.
2021-04-14 20:58:19 +02:00
Bård Skaflestad
0edf6673ba Add Restart Output Facility for Analytic Aquifer Data
We support both Fetkovich and Carter-Tracy aquifers.  We presently
output trivial values only in the 'ACAQ' (per-connection, double
precision elements), but otherwise assemble reasonable values for
many items.

We leverage the fact that the aquifer connections do not change
throughout the simulation run.  The "Aggregate" API is therefore
constructed in such a way that most of the expensive operations
(e.g., mapping active cell IDs to their columnar counterparts)
happens once (in the constructor) and the per-aquifer operations are
performed for each restart output step.  We intend that one aquifer
output object be constructed at the start of the simulation run, if
needed, and that this object will live until simulation shutdown.
2021-04-14 20:58:19 +02:00
Bård Skaflestad
762e256d2b Make "WindowedArray" a Movable Type
Needed to put such objects into standard containers.
2021-04-14 20:58:19 +02:00
Joakim Hove
93b07c0519 Add named constant IGroup::ExceedAction = 7 2021-03-30 21:15:22 +02:00
Joakim Hove
2247b45872 Use SummaryState for connection rates in restart output 2021-03-25 07:21:31 +01:00
Bård Skaflestad
70457e1433 Support CT-Aquifer Dimensionless P/T Summary Vectors
This commit adds support for calculating and outputting the
CT-specific summary vectors "AAQTD" (dimensionless time, real time
divided by aquifer's time constant) and "AAQPD" (dimensionless
pressure-influence function evaluated at dimensionless time).
2021-03-24 11:43:25 +01:00
Jostein Alvestad
278cd0a240 eliminated WellDims and used WellTableDims instead 2021-03-19 13:59:40 +01:00
Jostein Alvestad
d0f177d94c corrections to inteHead - rockopts, well lists 2021-03-19 13:59:39 +01:00
Bård Skaflestad
89e3efb2e4 Record Dynamic Well Status in Output Wells
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.
2021-03-18 17:26:33 +01:00
Joakim Hove
0a5301d949 Merge pull request #2319 from jalvestad/rst_wsegaicd
Changes to output Restart data for the WSEGAICD keyword (Eclipse compatible restart file)
2021-03-10 14:59:49 +01:00
Bård Skaflestad
6d18b3b7e6 ActiveIndexByColumn: Remove 'build' Method
Do construction work in constructor instead.

Suggested by: [at]joakim-hove
2021-03-10 09:54:14 +01:00
Bård Skaflestad
d2028e4851 Add Special Purpose Active Cell Enumeration by Columns
The protocol for outputting an aquifer's active cell IDs to the
restart file requires that the cells be enumerated according to
their column.  In particular, the aquifer's notion of a model's
active cells correspond to a cell ordering of the form

    for (i = 0; i < Nx; ++i)
        for (j = 0; j < Ny; ++j)
            for (k = 0; k < Nz; ++k)
                use(X(i, j, k))

instead of the common ordering, sometimes referred to as "natural
ordering"

    for (k = 0; k < Nz; ++k)
        for (j = 0; j < Ny; ++j)
            for (i = 0; i < Nx; ++i)
                use(X(i, j, k))

which is employed elsewhere.

This commit adds a special purpose mapping facility which will
translate active cell IDs from natural ordering to the columnar
enumeration.  The facility is intentionally bare-bones because we
do not expect to use it outside of the restart writing code, and
only in a limited fashion within that context.  We will however
consider adding more features if the need arises.
2021-03-10 09:23:23 +01:00
Jostein Alvestad
f84c42104a further improvements to the code - segmentType 2021-03-09 15:50:04 +01:00
Jostein Alvestad
e96778c440 changes in test-dataset and initial adaptions to the new data set, plus corrections for ScalingFactor 2021-03-09 15:49:58 +01:00
Jostein Alvestad
8a5a159450 Added changes to output restart data to support WSEGAICD input 2021-03-09 15:49:55 +01:00
Jostein Alvestad
cece11c727 some corrections and completed unit tests 2021-02-17 08:58:59 +01:00
Jostein Alvestad
895b8af837 first complete version of restart output - no unit tests
code improvement plus initial changes on test dataset

removed changes to test-dataset

changes to adapt to changes of Schedule object

Added test data set

changed test data - all in one DATA-file, changed serielizer - vector string

added unit test of INode data
2021-02-17 08:58:55 +01:00
Jostein Alvestad
e3be265625 initial changes to output network data to ECL-compatible restart file
first code that runs and outputs the INODE array

Added INODE and parts of IBRAN

added contributions for IBRAN and INOBR

added changes for output of RNODE

initial changes for RBRAN
2021-02-17 08:58:52 +01:00
Kai Bao
74921e3668 summary support for numerical aquifer keywords 2021-02-05 14:40:38 +01:00
Joakim Hove
93913d64a3 Merge pull request #2119 from jalvestad/glopt
Enable eclipse compatible restart for wells with gas lift optimization
2020-12-17 15:56:48 +01:00
Arne Morten Kvarving
40ec45ebf2 add output serialization functions for aquifer 2020-12-15 11:49:48 +01:00
Jostein Alvestad
7d784f53ff added code to write lift gas optimisation data to restart file 2020-12-15 10:53:16 +01:00
Arne Morten Kvarving
11ade04fd6 fixed: initialize members in Aquifer 2020-12-15 09:51:44 +01:00
Jostein Alvestad
fe9ade9dab changes to SWEL and XCONN for lift gas optimisation 2020-12-08 14:50:45 +01:00
Joakim Hove
53cd73c2d7 PAvgCalculator to calculate WBP? pressures 2020-11-30 10:42:15 +01:00
Joakim Hove
ef5c51cee7 RHPV 2020-11-24 12:10:05 +01:00
Joakim Hove
3bc490b693 Add method RegionCache::wells()
The method RegionCache::wells() will output the wells with the first connection
in region region_id.
2020-11-21 08:58:39 +01:00
Joakim Hove
7a0b020c43 Add Inplace argument to Summary::eval() 2020-11-20 12:42:30 +01:00
Bård Skaflestad
9a669f5400 Restart File: Output Well's Preferred Phase
Note: We're missing the 'LIQUID' option (integer value 4) since

    Well::getPreferredPhase()

does not return that value.

Also, while here, remove the previously misattributed IWEL[15] item.
This item is the well's preferred phase, not the prediction control.
Finally, don't assign the active control mode to the history control.
That was a mistake.
2020-11-19 17:28:40 +01:00
Joakim Hove
bb3be75dc5 Add container class Inplace to manage aggregated region properties 2020-11-19 16:23:36 +01:00
Joakim Hove
5746c068c5 Add names for group type and level index 2020-11-19 11:42:17 +01:00
Joakim Hove
bd766a0277 Store references to EclipseState and Schedule in Summary class 2020-11-19 07:19:57 +01:00
Joakim Hove
e61e7afcc8 Refactor the NNC input class
- The NNC and EDITNNC keywords are internalized in the same class.
- The EDITNNC keyword operations are applied directly to the NNC keywords.
- The nnc vectors are ordered with cell1 < cell2 and ascending order.
- An api has been added to get the KeywordLocation from an NCC
- NNC/EDITNNC which is connected to inactive cell is ignored
2020-11-11 19:57:06 +01:00
Joakim Hove
57566ad768 Revert "Igrp prod" 2020-11-05 11:15:20 +01:00
Joakim Hove
f508c23750 Add names for group type and level index 2020-11-04 08:45:24 +01:00
Joakim Hove
1f7ec57895 Use named constants in IGRP access 2020-10-27 20:50:12 +01:00
Joakim Hove
92bf4a96ea Separately load active and requested group control from restart file
Use named constants for access to IGRP vector
2020-10-27 20:48:03 +01:00
Joakim Hove
c8efb7fd3b Use named constants when saving GuideRate defintion to IGRP 2020-10-21 09:47:16 +02:00