Commit Graph

73 Commits

Author SHA1 Message Date
Andreas Lauser
3a73a2c2b5 fix another missibility typo
this one was not fixed in @bska's PR because my branch for ROCKTAB was
not merged back then. /me is confused by too many things going on at
once...
2014-02-06 00:21:01 +01:00
Joakim Hove
c38e079a6d Merge pull request #111 from andlaus/better_rocktab
add a utility class for the ROCKTAB keyword
2014-02-05 15:47:42 +01:00
Andreas Lauser
d5bedde8a7 add a utility class to handle ROCK tables
So far, this only considers Eclipse R100...
2014-02-05 15:20:56 +01:00
Andreas Lauser
6eab8d62b1 add a utility class for the ROCKTAB keyword
this one is a bit more complicated than a plain SimpleTable as the
number of columns depends on the deck. (to be precise, it depends on
the presence of the RKTRMDIR keyword which is also added in this
patch.)
2014-02-05 15:04:04 +01:00
Bård Skaflestad
9bfd5b92d7 Fix spelling.
The connection "strength" (conduction factor) is called
"transmissibility" (double 's'), not "transmiscibility" ('sc').
2014-02-05 13:39:28 +01:00
Arne Morten Kvarving
4a9c18ac9f run tests through valgrind 2014-01-27 15:16:34 +01:00
Joakim Hove
581bf74e9a Changed int -> size_t many places. 2014-01-24 09:41:32 +01:00
Joakim Hove
4b35f79a35 Changed integer type int -> size_t throughout. 2014-01-17 08:13:08 +01:00
Andreas Lauser
9332f0edd1 PVTO: Add unit test and make the function names of the table class consistent with PVTG 2014-01-16 15:22:33 +01:00
Andreas Lauser
1c39df2d57 improve unit test for PVTG
now the data is parsed from a string specified in the source file
instead of a separate file, the PvtgTable utility class is tested and
the order of the fields in the JSON definition of PVTG is the same as
for that of PVTO.
2014-01-16 13:23:13 +01:00
Andreas Lauser
27efd0d1fa implement multi-region full tables
detecting empty records is still pretty hacky: When calculating the
number of flat items, we stop at the first item for which the default
was applied.

Also, this patch corrects the names of the columes used by the PVTG
keyword. (the first column is pressure, then comes Rv.)
2014-01-16 13:12:40 +01:00
Andreas Lauser
8d2ea3e0cd add wrapper classes for more eclipse keywords
these are convenient to convert everything required to rip out the old
parser of sim_fibo_ad. the concrete keywords are:

 - COMPDAT
 - EQUIL
 - GCONINJE
 - GCONPROD
 - GRUPTREE
 - WCONINJE
 - WCONINJ
 - WCONPROD
 - WELOPEN
 - WELSPECS
 - WGRUPCON

in the medium term it would be nice if these wrapper classes could be
automatically generated from the JSON keyword descriptions.
2014-01-15 15:44:38 +01:00
Andreas Lauser
93523a9a54 add wrapper class for "WCONINJ" 2014-01-15 15:44:38 +01:00
Andreas Lauser
f38e09f450 add a wrapper class for the "SPECGRID" keyword 2014-01-15 15:44:38 +01:00
Andreas Lauser
032916c1bd fix more of the annoying sign comparison warnings
hopefully all of them.
2014-01-15 12:52:12 +01:00
Andreas Lauser
0ed659de10 add a wrapper for records of the WELSPECS keyword 2014-01-15 12:52:12 +01:00
Andreas Lauser
024774b605 add wrapper class for the START keyword 2014-01-15 12:52:12 +01:00
Andreas Lauser
34e39d2f31 add utility class for the 'TSTEP' keyword 2014-01-15 12:52:12 +01:00
Andreas Lauser
079aa1417b move the SimpleMultiRecordTable class into its own files. 2014-01-15 12:52:12 +01:00
Andreas Lauser
8c83f0d8c1 remove the emacs and vim modelines
as it was decided that having editor-specific stuff in files is not
wanted in OPM. for emacs, a .dir-locals.el file is added to the
module's root directory which should have the same effect.
2014-01-15 12:52:12 +01:00
Andreas Lauser
6f721581bd add utility classes for some common keywords
the idea is to create a lightweight wrapper objects around
DeckKeywords which allow more convenient and more readable access to
the data. E.g. instead of

  std::vector outerColumnNames{"RV", "P", "BG", "MUG"};
  std::vector innerColumnNames{"P", "BG", "MUG"};
  Opm::FullTable pvtgTable(deck->getKeyword("PVTG"),
                           outerColumnNames, innerColumnNames);
  pvtgTable->getOuterTable()->getColumn(1);

one now better uses

  Opm::PvtgTable pvtgTable(deck->getKeyword("PVTG"));
  pvtgTable->getOuterTable()->getPressureColumn();

the idea for the other keywords is similar.
2014-01-15 12:52:12 +01:00
Andreas Lauser
d96b69c9ea add support for full-fledged tables 2014-01-15 12:52:12 +01:00
Andreas Lauser
3a3336028a add class for simple tables
This is intended for keywords like SWOF which currently is a big
vector of doubles but one needs to use the data in a column oriented
way.

This class is intended to be used like this:

Opm::DeckKeywordConstPtr swofKeyword = newParserDeck->getKeyword("SWOF");
Opm::SimpleTable swofTable(swofKeyword,
                           /*columns=*/std::vector<std::string>{"SW", "KRW", "KROW", "PCOW"},
                           /*recordIdx=*/table_num);
const std::vector<double>& sw = swofTable.getColumn(0);
// ...

what might be useful is to move the column names into the JSON
description of the keywords, but I could not find a way to go back to
the parser from the deck/keyword. maybe this is not even desireable as
decks might also be created by other means...

Also, a multi-record variant of the class is available. That one is
intended for keywords like PVTO where the first few items of each
record form a table (in the case of PVTO: Rs, pressure, Bo, and
viscosity for staturated oil) and the next entries constitute another
table (in the case of PVTO: pressure, Bo and viscosity for
undersaturated oil with the same RS factor as the first entry).

The second kind of tables can be constructed using the item-based
variant of SimpleTable.
2014-01-15 12:52:12 +01:00