Commit Graph

1487 Commits

Author SHA1 Message Date
Markus Blatt
20f3a4151a Makes BlackoilPropertiesFromDeck copyable.
We need this for the parallel sim_fibo_ad_cp, where we will need
to point to the same parts in two copies without duplicating data.
2015-02-05 15:41:02 +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
Atgeirr Flø Rasmussen
9cb9ec50b1 Rename directory opm/core/tof -> opm/core/flowdiagnostics. 2015-02-03 21:44:24 +01:00
Joakim Hove
f27f75b0b9 Use Value<double> for Connection Factor 2015-02-03 13:10:38 +01:00
Atgeirr Flø Rasmussen
4f327a5329 Merge pull request #738 from blattms/constify-parallelinformatio-workaround-eigen
Constify parallelinformation and workaround Eigen's weirdness
2015-01-30 20:35:33 +01:00
Markus Blatt
2caaca4160 Do not rely on begin()/end() of the containers to compute reductions.
One would think that such an assumption is safe in any case,
wouldn't one? But foen Eigen'S container this does not hold.
They do not provide STL compliant iterators, and access to them.
With this patch make the even stricter assumption that the containers
are random access and use operator[] instead of iterators.
2015-01-30 16:10:41 +01:00
Robert K
1f2a429a59 BlackoilState: added forgotten rv to equal method. 2015-01-29 11:07:24 +01:00
Markus Blatt
2a3adf7591 Constified the compute reduction functions.
These should and have to be used with a const object.
2015-01-28 21:55:35 +01:00
Joakim Hove
d2dab23d60 Using Parser to calculate well reference depth. 2015-01-26 12:03:11 +01:00
Markus Blatt
aac4cb7d66 Correctly compute the minimum and maximum values.
As there are no functors for computing the minimum and maximum,
we convert the std::max and std::min function pointers to
functors (which is not really nice.) Previously we were somehow
tricked into using std::greater and std::less, which of course do
return true or false and not what we need. Additionally, do more
excessive testing with different ranges.
2015-01-23 20:48:53 +01:00
Markus Blatt
6fe660a3d5 Do recurse in the recursive funtion computeGlobalReduction!
Somehow this was missed and only the first entry in the tuple
was computed globally.
2015-01-23 20:46:46 +01:00
Bård Skaflestad
6d8c89abea Merge pull request #728 from blattms/global-reductions
Added methods for computing global reductions.
2015-01-23 17:28:12 +01:00
Markus Blatt
033f290392 Add missing return statements. 2015-01-23 16:38:08 +01:00
Markus Blatt
d137b0c144 Calm warnings about excessive semi-colons, unused variables, and missing declarations. 2015-01-23 16:36:48 +01:00
Markus Blatt
4a80474782 Fixes formatting according to Atgeirr's coding style. 2015-01-23 14:56:15 +01:00
Atgeirr Flø Rasmussen
3e69d72fbd Reformat header for readability. 2015-01-23 09:13:43 +01:00
Atgeirr Flø Rasmussen
fb0bccc625 Fix whitespace issues. 2015-01-23 09:12:15 +01:00
Atgeirr Flø Rasmussen
3b1aa47830 Add missing #include <algorithm>. 2015-01-22 13:02:16 +01:00
Atgeirr Flø Rasmussen
73a310725e Fixed size of zero vector passed as gpress. 2015-01-21 21:14:32 +01:00
Markus Blatt
7bce15c04b Added methods for computing global reductions.
We need to compute quite a few global reductions in the
Newton method of opm-autodiff. This commit adds the functionality
to compute several reductions combined using only one global
communication. Compiles and test succeeds with one or more process.
2015-01-21 16:19:35 +01:00
Atgeirr Flø Rasmussen
77ae151be9 Added calculation of flow diagnostics quantities.
New functions:
 - computeFandPhi()
 - computeLorenz()
 - computeSweep()

