Commit Graph

1263 Commits

Author SHA1 Message Date
Andreas Lauser
45619a93f2 GridPropertyInitializers: add unit test 2014-09-25 21:36:43 +02:00
Andreas Lauser
c5f602a17c grid properties: implement a table-lookup initializer for the endpoint scaling keywords 2014-09-25 21:36:42 +02:00
Andreas Lauser
f54de8eafb grid properties: introduce initializer objects
this makes it possible to define more complicated initializers for
grid properties. (needed for example for keywords like ISGU.) This
patch does not introduce them yet, but only adds the necessary
infrastructure.

notes:

 - to get around cyclic definitions in template classes, the
   EclipseState is changed to a (defaulted) template parameter which
   causes the compiler to only look up the class definition at
   instantiation time.
 - using std::shared_ptr in the property initializers would lead to
   cyclic references which would cause memory leaks. To avoid that,
   plain old references where used in most places. I think this is
   okay as the GridProperty objects should be considered internal to
   EclipseState and thus the EclipseState object should live at least
   as long as GridProperty objects...
2014-09-25 21:36:42 +02:00
Andreas Lauser
f8ec08e069 change the defaults for the *NUM integer properties to 1
and add the ENDNUM integer property.
2014-09-25 21:36:42 +02:00
Andreas Lauser
036db1da4a GridProperties: don't use the garbage from defaulted data items
e.g.

```
SWL
10*0.1 10* 10*0.2 /
```

resulted in the SWL keyword exhibiting undefined values for the middle
ten data points.
2014-09-25 21:36:42 +02:00
Andreas Lauser
68df912f7d data items: allow to set only a subset of the values
e.g. Eclipse specifies that for PERMX only the topmost layer needs to
be specified, i.e. the following is valid on a 3x3x3 grid

```
PERMX
9*10 /
```

the previous behaviour was to throw.

also, mark if data items have been defaulted, i.e., the item of

```
PERMX
* /
```

will now return true for 'defaultApplied()'.
2014-09-24 12:47:57 +02:00
Andreas Lauser
b4ff0efff8 EclipseState: export the IMPTVD and IMKRVD tables
and also fix a small build bug in these table classes. I don't know
why they have not been also fully dealt with in the recent table code
refactoring...
2014-09-24 12:47:57 +02:00
Xavier Raynaud
20c9a616e0 Use CMODE to set default control in WCONINJH. 2014-09-22 10:11:46 +02:00
Xavier Raynaud
4011cc96c6 Added test to check if default value is used. 2014-09-19 17:40:40 +02:00
Xavier Raynaud
9e61f55f6b Merge branch 'master' into wconinjh-support 2014-09-19 16:56:41 +02:00
Xavier Raynaud
48e687a8ea set controlMode to RATE for WCONINJH 2014-09-19 16:51:02 +02:00
Andreas Lauser
7ad309d3b3 move the table classes from .../Utility to .../EclipseState/Tables 2014-09-19 15:12:21 +02:00
Xavier Raynaud
fe15d4a1d2 Added support for wconinjh 2014-09-19 14:58:37 +02:00
Andreas Lauser
a057280492 tables: remove trailing underscores from the protected and private methods
opm-parser does not follow this convention...
2014-09-19 14:33:35 +02:00
Andreas Lauser
f6b2797e23 tables: make them instantiable exclusively by EclipseState
since tables can be tricky, we now enforce that the compiler bails out
if the user tries to instantiate a table class manually.

Note that a bit of trickery is needed to keep the low-level unit
tests working...
2014-09-19 14:33:35 +02:00
Andreas Lauser
aa0d7d2e6b EclipseState: initialize and expose the tables which are featured by the deck
since this code is becomming a bit tricky, it is now recommended to
use the tables of EclipseState instead of trying to initialize them
yourself...
2014-09-19 12:24:54 +02:00
Andreas Lauser
e994d7314e endpoint scaling tables: make the bare-metal getColumn(index) method public
it is _strongly_ encuraged to use the properly named methods to access
the respective columns, but opm-core's current endpoint scaling code
makes it hard to use these...
2014-09-19 12:24:54 +02:00
Andreas Lauser
59d35de3af add table classes for RSVD and RVVD
these keywords are used by opm-core, albeit currently in a
"bare-metal" way.
2014-09-19 12:24:54 +02:00
Andreas Lauser
f544c926df tables: propertly handle defaults and monotonicity of columns
for some kinds of tables this means linear interpolation for some
columns, constant for other columns and some tables do not allow to
specify default. Since there is no clear rule, this patch involved
checking the reference manual for every single f****** table keyword
plus some guess-work if the reference manual is unclear about
monotonicity and/or defaults.
2014-09-19 12:07:06 +02:00
Andreas Lauser
fd6209a34d make it possible to evaluate some tables using linear interpolation
... and constant interpolation at the fringes. this kind of evaluation
in between sampling point only makes sense for tables where the first
column is strictly monotonic, though.
2014-09-19 12:07:06 +02:00
Andreas Lauser
1bbe775831 make all table classes default constructible
this allows to store them in std::vectors, but requires to call the
init() method after construction...
2014-09-19 12:07:06 +02:00
Andreas Lauser
0055703aef remove PvcdoTable
because PVCDO is not a table keyword.
2014-09-19 12:07:06 +02:00
Andreas Lauser
0d423b83f4 remove the PvtwTable
because PVTW is not a table keyword...
2014-09-19 12:07:06 +02:00
Andreas Lauser
f440f34788 remove RockTable
because ROCK is not a table keyword
2014-09-19 12:07:06 +02:00
Andreas Lauser
c5f78788e0 add the IMPTVD and IMKRVD keywords and table classes
basically they are just renamed copies of the EN* variants...
2014-09-19 12:07:05 +02:00
Andreas Lauser
7f786a7ccc add the ROCKOPTS keyword
because to properly initialize the ROCKTAB table, it is required...
2014-09-19 12:07:05 +02:00
Andreas Lauser
ef6e76562b Deck: mark numKeywords() and getKeywordList() as const
this was probably an oversight...
2014-09-19 12:07:05 +02:00
Andreas Lauser
eccf3d4551 ParserItem: improve the equallity testing code and remove the defaultSet() method
but we still need the m_defaultSet member because NaN == NaN as well
as NaN != NaN...
2014-09-15 12:29:58 +02:00
Andreas Lauser
435e6aa6c5 extend "StarToken" class
that's because not every token which contains a star represents an
repetion, e.g.

