Commit Graph

87 Commits

Author SHA1 Message Date
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
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
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
Kai Bao
827cd7e8e4 Removing the param.has() if condition. 2014-05-20 19:53:39 +02:00
Kai Bao
44a3dbd732 Finishing the workflow. 2014-05-20 19:52:15 +02:00
Kai Bao
63c53096cd Using param.getDefault() instead of param.get().
And also remove the space in dsMax (), drsMaxRel (), dpMaxRel ().
2014-05-20 15:17:37 +02:00
Kai Bao
0e244a4845 Commit to save changes. 2014-05-20 15:00:49 +02:00
Kai Bao
9557db4c15 Merge branch 'limited_variable_update' of github.com:GitPaean/opm-autodiff into oscillation_treatment_withlimitedupdate
Conflicts:
	opm/autodiff/FullyImplicitBlackoilSolver.hpp
2014-05-20 13:45:13 +02:00
Kai Bao
c617623eb1 Adding debugging output. 2014-05-20 13:31:13 +02:00
Kai Bao
79916078f2 Changing the defalut value for the paramters.
Add reordering the intialization order to removing the reordered
warning.
2014-05-20 13:05:11 +02:00
Kai Bao
8dcae05a7b Revising the function stablizeNewton().
For the SOR type relaxation, we need the dx from the previous iteration.
2014-05-20 11:25:04 +02:00
Kai Bao
5b6c325a32 Finish the first stablizeNewton(). 2014-05-19 18:41:38 +02:00
Kai Bao
ab8636b57d Add function detectNewtonOscillations. 2014-05-19 15:43:56 +02:00
Kai Bao
341f727467 Add the residuals() function. 2014-05-19 13:06:44 +02:00
Kai Bao
a969025c5e Add a residuals function prototype. 2014-05-19 10:41:23 +02:00
Kai Bao
2b31ab6111 Removing one blank line. 2014-05-16 18:27:23 +02:00
Kai Bao
d461eb9e76 Cleaning up some debugging output. 2014-05-16 18:15:42 +02:00
Kai Bao
f2ecbf163e Cleaning up some debugging output. 2014-05-16 18:13:36 +02:00
Kai Bao
cd50b54ddf Finishing the modification for solver class. 2014-05-16 18:02:55 +02:00
Kai Bao
94e3fd3fcb Add more residual output in getConvergence.
Output the residualWellFlux, residualWell, MB to monitor the convergence
process.
2014-05-16 13:52:33 +02:00
Kai Bao
55b0164d4a Apply dpmaxrel to the update of bhp
And also change the default value for dpmaxrel.
2014-05-16 13:46:00 +02:00
Kai Bao
b001c580b9 Add drsmaxrel for the update of rs.
drsmaxrel is a relative limit.
2014-05-16 13:32:34 +02:00