Commit Graph

67 Commits

Author SHA1 Message Date
Tor Harald Sandve
a4a0e5985c Make it optinal to apply SWATINIT
The reasoning behind this to make it possible to initialize the case
without SWATINIT in order to compute the same defaulted THPRES values as
Ecl. The initialization needs to be re-computed to account for SWATINIT
in the simulations.
2018-01-02 14:28:06 +01:00
Jørgen Kvalsvik
2c30f9e534 Update to shared_ptr-less parser interface. 2018-01-02 14:28:06 +01:00
Andreas Lauser
ec0ac4869c consolidate the unit system to opm-parser
since the unit code within opm-parser is now a drop-in replacement,
this simplifies things and make them less error-prone.

unfortunately, this requires quite a few PRs. (most are pretty
trivial, though.)
2018-01-02 14:28:06 +01:00
Andreas Lauser
5b40f3e643 set the Rv and Rs factors to the saturated values for cells which have no gas and no oil
the purpose of this is to get a more defined behaviour when doing the
gravity correction/upstream cell determination in the flux term.

I consider this to be just a kludge, so if anyone has a better idea of
what the composition for the non-existing gas and oil phases is,
please tell me. (note that generic compositional models do not exhibit
this issue because the composition of all fluids is always fully
defined because each component is assumed to dissolve in every phase.)
2018-01-02 14:28:06 +01:00
Pål Grønås Drange
877bd70c54 transmult and initconfig are ref's, use ref for EclipseState constructor 2018-01-02 14:28:06 +01:00
Liu Ming
a9ae704a35 it should be the same number in EQLNUM. 2018-01-02 14:28:06 +01:00
Liu Ming
d3ea24f653 use correct region number. 2018-01-02 14:28:06 +01:00
Liu Ming
f089b00a30 Rise up a warning if equil region has no active cells. 2018-01-02 14:28:06 +01:00
Markus Blatt
c32ff2b404 Prevent dereferencing the end iterator.
This happened for empty regions and surfaced when compiling
with "-D_GLIBCXX_DEBUG  -DDEBUG -DGLIBCXX_FORCE_NEW".
2018-01-02 14:28:06 +01:00
Pål Grønås Drange
e6a4cda9a8 Using API get3DProperties() 2018-01-02 14:28:06 +01:00
Pål Grønås Drange
de0aeac570 Updated opm-core to use new EclipseState API in opm-parser 2018-01-02 14:28:06 +01:00
Jørgen Kvalsvik
32c5b5e862 Remove Equil + EquilWrapper, replace with upstream
Upstream (opm-parser) now provides a better Equil + EquilRecord, and
simultaneously deprecated EquilWrapper. This patch fixes the resulting
breakage.

One important note: The new Equil does not expose integers for live
oil/wet gas initialization procedure methods, but rather booleans
through constRs/constRv methods. This is how the variable behaves
according to the Eclipse reference manual (EQUIL keyword section).

Code has been updated to reflect this.
2018-01-02 14:28:06 +01:00
Jørgen Kvalsvik
04a368cfc6 Add missing opm-parser headers
opm-parser pull #695
https://github.com/OPM/opm-parser/pull/695
2018-01-02 14:28:06 +01:00
Jørgen Kvalsvik
da411e49a5 Fixes includes wrt opm-parser PR-656
Several files stopped compiling due to relying on opm-parser headers
doing includes. From opm-parser PR-656
https://github.com/OPM/opm-parser/pull/656 this assumption is no longer
valid.
2018-01-02 14:28:06 +01:00
Joakim Hove
0cf00f240b Changed to use new table api from opm-parser. 2018-01-02 14:28:06 +01:00
Joakim Hove
f7da1ca81c Fxied bug in table-container use. 2018-01-02 14:28:06 +01:00
Joakim Hove
4e620e7eb6 Changed Table code to use TableContainer 2018-01-02 14:28:06 +01:00
Bård Skaflestad
b337714d4d RegionMapping<>: Support arbitrary region IDs
This commit introduces a new public method, activeRegions(), that
retrieves those region IDs that contain at least one active cell.
We furthermore extend the cells() method to support lookup of
arbitrary region IDs.  Non-active region IDs produce empty cell
ranges.

