Commit Graph

1688 Commits

Author SHA1 Message Date
Jørgen Kvalsvik
b3ebe04e14 Adds missing preconditoner destruction. 2014-12-10 18:09:13 +01:00
Jørgen Kvalsvik
8fbbdad722 Renamed variables to match Ax = b 2014-12-10 18:09:01 +01:00
Jørgen Kvalsvik
37a47711e5 Vector construction is now value oriented.
No longer initialised and constructed in two places.
2014-12-10 18:07:45 +01:00
Jørgen Kvalsvik
6c70d2938d Removes unecessary whitespace. 2014-12-10 18:06:28 +01:00
Jørgen Kvalsvik
43d82a232c Fixes performance bug in matrix construction.
At the same time changes the construction to be value-oriented, not
constructing it in OEM_DATA, but rather in to_petsc_mat
2014-12-10 18:05:04 +01:00
chflo
c2116149c9 OPM-139: Added unitttest and testdata for testing writing of welldata to eclipse restart files 2014-12-08 12:04:06 +01:00
Atgeirr Flø Rasmussen
06382498d2 Silence unused argument warning. 2014-12-02 09:17:11 +01:00
Andreas Lauser
64107ecc1b PVT properties: allow them to be temperature dependent
Note that this patch does not introduce any real temperature
dependence but only changes the APIs for the viscosity and for the
density related methods. Note that I also don't like the fact that
this requires so many changes to so many files, but with the current
design of the property classes I cannot see a way to avoid this...
2014-12-01 20:06:31 +01:00
Atgeirr Flø Rasmussen
bce2d6ad1a Avoid using VLAs (C99 feature).
Regular C fixed-size arrays are sufficient here, although in general
std::vector is the preferred replacement (if needing the dynamic size).
2014-11-24 10:55:10 +01:00
Atgeirr Flø Rasmussen
f279629bf1 Suppress unused argument warning in release mode. 2014-11-24 10:54:51 +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
Jørgen Kvalsvik
e69d92cca3 Moved KSPCreate to the Data constructor
This is where it was always intended to be called, so this fixes a mistake in
earlier development.
2014-11-12 20:41:21 +01:00
osae
239a5e12e8 Made hysteresis variant of gwseg consistent ...
... with the base gwseg behaviour.  Added test.
2014-11-05 17:00:11 +01:00
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