Commit Graph

98 Commits

Author SHA1 Message Date
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
48e687a8ea set controlMode to RATE for WCONINJH 2014-09-19 16:51:02 +02:00
Xavier Raynaud
fe15d4a1d2 Added support for wconinjh 2014-09-19 14:58:37 +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
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
Joakim Hove
e120c161c4 Default: Changes for default applied. 2014-09-03 10:37:01 +02:00
Joakim Hove
61cdf7d402 Default: defaultApplied -> setInDeck()
The data values in a deck item can be in three different states, given
by the DeckValue enum in DeckItem.hpp. The three values are:

  SET_IN_DECK : The value has been set explictly in the deck.
  DEFAULT     : The value was not present in the input deck, but a default
                value has been supplied in the configuration and that value
                has been set.
  NOT_SET     : No value has been set for this item; it was not explicitly
                set in the deck and also not included in the configuration.

If you ask for DeckItem->value which is in state NOT_SET you will get an
exception. The method setInDeck() can be used to check if a value has
been set explicitly in the deck; the method defaultApplied() will check
if a default value has been applied.

Observe that the system for handling defaults is not really well suited
for multi valued data items, as it is only a scalar state variable. In
the case of multi valued data items both defaultApplied() and
setInDeck() might return true.
2014-09-03 10:37:01 +02:00
Andreas Lauser
b690d9add8 EclipseState: check the canonical section topology
at least if the "beStrict" parameter for the constructor is set to
true. by default nothing changes...
2014-08-26 12:29:17 +02:00
Atgeirr Flø Rasmussen
5aa037799a Update checkWELSPECSConsistency() method.
Now accounts for new refDepthDefaulted() method and semantics.
2014-08-07 17:00:22 +02:00
Atgeirr Flø Rasmussen
15ee739326 Change Well constructors to avoid explicit bool arg.
Suggested by Joakim Hove.
2014-08-07 16:59:40 +02:00
Atgeirr Flø Rasmussen
ad93424b6a Add refDepthDefaulted field to Well class. 2014-08-07 12:34:49 +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
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
03860714c8 fix build
from the error, it seems a bit like the well container was recently changed
from std::map to std::vector...
2014-05-16 12:36:13 +02:00
Kristian Flikka
82a38c1cc8 Merge pull request #208 from AtleH/wellnamewithwildcard
Added wildcard support in WCONINJE and WCONPROD
2014-05-16 12:28:39 +02:00
Atle Haugan
20380ca7c8 Changed name for (some) iterators in Schedule 2014-05-14 15:36:42 +02:00
Atle Haugan
0f4590a2f3 Removed obsolete include statements 2014-05-14 15:26:54 +02:00
Atle Haugan
47ef4ed0e6 Simplified implementation and (slightly) changed behaviour of Schedule::getWells(wellNamePattern)
Improved performance by checking for wildcard before entering the loop. Logic slightly changed since method now only supports wildcards at the end of the string.
2014-05-14 15:10:17 +02:00
Atle Haugan
344d02ad1c Add support for wildcard in WCONPROD and WCONINJE keywords. 2014-05-06 09:54:37 +02:00
Joakim Hove
142255268d Using OrderedMap to hold wells in Schedule object - thereby preserving
well insert order.
2014-05-02 17:02:10 +02:00
Atgeirr Flø Rasmussen
5a1c345e3f Add preferred phase to Well class.
This entails:
 - Adding a new data member of type Opm::Phase::PhaseEnum.
 - Adding method getPreferredPhase().
 - Adding extra constructor argument.
 - Modifying constructor call in Schedule::addWell().
 - Adding unit test for the new preferredPhase property.
 - Modifying constructor call in all the well unit tests.
2014-04-06 23:11:38 +02:00
Andreas Lauser
2a9111b9d2 Schedule: trim strings which are received from the deck
for SPE-9 only the well/group names contain spurious white space, but
I suppose that other decks also feature them in control modes, status,
etc. so it's probably a good idea to trim these as well...
2014-04-03 14:55:38 +02:00
Joakim Hove
5785d088ea Added functionality in Completion class to adjust I and J to wellHead value if they have been defaulted (i.e. have value -1). This is unfortunate because we loose quite a lot of const correctness. 2014-03-28 18:56:21 +01:00
atleh
ec22c39f5c Minor adjustments in Section[Tests], Schedule and KeywordContainerTests 2014-03-25 09:26:43 +01:00
Joakim Hove
f84ec0bb3f Made injection and production control variables into property variables. 2014-03-21 00:07:23 +01:00
Joakim Hove
011eb8a2c6 camelCased property attributes in the production and injection properties structures. 2014-03-20 23:27:18 +01:00
Atle Haugan
3daaf827c9 Renamed getXyzProperties to getXyzPropertiesCopy. Added new getXyzProperties which currently does not work... 2014-03-20 10:36:57 +01:00
Atle Haugan
af784c6734 Enabled the remaining tests. 2014-03-20 10:31:21 +01:00
Atle Haugan
7358ac5d5a Added addProductionControl() method to the WellProductionProperties struct. Same for WellInjectionProperties. 2014-03-20 10:19:20 +01:00
Atle Haugan
87599c9841 Moved has/drop/addProductionControl to WellProductionProperties. The same for WellInjectionProperties. 2014-03-20 10:11:56 +01:00
Atle Haugan
fb5c83086a Moved (duplicated) m_isInPredictionMode to WellProductionProperties and WellInjectionProperties. 2014-03-19 10:51:13 +01:00
Atle Haugan
d9772b83eb Removed unused Well::m_injectionControls, moved m_injectorType to WellInjectionProperties. 2014-03-19 10:42:22 +01:00
Atle Haugan
9c64af0b6b Moved BHPLimits and THPLimits to WellProductionProperties and WellInjectionProperties (duplicated). Several unit tests are still commented out - will fix. 2014-03-19 10:42:21 +01:00
Atle Haugan
8aee879dc5 Added WellInjectionProperties, modified Well class to use it 2014-03-19 10:40:07 +01:00
Atle Haugan
df40a0aa21 Replaced single-item calls with call to get/setProductionProperties() 2014-03-19 10:13:58 +01:00
Atle Haugan
9650fce19a Using pointers for WellProductionProperties 2014-03-19 10:13:58 +01:00
Joakim Hove
8598fa279e Added throw() in Schedule if trying to control well on an item which has been defaulted. 2014-03-03 15:06:26 +01:00
Joakim Hove
7dc8767c80 Made sure that groups were added when reading the GRUPTREE keyword. 2014-03-03 15:06:26 +01:00
Joakim Hove
ceb4a8df8d Added check on Well->status before reading controlmode. 2014-03-03 15:06:25 +01:00
Joakim Hove
1907a8e467 Merge pull request #129 from andlaus/refactor_timemap
Refactor timemap
2014-02-26 23:09:50 +01:00
Andreas Lauser
18eb2fd8f4 TimeMap: replace boost::gregorian::date by boost::posix_time::ptime
this is necessary because boost::gregorian::date does not have a
notion of "time during a day" which is required to specify time step
lengths less than a day...
2014-02-21 17:06:21 +01:00
Kristian Flikka
b3dc1ea5ca Added rest of WGRUPCON handlingin Well and Schedule 2014-02-21 12:48:36 +01:00
Kristian Flikka
b69f41f32d Added support for guide rate 2014-02-19 15:43:42 +01:00