Commit Graph

161 Commits

Author SHA1 Message Date
Joakim Hove
ec20274fa3 Add serialization of SummaryState 2019-06-03 14:55:38 +02:00
Joakim Hove
89c8cb886b Correctly detect totals in SummaryState 2019-06-03 12:42:51 +02:00
Joakim Hove
5c65299c0a Add size() and num_wells() methods to SummaryState 2019-05-27 17:56:27 +02:00
Joakim Hove
779a2b8d89 Add group awareness to SummaryState 2019-05-27 14:38:13 +02:00
Joakim Hove
94b160258e Remove old well implementation 2019-05-22 21:44:50 +02:00
Joakim Hove
0c70d71df8
Merge pull request #766 from joakim-hove/summary-eval
Split Summary::add_timestep in eval()
2019-05-15 07:02:57 +02:00
Joakim Hove
07b02ed151 Factor out eval() method from Summary::add_timestep() 2019-05-15 06:58:10 +02:00
Bård Skaflestad
2c7eb20726
Merge pull request #724 from jalvestad/cell-summary-props
Changes to provide Summary output of more Block properties
2019-05-14 18:30:36 +02:00
Jostein Alvestad
ba1c30fd4a Added unit tests for grid block summary data variables 2019-05-13 15:29:57 +02:00
Jostein Alvestad
25f25d15bf Added unit tests to new grid block summary properties 2019-05-13 15:29:56 +02:00
Joakim Hove
9e288a9d78 Refactor SummaryState
- Change SummaryState::add() -> SummaryState::update(), the
   SummaryState::update() method is semantically aware of totals.

 - Add an internal variable to the SummaryState class to keep track of the
   elapsed simulation time.
2019-05-13 11:06:32 +02:00
Joakim Hove
fffe259621 Misc minor changes: whitespace++ 2019-04-23 07:25:05 +02:00
Joakim Hove
c244625865 Add wells() method to SummaryState 2019-03-07 11:35:55 +01:00
Bård Skaflestad
e685eccdc9 Restart: Save/Restore Historical Cumulative Production
This commit adds support for saving and restoring cumulative
production quantities like WOPTH, GWPTH, FGPTH, GGITH, and WWITH.
While here, also cater to the case of wells alternating between
injecting gas and injecting water.  This means that we'll save and
restore cumulative gas/water injection for all injectors,
irrespective of current injecting phase.

Update unit tests accordingly.
2019-02-10 19:14:30 -06:00
Bård Skaflestad
bed76c330b Summary: Add Means of Resetting Cumulative Quantities
This commit introduces a new mutating operation on Summary objects,

    Summary::reset_cumulative_quantities(const SummaryState&)

which overwrites the values of cumulative ("total") summary
quantities with those of the input argument.  The only *intended*
use case is reinitialising cumulative quantities in the case of
simulation restart, but other uses may exist.

Add a test case to exercise the new interface.
2019-02-10 19:14:29 -06:00
Joakim Hove
96c02c9d35 UDQ - hooked up to the Summary Output 2019-02-08 06:42:38 +01:00
Jostein Alvestad
9bbacfe710 Final changes to add unit tests for the well, group and field production / injection potential rates 2019-01-11 09:56:38 +01:00
Jostein Alvestad
982b221753 Initial changes to add unit tests for well potential rates 2019-01-11 09:56:36 +01:00
Atgeirr Flø Rasmussen
db90ecd88c Silence various warnings discovered with new version of clang. 2019-01-08 14:51:20 +01:00
Joakim Hove
85949d44ac
Merge pull request #602 from joakim-hove/error-list
Add small class ErrorGuard to store errors from parsing
2019-01-08 07:46:57 +01:00
Joakim Hove
2cd6fa2f49 Add overloads without ParseContext and ErrorGuard - update all tests 2019-01-04 13:59:28 +01:00
Joakim Hove
4968c35ad8 Add method wells() to the SummaryState class 2019-01-02 11:13:49 +01:00
Bård Skaflestad
3ea522d7ba Restore Build on GCC 4.9
Commit 334dbe4e broke GCC 4.9 (invoking explicit constructor with an
empty initializer_list).  Restore build by using the actual type.
2018-12-11 17:30:43 +01:00
Atgeirr Flø Rasmussen
334dbe4e1f Initialize all struct elements. 2018-12-10 16:10:25 +01:00
Joakim Hove
c1ffeeef53
Merge pull request #557 from joakim-hove/actioncontext-summary-state
Actioncontext summary state
2018-11-16 11:31:20 +01:00
Joakim Hove
8b8285ae2b
Merge pull request #556 from joakim-hove/summarystate-well-api
Summarystate well api
2018-11-16 09:42:01 +01:00
Joakim Hove
c35832b155 Changed exception to std::out_of_range 2018-11-09 21:14:03 +01:00
Joakim Hove
ca9da29c53 Add well_var methods to SummaryState 2018-11-09 20:45:20 +01:00
Joakim Hove
1ba51534ae Move SummaryState implementation to EclipseState/Schedule/ 2018-11-09 20:44:37 +01:00
Tor Harald Sandve
5d3125c532 Add output of well phase potential 2018-11-07 15:38:23 +01:00
Tor Harald Sandve
95179f393c Fix vappars and dr[sv]dt logic
The simulator should either use VAPPERS or dr[sv]dt, both the
combination drsdt and drvdt is allowed.
2018-11-05 13:38:42 +01:00
Lars Petter Øren Hauge
d958da6542 Include WPIMULT for CTFAC output 2018-10-29 09:12:50 +01:00
Bård Skaflestad
258bcbc186 Restart_Segment/Vectors_Present: Include SOFR Existence
We were checking "SGFR" twice due to copy-paste...

