Commit Graph

2983 Commits

Author SHA1 Message Date
Liu Ming
94ee69505a make toString() method as static. 2016-05-24 09:07:28 +08:00
Liu Ming
7eba8b01f5 fix strange indentation. 2016-05-23 10:55:36 +08:00
Liu Ming
eab67baa3b simplify the implementation. 2016-05-23 10:48:51 +08:00
Liu Ming
97eeee516d fix indentation and messages. 2016-05-23 10:47:26 +08:00
Liu Ming
341472456a write well related information into OpmLog. 2016-05-20 16:14:16 +08:00
Liu Ming
b7f7352b6d Add enum to string functions. 2016-05-20 16:13:37 +08:00
Atgeirr Flø Rasmussen
537c4dd730 Merge pull request #1010 from qilicun/log_timer_messages
Log timer messages
2016-05-20 08:39:14 +02:00
Liu Ming
d06b515c47 write the parameters information into OpmLog. 2016-05-20 14:30:43 +08:00
Liu Ming
f55d216561 log the warning messages to OpmLog. 2016-05-20 14:27:38 +08:00
Liu Ming
a44ab90759 Cleanup the prefix. 2016-05-20 08:54:12 +08:00
Atgeirr Flø Rasmussen
2a43e9631f Merge pull request #1011 from qilicun/format-output-relperm-diagnostics
Unify output messages format.
2016-05-19 15:06:52 +02:00
Liu Ming
b3db61bf7e remove the prefix from raw string, using OpmLog format. 2016-05-19 10:07:36 +08:00
Liu Ming
3028e819c6 remove internal counter. 2016-05-19 09:47:57 +08:00
Liu Ming
b25a964597 remove internal messages container. 2016-05-19 09:28:34 +08:00
Liu Ming
98a413bf5c use tag for terminal output control. 2016-05-19 09:22:03 +08:00
Liu Ming
d660dea73b add missing braces. 2016-05-16 09:04:54 +08:00
Tor Harald Sandve
79f04b6c9e Fixing PR comments
- Use std::vector<HydroCarbonState> instead of std::vector<int>
- Use the initializer list to initialize members in constructors
- Fix indent
- Return OilOnly for cases without gas to avoid potential trouble
further down the line
2016-05-13 12:49:45 +02:00
Tor Harald Sandve
cb4b698b51 Add method for calculating the initial hydroCarbonState
The following hydroCarbonState are used
    enum HydroCarbonState {
        GasOnly = 0,
        GasAndOil = 1,
        OilOnly = 2
    };
Cells almost filled with water are treated as a GasAndOil state
2016-05-13 09:10:13 +02:00
Tor Harald Sandve
31133af803 Add member hydroCarbonState to the BlackoilState
The hydroCarbonState is used to store the hydroCarbonState
  State 1: Gas only
  State 2: Gas and Oil
  State 3: Oil only
An empty vector is return at initialization as
no default values are provided by the blackoilstate.
2016-05-12 10:32:39 +02:00
Liu Ming
dd510244f8 unify the format. 2016-05-10 14:52:13 +08:00
Liu Ming
da70ab4e84 use OpmLog only for error messages. 2016-05-10 14:13:33 +08:00
Liu Ming
9f90e6cc3f output timer messages for terminal and log file. 2016-05-09 13:31:04 +08:00
Liu Ming
684614fe77 use ostream not std::cout directly. 2016-05-09 13:30:28 +08:00
Markus Blatt
e7a0b60b1c Prevent dereferencing the end iterator.
This happened for empty regions and surfaced when compiling
with "-D_GLIBCXX_DEBUG  -DDEBUG -DGLIBCXX_FORCE_NEW".
2016-05-06 21:40:33 +02:00
babrodtk
131e900cf3 Code cleanup 2016-04-26 07:48:58 +02:00
babrodtk
c8d5174113 Runs first iterations of two-phase test case plausibly 2016-04-26 07:48:58 +02:00
babrodtk
404929fe34 Checkpoint 2016-04-26 07:48:58 +02:00
Pål Grønås Drange
973438128c Using getInputGrid API from Parser, changed GridManager to no longer accept Deck in constructor 2016-04-20 08:51:10 +02:00
Andreas Lauser
145d61d751 adapt code w.r.t. the removal of the tags for Opm::Evaluation 2016-04-15 18:48:47 +02:00
Tor Harald Sandve
e76b9dd7f1 BUGFIX. Comparison with null pointer 2016-04-15 12:56:04 +02:00
Atgeirr Flø Rasmussen
165b17564d Merge pull request #997 from totto82/Fix_guiderates
Bugfix in setup guiderates
2016-04-15 08:46:17 +02:00
Atgeirr Flø Rasmussen
78a927c859 Update CMake list with deleted files. 2016-04-14 11:29:17 +02:00
jokva
eacbd4f214 Merge pull request #994 from pgdr/use-eclipse3dproperties
@bska We're merging as-is for now, and we've made a note to replace `shared_ptr` and maintain (and document!) this property. Those changes will obviously be internal and you won't notice a difference.
2016-04-13 11:01:43 +02:00
Tor Harald Sandve
acade0bb5f Bugfix in setup guiderates
- Handle shut wells
- Use the groups control type to determine which phase to calculate
the guide rates from. i.e for a ORAT controlled group, calculate the
guide rates from the oil phase well potentials etc.
2016-04-12 13:05:56 +02:00
Pål Grønås Drange
284f3702a2 Using API get3DProperties() 2016-04-11 15:23:35 +02:00
Pål Grønås Drange
fee514375d Using API get3DProperties() 2016-04-11 15:13:38 +02:00
Pål Grønås Drange
1e0356d392 This commit introduces non-trivial changes as GridProperty no longer is stored as a shared pointer. This file needs a thorough read-through, and it would be nice with some documentation. 2016-04-08 16:41:41 +02:00
Pål Grønås Drange
8a7bf1ef3c Updated opm-core to use new EclipseState API in opm-parser 2016-04-08 16:30:01 +02:00
Atgeirr Flø Rasmussen
90e9374a2b Renoved SimulatorOutput class from this module. 2016-04-07 15:41:40 +02:00
Atgeirr Flø Rasmussen
b5cbf0ea2d Rename HAVE_DUNE_CORNERPOINT -> HAVE_OPM_GRID.
Note that this is quite strange since opm-core is upstream and not downstream
from opm-grid. However, when this file is used from opm-autodiff the macro is used.
2016-04-05 15:14:02 +02:00
Atgeirr Flø Rasmussen
2b9b1f8b05 Merge pull request #987 from qilicun/refactor-relpermDiagnostics
Refactor relperm diagnostics using OpmLog functionalities.
2016-04-04 15:04:44 +02:00
Tor Harald Sandve
e1298ff21b Minor fixes based on PR comments
- fix comments, typos add missing reference arguments.
2016-04-04 08:10:24 +02:00
Liu Ming
5e6e4b2a38 mistake: count warning as error. 2016-04-02 11:53:36 +08:00
Liu Ming
53485a7ae7 do not write error summary twice. 2016-04-02 11:45:18 +08:00
Tor Harald Sandve
0fb81945f6 Calculate default guide rates using the well potentials
The default guide rates are caculated using the well potentials.
The well potentials are calculated in the simulator and given as input
to the wellsManager.
2016-04-01 15:00:21 +02:00
Liu Ming
88d41057c0 refactor relperm diagnostics using OpmLog functions. 2016-04-01 12:27:03 +08:00
Atgeirr Flø Rasmussen
09c31b67ca Merge pull request #984 from totto82/bugfix_groupcontrol
BUGFIX. Call setupGuideRates before groupcontrol is applied
2016-03-31 13:28:08 +02:00
Tor Harald Sandve
b8bad8b26b BUGFIX. Call setupGuideRates before groupcontrol is applied 2016-03-31 09:32:09 +02:00
Kjell W. Kongsvik
77a6c4229a Replace comment with "ifdef DISABLE_OUTPUT" 2016-03-29 14:57:58 +02:00
Kjell W. Kongsvik
8e68a4d815 Deleted all files in opm/core/io
This removes OutputWriter and eclipse, vtk, vag as this
functionality has moved to opm-output.
2016-03-29 14:57:58 +02:00
Kjell W. Kongsvik
03d5a5ba25 Commented out usage of OutputWriter in simulator 2016-03-29 14:56:25 +02:00
Joakim Hove
ce6cdb4a47 Merge pull request #962 from joakim-hove/remove-simulator-state
Replaced SimulatorState -> SimulationDatacontainer
2016-03-29 13:16:19 +02:00
Atgeirr Flø Rasmussen
e4929b7263 Implement direct fast field access. 2016-03-29 10:46:14 +02:00
Joakim Hove
c360079926 Replaced SimulatorState -> SimulationDatacontainer
Have removed the SimulatorState base class, and instead replaced with
the SimulationDatacontainer class from opm-common. The SimulatorState
objects were typcially created with a default constructor, and then
explicitly initialized with a SimulatorState::init() method. For the
SimulationDataContainer RAII is employed; the init( ) has been removed -
and there is no default constructor.
2016-03-29 10:44:49 +02:00
Robert Kloefkorn
3f63d09f86 SimulatorTimerInterface: include missing header for unique_ptr. 2016-03-29 10:42:03 +02:00
Robert Kloefkorn
a2d64e681e SimulatorTimers: added method clone to allow for copying of the objects. 2016-03-29 10:34:16 +02:00
Joakim Hove
fcd4368da4 Merge pull request #979 from jokva/missing-cassert-include
Add missing <cassert> include
2016-03-25 07:36:28 +01:00
Jørgen Kvalsvik
4f857b71fc Add missing <cassert> include 2016-03-18 15:40:57 +01:00
chflo
755873f5cc Changed include due to OpmLog changed path 2016-03-17 15:59:50 +01:00
Liu Ming
d943cbfe2a rename ParseMode as ParseContext. 2016-03-17 08:56:38 +08:00
Joakim Hove
2ca569d2e4 Merge pull request #973 from andlaus/fix_PERMXYZ
Fix PERM[XYZ] output
2016-03-16 11:28:22 +01:00
Andreas Lauser
31aac3481d EclipseWriter: deal with the concept of active cells for PERM[XYZ]
... and also with grids that reorder their cell indices.
2016-03-14 18:03:41 +01:00
Liu Ming
897aa67b89 use two slashes for comments inside functions. 2016-03-11 17:19:39 +08:00
Liu Ming
26e18bdcc4 use error variable. 2016-03-11 17:15:32 +08:00
Liu Ming
aa32349f19 fix saturation family bug. 2016-03-11 17:13:40 +08:00
Liu Ming
eafa6e2d9a fix indentation and fluid system issues. 2016-03-11 17:03:31 +08:00
Liu Ming
47fefe9e3a Merge remote branch 'remotes/opm/master' into solvent-diagnostics 2016-03-10 14:38:22 +08:00
Liu Ming
b7972eb01c Add solvent saturation functions support. 2016-03-10 14:32:43 +08:00
Liu Ming
95d65222fa Add solvent to fluid system. 2016-03-10 11:17:18 +08:00
Andreas Lauser
c635d84d37 threshold pressures: consider the saturated case and fix a typo
the typo was caused the surface density of the oil phase to be used
instead of the one of gas. This caused the density to be off by a
factor of typically about 900.

