Commit Graph

2039 Commits

Author SHA1 Message Date
Andreas Lauser
c7dfd096aa SatFuncBase.hpp: convert DOS line endings to unix ones
i.e. \r\n -> \n
2014-09-19 14:40:52 +02:00
Andreas Lauser
bd0bfc172b adapt the the table related API changes of opm-parser 2014-09-19 14:40:35 +02:00
Atgeirr Flø Rasmussen
6d1cfc0fb2 Avoid release mode warnings.
Variables only used in asserts have been removed, their content used
directly in the assert() instead.
2014-09-18 11:31:03 +02:00
Andreas Lauser
38eed1875a EclipseWriter: replace /= by unit::convert::to()
as insisted on by [at] bska
2014-09-10 11:41:26 +02:00
Andreas Lauser
5dd00f93c3 use the same units for pressure output as for pressure input from the deck
before, the output was always metric, regardless of whether the deck
used metric or field units...
2014-09-09 18:58:34 +02:00
Andreas Lauser
9a44720e32 rename getCF() to getConnectionTransmissibilityFactor() 2014-09-06 22:28:21 +02:00
Andreas Lauser
da25fb699d change the defaults for pvt_tab_size and sat_tab_size to -1
this causes the code to use linear instead of spline
interpolation. thanks to @atgeirr for pointing this out..
2014-09-03 14:42:43 +02:00
Andreas Lauser
8a8c71bc63 change the default of the "threephase_model" parameter from "simple" to "gwseg"
Using "simple", the Norne deck aborts with an exception.

Note: SPE1 and SPE9 still seem to work fine with this but there might
be small differences so that the reference solutions of the Jenkins
server might need to be updated...
2014-09-03 13:37:52 +02:00
Atgeirr Flø Rasmussen
dfb7483e1e Merge pull request #648 from bska/fix-peaceman
effectiveRadius: Fix Numerator Formula
2014-09-02 15:46:36 +02:00
Bård Skaflestad
9591aec757 effectiveRadius: Fix numerator formula
We must take the square root of the permeability ratios, not use them
as is.  This was lost in the refactorisation commit 96cf137.

Pointy hat: @bska.
2014-09-02 15:12:50 +02:00
Tor Harald Sandve
a7ecde25ce Include goc and woc in the span for the phase pressure calculation 2014-09-02 14:49:09 +02:00
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