Commit Graph

1280 Commits

Author SHA1 Message Date
Joakim Hove
1669138bf6 Added missing EDIT keyword to testdata. 2014-07-08 17:16:02 +02:00
Bård Skaflestad
92c179f4d3 Prediction mode: Support GRUP control
If a well is available for group control, we should add that control
mode to its Injection or ProductionProperties before assigning a new
current (active) control mode to the well ('.controlMode').

Suggested by: [at] joakim-hove.
2014-07-08 13:22:46 +02:00
Bård Skaflestad
ef5a9e8e1a Refactor WellProductionProperties manipulation code
This commit splits the creation of WellProductionProperties objects,
and especially the ad-hoc helper functions historyProperties()
and predictionProperties() out to a separate module,
WellProductionProperties.[hc]pp.  Creating the properties object
from a DeckRecordConstPtr is deferred to two named constructors,

    WellProductionProperties::history() and
    WellProductionProperties::prediction()

that, respectively, assume the roles of historyProperties() and
predictionProperties().  Reimplement handleWCONProducer() in terms
of these named constructors and remove the producerProperties()
helper whose task, inspecting the status and retrieving/setting the
CMODE if not SHUT, can be assumed by handleWCONProducer().

Add a simple test module, WellPropertiesTest.cpp, to enforce the
rather peculiar semantics of the WCONHIST keyword.  Control modes
{O,W,G}RAT, LRAT, and RESV are *always* (unconditionally) supported
in WCONHIST but there is no control mode switching.  The latter is
deferred to client code, depending on the '.predictionMode' flag.

Suggested by: [at] joakim-hove
2014-07-08 13:22:46 +02:00
Bård Skaflestad
93c133a7b8 historyProperties(): Extract BHP limit if not defaulted
This fixes a programming error introduced in the refactoring of
Schedule::handleWCONProducer() (commit 3889e92).  When there is a BHP
limit in WCONHIST, we obviously need the value specified in the input
deck.  The refactoring led to the limit being extracted only in the
prediction mode.

Pointy hat: [at] bska
2014-07-08 13:22:46 +02:00
Bård Skaflestad
e23659b286 historyProperties(): Add note on numerically zero defaults
This is a hint to a future maintainers that the subsequent control
modes are unconditionally supported.
2014-07-08 13:22:46 +02:00
Bård Skaflestad
07c7b59702 Rename helper: matchingProperties() -> historyProperties()
This more clearly reflects its actual purpose.

Suggested by: [at] joakim-hove
2014-07-08 13:22:45 +02:00
Bård Skaflestad
1111f87aa7 *Properties(): Rename control mode (enum) variable
Four characters (cmod) is less readable than "cmode".

Suggested by: [at] joakim-hove
2014-07-08 13:22:45 +02:00
Bård Skaflestad
cb3a196446 *Properties(): Switch to vector<string> for control modes
Update mode iteration accordingly.

Suggested by: [at]joakim-hove
2014-07-08 13:22:45 +02:00
Bård Skaflestad
1d34629cc2 Disable WCONHIST/GRAT non-existence test
Keyword WCONHIST always supports GRAT control mode, even when
defaulted.  The default value (zero) might not be very useful in a
simulation case but it's supported nonetheless.
2014-07-08 13:22:45 +02:00
Bård Skaflestad
3242976bf1 Refine semantics of WCONHIST implementation
This commit splits Schedule::handleWCONProducer() into those parts
that are specific to the individual keywords (WCONHIST/matching and
WCONPROD/prediction) and those that are common to both.

In particular we introduce two new helper functions

    matchingProperties() and predictionProperties()

of which the first constructs a WellProductionProperties object
specific to matching semantics and the latter constructs a similar
object specifc to prediction.  In the case of WCONHIST, the well
always supports component rates at surface conditions ({O,W,G}RAT)
as well as liquid rate (LRAT) and (total) reservoir volume rate
(RESV).  The prediction mode keeps the existing semantics of not
supporting control modes for which the values have been defaulted.

The final helper, function producerProperties(), dispatches to
matchingProperties() or predictionProperties() depending on
handleWCONProducer()'s 'isPredictionMode' flag and handles the
record properties that are common to both WCONHIST and WCONPROD,
including whether or not to assign a new active control mode.

The end result is that handleWCONProducer() becomes a loop of
keyword data records that

  1) Determines the wells affected by a given record
  2) Determines whether or not the wells are OPEN
  3) Computes control mode properties (producerProperties())
  4) Assigns status and those properties to all affected wells

