Commit Graph

2028 Commits

Author SHA1 Message Date
Tor Harald Sandve
e44b045260 Remove fix for GOC and WOC above/below reservoir 2014-09-02 14:49:09 +02:00
Bård Skaflestad
7f874c0d64 effectiveExtent: Fix out-of-bounds indexing
Commit 96cf137 introduced support for Peaceman index calculation
that honoured general completion directions (X,Y,Z).  This was
accomplished through a permutation index that reordered the
permeability and geometric extent components according to a local
coordinate system along the completion.

In a complete breakdown of logic, however, the d-component extent
vector was indexed as though it were a d-by-d matrix.  This commit
restores sanity to the processing.

Pointy hat: @bska.
2014-09-01 13:30:32 +02:00
Atgeirr Flø Rasmussen
c55a887904 Use double braces for std::array init to avoid warning.
Warning triggered at least using clang.
2014-09-01 10:09:27 +02:00
Bård Skaflestad
96cf137e4c WellsManager: Support NTG and horizontal completions
This commit extends the feature set of the WellsManager to support
horizontal ("X" and "Y") completions and include the net-to-gross
ratio in the Peaceman index ("Completion Transmissibility Factor,
CTF") of a well completion.  The NTG factor is included if present
in the input deck represented by the "eclipseState".

There are two separate, though related, parts to this commit.  The
first part splits the calculation of Peaceman's "effective radius"
out to a separate utility function, effectiveRadius(), and
generalises WellsManagerDetail::computeWellIndex() to account for
arbitrary directions and NTG factors.  The second part uses
GridPropertyAccess::Compressed<> to extract the NTG vector from the
input if present while providing a fall-back value of 1.0 if no such
vector is available.

Note: We may wish to make the extraction policy configurable at some
point in the future.
2014-08-31 21:24:37 +02:00
Bård Skaflestad
8adeb5f56c Annotate namespace closing brace with namespace name 2014-08-29 12:31:35 +02:00
Bård Skaflestad
c3375da14f Adjust white-space for readability
This is mostly just splitting long lines and aligning parameters where
appropriate.  No functional changes.
2014-08-29 12:22:26 +02:00
Bård Skaflestad
b35362f1e9 createWellsFromSpecs: Assert three space dimensions
Method WellsManager::createWellsFromSpecs() is only supported in
three space dimensions.  Assert that we don't use anything else.
2014-08-29 12:18:59 +02:00
Bård Skaflestad
fda49df8a8 createWellsFromSpecs: Use ref-to-const cart2active
This commit tightens the function header of method

    WellsManager::createWellsFromSpecs()

to accept a reference-to-const 'cartesian_to_compressed' map.  It
used to be a complete, copy-constructed object, so this is a slight
performance enhancement as we no longer need to copy a (somewhat)
large object on every call to the method.
2014-08-29 12:13:38 +02:00
Bård Skaflestad
97a8ee630e getCubeDim: Support arbitrary number of dimensions
This commit generalises the implementation of utility function
'getCubeDim' to support arbitrary number of space dimensions.  In
actual practice there's no change in features as we only really use
a compile-time constant (= 3) to specify the number of space
dimensions.
2014-08-29 11:39:24 +02:00
Bård Skaflestad
7933d87605 Merge pull request #638 from totto82/fix_GOC_below
Currectly handling GOC below and WOC above the reservoir
2014-08-29 09:27:56 +02:00
Bård Skaflestad
1a3f7b230f Merge pull request #639 from atgeirr/threshold-pressure
Threshold pressure function
2014-08-29 09:13:27 +02:00
Bård Skaflestad
9784df8024 Merge pull request #641 from atgeirr/fix-warnings
Fix warnings
2014-08-28 16:11:12 +02:00
Atgeirr Flø Rasmussen
e1be710526 Suppress unused argument warning.
The eclState argument was added in PR#634, and may be needed later.
Until then, this silences the warning generated.
2014-08-28 14:14:22 +02:00
Atgeirr Flø Rasmussen
5059f66bad Squash warnings by removing or commenting out unused parameters. 2014-08-28 14:14:22 +02:00
Bård Skaflestad
59205f2e65 Add missing 'not' in documentation. 2014-08-28 10:20:07 +02:00
Bård Skaflestad
7f875a6c34 Use correct name in name-space closing comment
Pointed out by [at] atgeirr.
2014-08-28 10:14:55 +02:00
Bård Skaflestad
f22bd0c208 Fix class reference in documentation
CompressedAccess<> was the former name of class template Compressed<>.
2014-08-27 22:55:15 +02:00
Bård Skaflestad
58f55f3c90 Reimplement assign* in terms of Compressed<>
This is a demonstration of using the

    GridPropertyAccess::Compressed<>

class template.  We save (some) memory by not creating the zero
fall-back vector in assignPermeability(), preferring instead to use
the fall-back/default mechanism of ArrayPolicy::ExtractFromDeck<>.

While here, adjust vector<PermComponent>::reserve() capacity to
reflect actual requirements.
2014-08-27 21:19:41 +02:00
Bård Skaflestad
37dfc4a3b5 Add facility for accessing active subset of global data array
This commit introduces a fairly general mechanism for accessing the
active subset of a global grid (property) array.  Essentially, this
takes on the role of translating the active cell index through the
"global_cell" mapping when accessing, e.g., the net-to-gross data
value.

The primary component is class template

    Opm::GridPropertyAccess::Compressed<DataArray,Tag>

which implements a read-only

    value_type operator[](const int c)

that encapsulates and performs the compressed-to-global cell index
translation.  Template parameter "DataArray" is intended as a policy
parameter that for instance wraps access to a "GridProperty<T>" from
module opm-parser (with a fall-back default value if the data is not
specified on input).  The "Tag" parameter is a provision for type
safety--e.g., to prevent passing a region ID into a function that
requires a porosity value.
2014-08-27 21:19:41 +02:00
Bård Skaflestad
7f07964e0c assignPermeability: Remark on storage order
Clients expect column-major (Fortran) ordering of the contiguous
"permeability_" array so that's what we create despite "tensor"
being row-major.

Suggested by: [at] atgeirr
2014-08-27 21:19:40 +02:00
Bård Skaflestad
008702817d Merge pull request #637 from atgeirr/add-minpv
Add MINPV processing to GridManager
2014-08-27 19:34:34 +02:00
Atgeirr Flø Rasmussen
e1ea795cdc Fix minor typo in comment. 2014-08-27 18:13:15 +02:00
Atgeirr Flø Rasmussen
5604745642 New free function thresholdPressures(). 2014-08-27 18:07:46 +02:00
Atgeirr Flø Rasmussen
5e940faa8b Use syntax for std::array which works with GCC 4.4. 2014-08-27 16:00:57 +02:00
Tor Harald Sandve
37e526a046 Fix sign error in the specified oil pressures at at WOC and GOC
The oil pressure at the contact for the special cases:

contact	location	po(contact)
GOC 	above 	-inf
GOC 	below 	+inf
WOC 	above 	-inf
WOC 	below 	+inf
2014-08-27 14:35:01 +02:00
Atgeirr Flø Rasmussen
ce4168df27 Refactor set/getCellCorn() with private method.
Also const-ify everything that can be const.
2014-08-27 13:17:28 +02:00
Atgeirr Flø Rasmussen
0f02dba2d4 Correct doc error (zcorn is also output argument). 2014-08-27 11:15:00 +02:00
Atgeirr Flø Rasmussen
7ca1922c77 Remove unneeded const_cast. 2014-08-27 11:13:37 +02:00
Tor Harald Sandve
704e7dbb58 Currectly handling GOC below and WOC above the reservoir The phase pressure of water and gas is set to inf when WOC and GOC is above and below the reservoir. This make sure the minimum saturation values are picked for these cases. 2014-08-27 10:10:55 +02:00
Bård Skaflestad
bcec9fd0f6 Simplify diagonal component thresholding
This commit switches the assignment

    diagonal = max(diagonal, minval)

to using a reference in the "diagonal" expression.  This guarantees
that the indexing is done once which eases maintainability.  While
here, replace the hard-coded dimension stride ('3') with the current
run-time dimension.  This is mostly for symmetry because the overall
code is only really supported in three space dimension.
2014-08-26 23:50:05 +02:00
Bård Skaflestad
2ae64c1df2 Remove obsolete comment
This comment was needed when the code was first developed, but
subsequent development has rendered it obsolete.  Remove it to avoid
confusion.
2014-08-26 23:50:05 +02:00
Bård Skaflestad
194b6eda7a Fix semantics of permeability assignment
Calling code relies on permeability tensors being stored in column
major order (row index cycling the most rapidly).  Honour that
requirement.  The previous assignment implied row major ordering
(column index cycling the most rapidly).  This, however, is a
pedantic rather than visible change because the surrounding code
enforces symmetric tensors whence both orderings produce the same
results when the array is viewed contiguously.
2014-08-26 23:50:04 +02:00
Atgeirr Flø Rasmussen
6297fb7991 Merge pull request #630 from totto82/fix_init_spe9
The water/gas press. are calculated only if woc/goc is within the reservoar
2014-08-26 22:27:11 +02:00
Atgeirr Flø Rasmussen
4279170284 Change loop order. 2014-08-26 22:10:31 +02:00
Atgeirr Flø Rasmussen
37604618ec Documented MinpvProcessor. 2014-08-25 15:39:33 +02:00
Atgeirr Flø Rasmussen
4ad160d2de Add new constructor, that can handle MINPV processing. 2014-08-25 15:20:41 +02:00
Atgeirr Flø Rasmussen
f74a0bb3e6 New class MinpvProcessor, and test. 2014-08-25 15:20:01 +02:00
Bård Skaflestad
492b64faac CornerpointChopper::writeGrdecl(): Increase vector precision
This commit increases the precision of the (floating-point) vector
output (e.g., permeabilities) from method writeGrdecl().  This
reduces the impact of rounding errors when the sub-set sample is
output to disk for subsequent processing (e.g., property upscaling).
2014-08-25 14:01:03 +02:00
Bård Skaflestad
71596fe8a3 CornerpointChopper::writeGrdecl(): Write fewer items per line
This is in preparation of increasing the vector output precision to
reduce the impact of rounding errors in subsequent upscaling.  The
change impacts floating-point vectors only.

Background: The ECL simulator stipulates an upper bound on the
number of characters in a record (i.e., one line) and while we don't
have such limits, there's no reason to emit lines that can't be
input by other tools.
2014-08-25 14:01:03 +02:00
Bård Skaflestad
d3d38d2d6f Merge pull request #634 from osae/satFunc-eclState
Provide eclipse state to saturation property init.
2014-08-25 13:55:44 +02:00
osae
96823e04a3 Provide eclipse state to saturation property init. 2014-08-22 15:36:07 +02:00
Atgeirr Flø Rasmussen
cfd07600bc Create pointer-to-const objects.
Older gcc (4.4) does not allow conversion of shared_ptr<Foo> to
shared_ptr<const Foo>. Pointed out by @bska.
2014-08-21 15:24:39 +02:00
Atgeirr Flø Rasmussen
5690d20705 Add PINCH support to grid construction. 2014-08-21 14:32:13 +02:00
Atgeirr Flø Rasmussen
f72f823aab Make all construction from deck use EclipseGrid.
The deck constructor is still present, but it will construct an
EclipseGrid object instead of doing its own equivalent processing.
2014-08-21 14:21:21 +02:00
Tor Harald Sandve
b331c68fbc Fixes issues pointed out in the PR comments 2014-08-18 08:57:23 +02:00
Tor Harald Sandve
12b245df3d The water/gas pressures are only calculated if woc and goc lies within
the reservoar
The water/gas pressure is set to -inf when woc and goc is above or below
the reservoar.
2014-08-15 08:56:35 +02:00
Atgeirr Flø Rasmussen
a6c173abad Merge pull request #625 from andlaus/fix_wells_in_summary_output
EclipseWriter: attempt to fix the well summary output for activeWells != totalWells
2014-08-14 14:02:54 +02:00
Andreas Lauser
6e1bf4b3ab EclipseWriter: attempt to fix the well summary output for activeWells != totalWells
The summary files now always features all wells which ever appear in
the deck in every timestep (even if they are not specified for the
time step). This _should_ fix the crashes when writing Eclipse output
in the Norne deck, but I have no idea if the resulting summary file is
correct. More testing would be thus highly appreciated...
2014-08-14 13:35:44 +02:00
Tor Harald Sandve
28d7380d40 BUGFIX
Wrong placement of parentes
2014-08-11 12:45:52 +02:00
Tor Harald Sandve
5051658a07 Implements initialization for constant capillary pressure functions 2014-08-11 11:23:15 +02:00