'PROD*'

and

'123*456'

(with the quotes) are strings...
2014-09-15 12:27:28 +02:00
Andreas Lauser
6dbe6ae5ac remove the "value status" concept from deck items
I know it was only added recently, but all of the "setInDeck()" calls
can now be substituted by a combination of item->size() and
item->defaultApplied(index)...
2014-09-15 12:17:04 +02:00
Andreas Lauser
16337759b6 add some defaulted values to the unit test of PVTG 2014-09-15 12:17:03 +02:00
Andreas Lauser
e014896e35 add more explicit unit test for defaulted deck items
(the ParserItemTests already have one (Scan_All_WithDefaults) but a
second one won't hurt...)
2014-09-15 12:17:03 +02:00
Andreas Lauser
b72df6f406 make ParserItems always defaultable
i.e. remove the defaultSet() method and its friends. this is required
to be able to specify defaults in DATA items like grid properties or
saturation tables. e.g.

SGL
10*0.1 10* 10*0.2 /

would not be possible without this. If no meaningful default for an
item is defined, float and double items get NaN, int items get -1 and
string ones get an empty string. The hope is that if these values get
used in the simulation, they will make the result obviously
incorrect. (Whether a data point of an item was defaulted can be
queried using item->defaultApplied(index).)
2014-09-15 12:17:03 +02:00
Andreas Lauser
539c7a23ae make the defaults of an item settable per data point
instead of for the whole item...
2014-09-15 12:17:03 +02:00
Andreas Lauser
e6fa1e01a8 DeckItem: add indices to the methods which allow to query the defaulted status
also, this renames DeckItem::setInDeck() to DeckItem::wasSetInDeck()
because the former method can easily be confused with a setter method
(which it is not, it is a 'getter').

note that there is a small semantical difference now: the old
signatures specified the status of the whole *item* while the new
variants are specific for a single *data point* of an item. Though at
this point the index passed to the methods is still disregarded..
2014-09-15 12:17:03 +02:00
Andreas Lauser
09d9508c39 remove the 'ParserBoolItem.[ch]pp' files
they were empty and as far as I can see, Eclipse does not have the
concept of boolean items...
2014-09-15 12:17:03 +02:00
Joakim Hove
981d63e1ac Fixed dimension of Kh item to Permeability*Length 2014-09-09 14:11:37 +02:00
Andreas Lauser
76b8cc6e4f EclipseState: provide an accessor method for the unit system used by the deck
this is required to convert calculated quantities to the same units as
the ones used in the input deck.
2014-09-09 12:16:13 +02:00
Andreas Lauser
66139d9f07 fix compiler warnings and rename CF to ConnectionTransmissibilityFactor
for the compiler warnings, see e.g.

https://opm-project.org/CDash/viewBuildError.php?type=1&buildid=27777

the CF to ConnectionTransmissibilityFactor rename makes things much easier to
understand for people who are not intimately familiar with the wells
code.
2014-09-06 22:18:55 +02:00
Joakim Hove
152e07775a Merge pull request #294 from andlaus/GridProperties_first_int_then_double
first handle all integer properties, then all double ones
2014-09-05 14:42:22 +02:00
Joakim Hove
2b114b8b46 Removed explicit default value from two config items. 2014-09-05 12:31:57 +02:00
Andreas Lauser
09d149b0c7 Removed all trailing spaces from JSON 2014-09-05 11:01:44 +02:00
Andreas Lauser
b2570ef216 remove some keywords which are already covered by *_PROBE 2014-09-05 10:58:10 +02:00
Andreas Lauser
e73af3d182 REGION_PROBE: add more user defined keywords
these are not really documented, but they are used by the file
./INCLUDE/SUMMARY/extra.inc of the Norne deck. I don't know why this
did not bite anyone so far, probably people just commented out the
INCLUDE statement of this file...
2014-09-05 10:58:06 +02:00
Andreas Lauser
1f618ed546 add a PERFORMANCE_PROBE parser keyword
this contains all performance monitoring keywords like TCPU or PERFORMA
2014-09-05 10:57:59 +02:00
Joakim Hove
be32f91004 Changed Completion to use Value<double>. 2014-09-04 22:10:16 +02:00
Joakim Hove
f88fd65937 Implemented PINCH and MINPV as Value<double> 2014-09-04 22:10:16 +02:00
Joakim Hove
c08770c853 Added class Value<T>
The class Value<T> will keep track of a named variable, and whether that
particular value has been explicitly initialized. Will throw
std::logic_error if trying to use an unitialized value.
2014-09-04 22:10:09 +02:00
Joakim Hove
c1f42aee64 Moved OrderMap to EclipseState/Util 2014-09-04 14:09:33 +02:00
Joakim Hove
fedc3387fd Default: Added dataset from opm-core with test 2014-09-03 10:37:02 +02:00