Also a unit test has been added for the new features.
2015-01-21 14:58:44 +01:00
Atgeirr Flø Rasmussen
998d5f9d5a Added IncompTpfaSinglePhase class. 2015-01-20 15:47:50 +01:00
Atgeirr Flø Rasmussen
fa16d8f616 Add IncompPropertiesSinglePhase class. 2015-01-20 15:47:50 +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
1718800e55 Add warning to c solvers when stopped wells occur
Stopped wells are treated as shut wells in the c solvers in opm-core.
I.e they are completly isolated from the domain.
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
Atgeirr Flø Rasmussen
45a2631b7f Put reformatted error message in anonymous namespace. 2015-01-07 10:16:13 +01:00
Atgeirr Flø Rasmussen
dfebd46acf Make compilation of class depend on Boost.Heap availablility.
If boost version is too old, the API is still the same and the
class will build, but throws upon construction.
2015-01-07 09:49:47 +01:00
Atgeirr Flø Rasmussen
1e39010ba4 Fix anisotropy closeness test.
The old test was simply wrong: it computed the M-distance and compared
to the grid radius, which becomes dependent on the scaling of the
metric M. The corrected test in isClose() depends on the anisotropy
ratio of M and the grid radius.
2015-01-02 15:22:02 +01:00
Atgeirr Flø Rasmussen
8491d186d4 Make isClose() use actual grid and metric data.
Note that current implementation is somewhat ad-hoc, and not
in line with the algorithm of the paper.
2014-12-29 12:28:30 +01:00
Atgeirr Flø Rasmussen
2eab160761 Whitespace fix. 2014-12-29 12:28:29 +01:00
Atgeirr Flø Rasmussen
451bca1753 Add computeValueUpdate() to avoid recomputing. 2014-12-29 12:28:29 +01:00
Atgeirr Flø Rasmussen
cb7be97ee5 Change order of steps in algorithm to avoid rework. 2014-12-29 12:28:29 +01:00
Atgeirr Flø Rasmussen
5233d37e63 Follow renaming of function. 2014-12-29 12:28:29 +01:00
Atgeirr Flø Rasmussen
c5a19b250b Fix bug in distance derivative function. 2014-12-29 12:28:29 +01:00
Atgeirr Flø Rasmussen
654e06de00 Work in progress. 2014-12-29 12:28:29 +01:00
Atgeirr Flø Rasmussen
5d81306007 Initial versions of compute functions done.
Still has bugs.
2014-12-29 12:28:29 +01:00
Atgeirr Flø Rasmussen
22cbcc8bf5 Solver logic finished.
Methods isClose(), computeFromTri() and computeFromLine() are still dummies.
2014-12-29 12:28:29 +01:00
Atgeirr Flø Rasmussen
ee4d2be67e Work in progress on AnisotropicEikonal. 2014-12-29 12:28:29 +01:00
Atgeirr Flø Rasmussen
84da6a28f3 Added simple test, work in progress. 2014-12-29 12:28:29 +01:00
Atgeirr Flø Rasmussen
3001768632 Add skeleton of AnisotropicEikonal class and test. 2014-12-29 12:28:29 +01:00
Atgeirr Flø Rasmussen
dea6e8c044 Merge pull request #702 from jorgekva/linsolver_petsc
PETSc support in OPM
2014-12-19 11:25:58 +01:00
Jørgen Kvalsvik
263e1a6928 Sets initial guess to zero.
Setting it to nonzero means starting to approximate from memory garbage values.
2014-12-10 18:15:33 +01:00
Jørgen Kvalsvik
294ec58bed Adds missing VecCreate. 2014-12-10 18:15:13 +01:00
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
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
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
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
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
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
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
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
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
Bård Skaflestad
c0559fa258 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
cc23f74f25 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
osae
84173e1cac Provide eclipse state to saturation property init. 2014-08-22 15:36:07 +02:00
Tor Harald Sandve
c1fc8aeb7d Fixes issues pointed out in the PR comments 2014-08-18 08:57:23 +02:00
Tor Harald Sandve
f3a9dac5bb 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
Tor Harald Sandve
51b8b44e35 BUGFIX
Wrong placement of parentes
2014-08-11 12:45:52 +02:00
Tor Harald Sandve
91bdb7dde2 Implements initialization for constant capillary pressure functions 2014-08-11 11:23:15 +02:00
Tor Harald Sandve
bf635f3fe9 Computes saturations based on depths
For constant capillar pressure function the saturation is
    determined by cell depths:

    Sg_max, Sw_min
    ----- goc ----
    Sg_min, Sw_min
    ----- woc ----
    Sg_min, Sw_max
2014-08-11 11:22:47 +02:00
Bård Skaflestad
28c8898122 swatInitScaling(): Abide by OPM coding conventions
This commit attaches the reference-signifying ampersand to the type
as is preferred in the OPM code base.

Suggested by: [at] atgeirr
2014-08-07 18:50:07 +02:00
Bård Skaflestad
46c7ff53a2 swatInitScaling(): Remove EOL whitespace
This commit removes several instances of EOL whitespace in function
'swatInitScaling()'.  Aesthetic only.  No functional changes.

Suggested by: [at] atgeirr
2014-08-07 18:50:07 +02:00
Bård Skaflestad
61300523c4 swatInitScaling(): Name magic constant
The constant 1.0e-8 was used as a threshold to distinguish "low"
from "high" capillary pressure values.  Introduce acutual constant
"pc_low_threshold" to clarify that role.

Suggested by: [at] atgeirr
2014-08-07 18:50:07 +02:00
Bård Skaflestad
ef9e81ff9b swatInitScaling(): Rename array size parameter
This commit renames the 'np' parameter used to allocate small arrays
for saturations and capillary pressures to 'max_np' to better
reflect its purpose.

Suggested by: [at] atgeirr
2014-08-07 18:50:06 +02:00
Bård Skaflestad
59eedcd82b Initialise saturation points for Pc scaling
This gives predictable failure modes although the actual behaviour
is (probably) unchanged.
2014-08-07 18:50:06 +02:00
Bård Skaflestad
d067ef07a2 Consistently refer to BlackoilPhases::Aqua
This avoids confusion.
2014-08-07 18:50:06 +02:00
Bård Skaflestad
2229affcb0 Don't use variable-length arrays
We only support up to 'BlackoilPhases::MaxNumPhases' different
phases (and components), so there's no need to pretend otherwise.
2014-08-07 18:50:06 +02:00
Atgeirr Flø Rasmussen
070f2456c4 Properly handle defaulted well reference depths. 2014-08-07 12:57:05 +02:00
Liu Ming
28b354c625 Add HAVE_PETSC macro. 2014-07-08 10:58:39 +08:00
Atgeirr Flø Rasmussen
12c9ef2b09 Merge pull request #607 from osae/swatinit
Scaling of capillary pressure / initialisation from kw SWATINIT.
2014-07-07 14:10:02 +02:00
Bård Skaflestad
3a6ac6a759 Reimplement clone_wells() in terms of well_controls_clone() 2014-07-03 16:09:56 +02:00
Bård Skaflestad
81d691e66a wells.h: Document several function
This commit adds Doxygen-style documentation to functions

  - clear_well_controls()
  - set_current_control()
  - wells_equal()

No functional changes.
2014-07-03 16:09:56 +02:00
Bård Skaflestad
033625c5a8 well_controls: Add deep-copy (clone) support
New function well_controls_clone(), implemented in terms of the
public API only, mirrors the objective of function clone_wells(),
only for well control sets.  Add a basic test to demonstrate the
function too.
2014-07-03 16:09:56 +02:00
Bård Skaflestad
24804a1f6f clone_wells(): Assert result equal to input
This adds a debug-mode safety belt that cloning wells produces a
comparable set of wells to the input.
2014-07-03 16:09:56 +02:00
Bård Skaflestad
464b0c3d15 well_controls_equal(): Don't compare set capacities
The 'cpty' field is for internal memory management purposes only.
No client can know of its existence, let alone inspect or directly
change the value, so it should not be used to adjudicate control set
equality.  This was useful during the refactoring work to introduce
the opm-parser support, but its utility has since ceased.

