Commit Graph

573 Commits

Author SHA1 Message Date
Markus Blatt
f5ed31d128 Fixes rotated function parameters during function call.
There was a mixup in the order of the function parameters, both in
the declaration and in the actual function call. This commit resolves this.
2015-01-28 19:08:48 +01:00
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
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
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
Robert K
0af8dd0e1d remove template keyword. 2015-01-20 14:27:37 +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
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
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
Robert K
e577b3b2d9 SimulatorFullyImplicitBlackoil: only access output parameters when output is enabled. 2015-01-15 13:31:28 +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
Robert K
7fd9895a12 Merge remote-tracking branch 'upstream/master' into PR/EclipseWriter-revision-to-write-substeps 2015-01-12 12:35:22 +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
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
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
Atgeirr Flø Rasmussen
e1af08c5d2 Add a generic (throwing) tpfa_loc_trans_compute_().
Without this, we may have link errors with CpGrid, since only
an UnstructuredGrid specialization was provided.
2014-12-17 10:47:16 +01:00
Atgeirr Flø Rasmussen
1348658507 Merge pull request #249 from totto82/locTrans
Compute half transmissibilities based on local coordinate system
2014-12-17 00:20:11 +01:00
Atgeirr Flø Rasmussen
28af900f0b Merge pull request #250 from dr-robertk/PR/performance-avoid-zero-matrix-entries
Further performance improvement by avoiding zeros in matrix-matrix product.
2014-12-16 14:12:14 +01:00
Tor Harald Sandve
25a4bb5fbe Add contribution from region multipliers
The multiplier contribution from the getRegionMultiplier is added to the
face multipliers. The getRegionMultiplier method is called with the cell
index on both side of the face in order to return the correct region
multiplier across faults.
2014-12-10 11:46:49 +01:00
Tor Harald Sandve
6ae7f460ff Implement code style comments 2014-12-10 07:34:56 +01:00
Tor Harald Sandve
02724b7f7a Implement comments for PR#249
1) Add the possibility for the user to chose between local and global
coordinate permeability in the transmissibility calculations.
2) Trow for CpGrid
3) Add default for switch
2014-12-10 07:29:05 +01:00
Tor Harald Sandve
b11534b137 Compute half transmissibilities based on local coordinate system
hTrans(cellFaceIdx) = K(cellNo,j) * sum( C(:,i) .* N(:,j), 2) /
sum(C.*C, 2),
Only for diagonal tensors, off-diagonal permeability values are ignored
without warning
2014-12-10 07:29:05 +01:00
Atgeirr Flø Rasmussen
2bfb928c14 Merge pull request #247 from andlaus/RateConverter_remove_averageTemperature
RateConverter: remove the unused averageTemperature() method
2014-12-08 11:01:09 +01:00
Robert K
5287c54c1d fix parameter order for SeqILUn. 2014-12-05 15:03:59 +01:00
Robert K
8fecf98f37 [cleanup] remove commented code. 2014-12-05 14:50:55 +01:00
Robert K
230447bea0 [cleanup] I revert the sort call to QuickSort again since it's faster on my machine. 2014-12-05 14:48:16 +01:00
Robert K
9a2a95c6eb This commits allows for flexible choice of either ILU(0) or ILU(n) where n is a
dynamical parameter given in the parameter file. The default is 0 (as before).
In addition the relaxation parameter has been added to the parameter with the
default preserving the state from before.
Also, the default parameter for use_amg and use_bicgstab in the constructor of
CPRPrecondition have been removed.
2014-12-05 14:03:58 +01:00
Atgeirr Flø Rasmussen
cda742ab0e Redo commit 6f55c862 after rebasing. 2014-12-05 13:10:33 +01:00
Atgeirr Flø Rasmussen
5b6765f9d8 Use fastSparseProduct() in place of Eigen's product. 2014-12-05 13:09:46 +01:00
Atgeirr Flø Rasmussen
c43b9f4a22 Use fastSparseProduct(), do not use hijacked Eigen header. 2014-12-05 13:09:46 +01:00
Atgeirr Flø Rasmussen
e8b3524ffa Add Robert Kloefkorn's fast sparse product implementation. 2014-12-05 13:08:30 +01:00