Intended use case is

    for (const auto& reg : rmap.activeRegions()) {
        const auto& c = rmap.cells(reg);

        // use c
    }
2018-01-02 14:28:06 +01:00
babrodtk
f1e102a54e Fixed several warnings 2018-01-02 14:28:06 +01:00
Joakim Hove
fd3a0ad136 Using TableManager to get tables. 2018-01-02 14:28:06 +01:00
Markus Blatt
b942633b3c Ported initStateEquil to using the GridHelpers.
Currently the keyword EQUIL is not supported by the fully
implicit blackoil simulator when using CpGrid. This
commit is a first step towards this as it makes the
implementation of initStateEquil generic.
2018-01-02 14:28:06 +01:00
Andreas Lauser
baee24ecde 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...
2018-01-02 14:28:06 +01:00
Robert K
ab75ba3ee5 remove unused typedef to avoid compiler warning and keep code clean. 2018-01-02 14:28:06 +01:00
Andreas Lauser
87adfef018 adapt the the table related API changes of opm-parser 2018-01-02 14:28:06 +01:00
Tor Harald Sandve
eb25a7bf5e Implements initialization for constant capillary pressure functions 2018-01-02 14:28:06 +01:00
osae
9d9f5f003b Make use of EclipseState for EQLNUM and SWATINIT. 2018-01-02 14:28:06 +01:00
osae
05b7347b1a SWATINIT: Initialisation and capillary pressure scaling. 2018-01-02 14:28:06 +01:00
Andreas Lauser
8c8ed13c16 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.
2018-01-02 14:28:06 +01:00
Andreas Lauser
beed4544de Implement multi-region PVT for all property classes
since they are not using a single PVT table anymore, their "Single"
prefix has been removed...
2018-01-02 14:28:06 +01:00
Andreas Lauser
b5266db401 rename all "newParserDeck" objects to "deck"
The "new" parser is now "the" parser...
2018-01-02 14:28:06 +01:00
Andreas Lauser
55927d68cf remove EclipseGridParser compatibility methods from all classes 2018-01-02 14:28:06 +01:00
osae
8ec7f178de Initialisation of EGLNUM (analogous to e.g SATNUM) 2018-01-02 14:28:06 +01:00
osae
b28c7ed35e Fix to make EQLNUM consistent with ACTNUM.
This should eventually be integrated in the parser.
2018-01-02 14:28:06 +01:00
Andreas Lauser
0467bf8b8f adapt to the renames of the table classes in opm-parser
basically, "Opm::SimpleTable" becomes "Opm::SingleRecordTable".
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
e8f0592599 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.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
ec3befafae Avoid signed/unsigned warning. 2018-01-02 14:28:06 +01:00
osae
43839c7923 Equil regions now internally indexed 0..(NTEQUL-1) 2018-01-02 14:28:06 +01:00
osae
27579736dd New parser included. 2018-01-02 14:28:06 +01:00
osae
b79455fea6 Default equil region should be one not zero ...
Otherwise problems when kw EQLNUM is used.
2018-01-02 14:28:06 +01:00
osae
c5b07d9623 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.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
1923de2694 Fix bug in RS initialisation.
Also throw if default init is specified and datum != goc depth.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
6e607115fd Remove debugging output. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
8728e43722 Add computeRs() function and use from InitialStateComputer. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
d2741a76be 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.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
128829e7c8 Added Rv field to InitialStateComputer.
It is currently not computed, as for Rs.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
b53944f30a Moved implementation of phaseSaturations() to _impl file. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
6144730b47 Refactor copying of region to global data. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
5ee2c0cbc9 Rename PhasePressureSaturationComputer -> InitialStateComputer.
Also add (unused so far) rs_ field to class.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
843517e517 Enable live oil in initialisation. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
b6315cabd6 Removed redundant calcPressII() method.
Pressure is also calculated in the calcPressSat() method.
2018-01-02 14:28:06 +01:00