Okay'ed by: [at] atgeirr and [at] joakim-hove
2014-07-03 16:09:56 +02:00
osae
b22d3bdbf1 Included inititalisation of surface volumes. 2014-06-26 15:06:47 +02:00
osae
c1732b0b32 Make use of EclipseState for EQLNUM and SWATINIT. 2014-06-26 14:46:57 +02:00
osae
7c667a2bd7 Adjustments for vanishing oil phase. 2014-06-25 18:03:17 +02:00
osae
a9138ef574 SWATINIT: Initialisation and capillary pressure scaling. 2014-06-25 18:03:17 +02:00
osae
45e35178bb Scaling of capillary pressure. 2014-06-25 18:03:17 +02:00
Atgeirr Flø Rasmussen
fd606d907a Fix initialization of tracer heads, and output ordering. 2014-06-25 09:56:37 +02:00
Atgeirr Flø Rasmussen
3290c41f3a Refactor tracer computations.
Current version executes reordered solve once for each tracer. The benefit
is a simpler code and the ability to use MDU with tracers. The cost is
potentially higher runtime, compared to doing a single sweep for all
tracers (and tof).
2014-06-24 09:43:26 +02:00
Atgeirr Flø Rasmussen
23400d7e2e Remove unused data member. 2014-06-23 14:18:01 +02:00
Atgeirr Flø Rasmussen
63d7b868d0 Clean up dead code for MDU, update comment. 2014-06-23 14:05:51 +02:00
Atgeirr Flø Rasmussen
41887508ea Add tracers_ensure_unity parameter.
When this boolean parameter is true (the default), tracer solutions
will be normalized so that the tracer averages will sum to one in each cell.
This behaviour is the same as before, the change is that it can now be
turned off.
2014-06-23 14:03:49 +02:00
Atgeirr Flø Rasmussen
631498bd06 Activate MDU option, making SMU method its default. 2014-06-23 11:29:14 +02:00
Atgeirr Flø Rasmussen
1a59e7360b Fix bugs in MDU. 2014-06-23 11:23:16 +02:00
Atgeirr Flø Rasmussen
ae1236c5cd Add computation of face tofs parts.
This must be done after the cell tof has been computed since they
depend on it.
2014-06-23 11:22:14 +02:00
Atgeirr Flø Rasmussen
bd1bb1099f First compiling version of fixed MDU method. 2014-06-19 15:11:32 +02:00
Atgeirr Flø Rasmussen
0b05182645 Fix use of assert. 2014-06-16 13:44:00 +02:00
Atgeirr Flø Rasmussen
a199d78476 Work in progress fixing multidim upwinding. 2014-06-16 13:14:42 +02:00
Atgeirr Flø Rasmussen
4166a0621c Removed unused debugging output. 2014-06-16 12:49:41 +02:00
Atgeirr Flø Rasmussen
0afbecfa07 Split method solveSingleCell() for easier maintenance. 2014-06-16 12:49:41 +02:00
Andreas Lauser
05775a0b36 Glue in support for the grid property modifier keywords
this basically means using Opm::EclipseState instead of the raw deck
for these keywords.

with this, property modifiers like ADD, MULT, COPY and friends are
supported for at least the PERM* keywords. If additional keywords are
required these can be added relatively easily as well.