This approach reorders the well loop compared to the previous
implementation which computed separate WellProductionProperties for
each well.
2014-07-08 13:22:45 +02:00
Andreas Lauser
3dac72d821 use extended regular expressions in the test for std::regex
for some compilers (e.g., GCC < 4.9) the default is buggy and
opm-parser thus uses extended expressions...

thanks to [at]bska for digging this up!
2014-07-08 13:01:20 +02:00
Kristian Flikka
e8310ffbca Changed from if to ifdef, to clarify the actual functionality 2014-07-08 12:49:12 +02:00
Andreas Lauser
1a72cade01 use std::regex if it is available
it turns out that boost::regex does not work for the libstdc++ debug
mode. This patch should fix this for sufficiently new compilers.

Note that this requires the FindCXX11Features.cmake tests pulled in
from opm-core and an additional compiler flag...
2014-07-07 17:50:46 +02:00
Andreas Lauser
f754bd9c45 fix some screw-up with internal vs deck names
Parser::hasKeyword() was called with deckNames but looked up the map
for internal names. This patch renames the method to hasDeckName(),
renames Parser::getKeyword() to Parser::getKeywordFromDeckName() and
adapts/extends the tests.
2014-07-01 17:07:43 +02:00
Andreas Lauser
e2eca64f59 fix boost::regex usage
turns out that boost::regex("foo") should be used instead of
boost::regex::basic_regex
2014-07-01 10:21:08 +02:00
Andreas Lauser
f6689d838e make ParserKeyword::matches only return true if the deck keyword name is valid 2014-06-29 14:32:06 +02:00
Andreas Lauser
fe638c2fc8 separate the internal keyword names and the deck names more clearly
so far, these two concepts were partially mingled in Opm::Parser...
2014-06-29 14:32:06 +02:00
Andreas Lauser
09c5a24473 add GROUP_PROBE 2014-06-29 14:32:06 +02:00
Andreas Lauser
d4409dbae0 add BLOCK_PROBE 2014-06-29 14:32:06 +02:00
Andreas Lauser
268d91192d add CONNECTION_PROBE 2014-06-29 14:32:06 +02:00
Andreas Lauser
936bed6804 add REGION_PROBE
which represents the approximately 500 thousand keywords to specify
the quantities the simulator is supposed to dump into the summary
section.
2014-06-29 14:32:06 +02:00
Andreas Lauser
62b8078e81 add FIELD_PROBE
i.e., the about a million keywords for which specify the field values
in the summary output.
2014-06-29 14:32:06 +02:00
Andreas Lauser
9d9b977d43 update the WELL_PROBE keywords 2014-06-29 14:32:06 +02:00
Andreas Lauser
49b48662ef change the TVDP keywords to use regular expressions instead of wildcards 2014-06-29 14:32:06 +02:00
Andreas Lauser
ac039598bc fix typo
the JSON name of DEPTH keyword was "DEPTHZ". since "DEPTH" is an
E100 keyword, this is most likely a mistake...
2014-06-29 14:32:06 +02:00
Andreas Lauser
fee11596f8 allow underscores in deck names and disallow sharps
underscores are used by a few of the summary specifier keywords
(e.g. BPR_X), but after closer inspection '#' symbols are not.
2014-06-29 14:32:06 +02:00
Andreas Lauser
96904b00f4 allow keywords to match regular expressions as their deck name
the RE used is specified via the "deck_name_regex" in the JSON file of
the respective keyword. A deck name is assumed to match a given parser
internal keyword if the deck name is valid and if it is either in the
list specified by the "deck_names" entry or if it matches the regular
expression.

This functionality is useful to implement the well probes for the
tracers as well as replacing the current "wild card keyword"
implementation which only allows a star as a suffix.
2014-06-29 14:32:06 +02:00
Andreas Lauser
ed4a1d3e09 add the boost::regex library as a prerequisite
this is required for regex-matching keywords. Once GCC 4.9 is the
minimum compiler version to be supported, this can be dropped in favor
of std::regex ...
2014-06-29 13:40:09 +02:00
Andreas Lauser
480e17e5b6 syncronize Findopm-parser.cmake with the opm-core version
the ERT libraries and headers were missing and a few other minor
cleanups. see https://github.com/OPM/opm-core/pull/601 for details.
2014-06-27 10:55:08 +02:00
Andreas Lauser
96ba492cf7 fix build
*grr* spurious comma! Though I'm wondering a bit why it compiled on my
 machine yesterday...
