Commit Graph

177 Commits

Author SHA1 Message Date
Jørgen Kvalsvik
50c1bbdc85 Fixes includes wrt opm-parser PR-656
Several files stopped compiling due to relying on opm-parser headers
doing includes. From opm-parser PR-656
https://github.com/OPM/opm-parser/pull/656 this assumption is no longer
valid.
2016-01-21 09:42:51 +01:00
Markus Blatt
3e8381be20 Renamed well_index to well_index_on_proc and added comment.
This should prevent misunderstandings about what the
well_index_on_proc is. It is not the well_index according to
the eclipse state (on open wells count) but the index of the
wells that are stored on this process' domain.
2015-10-28 13:09:12 +01:00
Markus Blatt
4bfc921957 Fix grammar and spelling in warning. 2015-10-27 14:26:01 +01:00
Markus Blatt
02df6dd963 Fixes well manager for wells crossing into cells that overlap.
In the parallel run there are cases where wells perforate cells
that are neighbors of overlap/halo cells. On other process only
parts of the well are seen as perforations. These wells should be
ignored there. While the well was indeed ignored, the perforations
found where mistakenly added to the well found due not clearing the
wellperf_data[well_index]. This commit now does this clearing and
results in the right handling of wells for e.g. SPE9.
2015-10-27 14:02:26 +01:00
Atgeirr Flø Rasmussen
10b4d6c6f7 Merge pull request #897 from totto82/crossflow
Add boolean flag to determine whether crossflow is allowed in a well
2015-10-14 09:36:27 +02:00
Andreas Lauser
d41f989a78 use the error macros from opm-common 2015-10-08 11:42:15 +02:00
Tor Harald Sandve
da44c2cfd6 Set wd.allowCrossFlow directly 2015-10-07 12:50:00 +02:00
Tor Harald Sandve
cf35ecbb05 Avoid using bool in the c code 2015-10-07 12:49:05 +02:00
Tor Harald Sandve
40ec39fa71 Add boolean flag to determine whether crossflow is allowed in a well
This PR adds allow_cf to the wells structure that determine whether
crossflow is allowed or not. An extra argument is added to addWell(..)
to specify the allow_cf flag.
2015-10-06 15:54:20 +02:00
Atgeirr Flø Rasmussen
061b283a03 Merge pull request #888 from totto82/avoid_throw_wellManager
WARN instead of THROW if completion is not found in the grid
2015-09-28 10:02:06 +02:00
Markus Blatt
e2e9ea1bf5 Prevent WellsManager from subscripting empty container.
While hopefully not a bug it raises an exception with gcc's
libc debugging mode. Therefore we resort to using C++11's
std::vector::data instead.

The exception was rosen when running SPE9 in parallel.
2015-09-23 09:28:59 +02:00
Tor Harald Sandve
fb127aeb9a WARN instead of THROW if completion is not found in the grid
Completions that are not found in the grid are ignored.
2015-09-22 13:51:06 +02:00
Atgeirr Flø Rasmussen
99d3ca24bb Use compressedToCartesian() to avoid possible null reference. 2015-09-15 14:23:10 +02:00
Tor Harald Sandve
8d9bdb8d47 Use cell thickness from EclipseGrid in well transmissibility
calculations

The dz calculated in WellDetails::getCubeDim is not correct in cases
where the face centroid of the horizontal faces is located above or
below the face centroid or the vertical faces. The cell thickness in
EclipseGrid, calculated using the Z-coordinates, is therefore used
instead.
2015-09-15 10:50:56 +02:00
Markus Blatt
af2f3a0a90 Allow a few well completions in the overlap.
If on one process a well completion is next to border then
it might also be stored in the neighbor process. Still not
all the completions of the well are known to the neighbor.
This breaks the previous assumption that for each well all
completions must belong to the partition of the process.