using saturated FVFs does not change much, but it does not hurt
because it is also done that way in the simulator.

This makes the defaults for the threshold pressures reasonable again,
but for some reason they are not exactly the same as in the old
implementation. (although the differences are very tolerable.)

On the question why only "Model 2" is affected by this: the other
decks don't use threshold pressures (SPE-X) or do not default any
values (Norne).
2016-03-08 14:52:09 +01:00
Andreas Lauser
dfda345661 BlackoilPropertiesFromDeck: properly calculate the Rs and Rv values for viscosity
the dissolution factors used for the viscosities were always zero so
far. this was not discovered earlier because flow is completely
unaffected by this since the only place where this class is used in
flow is the equilibration code and the equilibration code does not
need phase viscosities.

thanks to @atgeirr for finding this.
2016-03-08 11:07:20 +01:00
Andreas Lauser
23088f987f replace the blackoil PVT classes by the ones of opm-material
the opm-material classes are the ones which are now used by
opm-autodiff and this patch makes it much easier to keep the opm-core
and opm-autodiff results consistent. Also, the opm-material classes
seem to be a bit faster than the opm-core ones (see
https://github.com/OPM/opm-autodiff/pull/576)

I ran the usual array of tests with `flow`: SPE1, SPE3, SPE9 and Norne
all produce the same results at the identical runtime (modulo noise)
and also "Model 2" seems to work.
2016-03-05 19:11:44 +01:00
Joakim Hove
0c05fc4dc0 Merge pull request #966 from jokva/initconfig-equil
Remove Equil + EquilWrapper, replace with upstream
2016-03-04 18:18:57 +01:00
Atgeirr Flø Rasmussen
eb0f59f96d Merge pull request #965 from atgeirr/remove-unused-parameter
Remove unused 'restart' parameter from SimulatorTimer::init().
2016-03-04 11:22:01 +01:00
Atgeirr Flø Rasmussen
2a4ca8a34e Only .cpp files should include config.h. 2016-03-04 09:10:19 +01:00
Atgeirr Flø Rasmussen
54ac4bd5e4 Include template implementation file. 2016-03-04 09:09:52 +01:00
Liu Ming
58f53cae2a make grid as template parameter. 2016-03-04 09:09:38 +08:00
Jørgen Kvalsvik
27a240ae7f 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.
2016-03-01 09:59:54 +01:00
Atgeirr Flø Rasmussen
5c2257cafa Remove unused 'restart' parameter from SimulatorTimer::init(). 2016-02-29 11:03:08 +01:00
Atgeirr Flø Rasmussen
01df431198 Silence sign comparison warning. 2016-02-29 10:58:43 +01:00
Jørgen Kvalsvik
82472a1dfd Add missing opm-parser headers
opm-parser pull #695
https://github.com/OPM/opm-parser/pull/695
2016-02-26 11:49:40 +01:00
Joakim Hove
df6e6a2347 Replaced TwoPhaseState -> SimulatorState 2016-02-22 22:03:43 +01:00
Joakim Hove
6ca10ea57d Added SimulatorState::getCellData() 2016-02-22 22:03:42 +01:00
Joakim Hove
6c5fae2f9d Added free function initSaturation().
The state argument is of type SimulatorState& - and no longer a template
parameter.
2016-02-22 22:03:41 +01:00
Joakim Hove
a214c10595 Changes in SimulatorState:
1. Added method setCellDataComponent()
 2. Removed setFirstSat()

Implemented saturation initialisation using setCellDataComponent()
instead of setFirstSat(). This way the template<class Props> has been
removed from the SimulatorState class.
2016-02-22 08:42:04 +01:00
Andreas Lauser
377b844862 fix build breakage of the unit tests due to OPM/opm-parser#687
While the patch is quite trivial (some forgotten 'const'), the havoc
was caused because I usually configure my modules with --disable-tests
(to get much better turn-around times when switching all modules from
debug to optimization flags) and the usual way to force them to
compile ('make test-suite') does not work for opm-core...
2016-02-21 17:35:33 +01:00
Andreas Lauser
c709e347c3 fix some recent deprecation warnings
these are caused by OPM/opm-parser#687. While they are harmless, they
are certainly annoying. (that's their point!)
2016-02-21 17:29:43 +01:00
Atgeirr Flø Rasmussen
be1ea358ff Merge pull request #953 from andlaus/const_gridproperties
fix the build
2016-02-19 11:46:32 +01:00
Atgeirr Flø Rasmussen
0297d6c657 Merge pull request #957 from joakim-hove/cmp-template
Using template for cmp::vector_equal()
2016-02-19 11:41:07 +01:00
Joakim Hove
58f355935f Using template for cmp::vector_equal() 2016-02-19 07:57:02 +01:00
Jørgen Kvalsvik
b8edc8b5b4 Change Deck access methods/types to references
opm-parser#677 changes the return types for the Deck family of classes.
This patch fixes all broken code from that patch set.

https://github.com/OPM/opm-parser/pull/677
2016-02-18 08:50:26 +01:00
Joakim Hove
1661ac8f58 Merge pull request #956 from jokva/remove-unused-wrapper
Remove unused Wrapper includes from Deck/Utility
2016-02-17 17:10:43 +01:00
Jørgen Kvalsvik
62d7c7bed2 Remove unused Wrapper includes from Deck/Utility 2016-02-17 14:46:15 +01:00
Atgeirr Flø Rasmussen
dc918fcff9 Merge pull request #947 from andlaus/fix_wet_gas_pvt_extrapolation
PvtLiveGas: do not special case in the extrapolation code
2016-02-16 12:44:53 +01:00
Andreas Lauser
8f0d81db2f fix the build
it broke because EclipseState::get*GridProperty() now returns a
pointer to a constant object.
2016-02-15 15:06:05 +01:00
Joakim Hove
5172652e73 Removed opm_memcmp_double() - use cmp from common. 2016-02-14 21:41:51 +01:00
Joakim Hove
9b1efd7810 Revert: Removed unused SimulatorState comparison.
This reverts commit 5ce1d84ac1.
2016-02-04 18:39:40 +01:00
Joakim Hove
b241fde63c Revert: Removed unused SimulatorState::setFirstSat 2016-02-04 18:39:39 +01:00
Joakim Hove
4e46bb3fa4 Merge pull request #948 from joakim-hove/simulatorstate-remove-unused
Simulatorstate remove unused
2016-02-04 15:57:59 +01:00
Joakim Hove
5ce1d84ac1 Removed unused SimulatorState comparison. 2016-02-03 05:54:24 +01:00
Joakim Hove
df0d11b8de Removed unused SimulatorState::setFirstSat() 2016-02-03 05:51:05 +01:00
Andreas Lauser
e6c89a595b PvtLiveGas: do not special case in the extrapolation code
at least, don't special case that much. This caused a discrepancy with
the opm-material PVT relations for Norne after 23 report steps. (which
takes an hour or two to get to with debugging options on my machine.)
As you can probably imagine, finding this was *a lot* of fun...
2016-01-28 14:42:10 +01:00
Bård Skaflestad
6365167109 Merge pull request #946 from jokva/clean-up-header
Improve includes from opm-parser
2016-01-26 15:58:25 +01:00
Bård Skaflestad
d738138afa Merge pull request #943 from qilicun/update_relperm_diagnostics
Update relperm diagnostics
2016-01-26 15:12:28 +01:00
Jørgen Kvalsvik
697763a4b9 Improve includes from opm-parser
Adopting to opm-parser PR#661, add previously missing includes.

https://github.com/OPM/opm-parser/pull/661
2016-01-26 13:30:58 +01:00
Joakim Hove
ba1c06d415 Removed SimulatorState::init( UnstructureGrid& ) 2016-01-25 07:30:03 +01:00
Liu Ming
10baa52828 Omit some usages of to_string function. 2016-01-25 11:18:56 +08:00
Liu Ming
9e9287f20d change headline to saturation functions diagnostics. 2016-01-25 11:00:23 +08:00
Liu Ming
039f9ce1cc Format output and add SATNUM for scaled saturation endpoints. 2016-01-25 10:58:50 +08:00
Liu Ming
229282c310 fix bugs: counter warning as error. 2016-01-25 09:38:55 +08:00
Liu Ming
009f1b101b Merge remote branch 'remotes/opm/master' into update_relperm_diagnostics
Conflicts:
	opm/core/props/satfunc/RelpermDiagnostics.cpp
2016-01-22 13:04:01 +08:00
Jørgen Kvalsvik
c7349b5586 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.
2016-01-21 09:42:51 +01:00
Liu Ming
8e397ef7ce fix typo. 2016-01-21 16:10:31 +08:00
Liu Ming
ce0ec1e466 remove comments. 2016-01-21 14:04:01 +08:00
Liu Ming
dd9b607c99 make const as more as possible 2016-01-21 14:01:02 +08:00
Liu Ming
743f17169d saturation region should start with 1. 2016-01-21 13:47:57 +08:00
Liu Ming
c02c93ce1b fix formatting and grammar issues. 2016-01-21 13:45:32 +08:00
Liu Ming
2f2bd8a955 Add region number for output and output summary msg to streamLog 2016-01-18 11:10:51 +08:00
Liu Ming
682d0a7d1f change error to warning due to eclipse manual. 2016-01-18 11:10:36 +08:00
Liu Ming
3bce4e72b9 Add region number for unscaled endpoints. 2016-01-18 11:10:26 +08:00
Liu Ming
5e234fcd21 1. use scaled_messages_ to store scaled endpoints infor.
2. format the terminal output messages.
2016-01-18 11:10:14 +08:00
Liu Ming
1f809cf3d5 Add counter for numbering warning, error, proble, and bugs. 2016-01-18 11:10:04 +08:00
Liu Ming
3e143907d3 For that break clipse rules should raise an error. 2016-01-18 11:09:50 +08:00
Liu Ming
f38fe6d91b add cell index for scaled endpoints error messages output. 2016-01-18 11:09:02 +08:00
dr-robertk
b26eb3827f Merge pull request #937 from chflo/OPM_251_support_restart
OPM-251: Prepare for restart
2016-01-15 14:44:06 -07:00
Joakim Hove
a35520a65d Merge pull request #939 from joakim-hove/table-column
Table column
2016-01-08 15:29:10 +01:00
Joakim Hove
a6deb02d04 Changed to use new table api from opm-parser. 2016-01-08 14:47:09 +01:00
chflo
ca60041332 OPM-163: Use EclipseState instead of Deck for PvtInterface 2016-01-07 16:36:28 +01:00
Joakim Hove
a566ac608d Added TableColumn based overloads. 2016-01-06 09:19:47 +01:00
chflo
c003900145 OPM-251: Support for restart 2016-01-04 16:11:21 +01:00
Atgeirr Flø Rasmussen
125c27462d Merge pull request #928 from totto82/minpv_pinch
compatibility of MINPV and PINCH
2015-12-14 11:33:20 +01:00
Tor Harald Sandve
8827ca0794 Bugfix. Fix face direction in the pinchprocessor 2015-12-14 10:48:26 +01:00
Atgeirr Flø Rasmussen
cc07dc80b7 Merge pull request #934 from totto82/residualSaturations
Add method to access the materialLawManager
2015-12-11 13:08:39 +01:00
Tor Harald Sandve
7689f80a7f Add method to access the materialLawManager 2015-12-11 12:50:54 +01:00
Liu Ming
8605675199 make the constructor as explicit. 2015-12-09 16:51:07 +08:00
Tor Harald Sandve
43abdf5946 Adapt to changes in the NNC class 2015-12-08 13:03:15 +01:00
Tor Harald Sandve
c208d32498 BUGfix. Use correct facedirection 2015-12-08 12:57:43 +01:00
Tor Harald Sandve
7e4bff4a18 Hardcode usage of opmfil
The opmfil option in the minpv-processor will be used regardless of
OPMFIL input in the deck.
2015-12-08 11:04:54 +01:00
Tor Harald Sandve
3d7ce4ece2 Cleanup after rebase
- cleanup of some rebase mess
- Added comments
- Use the maxDp for the NNCs
- remove misplaced break in the pinchprocessor
2015-12-08 09:50:07 +01:00
Tor Harald Sandve
b8f54e4e59 Ignore segments with no active cells above or below. 2015-12-08 09:25:35 +01:00
Tor Harald Sandve
a7c1810029 Calculate thresholdPressures for the NNCs 2015-12-08 09:25:35 +01:00
Tor Harald Sandve
97466d988b Fix to account for the combination of minpv and pinch 2015-12-08 09:21:51 +01:00
Tor Harald Sandve
dec23df301 Add option for not including the removed volume in the MinpvProcessor
The volume in cells with pore volume less than the minpv threshold is
removed if minpvMode is ECLStd while it is added to the underlying cell
if minpvMode is OpmFil
2015-12-08 09:21:51 +01:00
Liu Ming
ef203a1d04 Merge remote branch 'remotes/opm/master' into relpermDiagnostics
Conflicts:
	CMakeLists_files.cmake
2015-12-08 16:08:02 +08:00
Liu Ming
252af19e4b Use OpmLog to output messages.
return messages and opmLog.
2015-12-02 10:58:06 +08:00
Atgeirr Flø Rasmussen
fc20fe5be9 Silence some warnings. 2015-12-01 13:36:08 +01:00
Liu Ming
780292875a remove unused functions and comments, add documentations to diagnosis(). 2015-11-30 10:52:34 +08:00
Liu Ming
91e14bec36 1. remove eclState from phaseCheck_ function.
2. rename messager_ to messages_.
3. change 0 and 1 to 0.0 and 1.0
4. change unsigned to int.
2015-11-30 10:42:57 +08:00
Liu Ming
544c7c24f9 reorder function and make more whitespace. 2015-11-30 10:26:59 +08:00
Liu Ming
5cfc3961db make enum as private members. 2015-11-30 10:20:43 +08:00
Liu Ming
6d06c36f64 1. Move implemtation to .cpp file.
2. Delete constructors.
3. Add config.h
2015-11-30 10:11:43 +08:00
Liu Ming
05ebcc2067 Fix bugs and remove reptetitive messagers. 2015-11-27 10:47:04 +08:00
Liu Ming
839d2e0471 Add NEXUS scaled endpoints consistency check. 2015-11-26 16:32:17 +08:00
Liu Ming
e600383589 Check scaled endpoints mobility. 2015-11-26 15:40:40 +08:00
Liu Ming
df6043ace6 add endpoints scaling consistency check. 2015-11-26 15:22:51 +08:00
Tor Harald Sandve
fd0dbe1d48 Use cell depths based on averaging cell corners 2015-11-24 10:17:12 +01:00
Liu Ming
89d688d0f8 make use of fluidSystem. 2015-11-20 11:04:50 +08:00
Liu Ming
9428c829c3 unify the output messages. 2015-11-20 10:57:13 +08:00
Liu Ming
57f4348f6d clear up unused functions. Make some functions ad private member. 2015-11-19 16:24:09 +08:00
Liu Ming
8810a47215 fix typo and output message. 2015-11-19 13:51:03 +08:00
Liu Ming
4d2c656a72 clear message output. 2015-11-19 13:31:02 +08:00
Liu Ming
5938bbc74b solve git cherry-pick conflict. 2015-11-19 11:05:43 +08:00
Liu Ming
26b680970f Use messager container to store error message.
Conflicts:

	opm/core/props/satfunc/RelpermDiagnostics.hpp
2015-11-19 11:00:21 +08:00
Liu Ming
1db1bf6fd6 initial RelpermDiagnostics. 2015-11-19 09:21:00 +08:00
Atgeirr Flø Rasmussen
84b3bcc6ea Merge pull request #907 from andlaus/thpress_from_initial
implement determining the threshold pressure from the initial condition
2015-11-17 09:03:02 +01:00
Andreas Lauser
e7d57bd0e6 thresholdPressures(): move the code which calculates the maximum gravity corrected pressure difference between EQLNUM regions to its own function
requested by [at]atgeirr
2015-11-13 15:36:50 +01:00
Atgeirr Flø Rasmussen
556e24f008 Merge pull request #922 from blattms/return_mask_for_updateOwnerMask
Return a constant reference to the mask for ParallelISTLInformation::updateOwnerMask
2015-11-13 15:20:35 +01:00
Andreas Lauser
dc9f73e94d thresholdPressures(): split several long lines
as requested by [at]atgeirr
2015-11-13 15:13:28 +01:00
Andreas Lauser
ec0f28c176 thresholdPressures(): constify all local variables which can be made constant
I have doubts if this will change anything in the binaries (and in my
personal opinion, these 'const's look quite ugly and are sometimes a
(small) annoyance when debugging), but I don't mind using the coding
style used by most of the rest of opm-core here.
2015-11-13 15:13:15 +01:00
Atgeirr Flø Rasmussen
909f62ef4b Follow class renaming. 2015-11-13 11:37:53 +01:00
Robert Kloefkorn
e5d3b3e10f timeError --> relativeChange. 2015-11-10 09:53:40 -07:00
Robert Kloefkorn
23c27cc826 AdaptiveTimeStepping: pass object to compute time error to time step control. This
allows us to shift the computation of the error to the physical model.
2015-11-10 09:45:07 -07:00
Atgeirr Flø Rasmussen
6ac19ac961 Merge pull request #920 from totto82/interpolation_points
Change the number of integration points in the initialization
2015-11-09 16:52:30 +01:00
Andreas Lauser
e49e9bd9b9 THPRES: only update the threshold pressure between regions if the saturation of the upstream cell is larger than the residual saturation
before it was 0. Again, thanks to [at]totto82 for the suggestion.
2015-11-05 15:39:29 +01:00
Andreas Lauser
f4fcb616be THPRES: change the sign of the gravity correction
we're correcting the pressure at the cell center depths to get the
pressure at the face depth, not the other way around. This is
confusing...

thanks to [at]totto82 for discovering this.
2015-11-05 12:29:19 +01:00
Andreas Lauser
6a9e11a4e1 fix a compressed vs logically Cartesian cell index bug
PVTNUM is for logically Cartesian indices, but was accessed by
compressed ones.
2015-11-05 12:29:19 +01:00
Andreas Lauser
547b701a57 implement determining the threshold pressure from the initial condition
This needs to be done if a equilibration region transition is
mentioned by the THPRES keyword, but no value is given for this record
in the third item. (it seems that this is used quite frequently.)

Also, the approach taken by this patch also does not collide with the
restart machinery as far as I can see. This is because the initial
condition is applied by the simulator before the state at the restart
time is loaded. (I interpreted the code that way, but I could be
wrong, could anyone verify this?)

since it is pretty elaborate to calculate initial condition, this
patch is pretty messy. I also do not know if Eclipse does include
capillary pressure in this calculation or not (this patch does). Huge
kudos go to [at]totto82 for reviewing, testing and debugging this.
2015-11-05 12:29:19 +01:00
Markus Blatt
8d253606fc Return a constant reference to the mask for ParallelISTLInformation::updateOwnerMask
Thus we can actually access the mask in external code. This is for
example needed when calculating averages in RateConverter of opm-autodiff.
2015-11-02 15:02:32 +01:00
Tor Harald Sandve
7542aca827 Change the number of integration points in the initialization
The number is changed from 100->2000 to increase accuracy.
2015-10-30 08:14:10 +01:00
Atgeirr Flø Rasmussen
bdd5104bc5 Merge pull request #919 from blattms/fixes-wells-with-perforations-in-overlap
Fixes well manager for wells crossing into cells that overlap.
2015-10-28 13:23:35 +01:00
Atgeirr Flø Rasmussen
11cd4d56ad Merge pull request #918 from blattms/allow-zero-initialization-of-rock-properties
Allow the rock properties to be zero initialized without a deck.
2015-10-28 13:21:16 +01:00
Markus Blatt
b12708785c Make constructor taking one argument explicit. 2015-10-28 13:19:42 +01:00
Markus Blatt
bd760d3e61 Added comment about 9 entries in permeability tensor. 2015-10-28 13:14:56 +01:00
Markus Blatt
de66419e38 Renamed well_index to well_index_on_proc and added comment.
This should prevent misunderstandings about what the
well_index_on_proc is. It is not the well_index according to
the eclipse state (on open wells count) but the index of the
wells that are stored on this process' domain.
2015-10-28 13:09:12 +01:00
Markus Blatt
4dbb517d92 Fix grammar and spelling in warning. 2015-10-27 14:26:01 +01:00
Markus Blatt
5676bd4573 Fixes well manager for wells crossing into cells that overlap.
In the parallel run there are cases where wells perforate cells
that are neighbors of overlap/halo cells. On other process only
parts of the well are seen as perforations. These wells should be
ignored there. While the well was indeed ignored, the perforations
found where mistakenly added to the well found due not clearing the
wellperf_data[well_index]. This commit now does this clearing and
results in the right handling of wells for e.g. SPE9.
2015-10-27 14:02:26 +01:00
Markus Blatt
de6cf63e50 Allow the rock properties to be zero initialized without a deck.
This is needed in parallel runs where the rock properties will not
be read from the deck but be communicated from a master process. Nevertheless
we need to be able to initialize the data structures with the correct
container size. In addition we need to be able to change the container values
from opm-autodiff's BlackoilPropsDataHandle.
2015-10-26 23:52:24 +01:00
Markus Blatt
8b7ccd9b19 [bugfix] Fixes copyOwnerToAll.
Previously, we copied owner/overlap to all which is clearly wrong.
Now we copy from owner to all as the function name says.
2015-10-26 23:45:12 +01:00
Arne Morten Kvarving
b20c21feb8 fix Equilibration test by adding some fuzz
Backports parts of a7b1e69a45
2015-10-26 11:21:26 +01:00
dr-robertk
d43e447852 Merge pull request #912 from atgeirr/bump-version
Bump version and unify format of dune.module.
2015-10-23 15:08:32 +02:00
Atgeirr Flø Rasmussen
7df248d2d6 Remove version.[ch] files. 2015-10-23 13:32:13 +02:00
Atgeirr Flø Rasmussen
50814d88ce Merge pull request #905 from atgeirr/fix-timestep-bug
Fix timestep bug
2015-10-22 13:37:49 +02:00
Atgeirr Flø Rasmussen
d460952d08 Make SaturationPropsFromDeck work for two-phase cases. 2015-10-21 15:27:52 +02:00
Atgeirr Flø Rasmussen
8a455fbde8 Remove unused arguments in PinchProcessor methods.
This silences warnings. It also makes it clear that
the cell thicknesses are not used in the current
algorithm, the doc comment has been updated to
reflect this.
2015-10-21 11:52:31 +02:00
Tor Harald Sandve
8b94e7b0eb Make the code more readable 2015-10-20 16:09:04 +02:00
Tor Harald Sandve
2330cd615a Complete undersaturated PVTG tables by extrapolating from existing data
This PR copies equivalent code from PvtLiveOil
2015-10-20 11:29:20 +02:00
Atgeirr Flø Rasmussen
8df54df573 Bugfix: currentStepNum() -> reportStepNum() also in RFT writer. 2015-10-20 10:35:25 +02:00
Atgeirr Flø Rasmussen
b47640db71 Bugfix: currentStepNum() -> reportStepNum(). 2015-10-20 10:04:56 +02:00
Atgeirr Flø Rasmussen
917d491a91 Improve formatting, comment and use separate scope.
To make it clear that the variables are only used here.
2015-10-20 09:58:34 +02:00
Atgeirr Flø Rasmussen
f2d735cacb Merge pull request #892 from qilicun/pinchprocessor
PinchProcessor
2015-10-19 10:22:44 +02:00
Liu Ming
b2390e2662 Fix FaceDir issues, deeper z should be ZPlus.
Fix whitespaces.
2015-10-19 15:24:28 +08:00
Liu Ming
ad819422b4 use range-for-loop to access cellfaces array. 2015-10-15 14:39:25 +08:00
Liu Ming
1c2b04f150 add comments and some minor changes. 2015-10-15 12:59:10 +08:00
Liu Ming
ca87064f47 refactor interface_ function. 2015-10-15 10:36:59 +08:00
Liu Ming
60db229072 use namespace in the function and remove unused variables. 2015-10-15 10:24:41 +08:00
Atgeirr Flø Rasmussen
d78e14c1c6 Merge pull request #897 from totto82/crossflow
Add boolean flag to determine whether crossflow is allowed in a well
2015-10-14 09:36:27 +02:00
Atgeirr Flø Rasmussen
a8e042aeb6 Merge pull request #902 from joakim-hove/rename-memcmp-double
Renamed memcmp_double -> opm_memcmp_double
2015-10-14 09:32:45 +02:00
Liu Ming
30b7842c5d use opm-common ErrorMarcos. 2015-10-13 15:13:14 +08:00
Atgeirr Flø Rasmussen
08eea02316 Merge pull request #899 from andlaus/error_macros_to_opm_common
Error macros to opm common
2015-10-12 13:31:42 +02:00
Joakim Hove
68e12e9250 Renamed memcmp_double -> opm_memcmp_double 2015-10-12 09:25:37 +02:00
Liu Ming
427c5b7afd use PinchMode instead of string. 2015-10-09 16:30:39 +08:00
Liu Ming
8788563088 fix actnum with cartesian grid issue. 2015-10-09 13:44:11 +08:00
Liu Ming
8beccf431f remove PINCH item 2 support. 2015-10-09 10:32:57 +08:00
Liu Ming
fc263590ea Merge remote branch 'remotes/opm/master' into pinchprocessor 2015-10-09 09:42:50 +08:00
Andreas Lauser
26c6077ddb remove the header files with the error macros 2015-10-08 12:14:16 +02:00
Andreas Lauser
c8000272bf use the error macros from opm-common 2015-10-08 11:42:15 +02:00
Tor Harald Sandve
95df0c5cf6 Set wd.allowCrossFlow directly 2015-10-07 12:50:00 +02:00
Tor Harald Sandve
2303c43c03 Avoid using bool in the c code 2015-10-07 12:49:05 +02:00
Bård Skaflestad
28a793c448 Merge pull request #896 from joakim-hove/relocate-warning-headers
Relocated warning headers.
2015-10-06 15:56:23 +02:00
Tor Harald Sandve
80cdb6bbf0 Add boolean flag to determine whether crossflow is allowed in a well
This PR adds allow_cf to the wells structure that determine whether
crossflow is allowed or not. An extra argument is added to addWell(..)
to specify the allow_cf flag.
2015-10-06 15:54:20 +02:00
Joakim Hove
c8649896f8 Relocated warning headers. 2015-10-06 11:39:14 +02:00
Joakim Hove
545aeeeb23 Fxied bug in table-container use. 2015-10-05 15:59:08 +02:00
Joakim Hove
61d5e291d6 Merge pull request #886 from joakim-hove/table-container
Changed Table code to use TableContainer
2015-10-05 14:46:49 +02:00
Joakim Hove
5b15bbdde2 Changed Table code to use TableContainer 2015-10-05 09:59:29 +02:00
Atgeirr Flø Rasmussen
0d802def88 Merge pull request #887 from osae/equil-water-zone
Support for equil-initialisation for datum depth outside oil zone.
2015-10-03 19:04:34 +02:00
Liu Ming
0d0abcd396 remove unused variables. 2015-09-30 14:05:09 +08:00
Liu Ming
0667203879 Use std function to get the index of value in vector. 2015-09-30 14:04:49 +08:00
Liu Ming
043dc83667 use std::numeric_limits instead of the constant big value. 2015-09-30 14:04:30 +08:00
Liu Ming
1eda852cca - rename functions and variables.
- add comments.
- add NNC object.
2015-09-30 14:04:00 +08:00
Liu Ming
82701040b2 Add PinchProcessor for keyword PINCH and MINPV. 2015-09-30 14:03:22 +08:00
Atgeirr Flø Rasmussen
fbd6fce24f Merge pull request #888 from totto82/avoid_throw_wellManager
WARN instead of THROW if completion is not found in the grid
2015-09-28 10:02:06 +02:00
Joakim Hove
43d1890190 Merge pull request #889 from totto82/fixTotalRates
Use correct units for the accumulated output
2015-09-23 10:35:23 +02:00
Markus Blatt
860bb6eaff Prevent WellsManager from subscripting empty container.
While hopefully not a bug it raises an exception with gcc's
libc debugging mode. Therefore we resort to using C++11's
std::vector::data instead.

The exception was rosen when running SPE9 in parallel.
2015-09-23 09:28:59 +02:00
Tor Harald Sandve
ac32b6302e Use correct units for the accumulated output
Avoid division on time in the total output of rates.
2015-09-22 15:49:01 +02:00
Tor Harald Sandve
4251b27737 WARN instead of THROW if completion is not found in the grid
Completions that are not found in the grid are ignored.
2015-09-22 13:51:06 +02:00
osae
6267a3f3e5 Support for equil-initialisation for datum depth outside oil zone. 2015-09-21 18:22:11 +02:00
Robert Kloefkorn
4881b3ab6a AdaptiveTimeStepping: also apply terminal output to solver_verbose. 2015-09-16 15:19:19 +02:00
Robert Kloefkorn
d972155d64 AdaptiveTimeStepping: pass variable terminal output to avoid multiple outputs in
parallel.
2015-09-16 14:33:35 +02:00
Robert Kloefkorn
0a6791313b WellState: move typedefs into public section and include string. 2015-09-16 12:36:05 +02:00
Robert Kloefkorn
68f8004132 WellState: add assertion on wells->name[]. 2015-09-16 09:48:43 +02:00
Robert Kloefkorn
c532d149bd WellState: move mapping from well name to well index to here from autodiff's WellStateFullyImplicitBlackoil. 2015-09-16 09:48:43 +02:00
Bård Skaflestad
c010d4c3e2 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
    }
2015-09-15 15:33:22 +02:00
Bård Skaflestad
a439f7bd88 convertSats(): Transpose loop nest for locality of data 2015-09-15 15:33:22 +02:00
Bård Skaflestad
234377fe72 Mark non-template functions in headers as 'inline' 2015-09-15 15:33:22 +02:00
Atgeirr Flø Rasmussen
5bd95582d2 Remove unnecessary include. 2015-09-15 14:53:46 +02:00
Atgeirr Flø Rasmussen
1ca5300f6e Move implementation to .cpp file. 2015-09-15 14:45:07 +02:00
Atgeirr Flø Rasmussen
7cfc09aa85 Use compressedToCartesian() to avoid possible null reference. 2015-09-15 14:23:10 +02:00
Atgeirr Flø Rasmussen
f2c6344d04 Moved compressedToCartesian() to its own file. 2015-09-15 14:13:58 +02:00
Tor Harald Sandve
876c8864c7 Use cell thickness from EclipseGrid in well transmissibility
calculations

The dz calculated in WellDetails::getCubeDim is not correct in cases
where the face centroid of the horizontal faces is located above or
below the face centroid or the vertical faces. The cell thickness in
EclipseGrid, calculated using the Z-coordinates, is therefore used
instead.
2015-09-15 10:50:56 +02:00
Atgeirr Flø Rasmussen
1cee1e038c Cleanup SaturationPropsFromDeck interface.
Unused methods and arguments have been removed,
and we avoid including the EclMaterialLawManager
in the header. Clients IncompPropertiesFromDeck
and BlackoilPropertiesFromDeck have been updated.
2015-09-14 15:02:59 +02:00
Atgeirr Flø Rasmussen
355c90279a Remove unused args from constructor.
Also from init() function. This means the methods are no longer templates,
and have been moved to the cpp file.
2015-09-14 15:02:59 +02:00
Robert Kloefkorn
0e86a6165a SimulatorState: export num_cells_ and num_faces_ and allow to register data from any
class. This is needed in the parallel output class. A formal interface for the state
class needs to be introduced.
2015-09-14 12:57:36 +02:00
osae
1fdc4c39dc Assure 4 vertices for each face of the grid. 2015-09-11 11:47:27 +02:00
osae
565fa4278e Add some comments and limit to 3 dimensions. 2015-09-10 18:29:02 +02:00
osae
299aa77e18 Cell center depth also from zcorn average.
There is a sligth difference between the cell depth taken from the
centroid (opm) and a straightforward average of corner coordinates
(ecl). For the initialisation of Norne this causes some differences
when deciding cell center positions relative contact depths.
2015-09-10 18:29:02 +02:00
Atgeirr Flø Rasmussen
99cf5299b6 Merge pull request #876 from blattms/wells-completion-might-cross-overlap
Allow a few well completions in the overlap.
2015-09-09 10:41:47 +02:00
Markus Blatt
3b4595d2d7 Allow a few well completions in the overlap.
If on one process a well completion is next to border then
it might also be stored in the neighbor process. Still not
all the completions of the well are known to the neighbor.
This breaks the previous assumption that for each well all
completions must belong to the partition of the process.

Therefore with this commit we allow wells that only have a
part of their completions assigned to the partition of the process.
This wells are deactivated under the assumption that they must
exist completely on another process due to the partitioning.
2015-09-08 20:38:02 +02:00
Atgeirr Flø Rasmussen
4448a557f0 Merge pull request #875 from totto82/change_default
Change default values
2015-09-08 17:55:28 +02:00
Atgeirr Flø Rasmussen
56c23d1a5a Merge pull request #873 from blattms/fix-parallel-wellsmanager-for-partly-shut-wells
[bugfix] Account for shut completions when checking well in parallel
2015-09-08 11:01:44 +02:00
Tor Harald Sandve
e8d8df5b47 Change default values
- use time stepping algorithm pid instead of pid + iter
Adjusting the time-steps on the number of linear iterations does
currently not give any improvents on the time-stepping.
- Change the pid tolerance. The time-stepper will take longer time-steps
and thus reduce the simulation time significantly. The Norne and the SPE
results does not degrade
- Less aggressive reduction of time-steps after convergence problems
2015-09-08 10:56:58 +02:00
Markus Blatt
3261ec3281 Make code clearer with and if-else-if statements and spaces. 2015-09-08 10:48:55 +02:00
Markus Blatt
7b5e07f8f6 Improve code comments. 2015-09-08 10:48:14 +02:00
Markus Blatt
ef6cf0d928 Make last commit compile 2015-09-08 09:30:16 +02:00
Markus Blatt
3412d1ff1e [bugfix] Account for shut completions when checking well in a parallel run.
Previously well with just some shut completions errorneously triggered an
exception in parallel runs. This is fixed with this commit.

Due to the logic shut completions will always be marked as existing
on a process. (Initially all completions are marked as found. For
each open completion we check whether the cartesian index belongs to
the local grid. If that is not the case we mark it as not found).
Therefore we now check whether the found number of completions
is either the number of shut completions or the number of all completions.
In the former case the well is not stored on this process, and in the latter
case it is. In other cases we throw an exception.
2015-09-07 16:55:08 +02:00
Robert Kloefkorn
65b5fa1c31 [BlackoilPropsFromDeck] remove sign/unsigned warnings. 2015-09-07 09:50:40 +02:00
Atgeirr Flø Rasmussen
c17488888e Merge pull request #867 from babrodtk/fix_warnings
Fixed several warnings
2015-09-04 14:13:34 +02:00
Atgeirr Flø Rasmussen
c042a1912a Merge pull request #869 from blattms/fix-for-loop-initial-decl
Fix complaint about initial declaration in foor loops.
2015-09-04 14:10:46 +02:00
babrodtk
96e1a89abe Fixed even more warnings 2015-09-03 15:17:10 +02:00
babrodtk
221d1a3e92 Fixed several warnings 2015-09-03 15:17:10 +02:00
Markus Blatt
7db80ba2c6 Fix complaint about initial declaration in foor loop.
gcc-4.7.2 (Debian 4.7.2-5) complained about:
"‘for’ loop initial declarations are only allowed in C99 mode
note: use option -std=c99 or -std=gnu99 to compile your code"
when seeing a loop like
for(int i=0; i<end; ++i)

This is fixed by moving the declaration before the for loop with
this commit. Altenatively, we could use the above option.
2015-09-03 14:03:25 +02:00
Tor Harald Sandve
a765659d90 Limit the timestep growth for all timestepping algorithm
The time step restriction is moved to AdaptiveTimeStepping_impl.hpp to
make it apply to all time-stepping algorithms.
2015-09-03 12:52:47 +02:00
Andreas Lauser
71bbc01fdf SaturationPropsFromDeck: fix some array index screw-ups in the twophase case
I don't think the code gets more beatiful because of this, but it
seems like it does not crash anymore.
2015-09-02 12:29:18 +02:00
Andreas Lauser
faadeaa0aa use a .cpp instead of an _impl.hpp file for SaturationPropsFromDeck
this avoids having to include the "Evaluation.hpp" file as the first
thing in the morning.
2015-09-02 12:29:18 +02:00
Andreas Lauser
bc9ab3862b InitStateEquil: fix valgrind complaint about uninitialized values
it seems that it was pure luck that this worked so far!
2015-09-02 12:29:18 +02:00
Andreas Lauser
a1eb108528 remove the now obsolete SatFunc* classes 2015-09-02 12:29:18 +02:00
Andreas Lauser
921f377a1d SaturationPropsFromDeck: add the code to calculate all saturation properties using opm-material
also remove the now obsolete code in that class.
2015-09-02 12:29:11 +02:00
Andreas Lauser
f32ab0e4e3 add a fluid state where scalars include the derivatives w.r.t. the saturations 2015-09-02 12:23:24 +02:00
Andreas Lauser
919ba96c09 ExplicitArraysFluidState: always make it appear threephase to the exterior, but also accept twophase arrays 2015-09-02 12:23:24 +02:00
Joakim Hove
34e90a0a30 Merge pull request #865 from joakim-hove/table-refactor
Using TableManager to get tables.
2015-09-02 11:57:53 +02:00
Markus Blatt
31617da382 [bugfix] Allow querying the current time step even if we are done.
Previously there was an assertion whether the time stepping is still
running when querying the time step. After commit 5af794cfd5 this
triggered an assertion for Norne. As there is no reason to limit querying
the current time step in this way. This commit simply removes the assertion
in AdaptiveSimulatorTimer::currentStepLength.

This closes OPM/opm-autodiff#446
2015-09-01 19:34:30 +02:00
Joakim Hove
f3151a9abe Using TableManager to get tables. 2015-09-01 12:58:09 +02:00
osae
f81a4d62a4 Zero-porosity cells and MINPV.
Model 2 partly uses PORO=0.0 to signal inactive cells. This PR
prevents such cells from causing unwanted zcorn modifications in
the current min-pv algoritm. (The problem is however more general as
zero PORO or NTG should kill a cell whether MINPV is active or not,
refer kw ACTNUM.)
2015-08-27 17:49:10 +02:00
Joakim Hove
6579a150f3 Merge pull request #860 from joakim-hove/THPRES
Using map base ThresholdPressure implementation.
2015-08-25 16:23:56 +02:00
Joakim Hove
f8fb0ab7ab Using map base ThresholdPressure implementation. 2015-08-25 16:22:37 +02:00
Tor Harald Sandve
b318686df1 Rename last_timestep_ to suggested_next_timestep_ 2015-08-25 11:16:36 +02:00
Tor Harald Sandve
5af794cfd5 Use estimated time-step instead of average in next report step 2015-08-25 06:32:39 +02:00
Fredrik Gundersen
352a5d826b Updated as needed by new opm-parser functinality 2015-08-24 15:37:49 +02:00
Fredrik Gundersen
3d90a918d5 Merge remote-tracking branch 'upstream/master' 2015-08-24 08:35:58 +02:00
chflo
48c17ebd86 OPM-215: Added fault handling 2015-08-21 13:25:34 +02:00
Fredrik Gundersen
09aa2b7bf7 Added suport for new Threshold Pressure behavior 2015-08-20 13:00:01 +02:00
chflo
9d723ab071 OPM-215: Added method restoreSOLUTIONData() to EclipseReader, and helper methods 2015-08-20 12:37:06 +02:00
chflo
c5383bc576 OPM-215: Created EclipseIOUtil.hpp file 2015-08-20 10:06:48 +02:00
babrodtk
3bca45883a Fixed whitespace 2015-08-19 13:20:58 +02:00
Atgeirr Flø Rasmussen
eba000bf17 Do thp init() differently. 2015-08-19 13:12:15 +02:00
babrodtk
104159af15 Minor fixes 2015-08-19 13:12:14 +02:00
babrodtk
761973b01e Fixed several compiler warnings 2015-08-19 13:12:14 +02:00
babrodtk
a103c59f3f Bugfix with THP for injection wells 2015-08-19 13:12:14 +02:00
babrodtk
5fb364a48b Removed superfluous line 2015-08-19 13:12:14 +02:00
babrodtk
ac0e72ea1d Refactoring 2015-08-19 13:12:14 +02:00
babrodtk
c7a66bf595 Update support for VFP tables: Now produces almost identical results to BHP for 'identity' table' 2015-08-19 13:12:14 +02:00
babrodtk
5913535396 More integration of VFP tables 2015-08-19 13:12:03 +02:00
babrodtk
88c3596535 Initial integration of VFP 2015-08-19 13:11:41 +02:00
babrodtk
53413e9318 Fixed warning 2015-08-19 13:10:48 +02:00
babrodtk
c4aae4440e Update support for VFP tables: Now produces almost identical results to BHP for 'identity' table' 2015-08-19 13:10:48 +02:00
babrodtk
e05b7778d7 More integration of VFP tables 2015-08-19 13:10:48 +02:00
babrodtk
1dab5351c2 Initial integration of VFP 2015-08-19 13:10:48 +02:00
Atgeirr Flø Rasmussen
13d443473e Match init order to member order.
In a constructor initialisation list, the order should be the same
as the order in which the variables actually are initialised, which
is given by the order they are declared in the class and not by the
order in the initialisation list.
2015-08-19 11:33:29 +02:00
Kai Bao
5e5271b14d adding command line option full_timestep_initially_
when the option is true, for each report step, the size of the adaptive
time step always beginning with the size of the report step.
2015-08-17 15:56:31 +02:00
Atgeirr Flø Rasmussen
64b83989d5 Correct comment. 2015-08-17 13:02:37 +02:00
Atgeirr Flø Rasmussen
e88e62a68d Catch MatrixBlockError in the adaptive time stepper.
This can be thrown by the ILU0 preconditioner when using the
interleaved solver approach.
2015-08-17 12:59:31 +02:00
Atgeirr Flø Rasmussen
9c6cabcd9a Use the correct (new) method from the Group class for group RESV.
Production controls now are no longer initialised from injection control data.
2015-08-13 10:21:24 +02:00
Atgeirr Flø Rasmussen
0147d28257 Merge pull request #848 from atgeirr/fix-bugs-explicitarraysfluidstate
Fix bugs related to ExplicitArraysFluidState
2015-08-12 15:25:29 +02:00
Joakim Hove
20968d9c0a Added small utility memcmp_double() 2015-08-12 14:31:07 +02:00
Atgeirr Flø Rasmussen
6921bd2af9 Make saturation functions work with two phases again.
Note that this changes ExplicitArraysFluidState to take
a run-time argument for the number of phases.
2015-08-12 13:38:32 +02:00
Atgeirr Flø Rasmussen
6c821aef10 Bugfix: add forgotten setIndex() call. 2015-08-12 13:38:10 +02:00
Atgeirr Flø Rasmussen
547018d3c7 Merge pull request #845 from atgeirr/fix-abs-bug-and-warnings
Fix abs bug and warnings
2015-08-12 12:50:31 +02:00
Atgeirr Flø Rasmussen
8a0010527c Suppress warnings. 2015-08-10 16:07:45 +02:00
Atgeirr Flø Rasmussen
1ead8dd458 Fix bug in floating-point comparison.
The function used integer abs() instead of fabs(), in C abs() only
takes integers so this is an error. Also needed to add comparison
with absolute tolerance to get reasonable behaviour (comparing 0 versus
0.0000000000001 is ok here).
2015-08-10 16:05:00 +02:00
Joakim Hove
8820e80f4a Merge pull request #843 from chflo/opm-218-reverse
Reverse changes that should not have been merged into master
2015-08-10 15:26:28 +02:00
Atgeirr Flø Rasmussen
d8edb3db92 Merge pull request #838 from andlaus/initialize_SatHyst
properly initialize the attributes of the SatHyst class
2015-08-10 14:26:54 +02:00
chflo
0ee4ed6eab Reverse changes that should not have been merged into master 2015-08-10 14:17:59 +02:00
Atgeirr Flø Rasmussen
2e4a8da02c Remove warning-suppression utility headers.
They have been moved upstream to opm-parser.
2015-08-10 10:52:52 +02:00
Robert Kloefkorn
9b16794a56 TofDiscGalReorder and TofReader: remove warnings due to new boost version. 2015-08-07 12:02:59 +02:00
Atgeirr Flø Rasmussen
06c9d7d7e5 Merge pull request #839 from atgeirr/handle-new-umfpack
Define the UF_long type if necessary.
2015-08-07 11:11:23 +02:00
Joakim Hove
7b6172a1f8 Updated to use ParseMode. 2015-08-06 15:56:51 +02:00
Andreas Lauser
feae6e393a properly initialize the attributes of the SatHyst class
this caused the hysteresis saturation shifts to be initially wrong and
was probably the source of a lot of my confusion w.r.t. the saturation
scaling and hysteresis shift code. I guess this also fixes a valgrind
complaint, but I haven't checked...
2015-08-06 11:34:22 +02:00
Atgeirr Flø Rasmussen
596eba610a Define the UF_long type if necessary.
The UF_long type is deprecated in UMFPack, and actually seems
to be removed from the latest versions.
2015-08-06 09:54:05 +02:00
chflo
a949d5a736 OPM-218: Write restart files at same interval as eclipse 2015-08-05 13:38:52 +02:00
chflo
5e9e472613 OPM-218: Fix Flow vs Eclipse restart interval write differences: Use new method for correct date in rsthead 2015-07-27 13:27:14 +02:00
chflo
338777f514 OPM-218: Fix Flow vs Eclipse restart interval write differences: Override method from SimulatorTimerInterface 2015-07-27 13:26:28 +02:00
chflo
0f064bea3e OPM-218: Fix Flow vs Eclipse restart interval write differences: Added new method to SimulatorTimerInterface 2015-07-27 13:25:33 +02:00
Robert Kloefkorn
ae740adaf3 SimulatorState: use register{Cell/Face}Data also in SimulatorState. 2015-07-08 16:30:51 +02:00
Robert Kloefkorn
0ad5146b1f make ids protected. 2015-07-08 13:24:19 +02:00
Robert Kloefkorn
034f163d88 SimulatorState: clear memory on init. 2015-07-08 13:23:36 +02:00
Robert Kloefkorn
5ca0a0f788 SimulatorState: added copyright
BlackoilState: added copyright

Also, small docu fix.
2015-07-08 13:23:36 +02:00
Robert Kloefkorn
3bc520eeb7 SimulatorState: store all data in a vector to allow for flexibility when used with
derived states.
BlackoilState: adjusted to SimulatorState changes.
2015-07-08 13:23:36 +02:00
Atgeirr Flø Rasmussen
7df516896d Fix unused argument warnings. 2015-07-08 12:37:11 +02:00
Andreas Lauser
4fe4bee158 fix SatFuncMultiplexer on old compilers
"old" == "gcc 4.4". the standard c++ library of this compiler seems to
invoke the copy operator when creating objects in a vector, whereas
newer versions of the library don't. The problem is that std::unique
pointer cannot be copied because it is -- err -- unique and thus the
implicit copy operator for the SatFuncMultiplexer class gets deleted
by the compiler.

the fix is to introduce a "fake" copy operator which does not do
anything but is present to make std::vector of stdlibc++-4.4
happy. this is obviously not very elegant, but I could not come up
with a better solution. (another fix would be to use raw pointers
instead of std::unique_ptr, but IMO this does not qualify as
"better".)
2015-07-02 11:47:32 +02:00
Andreas Lauser
8ccf1b3dbe multiplexer saturation function: get rid of the pesky union and the reinterpret_cast
basically, we now store a pointer to the base class and convert this
to the concrete incarnation of the saturation function. the only
disadvantage of this is that it requires to allocate the concrete
objects dynamically, i.e., there's another layer of indirection. On
the plus side it saves a few bytes per object and it makes things
quite a bit simpler, so it is a win IMO.

thanks to [at]atgeirr for suggesting this.
2015-06-29 15:28:30 +02:00
Andreas Lauser
388578f5ba use the multiplexer saturation function in SaturationPropsFromDeck
this makes it possible to switch to different saturation functions
again. So far the only supported function besides the default one is
the one which implements the "Stone 2" model.
2015-06-29 14:49:20 +02:00
Andreas Lauser
47521dca1d add a multiplexer saturation function 2015-06-29 14:49:20 +02:00
Andreas Lauser
e016b1ea37 convert the "Stone2" and "Simple" saturation functions to fluid states 2015-06-29 14:49:20 +02:00
Andreas Lauser
63075249a9 SaturationPropsFromDeck: make the jump to fluid states
this means the following changes:

- the "SatFuncGwseg" class is converted
- for now, Gwseg is the only saturation function supported by
  SaturationPropsFromDeck. (will be changed in later commits.)
- the funcForCell() method of SaturationPropsFromDeck is removed as it
  just occludes things
2015-06-29 14:49:20 +02:00
Andreas Lauser
4b5de05d15 SaturationPropsFromDeck: remove the 'SatFuncSet' template parameter
in any reasonable simulator which reads an ECL deck the deck is going
to decide which saturation function is to be used and not the outside
code. also, the table this which function will be using is not really the
calling code's business. (for any reasonable deck it is always going to
be a non-uniform table so it makes a lot of sense to avoid unnecessary
complexity IMO.)

