Commit Graph

62 Commits

Author SHA1 Message Date
Joakim Hove
94b160258e Remove old well implementation 2019-05-22 21:44:50 +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
04d42c2f4e Move well and well related files to Well/ subfolder 2019-03-08 07:15:49 +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
9e97dde466 Restore Cumulative Summary Quantities in Restart
This commit hooks the new helper function restore_cumulative() up to
the gateway restart function

    RestartIO::load()

by changing the return type from "RestartValue" to

    std::pair<RestartValue, SummaryState>

with the pair's '.second' being restore_cumulative()'s return value.

Update callers including unit tests accordingly, specifically such
that the gateway function

    EclipseIO::loadRestart()

internally resets its Summary object's cumulative quantities using
'load().second'.  This is, strictly speaking, a violation of the
"const" qualifier on EclipseIO::loadRestart(), but the language
permits the usage because the 'impl' pointer in this case will be a
constant pointer to a mutable 'Impl' object.
2019-02-10 19:14:29 -06:00
Joakim Hove
2cd6fa2f49 Add overloads without ParseContext and ErrorGuard - update all tests 2019-01-04 13:59:28 +01:00
Joakim Hove
1ba51534ae Move SummaryState implementation to EclipseState/Schedule/ 2018-11-09 20:44:37 +01:00
Joakim Hove
967e3ad3af
Merge pull request #526 from totto82/addDRSDTR
Add DRSDTR and DRVDTR
2018-11-06 08:21:32 +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
Bård Skaflestad
4348438044 Summary: Ensure that we don't step backwards during simulation
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.
2018-11-04 21:48:35 +01:00
Jostein Alvestad
ef6e0b084d Corrected merge conflicts with upstream master
Write cumulative production / injection only in eclipse compatible mode
2018-09-19 16:02:17 +02:00
Bård Skaflestad
41d0a56967 Test Restart: Use Non-Default SummaryState Values
Needed by the new restart code.
2018-09-19 16:02:12 +02:00
Jostein Alvestad
3fb7149226 Added change to rseg item 11 2018-09-19 16:02:10 +02:00
Jostein Alvestad
5b1ec7b5b0 Added code to write restart data for groups and segmented wells to restart file - consistent with Eclipse 100 2018-09-19 16:02:02 +02:00
Jostein Alvestad
cedadaf649 Added code to implement writing XGRP to the restart file. 2018-09-19 16:01:58 +02:00
Joakim Hove
71d92c3dc8 Add opm_formatted property to the IOConfig 2018-09-12 11:34:57 +02:00
Joakim Hove
45e81a02fa Use plain C api for temporary testarea 2018-09-07 05:53:20 +02:00
Joakim Hove
3e95d3f42b Fixup: THPRESPR -> THRESHPR 2018-09-05 17:53:33 +02:00
Joakim Hove
4a10023c0d Make sure the THPRESPR field is written in solution section 2018-09-04 08:38:15 +02:00
Joakim Hove
ae3c4e0d8c Rename THPRES string to THPRESPR 2018-09-03 17:15:01 +02:00
Joakim Hove
f80644b616 Remove special case for Travis 2018-07-19 06:44: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
Joakim Hove
3975db2ff3 Rename CompletionSet -> ConnectionSet 2018-06-11 14:03:32 +02:00
Joakim Hove
7163807296 Change method names 2018-05-16 12:31:14 +02:00
Joakim Hove
3c18add696 Verify that the extra container has THPRES 2018-05-15 23:08:30 +02:00
Joakim Hove
593af1c678 Pass dimension information for extra fields in restart 2018-05-14 16:12:52 +02:00
Joakim Hove
e6f318aa28 Add key string to RestartKey 2018-05-14 16:12:52 +02:00
Joakim Hove
d078a96eae Use RestartValue container for Eclipse output 2018-05-14 16:12:52 +02:00
Arne Morten Kvarving
7f79101fb2 changed: let the build system handle the dynamic boost test defines 2018-02-14 16:03:57 +01:00
Tor Harald Sandve
890b2226b2 Get Block values from simulator
Avoids communication of the whole state
2018-02-05 14:23:19 +01:00
Tor Harald Sandve
45267477b4 Get Region and Field values from simulator
Avoid cell based computations in opm-output as it could slow down the
MPI run.
2018-02-05 14:19:50 +01:00
Joakim Hove
6a7412af7e Increased tolerance when testing TEMP in restart test. 2018-02-01 08:41:41 +01:00
Joakim Hove
21a2944885 Extract Schedule and SummaryConfig. 2017-10-03 09:29:25 +02:00
Joakim Hove
cf67d56dba Dsiable test when running travis. 2017-06-10 11:19:31 +02:00
Arne Morten Kvarving
0b68a2f69e changed: make RestartValue constructor explicit
update code which previously relied on the implicit cast
2017-06-09 11:57:48 +02:00
Joakim Hove
9120c67cf8 Ability to pass misc values to summary writer. 2017-06-06 15:40:34 +02:00
Atgeirr Flø Rasmussen
ada3e302b8 Silence shadowing warnings. 2017-04-12 10:31:53 +02:00
Joakim Hove
621b94235c RestartIO::load( ) can specifiy optional keys. 2017-04-11 14:35:10 +02:00
Joakim Hove
ace3e10ac5 RestartIO::load extra keys can be marked optional. 2017-03-09 14:49:34 +01:00
Joakim Hove
3d2a0a6368 Changes to restart IO.
- Will throw an exception if solution data has wrong size.
 - struct ResatrtValue used as RestartIO::load( ) return value.
 - RestartIO can take arbitrary double vectors as extra data.