Therefore with this commit we allow wells that only have a
part of their completions assigned to the partition of the process.
This wells are deactivated under the assumption that they must
exist completely on another process due to the partitioning.
2015-09-08 20:38:02 +02:00
Markus Blatt
602310541e Make code clearer with and if-else-if statements and spaces. 2015-09-08 10:48:55 +02:00
Markus Blatt
50eab88274 Improve code comments. 2015-09-08 10:48:14 +02:00
Markus Blatt
8b11b7069f Make last commit compile 2015-09-08 09:30:16 +02:00
Markus Blatt
4fc36e58fb [bugfix] Account for shut completions when checking well in a parallel run.
Previously well with just some shut completions errorneously triggered an
exception in parallel runs. This is fixed with this commit.

Due to the logic shut completions will always be marked as existing
on a process. (Initially all completions are marked as found. For
each open completion we check whether the cartesian index belongs to
the local grid. If that is not the case we mark it as not found).
Therefore we now check whether the found number of completions
is either the number of shut completions or the number of all completions.
In the former case the well is not stored on this process, and in the latter
case it is. In other cases we throw an exception.
2015-09-07 16:55:08 +02:00
Markus Blatt
4102846873 Fix complaint about initial declaration in foor loop.
gcc-4.7.2 (Debian 4.7.2-5) complained about:
"‘for’ loop initial declarations are only allowed in C99 mode
note: use option -std=c99 or -std=gnu99 to compile your code"
when seeing a loop like
for(int i=0; i<end; ++i)

This is fixed by moving the declaration before the for loop with
this commit. Altenatively, we could use the above option.
2015-09-03 14:03:25 +02:00
babrodtk
9458fcc498 Fixed several compiler warnings 2015-08-19 13:12:14 +02:00
babrodtk
a002781998 Bugfix with THP for injection wells 2015-08-19 13:12:14 +02:00
babrodtk
ede4945282 Removed superfluous line 2015-08-19 13:12:14 +02:00
babrodtk
a743efe819 Refactoring 2015-08-19 13:12:14 +02:00
babrodtk
83f6b02941 More integration of VFP tables 2015-08-19 13:10:48 +02:00
babrodtk
f320b04c4d Initial integration of VFP 2015-08-19 13:10:48 +02:00
Atgeirr Flø Rasmussen
24f91aa248 Use the correct (new) method from the Group class for group RESV.
Production controls now are no longer initialised from injection control data.
2015-08-13 10:21:24 +02:00
Fredrik Gundersen
13f30e294a Added support for WPIMULT 2015-06-02 13:24:37 +02:00
Markus Blatt
3aa869cfa0 Removes well debugging output. 2015-05-27 09:22:54 +02:00
Markus Blatt
63d8d5e781 [bugfix,parallel] Deactivate non-existing wells in manager.
Previously, we used the setStatus method to set wells that do not
exist on the local grid to SHUT. Or at least this is what I thought
that ```well.setStatus(timestep, SHUT)```. Unfortunately, my
assumption was wrong. This was revealed while testing a parallel run
with SPE9 that threw an expeption about "Elements must be added in
weakly increasing order" in Opm::DynamicState::add(int, T). Seems like
the method name is a bit misleading.

As it turns out the WellManager has its own complete list of active
wells (shut wells are simply left out). Therefore we can use this
behaviour to our advantage: With this commit we not only exclude shut
wells from the list, but also the ones that do not exist on the local
grid. We even get rid of an ugly const_cast.

Currently, I have running a parallel SPE9 test that has not yet
aborted.
2015-05-26 21:01:16 +02:00
Markus Blatt
1a7ab6b81c Get rid of unclear continue; statement in favor of if-else 2015-05-12 15:30:20 +02:00
Markus Blatt
9514b8c89a Switched from default constructing to explicit construction with false. 2015-05-08 19:44:50 +02:00
Markus Blatt
2b4ebb94cc Adds possibility of having a well not stored on a grid partitioning.
In a parallel run each process only knows a part of the grid. Nevertheless
it does hold the complete well information. To resolve this the WellsManager
must be able to handle this case.

With this commit its constructor gets a flag indicating whether this is
a parallel run. If it is, then it does not throw if a well has cells that
are not present on the local part of the grid. Nevertheless it will check
that either all or none of the cells of a well are stored in the local part
of the grid.