Pointy Hat: bska
2018-10-25 09:09:32 +02:00
Bård Skaflestad
f9eb32a235 Segment Summary: Test Read/Write Support
This commit completes the set of unit tests for the segment-related
summary vectors

    SOFR, SGFR, SWFR, and SPR

by adding a test (Restart_Segment/Write_Read) that serializes the
result of multiple Summary::add_timestep() calls for SOFR_TEST.DATA
and reads that summary file back in.
2018-10-25 09:09:32 +02:00
Bård Skaflestad
f275fd6089 Summary: Transmit Segment Values to "prev_state"
This commit makes the helper function find_wells() aware of summary
vectors defined on segments.  Previously, this helper function would
return an empty list of wells in the case of ECL_SMSPEC_SEGMENT_VAR
whence all segment-related summary vectors would be zero at all
times.

Add a small set of unit tests to verify that we transmit the known
(small) set of segment-related summary vectors (SOFR, SGFR, SWFR,
SPR) to the internal "prev_state" with correct output units and sign
convention (producing flow rates--reservoir to well--positive).
2018-10-25 09:09:32 +02:00
Jostein Alvestad
fe060c7f48 Changes to contribute to write segment data to summary file 2018-10-25 09:09:31 +02:00
Bård Skaflestad
80154e8f5f Serialization: Add Initial Support for Segment Information
This commit extends Opm::data::Wells to include a set of output
vectors for well segment information.  At present we define output
structures for segment rates and segment pressures.  The immediate
use case is properly assigning restart vector items RSEG[8 .. 11],
but these same values are also usable for outputting the summary
vectors SPR, SOFR, SGFR, and SWFR.  Future expansion is likely.
2018-10-25 09:09:31 +02:00
Lars Petter Øren Hauge
87e3beb601 Support CTFAC in output 2018-09-13 10:23:47 +02:00
Joakim Hove
45e81a02fa Use plain C api for temporary testarea 2018-09-07 05:53:20 +02:00
Bård Skaflestad
0be3f2c76f Unit Tests: Supply Enough Parameters for data::Connection
We must provide cell_pressure, cell_saturation_water,
cell_saturation_gas, and effective_Kh.

Forgotten in commit 687f108.
2018-07-12 00:46:46 +02:00
Lars Petter Øren Hauge
5c68a0aaa8 Support CCI(R/T) 2018-06-29 09:45:14 +02:00
Lars Petter Øren Hauge
7a91bebd61 Support FCI(R/T) 2018-06-29 09:45:14 +02:00
Lars Petter Øren Hauge
102bd6b728 Support GCI(R/T) 2018-06-29 09:45:14 +02:00
Lars Petter Øren Hauge
fc3bc714fc Support WCI(R/T) 2018-06-29 09:45:14 +02:00
Bård Skaflestad
c3a11a2fb5 Summary: Calculate Independent Set of Vectors for Restart
This commit ensures that the following set of vectors are stored/updated in

    Summary::add_timestep()

for all active wells and well groups (including FIELD):

    - Production rates for Oil, Water, Gas, and Reservoir Volume
      (i.e., (O|W|G|V)PR).

    - Cumulative production totals for Oil, Water, Gas, and
      Reservoir Volume (i.e., (O|W|G|V)PT).

    - Injection rates for Water and Gas (i.e., (W|G)IR).

    - Cumulative injection totals for Water and Gas ((W|G)IT).

    - Producing Water Cut (WCT).

    - Producing Gas/Oil ratio (GOR).

We additionally capture the well bottom-hole pressure (WBHP) for all
wells that are active at the pertinent simulation step (sim_step).

Add an accessor function

    const SummaryState& Summary::get_restart_vectors() const

that returns the 'prev_state' which contains these summary vectors
and add a set of unit tests to exercise the new interface.
2018-06-25 14:04:11 +02:00
Joakim Hove
3975db2ff3 Rename CompletionSet -> ConnectionSet 2018-06-11 14:03:32 +02:00
Joakim Hove
6168a35512 Add SummaryState class to hold on to summary state. 2018-05-23 06:49:23 +02:00
Lars Petter Øren Hauge
bbf2ae26f1 Match timestep for well info
Decrement timestep where necessary to avoid well post-configuration.

Consider the following:

.
.
.

WELLSPECS
 'W1'  'G1' ... /

TSTEP
 2*1 /

WELLSPECS
 'W1'  'G2' .../

TSTEP
 2*1 /

In that case the parent group of W1 is changed after two timesteps. At timestep
two the Group parent will indicate G2, while the GOPT:G2 at timestep two should
be reported for what has progressed up until timestep two.
2018-03-13 08:16:07 +01:00
Lars Petter Øren Hauge
fdb06aa77f Apply efficiency factors
Efficiency factors are multiplied when specified at multiple levels of
the well/group hierarchy.

The factors are included as follows:

* Well Rate        - No efficiency factor
* Well Total       - WEFAC & GEFAC (whole hierarchy)
* Group Rate       - WEFAC & GEFAC (only subgroups)
* Group Total      - WEFAC & GEFAC (whole hierarchy)
* Field Rate       - WEFAC & GEFAC (whole hierarchy)
* Field Total      - WEFAC & GEFAC (whole hierarchy)
* Region Rate      - WEFAC & GEFAC (whole hierarchy)
* Region Total     - WEFAC & GEFAC (whole hierarchy)
* Completion Rate  - No efficiency factor
* Completion Total - WEFAC & GEFAC (whole hierarchy)

Authored by Sveinung Rundhovde and Lars Petter Hauge
2018-02-20 10:26:54 +01:00
Lars Petter Øren Hauge
dde1ccaae0 Fix minor name error 2018-02-20 10:03:59 +01:00