this patch temporarily removes the ability to use anything except the
ECL default saturation function ("Gwseg"). this ability will be
restored later in this patch series.
2015-06-29 14:49:20 +02:00
Andreas Lauser
3c484e4c6f add some fluid state classes
namely BlackoilStateToFluidState which takes a BlackoilState object
and exposes it as a opm-material like fluid state object. Similar for
ExplicitArraysFluidState, which takes raw arrays.

since fluid states are a local API, the index of the cell to be used
for these two classes must be set externally. The advantage of this
concept is that it is possible to make "saturation functions" which
not only depend on saturations but also on arbitrary other quanties
(like temperature or phase composition) without having to change the
API of the "saturation" functions.
2015-06-29 14:49:20 +02:00
Andreas Lauser
6ff2cc287f remove obsolete and empty file SatFuncStone2.cpp 2015-06-26 13:01:30 +02:00
Andreas Lauser
4ee7c34970 remove obsolete and empty file SatFuncGwseg.cpp 2015-06-26 13:01:30 +02:00
Andreas Lauser
db615ae01f remove obsolete and empty file SaturationPropsFromDeck.cpp 2015-06-26 13:01:22 +02:00
Atgeirr Flø Rasmussen
590a4898b8 Add missing include statement. 2015-06-22 13:04:14 +02:00
Atgeirr Flø Rasmussen
ae378c691b Merge pull request #819 from edbru/OPM-188
Opm 188 Read and write of RESTART wellstate data
2015-06-22 12:34:31 +02:00