Commit Graph

364 Commits

Author SHA1 Message Date
Joakim Hove
3a8adeb0b3 Merge pull request #218 from totto82/fixGasOilFPR
Fix FPR and RPR for 2p GasOil case
2017-11-28 10:12:59 +01:00
Bård Skaflestad
440b6259ef Table Output: Switch Naming Convention for Data Members
Mostly to remove trailing underscores.  The internal 'tabdims'
vector in Opm::Tables has been renamed to 'm_tabdims' to avoid
conflicting with the member function named 'tabdims'.
2017-11-27 10:25:48 +01:00
Bård Skaflestad
ec756dde45 Init File: Hook Saturation Function Writing Up to System 2017-11-27 09:15:00 +01:00
Bård Skaflestad
f681862f7c INIT File: Add Support for Writing Saturation Function Tables
This commit extends the INIT file Table writing to also output the
saturation function tables in normalised form.  We support
generating the INIT file's SGFN, SOFN, and SWFN tables--including
the derivative information--for both two and three phases from both
families of saturation function keywords (S{G,W}OF and S{G,W}FN +
SOF{2,3}).  We do not yet support generating the appropriate tables
from input keyword SLGOF.

We leverage the LinearisedOutputTable to abstract away some of the
details of indexing into the linear 'tab' array and create a helper
function to loop across saturation function regions whence each
table generator need only be concerned about the specific data
pertaining to that region's saturation function (i.e., the values of
independent and dependent variates and number of active rows).  We
allocate the output tables according to information in the TABDIMS
keyword, notably the number of saturation nodes (item 3 of TABDIMS).

Generating the three-phase SOFN table, which has the same columns as
the input table SOF3, in the case of family One (SGOF and SWOF) is
slightly involved.  In particular we need to join the SGOF and SWOF
tables on common oil saturation values and derive/insert missing
KroX data through piecewise linear interpolation in the appropriate
input table.  We defer the details of merging on common (and uniqe)
oil saturation values to the standard library routine 'set_union()'
which outputs repeated saturation values exactly once rather than
for each occurrence.  That way we only need to wrap the input tables
in a simple class to facilitate look-up of oil saturation values and
the mechanics of piecewise linear interpolation of the relative
permeability column for oil.  Due to this merging process, the
number of rows in SOFN is twice the number of saturation nodes in
this case.

Since this support depends on being able to determine which phases
are active in a particular run, what table sizes to use for the
output and which keywords are being used to represent the saturation
function tables we introduce a single new public member function

    void Tables::addSatFunc(const EclipseState& es)

This function determines the run's active phases and dispatches to
the new helper functions

    void Tables::addSatFunc_FamilyOne()
    void Tables::addSatFunc_FamilyTwo()

according to which keyword family exists in the input deck.  These
functions in turn call additional helper functions to handle each
phase table separately.  For instance addSatFunc_FamilyOne() uses
the helper function

    SatFunc::Oil::ThreePhase::fromSGOFandSWOF()

to generate a three-phase SOFN table based on the information in the
SGOF and SWOF tables.

Information about slopes/derivatives for the piecewise interpolants
of the dependent variates is computed through the helper function

    DifferentiateOutputTable::calcSlopes()

whence the first entry of each derivative column is undefined (i.e.,
assigned the sentinel value 1e+20).  This should arguably be zero
instead.  Further testing and comparison with INIT result sets
generated by ECL will inform the decision here.

We add unit tests for all combinations of number of active phases
(two or three) and which saturation function keyword family is
present in the simulation case.  The unit tests use the tables from
SPE 9 for keyword family One and the tables from SPE 1 for keyword
family Two.  Comparison data is extracted directly from the ECL INIT
file in the case of the SPE 9 tables and derived from independent
calculation for the SPE 1 tables.
2017-11-27 09:15:00 +01:00
Bård Skaflestad
67cf8764aa Linearised Output Table: Store Derivatives at Right-Hand End Point
This is more in keeping with the intended application--at least for
saturation function output to the INIT result set.

