Commit Graph

374 Commits

Author SHA1 Message Date
Atgeirr Flø Rasmussen
cc5fa94e46 Remove unused grav_ member and function used to compute it.
This is a relic of the way we originally handled gravity. The member
remained after the change, and is now a major time-consumption sink
due to the unfortunate fact that it is computed every time step
(unnecessary), and because the gravityOperator() function (now removed)
was very unperformant after changing to use the faceCells() function.
2014-08-05 11:27:00 +02:00
Kai Bao
2ac5146cfc Adding ErrorMacros.hpp to GeoProps.hpp
#include <opm/core/utility/ErrorMacros.hpp>
2014-07-29 11:40:52 +02:00
Andreas Lauser
e07ef16a45 implement pore volume and transmissibility multipliers
this means that the NTG, MULTPV and MULT[XYZ]-? keywords are now
supported.

Actually FAULTS and MULTFAULT are supported too, but that's abstracted
away by opm-parser's TransMult class. (Kudos to [at]joakim-hove for
implementing this.)
2014-07-28 11:30:13 +02:00
Andreas Lauser
63eaecf246 DerivedGeology: pass the EclipseState object to its constructor
this is required to implement pore volume and permeability multipliers
as discussed with [at]bska and [at]joakim-hove.

Note that this implies that the DerivedGeology class can't be
instantiated anymore if there is no EclipseState object. Thus all code
paths and tests that don't load a deck are removed by this patch. If
this is undesireable, there are two options: First, don't require
EclipseState for DerivedGeology which would imply to make the about 10
required multiplier functions part of the
BlackoilPropertiesAdInterface, or second, one can copy-and-paste the
DerivedGeology class as it was before this patch, derive from a newly
introduced DerivedGeologyInterface and pass DerivedGeologyInterface
objects to the simulator. IMHO, the second solution would be a bit
better but it would involve substantial overhead to implement and to
maintain it.

Anyway, in the mean time simulators cannot be instantiated without
decks.
2014-07-24 16:37:38 +02:00
Andreas Lauser
543d8d75b6 pass the DerivedGeology to the simulators
this was decided to be a good idea by [at]bska. (If I interpreted him
correctly, obviously.)
2014-07-24 16:37:38 +02:00
Atgeirr Flø Rasmussen
1faf5da05b Added test to ensure active gas phase. 2014-07-23 11:41:06 +02:00
Atgeirr Flø Rasmussen
92f20c6040 Update phase condition vector from primary variables.
This is necessary as an interim measure, since the phase condition vectors are
still used in property calculations.
2014-07-17 14:34:07 +02:00
Atgeirr Flø Rasmussen
cc4504c405 Merge pull request #159 from bska/fix-gpot
Fix one-sided gravity potential calculation
2014-07-07 15:36:41 +02:00
Bård Skaflestad
1257c03d26 Fix one-sided gravity potential calculation
Commit 5112b8a misinterpreted the role of index 'i' and, as a result,
installed code that would only define one-sided gravity potentials of
the first cell (roughly)--albeit eventually using the geometry of the
last active cell.

