Commit Graph

79 Commits

Author SHA1 Message Date
Arne Morten Kvarving
bc3eac293f make constructors explicit 2017-06-08 17:15:38 +02:00
Joakim Hove
9120c67cf8 Ability to pass misc values to summary writer. 2017-06-06 15:40:34 +02:00
Tor Harald Sandve
01c56deb3f PV weight FPR 2017-05-10 10:03:31 +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
b71fce3dd8 Document writeInitial. 2017-02-16 09:08:51 +01:00
Joakim Hove
d988a010ff Added INIT file output of PVTW and Density. 2017-01-27 08:35:11 +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
Joakim Hove
a2c0831836 Removed unused header file. 2016-12-05 18:49:52 +01:00
Joakim Hove
b92cecc7eb Removed writeECLData. 2016-12-05 18:49:52 +01:00
Joakim Hove
72d699473a Added PVTG output. 2016-11-28 13:22:57 +01:00
Joakim Hove
180057c062 Framework for adding tables to INIT file - PVTO. 2016-11-28 10:55:33 +01:00
Jørgen Kvalsvik
fc789d489a FOE support
Field efficiency: (OIP(initial) - OIP(now)) / OIP(initial). The initial
OIP is cached, and FOIP is reused for OIP(now). Adds the
operator-(double,quantity) to make the formula obvious from the FOE
function.
2016-11-18 11:40:45 +01:00
Joakim Hove
ac4640effe Check that completion corresponds to active cell. 2016-11-04 15:24:59 +01:00
Joakim Hove
64f5c9d13e Added completion list to RegionCache. 2016-10-26 19:50:17 +02:00
Joakim Hove
a8d82221a8 Added small class RegionCache. 2016-10-26 19:50:17 +02:00
Joakim Hove
0cb12fff56 Merge pull request #112 from joakim-hove/solution-default-arg
Using constructor in default argument creation.
2016-10-20 19:38:18 +02:00
Joakim Hove
9336045966 Using constructor in default argument creation. 2016-10-20 18:20:50 +02:00
Jørgen Kvalsvik
9f41044447 Remove CornerpointChopper.hpp 2016-10-19 13:44:33 +02:00
Jørgen Kvalsvik
c07fe44d5e Update to shared_ptr-less parser interface. 2016-10-19 13:44:33 +02:00
Joakim Hove
79e7ce643d Using data::Solution for simulator <-> output.
Will use one common container for both the solution data required for the
restart, e.g. PRESSURE and SWAT and also the auxillary data like KRG and
FIP which is intended as extra information in the restart file, or
alternatively the summary file.
2016-10-17 07:04:06 +02:00
Joakim Hove
79a03c26d0 Using CelldataConatiner in opm-output. 2016-10-17 07:01:51 +02:00
Joakim Hove
eb929077a2 Moved Cells.hpp and Wells.hpp opm/output/data/ 2016-10-06 16:29:20 +02:00
Joakim Hove
204ca5932b Outputwriter: use EclipseGrid
- The outputwriter will now take a a separate EclipseGrid instance as
  input argument, it is assumed that calling scope has already made sure
  ACTNUM and ZCORN are correct.

- All active/inactive cell mappings are based on the grid argument, the
  naked int* with global / active cell mappings has been completely
  removed.
2016-09-08 08:38:39 +02:00
Joakim Hove
33ae96f2af Summary will output region pressure: RPR 2016-08-26 12:50:40 +02:00
Joakim Hove
2aa9dfbf48 Added optional argument simProps to writeTimestep.
The simProps argument is vector of field properties which have been
initialized / calculated by the simulator. Examples of such properties
include the relative permeabilites KRG, KRO and KRW and the fluid in
place vectors FIPOIL and FIPGAS.
2016-08-20 19:26:35 +02:00
Joakim Hove
4bfacb144d Moved argument 'sub_step' to 2. in argument list. 2016-08-20 19:26:35 +02:00
Joakim Hove
667307f417 EclipseWriter: write restart with double.
In restart files generated by Eclipse the solution fields, i.e. pressure
and saturations are written in 32 bits precision using floats. For
compatibility that is the default behavior in opm/flow as well, but with
this patch it is optionally possible to write the solution fields with
64 bit double precision.

The resulting files will probably be incompatible with third party
applications, so this should be done with extreme caution.
2016-08-18 15:43:07 +02:00
Joakim Hove
53625baf26 Write DEPTH and DX,DY,DZ keywords to INIT file. 2016-07-12 13:56:35 +02:00
Joakim Hove
e40e731b2c Merge pull request #51 from joakim-hove/rename-writeInit
Rename write init
2016-07-01 13:56:47 +02:00
Jørgen Kvalsvik
0c0a548219 New private Summary implementation
A rewritten Summary.cpp with some minor header modifications. Synposis
of the new implementation:

