Commit Graph

1305 Commits

Author SHA1 Message Date
Markus Blatt
0b18e6a15f Improve documentation of convergenceReductions. 2015-01-28 16:54:28 +01:00
Markus Blatt
2209170c15 Use the already queried active phase index directly instead of looking it up each time. 2015-01-28 16:40:23 +01:00
Markus Blatt
622c8825a9 Correctly initialize the Eigen arrays.
Previously, we just called the default constructor. Of course this does not allocate
any memory and we experienced segmentation faults. With this patch we correctly
allocate the arrays by passing the number of row and columns to the constructor.
2015-01-28 16:38:10 +01:00
Markus Blatt
f820e1d441 Moves calculation of the total pore volume into convergenceReduction.
It is a global reduction in the parallel case and should therefore be
computed together with the other ones.
2015-01-27 12:49:55 +01:00
Markus Blatt
ddc2b820a7 Factors out the reduction part into a separate function.
Theses reductions are global and will require a different
behaviour in the parallel case.
2015-01-27 10:31:30 +01:00
Markus Blatt
0b81cd8f6f Reduces code duplication and reorganizes code when checking convergence.
The computations made to check the convergence are the same for all existing
phases. Therefore this patch uses loops over the phase indices when cmputing
them,

In the convergence check there are several reductions (maxCoeff(), sum())
that will trigger communication in a parallel run. This patch seperates the
reductions from the other computations. The idea is to one reduction for the
reductions that need to done as global communication is expensive.
2015-01-27 10:31:30 +01:00
Bård Skaflestad
7dfcf7b0c0 Merge pull request #282 from atgeirr/fix-wellstate-init
Fix issues in WellStateFullyImplicitBlackoil::init().
2015-01-26 23:12:12 -06:00
Atgeirr Flø Rasmussen
ce3519dadb Fix issues in init().
- Failed to set all rates to zero initially.
 - Could set out-of-bounds index if number of controls changed.
2015-01-26 16:46:51 +01:00
Atgeirr Flø Rasmussen
56ef604773 Merge pull request #280 from dr-robertk/PR/restart-solver-when-residual-nan
Restart solver when residual is nan or to large.
2015-01-26 13:08:37 +01:00
Robert K
3416cba92a added white space after comma. 2015-01-26 12:43:25 +01:00
Robert K
894983fc7b FullyImplicitBlackoilSolver: add max_residual_allowed parameter to restart solver when
residual is to large.
2015-01-26 12:43:25 +01:00
Robert K
8f29cae4cb FullyImplicitBlackoilSolver: throw Opm::NumericalProblem when one of the residuals is
NaN.
2015-01-26 12:43:25 +01:00
Atgeirr Flø Rasmussen
59f9b58d54 Merge pull request #281 from totto82/copy_perf_shut_complitions
Only copy perfPhaseRates if number of perforations is equal.
2015-01-26 10:17:51 +01:00
Tor Harald Sandve
7bf7b52dd8 Only copy perfPhaseRates if number of perforations is equal.
The number of perforations may change due to completions beeing shut.
If the number of perforations changes the perfPhaseRates are set to
equal the wellRates/(number of perforations) instead of the values from
the previous time step.
2015-01-23 14:10:10 +01:00
Atgeirr Flø Rasmussen
e7dc775a05 Merge pull request #278 from dr-robertk/PR/fix-276-gcc44
remove template keyword.
2015-01-20 14:53:39 +01:00
Robert K
0af8dd0e1d remove template keyword. 2015-01-20 14:27:37 +01:00
Atgeirr Flø Rasmussen
97b98328c6 Merge pull request #276 from dr-robertk/PR/allow-to-run-without-wells
Allow sim_fibo_ad to run without wells.
2015-01-20 13:03:08 +01:00
Robert K
4b551421be FullyImplicitBlackoilSolver: fix dangerous usage of assert. 2015-01-20 12:55:46 +01:00
Robert K
463e4bc5e3 BlockOilSimulator: allow to run without wells (mainly for testing and debugging). 2015-01-20 11:38:46 +01:00
Atgeirr Flø Rasmussen
bfe5f57c9a Merge pull request #277 from blattms/fix-phaseindex
Unifies the phase indices with the ones in opm-core.
2015-01-20 09:31:59 +01:00
Markus Blatt
cb43fc5e94 Unifies the phase indices with the ones in opm-core.
The initial definition of the phase indices seems to be in
opm/core/props/BlackoilPhases.hpp. Nevertheless there were
several redefinitions of the same or similar enums (either
Aqua, Liquid, and Vapor, or Water, Oil, and Gas). Surprisingly
most often these definitions did not use the original values.
This is bound to break if there is a change upstream.