2017-03-03 08:21:44 +01:00
Joakim Hove
00d7f7e155 Added ability to save restart fields in double. 2017-02-22 18:24:10 +01:00
Joakim Hove
4d1693d027 Changes in the loading of restart files.
The main content of this commit is that the loading of restart files is
based on map of keys passed in from calling scope. This way the
selection of keywords to save and load is fully under control of calling
scope, but in addition there are many small refactorings:

 - The EclipseWriter class and implementation has been renamed
   EclipseIO.

 - The loading and saving of restart files has been moved to file and
   namespace RestartIO, which contains two loose functions load( ) and
   save( ).

 - The Summary() and RFT( ) data get their own copies of the data::Cells
   vector.

 - Removed some abstractions and wrrappers around C / ert
   datastructures. Using ecl_file_view when loading restart files,
   instead of bare ecl_file. Simplified opening of unified restart
   files.

 - Removed the ability to save restart keywords in double precision.
2017-01-17 16:58:56 +01:00
Jørgen Kvalsvik
e06d591dd3 Read phase information from EclipseState.runspec 2016-11-01 11:19:59 +01:00
Joakim Hove
08d89858af Extended data::Wells to inherit from std::map. 2016-10-26 19:50:17 +02:00
Atgeirr Flø Rasmussen
72c09a80b9 Silence some false-positive warnings. 2016-10-25 14:20:49 +02:00
Jørgen Kvalsvik
30ef5a6099 data::Well::Completion is vector, not map
The data exchanged in data::Well::Completions is now a vector, more
closely matching the disk format and the order exposed by the simulator.
Zero'd wells and complations are still written for shut wells, or wells
the simulator does not provide any information for; however, all
non-closed wells (according to the schedule) will be restored. The
completions are written and restored in the same order as CompletionSet
from parser.
2016-10-24 16:52:26 +02:00
Jørgen Kvalsvik
ac9ed4ec5c OPM_IWEL Restart support 2016-10-21 12:50:17 +02:00
Jørgen Kvalsvik
b43461cb49 Prefer named data members over vectors in OPM_XWEL
Change the structure used to populate OPM_XWEL to use a plain map of
data::Wells objects rather than dumping a series of vectors to
data::Wells. Tests are added for serialising and restoring wells.
2016-10-21 12:50:17 +02:00
Jørgen Kvalsvik
c07fe44d5e Update to shared_ptr-less parser interface. 2016-10-19 13:44:33 +02:00
Jørgen Kvalsvik
8ac5dc553f Implement Solution via std::map 2016-10-17 07:06:23 +02:00