This commit restores the original, intended behaviour.
2014-07-03 00:27:39 +02:00
Bård Skaflestad
a5d3017062 assemble: Fix out-of-bounds indexing
The 'material_balance_eq' is indexed by active, not canonical, phase
indices.  Replace 'Oil' and 'Gas' with the appropriate 'phase_pos'
values.
2014-07-03 00:27:18 +02:00
Bård Skaflestad
78b87b8857 variableState: Don't form objects when references suffice
There's no need to form new objects, especially for the 'xvar', when
there are existing objects to which read-only references can be
bound.
2014-07-03 00:27:17 +02:00
Bård Skaflestad
eccc5c9694 variableState: Use pre-computed list of "all cells"
Class FullyImplicitBlackoilSolver<Grid> already features a list of
"all" cells, built at object construction time.  There's no need to
re-compute that list on every call to variableState() (when Gas is
active).
2014-07-03 00:27:17 +02:00
Bård Skaflestad
f69530a7d4 variableState: Defer r{s,v}Sat calculation
Quantities rsSat and rvSat are not needed unless we have an active
Gas phase.  Don't calculate them until we know that they are
actually needed.
2014-07-03 00:27:17 +02:00
Bård Skaflestad
35d883319b variableState: Don't reference non-existing variable
The "xvar" exists only if Gas is active.  Therefore, we cannot
extract that variable from "vars" unless we know that Gas is an
active phase.  Failing to do so would wrongfully increment 'nextvar'
whence the final BHP variable would be an out-of-bounds access.
2014-07-03 00:27:17 +02:00
Bård Skaflestad
13d3a42448 Fix phase property references
Methods 'computeRelperm()' and 'computePressures()' *always* return
a three-element vector of phase properties.  We must therefore
translate to canonical phase indices before indexing into the
results.
2014-07-03 00:27:17 +02:00
Tor Harald Sandve
02ce468c01 Support Oil/Water case
The updatePrimalVariableFromState is now only called when
the gas phase is active.
2014-06-13 14:44:21 +02:00
Tor Harald Sandve
3e3b39df07 Introduce primaryVariable_ and use it to switch primary variables 2014-06-13 14:31:40 +02:00
Tor Harald Sandve
8a600747fa Read DISGAS and VAPOIL from deck and pass them to the simulator 2014-06-13 14:29:52 +02:00
Bård Skaflestad
aecfa3ed50 Merge pull request #150 from andlaus/enable_property_modifiers
glue in support for property modifiers
2014-06-11 22:46:36 +02:00
Andreas Lauser
776f5e9005 explicitly include <array>
it _seems_ like this causes the build  failures of the RHEL 5 build at
statoil: http://opm-project.org/CDash/viewBuildError.php?buildid=18933
2014-06-09 13:22:40 +02:00
Andreas Lauser
0219f83563 glue in support for property modifiers
i.e. reading the grid properties from EclipseState instead of from the
raw deck. This requires that all deck files exhibit a GRID and a
SCHEDULE section or else EclipseState will throw in the constructor.
2014-06-09 12:36:46 +02:00
Bård Skaflestad
c834177897 Merge pull request #131 from andlaus/implement_multi-region_pvt_tables
implement multi-region PVT
2014-06-06 14:38:35 +02:00
Kai Bao
51fae6ca70 Removing some comments. 2014-05-23 14:55:54 +02:00
Kai Bao
f516bd6ce3 Removing some comments and debugging output. 2014-05-23 14:53:54 +02:00
Kai Bao
c96637ab96 Changing detectNewtonOscillations() a little bit.
Changing detectNewtonOscillations() a little bit for ease in reading.
2014-05-23 14:50:49 +02:00
Kai Bao
508a0c11ef Adding some comments before calling stablizeNewton. 2014-05-23 14:25:58 +02:00
Kai Bao
bb22f3572d Adding size function in LinearisedBlackoilResidual.
int sizeNonLinear() const;
To compute the size of the non-linear system.
2014-05-23 13:40:44 +02:00
Kai Bao
9fe98514c0 Changing the location of & when defining reference. 2014-05-23 11:39:26 +02:00
Kai Bao
1da24f3c3c Changing the way of string comparison to ==. 2014-05-23 10:07:02 +02:00
Kai Bao
cb48d185b9 The reference is used for residual_histroy.
In the detectNewtonOscillations().
2014-05-23 09:55:29 +02:00
Kai Bao
f2518b6647 Removing the output of the size of system. 2014-05-22 22:15:55 +02:00
Kai Bao
cd174c5ba4 Merge branch 'specifying_maximum_iterations' into oscillation_treatment_withlimitedupdate
Conflicts:
	opm/autodiff/FullyImplicitBlackoilSolver.hpp
	opm/autodiff/FullyImplicitBlackoilSolver_impl.hpp
2014-05-22 22:13:14 +02:00
Kai Bao
6e6339d8c3 Adding user-specifying max iteration. 2014-05-22 22:09:54 +02:00
Kai Bao
fdb201d365 Restoring maxit to be 15. 2014-05-22 21:59:27 +02:00
Kai Bao
8a905535ce Removing some spaces. 2014-05-22 21:58:44 +02:00
Kai Bao
6ac95ac7a8 Removing some debugging output. 2014-05-22 21:56:00 +02:00
Kai Bao
5c409173b4 Removing some debugging output. 2014-05-22 20:56:22 +02:00
Kai Bao
95cd33185b Correcting the determination of stagnate. 2014-05-22 20:25:58 +02:00
Kai Bao
f597e2117d Rewriting the detection function with for loop.
It is more automatic while it remains to change to some more flexible
form.
2014-05-22 16:07:17 +02:00
Kai Bao
d7aa21dc03 Merge branch 'master' into oscillation_treatment_withlimitedupdate
Conflicts:
	opm/autodiff/FullyImplicitBlackoilSolver.hpp
2014-05-22 09:59:50 +02:00
Atgeirr Flø Rasmussen
cb327ce63a Warning removal: const on return types not needed. 2014-05-21 19:49:29 +02:00
Bård Skaflestad
f0d908d104 Merge pull request #140 from atgeirr/cpr-preconditioning
Cpr preconditioner
2014-05-21 15:36:12 +02:00
Atgeirr Flø Rasmussen
f48ee55c0d Change error message. 2014-05-21 13:15:42 +02:00
Atgeirr Flø Rasmussen
e9ab64fd18 Remove usage of DUNE_UNUSED_PARAMETER. 2014-05-21 13:14:02 +02:00
Kai Bao
2733b5459e Removing the space before (). 2014-05-21 11:02:04 +02:00
Kai Bao
252048b30a Removing one blank line. 2014-05-21 11:00:24 +02:00
Kai Bao
0178bd1b8c Removing the bool paramters calling stablizeNewton. 2014-05-21 10:47:55 +02:00
Kai Bao
5277fa389d Removing two input paramters in stablizeNewton().
Removing the bool input parameters osicllate and stagnate from the
stablizeNewton(). Basically, the value omega will decide if the
relaxation will be applied.
2014-05-21 10:44:20 +02:00
Kai Bao
578abe3b78 Merge branch 'master' into oscillation_treatment_withlimitedupdate
Conflicts:
	opm/autodiff/FullyImplicitBlackoilSolver.hpp
2014-05-21 10:12:49 +02:00
Atgeirr Flø Rasmussen
3e956a9659 Merge pull request #139 from GitPaean/limited_variable_update
Limited variable update
2014-05-20 21:52:22 +02:00