Commit Graph

665 Commits

Author SHA1 Message Date
Tor Harald Sandve
1969c3711d Move instead of copy data to solution vector 2018-01-09 11:28:20 +01:00
Tor Harald Sandve
0132c3326e Add ecl output from opm-output
The new eclwriter output and restart using the eclIO from opm-output

All tests in opm-simulator pass and
MPI restart works.

Standard initialization is done prior to restart in order
to compute correct initial thpressure values. This is not
necessary if thpressures are written to the restart file

TODO: Some trivial fields are written out in order mimic legacy code,
this should be cleaned up

TODO: Output of wells, FIP, NNC is still done in opm-simulators.
This should be moved later.
2018-01-09 11:05:50 +01:00
Tor Harald Sandve
9192380308 Add support for PBDV and PDDV in initstateequil.hh 2018-01-09 10:42:04 +01:00
Andreas Lauser
4957a301f1 fix all Dune 2.6 related compiler warnings in ebos 2018-01-08 12:23:58 +01:00
Andreas Lauser
c8d7be3848 make all headers autonomous again 2018-01-03 19:03:22 +01:00
Andreas Lauser
817f91d176 make the equil test work in the presence of dune-fem 2018-01-03 18:53:03 +01:00
Andreas Lauser
4e37c53038 restore the hydrostatic equilibration test from opm-core
This involved quite a bit of kicking and screaming. The result
certainly is not pretty, but it works.
2018-01-03 12:28:12 +01:00
Andreas Lauser
f65e9fbb69 remove the runtime parameter system from all time critical code paths
it was not supposed to be used there in the first place, but it crept
into the discretization code.
2018-01-02 14:28:52 +01:00
Andreas Lauser
794fc3f588 equil init: reduce the tolerance of the regula falsi solvers to 1e-10 2018-01-02 14:28:06 +01:00
Andreas Lauser
2f00e7804a equil init: rename the files according to the eWoms standard convention
the eWoms file naming convention should probably be changed to the one
of the remaining OPM modules, but this is quite a bit of work and IMO
it is more important to be consistent within the module.
2018-01-02 14:28:06 +01:00
Andreas Lauser
69b1a5ca5a equil init: formating fixes to make it more consistent with the rest of ewoms
in particular, this removes excessive whitespace usage.
2018-01-02 14:28:06 +01:00
Andreas Lauser
79856b3b0a equil init: change all variables to camelCase
this makes it more integrated with the rest of eWoms.
2018-01-02 14:28:06 +01:00
Andreas Lauser
01c2a2da97 equil init: re-indent
this makes the indentation style of the equil init code consistent
with the rest of eWoms.
2018-01-02 14:28:06 +01:00
Andreas Lauser
0690cad957 equil init: get rid of boost::iterator_range
this class is rather simple and it was the only thing from Boost used
by the hydrostatic equilibrium code...
2018-01-02 14:28:06 +01:00
Andreas Lauser
d142060386 equil init: replace opm-core's linear interpolation function by Tabulated1DFunction 2018-01-02 14:28:06 +01:00
Andreas Lauser
3f875fb8f2 equel init: pass the type tag to the InitialStateComputer
also, get rid of Opm::extractPvtTableIndex()
2018-01-02 14:28:06 +01:00
Andreas Lauser
028a8c808b equil init: get rid of opm-core's "root finders"
instead, let's bit the bullet and add the few lines required for
regula-falsi-Pegasus method whenever the old RegulaFalsi class was
used. note that this leads to slightly different results for the
SPE5CASE1 flow test. I suspect that the old solvers behave in
unexpected ways, though...

Note that because the inverted functions are usually piecewise linear,
inversion can be done in a much smarter way.
2018-01-02 14:28:06 +01:00
Andreas Lauser
db9e26761f equil init: get rid of some UgGridHelpers usage
this only deals with the easy things, i.e. UgGridHelpers::numCells()
and UgGridHelpers::dimensions(). a more thorough cleanup is needed in
the future to make ebos work with grids other than Dune::CpGrid again.
2018-01-02 14:28:06 +01:00
Andreas Lauser
669d3fcd2a equil init: re-indent EquilibrationHelpers.hpp 2018-01-02 14:28:06 +01:00
Andreas Lauser
6f07f38fb1 equil init: get rid of initStateEquil_impl.hpp
now, all the beauty of that part of the code can be admired in
initStateEquil.hpp.