2014-06-26 11:18:22 +02:00
Kristian Flikka
81dbacc4e1 Changed from semicolon to comma, to fix compilation failure 2014-06-26 10:10:19 +02:00
Joakim Hove
6d88a8dabe Added SWATINIT as supported grid property. 2014-06-25 18:26:31 +02:00
Joakim Hove
93c5ac23f2 Typo in install target 2014-06-25 12:37:41 +02:00
Joakim Hove
c9f5e4682e Fixed trivial typo. 2014-06-25 12:22:25 +02:00
Joakim Hove
390f996f49 Merge pull request #245 from andlaus/add_ntg_gridproperty
grid properties: add support for the NTG keyword
2014-06-25 12:09:03 +02:00
Joakim Hove
09f928d52b Merge pull request #244 from joakim-hove/TransMultContainer
Trans mult container
2014-06-25 12:02:24 +02:00
Joakim Hove
59e6215967 Added TransMult object to EclipseState 2014-06-25 12:01:18 +02:00
Joakim Hove
a0ab4d4ecb Added transMult container - which only returns 1.0 2014-06-25 12:01:07 +02:00
Joakim Hove
afc83767d7 Added new enum to enumerate the different face directions. 2014-06-25 11:58:22 +02:00
Andreas Lauser
1a2bacf5d0 grid properties: add support for the NTG keyword
Whoever came up with that keyword deserves a spanking because its
semantics are adapting thickness of the grid layers using the rock
properties without modifying the grid (and thus the output is not
showing what is actually used). As I understood that whole affair,
this is also done incorrectly, because the flow is not distorted in
depth direction but this the permeability should be divided by the NTG
values as the fluids seep through the thinner layers more quickly...

Anyway, we have to implement it, so here we go.
2014-06-25 10:23:24 +02:00
Joakim Hove
e732564fb4 Merge pull request #242 from andlaus/deck_keyword_lists
Implement deck keyword lists
2014-06-20 13:54:30 +02:00
Andreas Lauser
7a015fcb76 use deck keyword name list for the well output specifier keywords 2014-06-13 13:54:24 +02:00
Andreas Lauser
7edad38fb2 avoid illegal internal names in the MULT keywords
before this, the variants with the trailing minus were just silently
ignored, and even if they were not, the code generator would have
produced illegal code, because the keyword name is used for a C++
variable there, i.e. the names needed to be valid names in the C++
sense. "Happily", these the former bug canceled the latter, so the
build went through...

now, there is only one internal keyword called "MULT_XYZ" which
matches on all possible variants which are allowed in a deck. The
mechanism used is a deck name list...
2014-06-13 13:17:03 +02:00
Andreas Lauser
5f949c11c3 add support for parser keywords specifying to multiple deck keywords
Say hello to the complete set of well, region, field and group output
specifiers soon...
2014-06-13 13:17:03 +02:00
Joakim Hove
a2d9d45da6 Added Parser test of deck with TOPS keyword. 2014-06-11 16:42:37 +02:00
Joakim Hove
5a13369b6d Added EclipseGrid::getCellVolume() and getCellCenter() 2014-06-11 16:42:37 +02:00
Joakim Hove
db2cbf9e87 Fixed bug in extending TOPS vector. 2014-06-11 16:42:36 +02:00
Andreas Lauser
d820a4d435 change construction of ParserKeyword objects to the factory paradigm
this makes it more explicit what the object is supposed to represent.
2014-06-11 15:08:58 +02:00
Andreas Lauser
b449a783f9 property operators: add quite a few additional keywords
These are all keywords which are used by the Norne deck within some
property modifiers plus all variants of these. (sans the variants for
radial grids which are completely pointless IMO.) The chances that
keywords which have not been added yet can also be used are very close
to 100%, though.

Note that the default values for these keywords are currently
incorrect as the Eclipse RM states that the values must be looked up
in their corresponding table if the keyword is left unspecified (see
e.g. the documentation SWU). This probably means that we need to
implement "ghosty" keywords which magically appear if they have not
been explicitly specified or maybe we should only provide them in
EclipseState to be able to do the context dependent table look-up
"vodoo"...
2014-06-10 12:21:14 +02:00
Andreas Lauser
71a0adf016 add some missing transmissibility multiplier keywords
and add a dimension to MULTZ
2014-06-10 12:19:22 +02:00