no ctest regressions have been observed with this patch on my machine.
2014-06-11 13:48:49 +02:00
Bård Skaflestad
ed5bd42980 Merge pull request #596 from andlaus/fix_some_keyword_names
Fix some keyword names
2014-06-10 23:14:34 +02:00
Andreas Lauser
7603eafaf9 fix some keyword names
The queried keywords are unknown to the parser and after manual
inspection also to the Eclipse RM. There might be wrong keywords some
left, but these were to ones needed to get SPE9 started using
sim_fibo_ad...
2014-06-05 16:07:31 +02:00
Andreas Lauser
5936c59e22 add an assert 2014-06-04 11:11:35 +02:00
Andreas Lauser
749d0e838d incorperate the review comments/decisions for multi-region PVT
the largest change is that all classes below opm/core/props/pvt take
the PVT region index as an argument, the higher-level ones (i.e.,
BlackoilProps*) take cell indices.
2014-06-04 11:11:35 +02:00
Andreas Lauser
9a7b068d15 Implement multi-region PVT for all property classes
since they are not using a single PVT table anymore, their "Single"
prefix has been removed...
2014-06-04 11:11:35 +02:00
Liu Ming
8a118f45fe rename the private member. 2014-05-23 11:10:22 +08:00
Liu Ming
9d985f7421 use unordered_map for "string-enum" translations. 2014-05-23 11:09:04 +08:00
Andreas Lauser
6a50afb219 rename all "newParserDeck" objects to "deck"
The "new" parser is now "the" parser...
2014-05-21 11:22:43 +02:00
Andreas Lauser
f360562aee remove EclipseGridParser compatibility methods from all classes 2014-05-21 11:22:43 +02:00
Liu Ming
6f2d28d08a Throw information for Petsc. 2014-05-16 15:02:49 +08:00
Liu Ming
ccb83a8503 Initialize Petsc from constructor.
Remove private members for initializing Petsc.
2014-05-16 14:53:49 +08:00
Liu Ming
4491eb7a6a Add Petsc to OPM. 2014-05-16 14:41:51 +08:00
Atgeirr Flø Rasmussen
abd341ab7f Supress signed-unsigned comparison warning. 2014-05-12 09:18:52 +02:00
Atgeirr Flø Rasmussen
a5ccc97a0f Merge pull request #573 from osae/test-eps
Endpoint scaling - taking advantage of the new parser.
2014-05-12 08:28:48 +02:00
osae
4a3c7ff204 Removing a few bugs ... 2014-05-06 18:15:03 +02:00
osae
d91c49cffd Proper interpretation of ENDNUM and IMBNUM fields.
Made consistent with grid discretization.
2014-05-06 14:41:17 +02:00
osae
d648917fcf Initialisation of EGLNUM (analogous to e.g SATNUM) 2014-05-06 12:47:24 +02:00
osae
ca5b0eb16f Inserted some documentation. 2014-05-05 11:27:10 +02:00
osae
bd38a577ae Fix to make EQLNUM consistent with ACTNUM.
This should eventually be integrated in the parser.
2014-05-05 11:23:43 +02:00
osae
922a73442c ENDNUM: changed default value and jtab-logic
Default value changed from 'no scaling' to 'use table 1'.
Range of jtab changed to [-1,#tables-1].
2014-05-05 10:33:04 +02:00
osae
48c3577277 Make use of keywords SATOPTS and EHYSTR. 2014-05-05 10:33:04 +02:00
osae
59eb5f6c20 Use ENDNUM and prepare for IMBNUM. 2014-05-05 10:33:04 +02:00
osae
a34eb162e8 Added missing line (parser conversion). 2014-05-05 10:33:04 +02:00
Andreas Lauser
0cdc32d213 adapt to the renames of the table classes in opm-parser
basically, "Opm::SimpleTable" becomes "Opm::SingleRecordTable".
2014-04-28 18:47:28 +02:00
Andreas Lauser
eb656c60ec add opm-parser variants for the incompressible property classes 2014-04-25 14:25:54 +02:00
Atgeirr Flø Rasmussen
320c3332ad Add missing break statements in switch, add default case. 2014-04-24 15:43:54 +02:00
Atgeirr Flø Rasmussen
be5af2378a Change option name and generated header names. 2014-04-15 20:21:10 +02:00
Atgeirr Flø Rasmussen
883e955176 Merge branch 'suppress-warnings' into suppress-external-warnings 2014-04-15 19:49:19 +02:00
Atgeirr Flø Rasmussen
ba26696d22 Fix access to keywords, while still silencing warning.
Previous fix was wrong because it called getKeyword() outside the
hasKeyword() check. Current version (like original code) uses the
short-circuiting behaviour of && to ensure this.
2014-04-15 14:52:21 +02:00
Atgeirr Flø Rasmussen
bd4eef5a86 Merge remote-tracking branch 'akva2/quell_dune_warnings' into suppress-external-warnings 2014-04-15 14:35:01 +02:00
Atgeirr Flø Rasmussen
cd0d48abbd Avoid signed/unsigned warning. 2014-04-15 13:40:50 +02:00
Atgeirr Flø Rasmussen
645ff76a0b Comment out unused function argument. 2014-04-15 13:40:15 +02:00
Atgeirr Flø Rasmussen
798ef0d070 Comment or add (void) usage of unused arguments. 2014-04-15 13:39:03 +02:00
Bård Skaflestad
d6d58d4045 Declare initBlackoilStateFromDeck(DeckConstPtr)
This was missing in commit 4c2120c and produced some build failures
that were hard to analyse.  I'm not convinced that the underlying
problem is solved, but this does at least restore the build.
2014-04-10 00:51:28 +02:00
Markus Blatt
20faca397a Added missing variant of initBlackoilStateFromDeck with new parser and without UG. 2014-04-09 14:34:04 +02:00
Markus Blatt
07ef14f181 Removed superfluous parameter cartdims from initStateFromDeck.
The parameter was unused and would cause trouble in initBlackoilStateFromDeck.
2014-04-09 14:33:35 +02:00
Markus Blatt
ab5e011f34 Merge remote-tracking branch 'upstream/master' into master-refactor-for-cpgrid-support
Manually resolved conflicts in:
	opm/core/io/eclipse/EclipseWriter.cpp
	opm/core/io/eclipse/EclipseWriter.hpp
	opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp
2014-04-08 21:50:00 +02:00
Atgeirr Flø Rasmussen
bbe5a0f776 Merge pull request #563 from osae/testEPS
New parser; proper handling of ENPTVD/ENKRVD.
2014-04-08 13:51:43 +02:00
Bård Skaflestad
333e110d4f Merge pull request #538 from blattms/parallel-solver-support
Added support for parallel dune-istl solvers
2014-04-08 00:17:35 +02:00
Bård Skaflestad
99d7f61822 Don't reference OwnerOverlap* unless MPI is available
The class OwnerOverlapCopyCommunication is not defined unless MPI is
avilable.  Therefore, we cannot reference the type unless we know
that MPI is available in the current translation unit.
2014-04-07 20:01:18 +02:00
Atgeirr Flø Rasmussen
28abf88520 Changed documentation of Wells::comp_frac to match reality. 2014-04-06 23:45:08 +02:00
Atgeirr Flø Rasmussen
db88058b34 Use preferred phase of producer well to set comp_fraction.
This replaces the previous hack, that set comp_fraction to (0,1,0) always.
2014-04-06 23:33:43 +02:00
osae
32230f70c8 New parser; proper handling of ENPTVD/ENKRVD. 2014-04-05 10:56:30 +02:00
Atgeirr Flø Rasmussen
94d45c4c3d Merge remote-tracking branch 'totto82/add_compi_producers' into add_compi_producers 2014-04-05 00:18:38 +02:00
Atgeirr Flø Rasmussen
cb9c36df65 Merge pull request #544 from osae/equil-init
Equil init
2014-04-04 22:39:37 +02:00
Markus Blatt
472844e454 Merge remote-tracking branch 'upstream/master' into master-refactor-for-cpgrid-support
Removed conflicts in
	opm/core/wells/WellsManager.cpp
that were due to the change
```diff
-                    pd.well_index = WellsManagerDetail::computeWellIndex(radius, cubical, cell_perm, completion->getDiameter());
+                    pd.well_index = WellsManagerDetail::computeWellIndex(radius, cubical, cell_perm, completion->getSkinFactor());
```
in  WellsManager::createWellsFromSpecs which moved from WellsManager.cpp to WellsManager_impl.hpp file in a previous commit.
2014-04-04 21:21:22 +02:00
Markus Blatt
7fd5b65691 Merge remote-tracking branch 'upstream/master' into parallel-solver-support
Removed conflicts in:
	opm/core/linalg/LinearSolverIstl.cpp
2014-04-04 20:38:52 +02:00
Bård Skaflestad
cb32cea7d7 Merge pull request #535 from blattms/add-scalar-product
Explicitly construct the ScalarProduct, and SequentialInformation.
2014-04-04 18:41:56 +02:00
Tor Harald Sandve
d90717877b Hack to set compi for producer.
compi is set to [0 1 0] for all producers
2014-04-04 12:15:49 +02:00
osae
3de80989a2 Equil regions now internally indexed 0..(NTEQUL-1) 2014-03-31 16:16:45 +02:00
Atgeirr Flø Rasmussen
eb19031c17 Bugfix: skin factor, not diameter. 2014-03-31 14:47:16 +02:00
Markus Blatt
7aa8728be9 Removed last artefact of checkCellExistence (in constructor taking wells)
Somehow this slipped one of the merges. With the last
patch this module failed to compile as we use the new
definition without the bool parameters.
2014-03-29 10:35:12 +01:00
Markus Blatt
0c96066a79 Readd definition of WellsManager constructor from wells.
As @bska pointed in my issue #518 this definition was
accidentally removed in commit 20468d1 during a merge of
upstream changes. Therefore I readd it with this patch.
2014-03-29 10:12:40 +01:00
osae
b86fa0af86 New parser included. 2014-03-28 17:35:43 +01:00
osae
b485d03711 Default equil region should be one not zero ...
Otherwise problems when kw EQLNUM is used.
2014-03-28 17:18:50 +01:00
Markus Blatt
c282949400 Merge remote-tracking branch 'upstream/master' into master-refactor-for-cpgrid-support
Manually resolved conflicts:
	opm/core/io/eclipse/EclipseWriter.cpp
	opm/core/io/eclipse/EclipseWriter.hpp
	opm/core/props/BlackoilPropertiesFromDeck.cpp
	opm/core/simulator/initState_impl.hpp
	opm/core/wells/WellsManager.cpp
	opm/core/wells/WellsManager.hpp
2014-03-27 15:27:11 +01:00
Markus Blatt
8653ffe327 [bugfix] Use the size of the vector for the copying.
The last patch did not compile as there was no size member
in scope. Therefore this patch resorts to using the size of
the vector.
2014-03-27 11:53:13 +01:00
Markus Blatt
23f19584cb Throw an error when using a sequential solver in parallel 2014-03-27 11:49:41 +01:00
osae
e1d2fa2088 Some adjustments to equil initialisation.
- Saturations, phase pressures, and standard initialsation of RS and RV
   now agree to baseline.
 - Tables of RS and RV versus vertical depth (kw RSVD RVVD) have been
   hardcoded for testing (need new parser) and the calculations agree to
   baseline in the gas and oil zones.  In the water zone there is some
   differences: Our code computes saturated RS and RV using the final
   phase pressures (these are modified to be consistent with saturations
   and capillary pressures) while the baseline uses unmodified phase pressures.
2014-03-26 14:53:47 +01:00
osae
5d028d4eca Merge branch 'master' of git://github.com/OPM/opm-core
Conflicts:
	CMakeLists_files.cmake
2014-03-26 14:51:06 +01:00
Markus Blatt
7495bfa6c4 [bugfix] Use the size of the vector for the copying.
The last patch did not compile as there was no size member
in scope. Therefore this patch resorts to using the size of
the vector.
2014-03-26 10:23:11 +01:00
Joakim Hove
f0126b2501 Removed WellsManager constructor which takes an ole Eclipsegridparser instance. 2014-03-25 18:57:58 +01:00
Markus Blatt
3115b7868f Moved ISTL right and left hand side construction for ISTL to solveSystem
cherry-picked from add-scalarproduct and ported.
2014-03-25 09:58:07 +01:00
Markus Blatt
909d3c9019 Moved ISTL right and left hand side construction for ISTL to solveSystem 2014-03-25 09:37:41 +01:00
Joakim Hove
2eab8aeb38 Changed the access to Parser/EclipseState/Schedule to use new well injection and production properties. To be aligned with opm-parser:e75970a28b96374409a55e3e6cea2198b6a0ea23 2014-03-21 00:35:15 +01:00
Markus Blatt
bdc4573e2a Added support for the parallel solvers of dune-istl.
To support this the solveSystem methods of the LinearSolverInterface gets
an optional additional template parameter of type boost::any. It can hold any
copy constructable object. In our case it is used to pass the information about
the parallelization into the solvers of dune-istl without the compiler needing to know
their type. Inside of LinearSolverIstl::solveSystem we check whether the type stored inside of
boost::any is the new ParallelIstlInformation. If this is the case we extract the information
and use the parallel solvers if available, otherwise we solve serial/sequential.

The new ParallelIstlInformation is needed as the OwnerOverlapCopyCommunication is not copy
constructable. This is indeed a design flaw that should and will fixed upstream, but for the
time being we need ParallelIstlInformation to transfer the ParallelIndexSet and RemoteIndices
objects.
2014-03-20 21:59:29 +01:00
Markus Blatt
cec51280e7 Explicitly construct the ScalarProduct, and SequentialInformation.
This patch refactors the calls to the dune-istl solvers.
The SeqScalarProduct, and SequentialInformation is now explicitly
constructed and later used to construct the smoothers
generically. Aditionally the linear operator (MatrixAdapter) is
constructed before calling the various solver dependent solve
routines.

While this does not change the behaviour of the code it is a
preparatory step to support parallel solvers. These parallel
solvers only differ in the type of the scalarproduct and
linear operator used from the sequential ones.
2014-03-20 12:09:24 +01:00
Markus Blatt
e1d0995104 Explicitly construct the ScalarProduct, and SequentialInformation.
This patch refactors the calls to the dune-istl solvers.
The SeqScalarProduct, and SequentialInformation is now explicitly
constructed and later used to construct the smoothers
generically. Aditionally the linear operator (MatrixAdapter) is
constructed before calling the various solver dependent solve
routines.

While this does not change the behaviour of the code it is a
preparatory step to support parallel solvers. These parallel
solvers only differ in the type of the scalarproduct and
linear operator used from the sequential ones.
2014-03-20 10:39:48 +01:00
Markus Blatt
8f60175d04 Include fastamg.hh for dune-istl 2.3
For the inofficial 2.2 release this was included automatically with amg.hh.
2014-03-19 19:51:17 +01:00
Markus Blatt
d333f413d1 Complete cf7f07b PR #530 to support FastAMG with dune-istl 2.3
This fixes further occurences of DUNE_HAS_FASTAMG that were
missed in pull request #530.

Previously we relied on the define DUNE_HAS_FAST_AMG to detect
whether these preconditioners are available. This define is only
available in the 2.2 release with cmake support. Therfore we now
addtionally test whether we are using dune-istl 2.3 or newer.
2014-03-19 17:40:02 +01:00
Atgeirr Flø Rasmussen
a9a3b423f0 Merge pull request #530 from blattms/support-fast-amg-2.3
Makes KAMG and FastAMG solver available with dune-istl 2.3
2014-03-19 15:28:23 +01:00
Atgeirr Flø Rasmussen
331342d753 Merge pull request #528 from blattms/fix-nonunifom
Fixes compilation of BlackoilPropertiesFromDeck.cpp.
2014-03-19 12:31:05 +01:00
Andreas Lauser
ddd662734f endpoint scaling: change default threephase_model to gwseg
and throw an exception if "simple" is encountered...

According to Ove, gwseg should be used, because "gwseg is the model
relevant to the norne case - i.e the model eclipse uses.

The fix for the simple model has to wait for a refac of the satfunc
complex."
2014-03-19 11:22:43 +01:00
Markus Blatt
8c8bb67aa0 Makes KAMG and FastAMG solver available with dune-istl 2.3
Previously we relied on the define DUNE_HAS_FAST_AMG to detect
whether these preconditioners are available. This define is only
available in the 2.2 release with cmake support. Therfore we now
addtionally test whether we are using dune-isl 2.3 or newer.
2014-03-19 11:19:25 +01:00
Markus Blatt
dd99948869 Fixes compilation of BlackoilPropertiesFromDeck.cpp.
Patch 31c09aed was erroneous as it was trying to assing a
SaturationPropsFromDeck<SatFuncSimpleNonuniform> to a
SaturationPropsFromDeck<SatFuncSimpleUniform> in the constructor
taking the new parser. This patch fixes this.
2014-03-19 11:09:13 +01:00
Atgeirr Flø Rasmussen
3d178087e7 Merge pull request #517 from blattms/issue-516
Apply changes from commit a953ba8 to new parser code too.
2014-03-19 08:29:16 +01:00
Andreas Lauser
0c1df10524 endpoint scaling: invert condition
yeah, true and false are difficult things sometimes...
2014-03-18 15:11:38 +01:00
Atgeirr Flø Rasmussen
5fc6cbc16f Made single-argument constructors explicit.
Avoids unintended implicit conversions.
2014-03-17 13:27:50 +01:00
Bård Skaflestad
957ad787ad Merge pull request #508 from atgeirr/adjust-initial-wellrates
Adjustment to well rate initialisation.
2014-03-15 14:59:27 +01:00
Atgeirr Flø Rasmussen
a13f7b990f Fix logic related to open/shut wells initialisation. 2014-03-14 11:27:20 +01:00
Atgeirr Flø Rasmussen
5bd306e7f0 Merge pull request #514 from joakim-hove/wells-cpos-manipulation
Removed cpos = ~cpos constructions for closing a well
2014-03-14 11:08:53 +01:00
Andreas Lauser
0b3217fe6f initStateFromDeck(): do not accept potentially contradicting ways to set the initial condition
i.e. PRESSURE and EQUIL are now considered mutually exclusive...
2014-03-13 16:33:32 +01:00
Markus Blatt
bb7b709312 Make initStateFromDeck with the new parser deck usable again.
My last merge broke compilation of opm-autodiff, as this new function
still relied on the old behaviour (the one taking a grid instead of
the data directly). This patch moved initStateFromDeck to the new behaviour.
2014-03-13 15:59:37 +01:00
Markus Blatt
e37cab0529 Fixed SaturationPropsFromDeck::initEPSKey for new parser and non-UG
There the cell_centroids where still treated like double*. This patch
uses the UgGridHelpers instead.
2014-03-13 15:41:59 +01:00
Markus Blatt
c6daebc35d Merge branch 'refactor-for-cpgrid-support' into master-refactor-for-cpgrid-support
Manually resolved conflicts in:
	opm/core/props/BlackoilPropertiesFromDeck.cpp
	opm/core/wells/WellsManager.cpp
2014-03-13 13:41:45 +01:00
Markus Blatt
d2bbf9a728 Fixed missed on occurence of number of samples 2014-03-13 12:13:11 +01:00
Markus Blatt
d0ca878c2a Apply changes from commit a953ba8 to new parser code too.
The mentioned commit was applied before the merge of
opm-parser-integrate and therefore the changes did not carry over
to the code that uses the new parser. This code mimics the
changed behaviour for the new parser.

Closes issue #516
2014-03-13 12:00:01 +01:00
Joakim Hove
ca7de3c7c1 Will check if a well is open before throwing for an invalid control. 2014-03-12 20:27:17 +01:00
Joakim Hove
7413894a67 Removed cpos = ~cpos constructions for closing a well; using well_controls_shut_well explicitly instead. 2014-03-12 17:41:40 +01:00
Atgeirr Flø Rasmussen
c0fd117103 Bugfix: || -> && 2014-03-11 12:54:04 +01:00
Atgeirr Flø Rasmussen
a592a23153 Assert to avoid future surprises.
Well types must be either INJECTOR or PRODUCER for now, if
we change this in the future, we should check this part of
the code as well.
2014-03-11 12:51:49 +01:00
Atgeirr Flø Rasmussen
db6a36d1fd Commented choices in initialisation of well rates. 2014-03-11 12:50:58 +01:00
Atgeirr Flø Rasmussen
c0ddb9707e Initialize well rates better.
Instead of making well rates zero for wells that are not controlled by
surface volume, we initialize them to a small value with the correct
sign (positive for injectors, negative for producers).
2014-03-10 13:30:43 +01:00
Bård Skaflestad
d88a5572b8 Merge pull request #506 from atgeirr/suppress-warnings
Suppress warnings
2014-03-06 11:37:17 +01:00
Arne Morten Kvarving
bb1e21d764 add option to quell dune(-istl) warnings 2014-03-05 09:27:47 +01:00
Atgeirr Flø Rasmussen
85a323e7da Remove warning pragmas.
They are only available on gcc 4.6 and newer, and clang.
2014-03-05 08:41:53 +01:00
Joakim Hove
8be1f0e8d3 Changed open / close behaviour of well_controls: 1) well_controls has an explicit open_close flag. 2) Will NOT flip current value to change open|close status 2014-03-04 20:23:19 +01:00
Atgeirr Flø Rasmussen
ae0464afe3 Suppress unused argument warnings. 2014-03-04 11:32:32 +01:00
Atgeirr Flø Rasmussen
95a17f847a Suppress warnings from included istl code.
This is done using #pragma GCC and works also in clang.
2014-03-04 11:31:16 +01:00
Atgeirr Flø Rasmussen
b40d2e63d0 Merge pull request #495 from osae/endscale
Endpoint scaling and hysteresis for gwseg.
2014-03-04 10:29:50 +01:00
Atgeirr Flø Rasmussen
d13bf03e1f Bugfix in RsSatAtContact: use min(), not max().
Also modified test to match output.
2014-02-27 14:57:38 +01:00
Atgeirr Flø Rasmussen
1c9675605c Fix bug in RS initialisation.
Also throw if default init is specified and datum != goc depth.
2014-02-27 14:48:14 +01:00
Atgeirr Flø Rasmussen
1b3cac2433 Remove debugging output. 2014-02-27 13:27:07 +01:00
Atgeirr Flø Rasmussen
af9c1fc4cc Add computeRs() function and use from InitialStateComputer. 2014-02-27 13:14:48 +01:00
Atgeirr Flø Rasmussen
f84162bc39 Add initStateEquil() function.
It is not quite complete yet for the following reasons:
  - it does not compute state.surfacevol(),
  - the InitialStateComputer class does not compute Rs or Rv,
  - it has not been verified.