During this exercise, I stumbled over some serious code-quality issues
like a different order of the template arguments for the declaration
and the definition, mismatching argument names and no forward
definition of some functions. besides this, some functions were
already defined in the non-_impl.hpp file and EquilibrationHelpers.hpp
used that approach from the outset.
2018-01-02 14:28:06 +01:00
Andreas Lauser
6871e1cf88 move the hydrostatic equilibrium code to its proper location and make it compile
this just moves the hydrostatic equilibrium code from its historc
location at opm/core to ebos/equil and adds minimal changes to make it
compile. this allows to clean up that code without disturbing the
legacy simulators.
2018-01-02 14:28:06 +01:00
Tor Harald Sandve
f6f2a78a6c Fix pvtIndex map for cases with non-active eqlnum regions. 2018-01-02 14:28:06 +01:00
Tor Harald Sandve
30192eac03 Fix 2p bug 2018-01-02 14:28:06 +01:00
Tor Harald Sandve
07c2cad36c Adress PR review issues 2018-01-02 14:28:06 +01:00
Tor Harald Sandve
d27c43bf61 Cleaning the initialization code
-remove whitespaces
-fix documentation
2018-01-02 14:28:06 +01:00
Tor Harald Sandve
2ce881e2e7 Use &ref not shared_pointer to MaterialLawManager 2018-01-02 14:28:06 +01:00
Tor Harald Sandve
4f915d116f Remove blackoilPhases and phaseUsage from the initialization code
Note 1: The initialization code now always consider 3 phases.
For 2-phase cases a trivial (0) state is returned.
Note 2: The initialization code does not compute a BlackoilStats,
but instead pass the initialization object with the initial state.
2018-01-02 14:28:06 +01:00
Tor Harald Sandve
8efc60957a Remove BlackoilProps from equil initalization code
Use FluidSystem and materialLaw from opm-material
directly not via the BlackoilProps in opm-core
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
546759f775 Bugfix: type for target capillary pressure. 2018-01-02 14:28:06 +01:00
Tor Harald Sandve
9265e12e0e Do not extrapolate initial rs and rv values in the depth tables 2018-01-02 14:28:06 +01:00
Tor Harald Sandve
39cb5e9ba6 Do not set rs=rsSat and rv=rvSat for the saturated case 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
db9ccebb17 Increase max iterations for capillary curve inversion.
Triggered by a new two-phase case.
2018-01-02 14:28:06 +01:00
Tor Harald Sandve
09713fd7f8 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
3c6fc0288a Update to shared_ptr-less parser interface. 2018-01-02 14:28:06 +01:00
Andreas Lauser
6f36076516 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
0d9629a282 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
ec2dc7773c transmult and initconfig are ref's, use ref for EclipseState constructor 2018-01-02 14:28:06 +01:00
Tor Harald Sandve
4220bb2615 Fix two phase EQUIL initialization 2018-01-02 14:28:06 +01:00
Liu Ming
ff7cc37589 it should be the same number in EQLNUM. 2018-01-02 14:28:06 +01:00
Liu Ming
e476fe8ba5 use correct region number. 2018-01-02 14:28:06 +01:00
Liu Ming
10f5bd7e7c Rise up a warning if equil region has no active cells. 2018-01-02 14:28:06 +01:00
Markus Blatt
f15a78ac9e 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
74430caae2 Using API get3DProperties() 2018-01-02 14:28:06 +01:00
Pål Grønås Drange
4926198e41 Updated opm-core to use new EclipseState API in opm-parser 2018-01-02 14:28:06 +01:00
Jørgen Kvalsvik
8b30078339 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
0b797bd972 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
916a0868cb 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
dbc496bd15 Changed to use new table api from opm-parser. 2018-01-02 14:28:06 +01:00
Tor Harald Sandve
f528dae86f Use cell depths based on averaging cell corners 2018-01-02 14:28:06 +01:00
Tor Harald Sandve
cfb7be332c Change the number of integration points in the initialization
The number is changed from 100->2000 to increase accuracy.
2018-01-02 14:28:06 +01:00