While here, also remove an unused data table (SWOF from SPE1).
2017-11-27 09:15:00 +01:00
Bård Skaflestad
e2bf7bf699 Table Output: Add Facility to Simplify Indexing Details
This commit introduces a new helper class, LinearisedOutputTable,
that is oriented towards managing tabular data such as the PVT or
saturation functions in an ECL result set (typically, .INIT file).
The class knows about row padding and the column oriented nature of
Fortran-like tables.

While here, and in anticipation of adding output of tabulated
saturation functions, also provide a mechanism for calculating
slopes of piecewise linear interpolants.  The ECL format stipulates
that function derivatives be output along with the actual table
data for most functions.
2017-11-27 09:15:00 +01:00
Bård Skaflestad
e26d647252 Table Output: Don't Store ECL Keywords Internally
This commit switches the internal implementation of the 'tab' and
'tabdims' vectors from being a mix of ECL keyword structures and
std::vector<>s to being purely std::vector<>s.  We remove the
fwrite() member function and rather reimplement the feature in terms
of new query member functions

    const std::vector<int>& tabdims() const
    const std::vector<double>& tab() const

that return read-only references to internal data members.
2017-11-27 09:15:00 +01:00
Bård Skaflestad
a2883e5057 Table Output: Switch to One-Based Offset Indices
This is needed for compatibility with Fortran and external software
that reads the .INIT file.
2017-11-27 09:15:00 +01:00
Andreas Lauser
b1564370a8 remove the configure wrapper script
this used to provide autotools compatibility, but it has not been working for a while. Thus it is IMO better to remove it in order not to mislead people.
2017-11-24 10:36:46 +01:00
Tor Harald Sandve
7a8db84a31 Fix FPR and RPR for 2p GasOil 2017-11-24 08:53:09 +01:00
Lars Petter Øren Hauge
efd108da56 Add GOP(R/T)(F/S)
Handling keywords to output rate and total for free and vaporized oil
2017-11-23 11:34:31 +01:00
Lars Petter Øren Hauge
8e6387456c Add GGPTS+GGPTF 2017-11-23 11:34:19 +01:00
Steinar Foss
87b79b5d36 EclipseIO::writeInitial: adjusted comment on int_data 2017-11-21 13:17:02 +01:00
Steinar Foss
0c20baa523 scatterVector method not used anymore 2017-11-21 11:15:26 +01:00
Steinar Foss
0679a63a3b test_EclipseIO.cpp: removed use of test_assert functions from ERT. 2017-11-21 10:30:45 +01:00
Steinar Foss
2dce52478c EclipseIO::writeInitial: added comments on int_data argument 2017-11-21 10:30:45 +01:00
Steinar Foss
73420104b5 variable named map renamed to int_data 2017-11-21 10:30:45 +01:00
Steinar Foss
045e355720 Added possiblity: writing integer fields to INIT files.
added std::map argument to EclipseIO::Impl::writeINITFile

writing EclipseIO::Impl::writeINITFile argument to INIT file

...

...
2017-11-21 10:30:45 +01:00
Sveinung Styve Rundhovde (IT SI SIB)
3fffeda7d7 Add WOPTS+WOPTF keywords 2017-11-17 09:36:05 +01:00
Sveinung Styve Rundhovde (IT SI SIB)
ff3d0cda28 Add vaporized_oil to Rates 2017-11-17 09:36:05 +01:00
Sveinung Styve Rundhovde (IT SI SIB)
85eca28c84 Add WGPTS+WGPTF keywords 2017-11-17 09:36:05 +01:00
Sveinung Styve Rundhovde (IT SI SIB)
72a08beb39 Add WGPRS+WGPRF keywords 2017-11-17 09:36:05 +01:00
Lars Petter Øren Hauge
1e776429f5 Add GGPRS+GGPRF keywords 2017-11-15 12:02:42 +01:00
Lars Petter Øren Hauge
0695ac5894 Add dissolved_gas to Rates 2017-11-15 12:02:42 +01:00
Joakim Hove
198037d7fc Merge pull request #207 from joakim-hove/extract-schdeule
Extract Schedule and SummaryConfig.
2017-11-06 17:05:58 +01:00
Andreas Lauser
e3920a861c remove unused travis files
these have not been used for a while. .travis.yml and the files in opm-common/travis/ are in charge
2017-10-14 12:33:24 +02:00
Andreas Lauser
7b1ff93fa4 replace #if HAVE_CONFIG_H by #ifdef HAVE_CONFIG_H
it seems like most build systems pass a -DHAVE_CONFIG_H flag to the
compiler which still causes `#if HAVE_CONFIG_H` to be false while it
clearly is supposed to be triggered.

