Commit Graph

1524 Commits

Author SHA1 Message Date
osae
31d1842ce4 Consistency between scaled and unscaled gwseg.
Modified the endpoint scaled version of SatFuncGwseg and updated
the tests accordingly.
2014-11-05 16:10:05 +01:00
osae
cc7d3dab93 Added some tests for the endpoint scaled relperm.
- satfuncStandard: Unscaled curves, using standard version of the
Gwseg model.
- satfuncEPSBase: Unscaled curves, but using the EPS version of
the Gwseg model.  There are some differences between this and the
standard version of Gwseg for derivatives at critical saturations.
The scheme for calculating the derivatives should be discussed.
(Will file a separate issue on this.)
- satfuncEPS_A: Scaled curves.  Scaling parameters specified via
SWL family.
- satfuncEPS_B: Scaled curves.  Scaling parameters identical to _A
but this time specified via the ENPTVD table.  Test currently
suspended due problems with eclipse-state.
- satfuncEPS_C: Scaled curves.  Scaling parameters identical to _A
but this time specified via Norne-like syntax (EQUALS, COPY etc.).
2014-11-05 16:10:05 +01:00
osae
c7f4ea8abd Rename eclState to eclipseState. 2014-11-05 16:10:05 +01:00
osae
2c09d2ce57 Base initialisation of SWL etc on EclipseState ...
Thus allowing an unmodified Norne deck.
2014-11-05 16:10:05 +01:00
osae
93dde017c6 Bugfix: Actually use column index ... 2014-11-05 16:10:05 +01:00
osae
1b5708871d Cleaning up and preparation for eclipseState. 2014-11-05 16:10:05 +01:00
Tor Harald Sandve
a59044bd93 The wellmanager test is modified to account for not adding shut wells
Shut wells are not added to the well list and the well manager test is
modified accordinly.
2014-10-27 07:23:58 +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
Robert K
da6b4109ba remove unused typedef to avoid compiler warning and keep code clean. 2014-10-24 12:51:57 +02:00
Tor Harald Sandve
ef9bbe4ce7 Make the comment in test_wellsmanager more precise
The comment now precisly says that Shut wells are not added instead to
the well list instead of removed.
2014-10-24 07:05:43 +02: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
Joakim Hove
4c53baed3e Updated WellsManager testing 2014-10-16 16:34:00 +02:00
Jørgen Kvalsvik
7c78afa13d Reduces CHKERRXX usage to where necessary.
The error checking macro makes it harder to read and harder to write, so
instead we now only check for functions  that can contain errors. Bounds and
range checks are handled by PETSc and not OPM.
2014-10-14 14:43:42 +02:00
Jørgen Kvalsvik
93a8430339 Petsc constructor now uses intialiser list.
The previous implementation set plenty of values in the initialization list and
immediately overwrote these values with values looked up from the param group.
This patch makes it look up the parameteres from the param group argument,
making the constructor simpler.
2014-10-14 14:43:42 +02:00
Jørgen Kvalsvik
ce3981a55e Makes using wrong constructor a compile-time error
Petsc only supports initialisation through the ParameterGroup constructor.
Calling the default, non-arg constructor is a static error, and not
implementing it makes using it break compiles.
2014-10-14 14:43:42 +02:00
Jørgen Kvalsvik
ade7aa658e Removes call_petsc.c and calls the lib from C++
call_petsc.c was really a thin C wrapper around the call to petsc itself and
turns out was mostly unnecessary C++ emulation. This removes the file entirely
and ports its functionality into LinearSolverPetsc.cpp.

All features from the file should now be more readable as well as properly
utilising modern C++ features.

The patch uses the CHKERRXX macro from petsc to handle errors reported by
petsc, and currently does not handle this and give the control back to OPM's
error/throw system.
2014-10-14 14:43:42 +02:00
Joakim Hove
827089b835 Bug in well_index increment in WellsManager 2014-10-14 12:43:57 +02:00
Joakim Hove
c9ad66168f Will not update WellControls if cmode == CMODE_UNDEFINED 2014-10-14 12:42:55 +02:00
Joakim Hove
cbff4612a3 ControlMode is left undefined if it unset in deck. 2014-10-14 12:34:58 +02:00
Andreas Lauser
0a1775db02 WellsManager: do not require a control mode to be set if the well status is SHUT
For Norne it fell on its nose because of this...
2014-10-08 12:35:38 +02:00
Joakim Hove
0657cc4deb Added test for SHUT well 2014-10-07 12:12:15 +02:00
Joakim Hove
73b82ed188 Removed 'dead' data at the end of test data. 2014-10-07 12:11:17 +02:00
Atgeirr Flø Rasmussen
33a91b59f9 Refactor third-party warning suppression.
Use header files from opm/core/utility/platform_dependent instead of
build-system generated ones for suppressing warnings from dune or Eigen.
2014-09-20 10:36:10 +02:00
Andreas Lauser
6f5d942502 blackoil fluids test: add section markers to make EclipseState happy
this is necessary because tables now must be queried using
EclipseState instead of directly. This implies that EclipseState can
be instantiated in the first place...

TODO (?): allow EclipseState instatiation for decks without a grid.
2014-09-19 15:27:12 +02:00
Andreas Lauser
36e3538b04 adapt the the table related API changes of opm-parser 2014-09-19 14:40:35 +02:00
Atgeirr Flø Rasmussen
b0c6fff9f0 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
2a0c9dd009 rename getCF() to getConnectionTransmissibilityFactor() 2014-09-06 22:28:21 +02:00
Atgeirr Flø Rasmussen
ca25f56365 Merge pull request #648 from bska/fix-peaceman
effectiveRadius: Fix Numerator Formula
2014-09-02 15:46:36 +02:00
Bård Skaflestad
86550fd6c9 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
5c244bd94e Include goc and woc in the span for the phase pressure calculation 2014-09-02 14:49:09 +02:00
Tor Harald Sandve
f960de4b0b Remove fix for GOC and WOC above/below reservoir 2014-09-02 14:49:09 +02:00
Bård Skaflestad
66293e8aed 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
402044a54a 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
6ab31022fc 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
70c0139a0f Annotate namespace closing brace with namespace name 2014-08-29 12:31:35 +02:00
Bård Skaflestad
a85638ec12 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
c0da69925e 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
8766e6468c 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
5f34301b92 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
e77096b258 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
749a8a5d10 Merge pull request #641 from atgeirr/fix-warnings
Fix warnings
2014-08-28 16:11:12 +02:00
Atgeirr Flø Rasmussen
166cd0fe6b 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
e6e2c9a330 Squash warnings by removing or commenting out unused parameters. 2014-08-28 14:14:22 +02:00
Bård Skaflestad
1307e0fdcf 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
c52175a200 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
Tor Harald Sandve
18de1c190a 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
Tor Harald Sandve
193872a1fe 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
e037142b01 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
e63e28a4f2 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