Wells with no perforated cells on the local will still be present but set to SHUT.
2015-05-08 16:35:00 +02:00
Atgeirr Flø Rasmussen
529662ca1a Complete function argument cleanup. 2015-02-17 13:56:02 +01:00
Atgeirr Flø Rasmussen
a38bdaf4c3 Remove unused argument from several functions. 2015-02-17 10:28:11 +01:00
Atgeirr Flø Rasmussen
fb983a44b1 Add default producer BHP control when not given in deck.
Default limit is 1 atm.
2015-02-04 10:30:15 +01:00
Joakim Hove
f27f75b0b9 Use Value<double> for Connection Factor 2015-02-03 13:10:38 +01:00
Joakim Hove
d2dab23d60 Using Parser to calculate well reference depth. 2015-01-26 12:03:11 +01:00
Joakim Hove
c2f9390d95 Wellsmanager will check completion status
With this commit the WellsManager will check the status of completions
before adding them to the internal struct wells
datastructure. Completions can be in the four states:

  OPEN, SHUT, AUTO, POPN

Completions with state == SHUT will be ignored, wheras the wellsmanager
will throw  if the states AUTO or POPN are encountered. The WELOPEN
keyword can also have the value 'STOP'; for completions that is
translated to 'SHUT' by Schedule object.
2015-01-12 12:43:45 +01:00
Joakim Hove
80423a0188 Pure white-space change 2015-01-12 12:43:44 +01:00
Joakim Hove
b9e7c88314 Added missing enum rename 2015-01-12 12:41:56 +01:00
Joakim Hove
a0d41dc130 Added WellCompletion namespace 2015-01-12 12:10:51 +01:00
Tor Harald Sandve
880026e893 Fix comments. 2015-01-09 09:10:10 +01:00
Tor Harald Sandve
82eafbb510 Renaming well is shut to well is stopped.
Rename the the meaning for shut as whats used in Eclipse.
STOP: Well stopped off above the formation. I.e. allow for flow in the
well.
SHUT: Well completely isolated from the formation. The well is removed
from the well list.
2015-01-09 09:10:10 +01:00
Tor Harald Sandve
b8bf45d24d Support stopped wells
The given control is applied to the stopped well, and the status is set
to not open. (i.e closed, but currently named shut)
2015-01-09 09:10:10 +01:00
Markus Blatt
f763192a32 [cleanup] Removes a superfluous if-check of the well state.
There were to identical if statements and the second one was followed
by an else branch. While in this case (if statement just throws) it is not
a bug, this commit cleans up one of the if statements.
2014-11-20 14:47:21 +01:00
Markus Blatt
529d0887a3 Fixes missing return value in non-void function of WellsManager.
gcc warned about the following

/home/mblatt/src/dune/opm/opm-core/opm/core/wells/WellsManager.cpp: In function ‘std::array<long unsigned int, 3ul> WellsManagerDetail::directionIndices(Opm::CompletionDirection::DirectionEnum)’:
/home/mblatt/src/dune/opm/opm-core/opm/core/wells/WellsManager.cpp:191: warning: control reaches end of non-void function

To calm it I introduced a throw clause after the switch statements. Thus adding a new
enum value will raise a warning on smart compilers, hopefully.
2014-11-20 11:53:23 +01:00
Tor Harald Sandve
3fe61bfb1b BUGFIX. Do not increase well index for shut wells.
Shut wells are not added to the well list and the well index should
therefore not be increased when well control is set. This is similar to
whats is done for shut wells in createWellsFromSpecs.
2014-10-27 07:20:03 +01:00
Tor Harald Sandve
4585446e5a Fix SHUT wells
Shut wells are not added to the well list and thus not considered in the
simulator.

The shut well test in test_wellsmanager is modified to assert this
behaviour.

BUG: This change provokes an assert in the EclipeWriter as number of
wells in wellstate is different from number of wells in the schedule.
2014-10-24 06:57:38 +02:00
Joakim Hove
642c5309c9 Minor whitespace fixup 2014-10-17 08:05:13 +02:00