* Uses unordered_map< string, std::function > for dispatch, instead of
  multiple functions and a switch
* Some poor man's function composition support has been added
  (privately) to avoid a lot of reptition in the post processing.
* Functions assume they work over lists of wells instead of single wells
  being special cased - this means groups of well etc. can share
  implementation with single wells and field keywords.
* Unsupported keywords are not written in the Summary file.

Furthermore, some comments on special cases and overall approach and
a generally more declarative implementation. This change is invisible to
downstream developers. Users will obviously see no more garbage
keywords.
2016-06-30 09:54:40 +02:00
Joakim Hove
c0b56afb13 Removed NNC argument to EclipseWriter constructor. 2016-06-29 13:10:35 +02:00
Joakim Hove
4b11d9a059 Rename wrietInit -> writeInitAndEgrid() 2016-06-29 13:10:35 +02:00
Joakim Hove
12e36f6cff Moved NNC argument to writeInit() method. 2016-06-29 13:10:35 +02:00
Joakim Hove
6a1888af14 Refactored writeInit:
- Removed class Init completely - writeint an init file is handled by
   the method EclipseWriter::writeINITFile( )

 - Seperated writing of INIT file and EGRID file better.
2016-06-29 13:10:35 +02:00
Joakim Hove
b232c568af writeInit() - can optionally take properties. 2016-06-29 13:10:35 +02:00
Jørgen Kvalsvik
7c82e69a00 Copy and save a Grid copy in Writer; apply actnum
Simulators might modify the grid post EclipseState creation, so the Grid
fetched from there is unreliable. Copy the Deck-provided grid and apply
the manipulations at EclipseWriter construction time to ensure it uses
the same dimensions and has the same properties as the simulator.
2016-06-16 14:30:27 +02:00
Jørgen Kvalsvik
c5397488a8 Correctly calculate totals 2016-06-07 08:42:30 +02:00
Jørgen Kvalsvik
0f1a1d7ede NNC variable not defaulted in writeInit 2016-06-07 08:40:41 +02:00
Jørgen Kvalsvik
99e2a55204 Replace raw conversion_table with UnitSystem
The to_si/from_si functions were moved into UnitSystem which now manages
table lookup for clients, rather than having to store the raw
conversion tables.
2016-06-07 08:40:41 +02:00
Jørgen Kvalsvik
e2a5c01a8b Read sim start time from EclipseState
Reading the start time from EclipseState means it's no longer required
as a parameter to every method, and that the current time can be
calculated as start time + time elapsed.
2016-06-07 08:40:41 +02:00
Jørgen Kvalsvik
91d5cad61e Remove unused argument from writeInit 2016-06-07 08:40:41 +02:00
Jørgen Kvalsvik
ecbbec3aad Remove the OutputWriter-Eclipse inheritance
This is-a relationship is never used, and the vtable is never leveraged.
The augmented output writers already use uniquely named output writers
anyway, so there is no reason to go via the hurdle of inheritance.

This gives a lot of flexibility when it comes to interface, since
Eclipse output can make Eclipse-specific assumptions.
2016-06-07 08:40:40 +02:00
Jørgen Kvalsvik
6efe691629 Replace boost::posix_time with time_t
The boost object was only used to calculate elapsed posix time anyway,
which is required (and already managed) by the callers. This makes the
interface slightly less complicated and removes an otherwise pointless
dependency.
2016-06-07 08:40:40 +02:00
Jørgen Kvalsvik
c1775bc1f1 Implement EclipseWriter as private; hide RFT
Hides all the EclipseWriter details and helper classes using pimpl,
which now enforces the non-copyability of EclipseWriter (which relies on
open and stateful file handles).
2016-06-07 08:40:40 +02:00
Jørgen Kvalsvik
29f64a1a85 Remove ParameterGroup include from CornerpointChopper 2016-06-07 08:40:39 +02:00
Jørgen Kvalsvik
1ab914e98a Simplify writing procedure 2016-06-07 08:40:39 +02:00
Jørgen Kvalsvik
9ea5e52144 Replace core/grid arg with dimensions in WriteECL
The grid structure was only used to read static size-related properties,
meaning the instance itself was rather uninteresting. Replace the grid
argument with raw ints.
2016-06-07 08:40:39 +02:00