2014-02-27 10:40:14 +01:00
Atgeirr Flø Rasmussen
4aaeff0078 Added Rv field to InitialStateComputer.
It is currently not computed, as for Rs.
2014-02-27 10:39:18 +01:00
Atgeirr Flø Rasmussen
0fbc3a1ccb Moved implementation of phaseSaturations() to _impl file. 2014-02-27 09:37:48 +01:00
Atgeirr Flø Rasmussen
a1192c09dc Refactor copying of region to global data. 2014-02-27 09:31:48 +01:00
Atgeirr Flø Rasmussen
a7c45d4e9f Rename PhasePressureSaturationComputer -> InitialStateComputer.
Also add (unused so far) rs_ field to class.
2014-02-27 09:08:39 +01:00
Atgeirr Flø Rasmussen
27743b4a13 Enable live oil in initialisation. 2014-02-27 08:31:03 +01:00
Joakim Hove
e5f1e1b0b8 Merge remote-tracking branch 'upstream/master' into opm-parser-integrate 2014-02-26 23:16:10 +01:00
Atgeirr Flø Rasmussen
d5ffcc051c Removed redundant calcPressII() method.
Pressure is also calculated in the calcPressSat() method.
2014-02-26 14:49:06 +01:00
Atgeirr Flø Rasmussen
38c89f363d Made phase mixing functors a class hierarchy.
In summary:
 - added RsFunction (base class),
 - made NoMixing, RsVD, RsSatAtContact inherit RsFunction,
 - RS and RV are no longer template arguments for EquilReg class,
 - EquilReg constructor now takes two shared_ptr<Miscibility::RsFunction>,
 - use of constructor updated, mostly using make_shared.