This patch limits the definition to one place in opm-autodiff,
namely opm/autodiff/BlackoilPropsAdInterface.hpp. To avoid
downstream confusion we define both the Water and Aqua triplets.
In addition we define the maximum number of phases to use at compile
time.
2015-01-19 20:18:14 +01:00
Atgeirr Flø Rasmussen
325ad95e80 Merge pull request #274 from blattms/generic-transmissibilities
Implement generic transmissibilities computations using the GridHelpers
2015-01-15 22:40:05 +01:00
Markus Blatt
dca6b436a7 Activates transmissibilities test for CpGrid without warnings.
Tests run fine for both grids.
2015-01-15 21:27:07 +01:00
Markus Blatt
57bf00cd27 [bugfix] Fixes cellCentroidCoordinate implementation.
Somehow this was never defined for CpGrid due to a copy&paste error.
2015-01-15 21:24:35 +01:00
Markus Blatt
a3acd22f24 Implement transmissibilities using the generic GridHelpers interface. 2015-01-15 21:24:35 +01:00
Atgeirr Flø Rasmussen
656e688692 Merge pull request #272 from blattms/add-facetag-access-2
Adds free function to access the face tag to UgGridHelpers.
2015-01-15 20:30:51 +01:00
Atgeirr Flø Rasmussen
7086ece5a2 Merge pull request #273 from blattms/ports-transmissilities-test-to-grid-helpers
Ports transmissibilities test to grid helpers
2015-01-15 14:46:31 +01:00
Atgeirr Flø Rasmussen
9d6e55c4a1 Merge pull request #268 from dr-robertk/PR/EclipseWriter-revision-to-write-substeps
Support of writing substeps with EclipseWriter.
2015-01-15 13:52:35 +01:00
Robert K
e577b3b2d9 SimulatorFullyImplicitBlackoil: only access output parameters when output is enabled. 2015-01-15 13:31:28 +01:00
Markus Blatt
b0707e05bf Ported test_transmissibilities to the UgGridHelpers interface.
Previously, there were a completely different check for UnstructuredGrid
and CpGrid. The latter probably not working properly due to missing
support in the DUNE grid interface.

This commit resorts the code to use the UgGridHelpers abtraction instead of
UnstructuredGrid's legacy grid interface. Thus one code can be used to do
the checks for both grids. For UG the code compiles and the test is successful.
For CpGrid it compiles but of course the test still fails due to missing
transmissibility multiplier support. This will be sorted out in a different PR.
2015-01-14 11:56:37 +01:00
Markus Blatt
e681d6b836 Use correct constructor for ntgGeology.
This should have been in the previous PR. But I missed it when splitting
things up.
2015-01-14 11:56:37 +01:00
Markus Blatt
4a0fbafbcc Adds free function to access the face tag to UgGridHelpers.
It uses the iterator over the cell faces to identify the face tag
in constant time.
2015-01-13 20:31:13 +01:00
Bård Skaflestad
18fa00b542 Merge pull request #270 from blattms/transmissibility-check-with-local
Use correct constructor of DerivedGeology used with CpGrid in test_trans...
2015-01-12 15:23:30 +01:00
Markus Blatt
55fb6fa7ed Use correct constructor of DerivedGeology used with CpGrid in test_transmissibilities.
The constructor now needs and additional boolean to
flag whether to local permeabilities. The old one used
is not there anymore. Therefor this patch moves the code
to the new constructor interface.
2015-01-12 14:56:42 +01:00
Robert K
7fd9895a12 Merge remote-tracking branch 'upstream/master' into PR/EclipseWriter-revision-to-write-substeps 2015-01-12 12:35:22 +01:00
Atgeirr Flø Rasmussen
86e5677b8e Merge pull request #269 from totto82/rsrv_fix
BUGFIX: Avoid inclusion of disgas in the vapoil contribution
2015-01-12 10:08:13 +01:00
Tor Harald Sandve
088cac6801 BUGFIX: Avoid inclusion of disgas in the vapoil contribution
A temporary copy is added to avoid inclusion of dissolved gas when the
vaporized oil contribution is added in the accumulation term for the oil
phase.
2015-01-12 07:19:18 +01:00
Robert K
6b4a63787d cleanup of unused code. 2015-01-09 16:27:37 +01:00
Robert K
f11d1758c1 also write initial data when using adaptive time stepping. 2015-01-09 16:26:48 +01:00
Robert K
a9edc45a49 Added flag for matlab output. default behavior is the same as before.
Also, avoid possibly uninitialized variables.
2015-01-09 16:26:30 +01:00
Robert K
e7e63e1989 make writing of substeps work 2015-01-09 16:26:30 +01:00
Atgeirr Flø Rasmussen
7a3008db72 Merge pull request #265 from totto82/fix_stoppedwells2
Account for the renaming in the wellsManager
2015-01-09 13:16:37 +01:00
Atgeirr Flø Rasmussen
20599ab698 Merge pull request #263 from totto82/phase_pressure
Use phase pressures for the fluid properties
2015-01-09 10:35:34 +01:00
Tor Harald Sandve
eefac9584e Add on overload of computePressure() that accepts explicit saturations
The overload is used direcly in variableState() to clean the code as
well as in the orignal computePressures(state) implementation.
2015-01-07 12:46:12 +01:00
Tor Harald Sandve
23f1f443fc Fix the fall out in case of missing gas phase 2015-01-07 08:34:08 +01:00
Tor Harald Sandve
5572a14c20 Account for the renaming in the wellsManager
Shut is renamed to stopped in the wellsManager in order to better
reflect the name logic in the deck. This PR implements the nessesary
change in opm-autodiff
2014-12-19 07:18:36 +01:00
Atgeirr Flø Rasmussen
29df1cab88 Merge pull request #262 from bska/fix-make-install
Fix "make install" in opm-autodiff
2014-12-18 11:20:49 +01:00
Tor Harald Sandve
0a0a3b2ba6 Use phase pressures for the fluid properties
There has been an inconsitancy in which pressure to use in the
evaluation of the fluid properties.
With this commit the phase pressure is used for all the evaluation of
the fluid properties.
2014-12-18 08:51:08 +01:00
Bård Skaflestad
b9b2b9f520 Really catch up to file renaming.
Pointy hat: @bska
2014-12-17 11:39:51 +01:00
Bård Skaflestad
c04351d4ac Merge pull request #261 from atgeirr/master
Fix call to DerivedGeology constructor.
2014-12-17 11:37:15 +01:00