That said, I do not really see a good reason why the inclusion of the
`config.h` file should be guarded in the first place: the file is
guaranteed to always available by proper build systems, and if it was
not included the build either breaks at the linking stage or -- at the
very least -- the runtime behavior of the resulting libraries will be
very awkward.
2017-10-14 12:33:24 +02:00
Andreas Lauser
46b00ffc03 delete the bit-rotten EclipseReader.cpp
it do not even build because it the "EclipseGridInspector.hpp" header
file is nowhere to be seen. I'm deleting this file outright because if
this functionallity ought to be revived, the code can be brought back
from the annals of git.
2017-10-14 12:33:24 +02:00
Joakim Hove
21a2944885 Extract Schedule and SummaryConfig. 2017-10-03 09:29:25 +02:00
Joakim Hove
a8f07228ce Using correct grid in restore_wells. 2017-10-02 08:58:31 +02:00
Joakim Hove
9a0e8a40ba Updated SummaryConfig constructor call. 2017-09-26 14:01:09 +02:00
Alf Birger Rustad
9919525c79 Merge pull request #201 from joakim-hove/rft-open-file
Make sure RFT file is opened in correct mode.
2017-09-11 09:02:13 +02:00
Joakim Hove
896f806492 Make sure RFT file is opened in correct mode. 2017-09-10 22:56:40 +02:00
Tor Harald Sandve
c96f1cd6ca Fix RPR summary output
- weight RPR by hydrocarbon pore volume
2017-09-06 12:47:10 +02:00
Atgeirr Flø Rasmussen
a70dbddfa4 Merge pull request #198 from blattms/allow-to-overwrite-initial-oip
Allow simulator to overwrite initial OIP value.
2017-08-01 16:15:53 +02:00
Joakim Hove
23e3bd8d4b Using Schedule::getWells( group, time_step)
When evaluating a group variable, like e.g. GOPR we need to traverse the
group tree all the way down to the leaf nodes, i.e. wells.
2017-07-26 09:24:48 +02:00
Markus Blatt
9f5dd5738d Allow simulator to overwrite initial OIP value.
Up to now we assumed that if there is interest in the
initial OIP value (e.g. to calculate FOE) then oip has
to be presented to EclipseWriter during the call of
writeInitial. For the downstream simulators OIP is
not available at this stage. This commit gives the simulator
the possibility to overwrite/reset the values later and
allows the current implementations to let output calculate
and output FOE.
2017-07-19 21:37:22 +02:00
Joakim Hove
9ffc7ebab2 Will insert RESTART header in summary files. 2017-06-30 10:22:42 +02:00
Joakim Hove
cf67d56dba Dsiable test when running travis. 2017-06-10 11:19:31 +02:00
Arne Morten Kvarving
2a3afbe846 initialize values to avoid maybe-unitialize-use-warnings 2017-06-09 12:11:35 +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
Arne Morten Kvarving
ca8d18386c disable unused private method 2017-06-08 17:17:55 +02:00
Arne Morten Kvarving
f7a2d10d82 reduce scope of variables 2017-06-08 17:17:38 +02:00
Arne Morten Kvarving
9fbda39404 pass by reference 2017-06-08 17:16:39 +02:00
Arne Morten Kvarving
bc3eac293f make constructors explicit 2017-06-08 17:15:38 +02:00
Arne Morten Kvarving
8a90f30ed8 add (default) constructor to Rates 2017-06-08 17:14:33 +02:00
Arne Morten Kvarving
fe4d8e5dde remove unused variables 2017-06-08 17:14:15 +02:00
Joakim Hove
9120c67cf8 Ability to pass misc values to summary writer. 2017-06-06 15:40:34 +02:00
Joakim Hove
ac70c34c68 Write (incorect) TCPU value to summary files. 2017-05-30 06:33:46 +02:00
Joakim Hove
976a963f7a Explicitly added REGDIMS to test deck. 2017-05-26 00:40:57 +02:00