2014-02-26 14:47:24 +01:00
Atgeirr Flø Rasmussen
8266c52d99 Made NoMixing a class.
For uniformity with its sibling classes.
2014-02-26 14:16:51 +01:00
Markus Blatt
2d54a7398b Refactored WellsManager to partial use without UnstructuredGrid. 2014-02-25 17:52:51 +01:00
Markus Blatt
f356d86701 Remove ambiguous functions increment and getCoordinate from unnamed namespace in favor to those from namespace UgGridHelpers 2014-02-25 15:45:50 +01:00
Markus Blatt
d307df71e7 Added suport for grid apart from UG for BlackoilPropertiesFromDeck 2014-02-25 15:45:15 +01:00
Markus Blatt
ab0b2a9c6b Added support for computePoreVolume for grids apart from UnstructuredGrid. 2014-02-25 15:12:16 +01:00
Markus Blatt
e30031dc77 Added missing namespace qualifiers. 2014-02-25 15:10:46 +01:00
Markus Blatt
c7e20e5eb3 Fixed unused parameter warning in initBlackoilStateFromDeck. 2014-02-25 15:10:18 +01:00
Atgeirr Flø Rasmussen
74573947bb Prune includes. 2014-02-24 16:11:50 +01:00
Atgeirr Flø Rasmussen
7e0bd62205 Moved equilibration utilities to separate file. 2014-02-24 16:09:04 +01:00
Atgeirr Flø Rasmussen
64b6a40191 Capitalize nested namespace names.
equil -> Equil
miscibility -> Miscibility
2014-02-24 15:55:14 +01:00
Kristian Flikka
a055b529ec Add handling of WGRUPCON to new-parser friendly WellsManager constructor 2014-02-24 15:24:33 +01:00
Atgeirr Flø Rasmussen
2b0fcfe748 Move RegionMapping class to its own header, add test.
Class now resides in opm/core/utility/RegionMapping.hpp.
2014-02-24 15:19:04 +01:00
Atgeirr Flø Rasmussen
c689bc757f Added class RsSatAtContact (not tested). 2014-02-24 13:47:03 +01:00
Atgeirr Flø Rasmussen
6c8babc7d2 Fix bug in saturation initialisation.
We shall only use gas-water capillary to initialise when we would get
unphysical saturations otherwise.
2014-02-21 14:47:14 +01:00
Atgeirr Flø Rasmussen
6ef6b82ab5 Merge branch 'no-spline-default' into initialisation.
Necessary since test case behaviour depends on changes in
BlackoilPropertiesFromDeck class.
2014-02-21 11:01:44 +01:00
Atgeirr Flø Rasmussen
50637e1a3b Make linear interpolation default for saturation properties.
This includes relative permeability and capillary pressure functions.
The default has been to make a monotone spline from the given table
values and use a fine, uniform sampling of that. Now the default
is to use the tables as-is. It is still possible to use the spline
approach. For example in the class BlackoilPropertiesFromDeck one
may pass nonzero values for the 'pvt_tab_size' and 'sat_tab_size'
parameters, corresponding to how fine the spline will be sampled.
2014-02-21 09:54:47 +01:00
Atgeirr Flø Rasmussen
b2be489e6e Add saturation computation to and rename computer class.
Opm::equil::DeckDependent::PhasePressureComputer ->
Opm::equil::DeckDependent::PhasePressureSaturationComputer
2014-02-21 08:52:25 +01:00
Atgeirr Flø Rasmussen
e1069cf39b Fix bugs in saturation initialisation and helpers. 2014-02-20 15:24:27 +01:00
Markus Blatt
b328c13bc0 Assume begin_cell_centroid to what the name tells us: an iterator over then centroids.
Therfore we do not need to call center() in getCoordinate. This is done in the iterator
class returned from CpGrid.
2014-02-20 10:45:08 +01:00
Markus Blatt
21864388bd Merge remote-tracking branch 'origin/opm-parser-integrate' into refactor-for-cpgrid-support
Resolved Conflicts:
	opm/core/props/BlackoilPropertiesFromDeck.cpp
	opm/core/props/rock/RockFromDeck.hpp
	opm/core/props/satfunc/SaturationPropsFromDeck.hpp
	opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp
2014-02-19 15:22:18 +01:00
Atgeirr Flø Rasmussen
b09dd7750a Add saturation init facilities.
This adds the function phaseSaturations() and some helpers:
satFromPc() and satFromSumOfPcs().
2014-02-19 13:42:07 +01:00
Atgeirr Flø Rasmussen
82216fa24f Add (defaulted) gravity argument in some places.
This is done to facilitate testing, using gravity = 10 m/s^2 for example.
2014-02-19 13:38:21 +01:00
osae
c93c1252e5 Endpoint scaling and hysteresis for gwseg.
Activation of eps and hysteresis treatment for gwseg. Also some
additional initialization.
2014-02-18 13:49:35 +01:00
Markus Blatt
d5f470cb68 Refactored parts needed for Blackoil in autodiff to get rid of UG dependency.
This patch refactors (hopefully) all parts of opm-core that are needed
by the fully implicite black oil solver in opm-autodiff and that inherently
relied on UnstructuredGrid.

We added a new simple grid interface consisting out of free functions
that will allow us to use CpGrid without copying it to an UnstructuredGrid
by the means of the GridAdapter. Using this interface we have add methods that
allow specifying the grid information (global_cell, cartdims, etc.) wherever
possible to prevent introducing grid parameters for the type of the grid.
Unfortunately this was not possible everywhere.
2014-02-17 13:23:01 +01:00
Kristian Flikka
ab42682399 Removed old EclipseGridParser from WellsManager constructor, WGROUPCON still missing 2014-02-14 15:36:32 +01:00
Joakim Hove
4982a913ee Merge pull request #493 from flikka/wellsmanager-group-refactor
Adding support for creation of groups from "new style" Wells and Groups (new parser)
2014-02-14 13:54:24 +01:00
Kristian Flikka
d1494e7daa Removed the previously introduced getAndUnRootChild method 2014-02-14 13:46:54 +01:00
Kristian Flikka
3c93c7a781 Added building of WellsCollection group structure from new opm-parser objects 2014-02-14 13:43:25 +01:00
Kristian Flikka
ae8944f6ea Added an else to avoid unnecessary checking. 2014-02-14 09:01:21 +01:00
Kristian Flikka
d7568b4adf Changed the WellCollection addChild functions to be more specific, and strict 2014-02-13 16:00:39 +01:00
Kristian Flikka
f94f63ff56 Extracted common functionality from the three create functions 2014-02-12 15:45:06 +01:00
Kristian Flikka
1181d1c1bc Create WellsGroupInterface from opm-parser Well/Group objects 2014-02-12 15:39:57 +01:00
Andreas Lauser
24cf0ab99f add back a newline which went MIA
this confused the heck out of us during review. thanks to @bska for
stumbling over it...
2014-02-12 15:06:46 +01:00
Andreas Lauser
42f5025c88 add variants of all methods which take a deck of the new parser to the BlackOilPropertiesFromDeck 2014-02-12 15:06:46 +01:00
Joakim Hove
0393a8f87d Merge pull request #467 from andlaus/parser-integrate_rock_properties
add variants of all methods which take a deck of the new parser to the rock properties
2014-02-11 18:13:07 +01:00
Kristian Flikka
b6072e5112 Added support for creation of WellsGroup objects from new parser Well and Group objects 2014-02-11 14:12:36 +01:00
Andreas Lauser
4018bcfc71 make the saturation functions work with opm-parser 2014-02-10 14:50:37 +01:00
Andreas Lauser
1221ea25c1 more typos
thanks to @bska
2014-02-10 14:49:58 +01:00
Andreas Lauser
5b77bcd4a0 handle the ROCK keywords using the new opm-parser utility class 2014-02-10 14:49:58 +01:00
Andreas Lauser
e177b657f9 use the (new) RocktabTable class for rock compressibility
thanks to @bska for pointing this out
2014-02-10 14:49:58 +01:00
Andreas Lauser
7fdda98213 add variants of all methods which take a deck of the new parser to the rock properties 2014-02-10 14:49:58 +01:00
Joakim Hove
88c99663c6 Merge pull request #469 from andlaus/parser-integrate_phase_usage_from_deck
git add variant of phaseUsageFromDeck() which takes a deck of the new parser
2014-02-10 13:30:39 +01:00
Atgeirr Flø Rasmussen
1f2b2eadc5 Merge branch 'master' into initialisation 2014-02-10 13:24:35 +01:00