Commit Graph

760 Commits

Author SHA1 Message Date
Atgeirr Flø Rasmussen
940853f9e5 Moved SolutionState to ModelTraits.
Also extracting existing private class and renamed it DefaultBlackoilSolutionState.
2015-05-25 00:46:28 +02:00
Atgeirr Flø Rasmussen
8f198986fd Remove unneeded file. 2015-05-24 20:09:39 +02:00
Atgeirr Flø Rasmussen
05bb1e4f42 Use the Curiously Recurring Template Pattern for BlackoilModel. 2015-05-24 17:36:29 +02:00
Atgeirr Flø Rasmussen
92ab1d7974 Use separate files for model parameter struct. 2015-05-24 17:33:06 +02:00
Atgeirr Flø Rasmussen
620ef2a3dd Create BlackoilModelBase class.
The class is identical to BlackoilModel class at this stage, but
since it was renamed from FullyImplicitBlackoilSolver it keeps the
commit history better.
2015-05-24 09:59:40 +02:00
Atgeirr Flø Rasmussen
d08c44c53b Follow changes to FullyImplicitBlackoilSolver
Original patch by Markus Blatt (@blattms).
2015-05-21 11:42:15 +02:00
Atgeirr Flø Rasmussen
5cebc1c047 Rename debugging macros to avoid potential collisions. 2015-05-21 10:43:04 +02:00
Atgeirr Flø Rasmussen
1e6ecb173f Rename terminalOutput() -> terminalOutputEnabled(). 2015-05-21 10:43:04 +02:00
Atgeirr Flø Rasmussen
cf3719d707 Add more iteration report methods to NewtonSolver. 2015-05-21 10:43:04 +02:00
Atgeirr Flø Rasmussen
603b9657a1 Use plural for parameter class names. 2015-05-21 10:43:04 +02:00
Atgeirr Flø Rasmussen
270a7c59fb Add afterStep() hook to NewtonSolver::step().
Also implement (noop) afterStep() for BlackoilModel, and
make the hooks take non-const versions of the state data.
2015-05-21 10:43:04 +02:00
Atgeirr Flø Rasmussen
f89297255f Rename FullyImplicitSolver -> NewtonSolver. 2015-05-21 10:43:04 +02:00
Atgeirr Flø Rasmussen
82827f56c0 Doc fixes and improvements. 2015-05-21 10:43:03 +02:00
Atgeirr Flø Rasmussen
5c3e79da38 Improve comments in step(). 2015-05-21 10:43:03 +02:00
Atgeirr Flø Rasmussen
2a967a321c Cleanup FullyImplicitSolver. 2015-05-21 10:43:03 +02:00
Atgeirr Flø Rasmussen
2e7e6c6344 Split functionality between model and solver.
The step() method and everything to do with relaxation and oscillation
detection is now in the FullyImplicitSolver class.
2015-05-21 10:43:03 +02:00
Atgeirr Flø Rasmussen
24ab95122d Made BlackoilModel contain all of the old solver class, now the
idea is to make the FullyImplicitSolver class grow instead.
2015-05-21 10:43:03 +02:00
Atgeirr Flø Rasmussen
7829addb99 Use new solver and model class instead of old solver class. 2015-05-21 10:43:03 +02:00
Atgeirr Flø Rasmussen
f8ef6d389a Added new solver and model classes.
Solver is initially a copy of the blackoil solver class, and the
class BlackoilModel is empty.
2015-05-21 10:43:03 +02:00
Markus Blatt
f6e3be5381 Adds space around some binary operators. 2015-05-20 17:54:43 +02:00
Markus Blatt
f0f38d7ac2 Fix seting of parallel_run_ member.
We are having a parallel only if there are more than one processes,
and not already with only one.

Kudos to @atgeirr for finding this in the review.
2015-05-20 17:53:54 +02:00
Markus Blatt
11211ca7d2 Update copyright notices 2015-05-20 09:26:25 +02:00
Markus Blatt
764e1e26c1 Used the correct parallel information for the whole system.
The whole system consists out of three equations per cell. Using
the parallel index set of the grid cells for it is wrong. Therefore
we use PR OPM/opm-core#803 to set up an  additional parallel index set
for the whole system and use this for the communication that is needed e.g.
by the ILU preconditioner.
2015-05-19 19:41:32 +02:00
Markus Blatt
cb4970c9a6 Prevent unused paramerter warning for RedistributeDatahandle. 2015-05-19 19:40:59 +02:00
Markus Blatt
d987e75b6d Rename createPreconditioner to the more accurate name createEllipticPreconditioner. 2015-05-19 19:40:11 +02:00
Markus Blatt
523ba001f6 Correctly compute the infinity norms of the well equations in parallel.
Here we assume that a complete well can be represented on one process.
Thus we only need to compute the local norms followed by a global reduction.
2015-05-15 15:57:50 +02:00
Markus Blatt
bf13922ff9 Correctly compute the infinity norm in parallel.
For this we need to use ParallelIstlInformation for the reduction operation.
2015-05-15 15:57:50 +02:00
Markus Blatt
48ce90fcc7 Compute scaled well residuals correctly for parallel runs.
This commit adapts the PR #375 for parallel runs. That is, the norms are
calculated over all wells, not just the ones that perforate the local grid
cells.
As this is a reduction, too, we move the computation to convergenceReduction
method.
2015-05-15 15:57:50 +02:00
Markus Blatt
9e0b2fed4f Notify well manager whether this is a parallel run.
In a parallel the well handling needs to be slightly
adapted, see PR OPM/opm-core#799. Therefore, we need to
pass a boolean flag to the well manager indicating whether
this is a parallel run or not.

With this commit we do this.
2015-05-15 15:57:50 +02:00
Atgeirr Flø Rasmussen
052cf09495 Merge pull request #378 from blattms/less-verbose-parallel-runs
Prevent printing stats on more than 1 process for CPR.
2015-05-15 15:38:55 +02:00
Atgeirr Flø Rasmussen
3375e1d312 Merge pull request #376 from blattms/debug-parallel-amg-cpr
Fixes convergence issues with the parallel CPR
2015-05-15 15:38:38 +02:00
Markus Blatt
c37cf08ee0 Removes unused residualNorm method.
This method seems to be some leftover from refactoring.
In flow we now use computeResidualNorms() instead and
residualNorm() is not used anywhere. Therefore this commit
removes it to prevent confusion.
2015-05-12 17:30:27 +02:00
Markus Blatt
f0691504af Prevent printing stats on more than 1 process for CPR. 2015-05-08 13:15:59 +02:00
Markus Blatt
1fbe8e3b6d Distribute the geology information.
As it turns out initializing the Geology on a distributed grid
result in wrong values for e.g. saturation. Therefore with this
commit we resort to initializing the global geology and distribute
it using communication.
2015-05-07 12:21:06 +02:00
Markus Blatt
a31aa46744 Send all phases for surface volume and saturation.
Previously, we only did send the information for the
first phase which led to computing wrong values in
a simulation. With this patch we now send all the data
for all the phases.
2015-05-07 12:21:06 +02:00
Tor Harald Sandve
d7c67f10de Change default tolerance for well residuals 2015-05-06 08:55:49 +02:00
Tor Harald Sandve
43b8f9851e Change to maximum norm for the well residuals 2015-05-06 08:55:49 +02:00
Tor Harald Sandve
b4369cade8 Check well_flow tolerance pr phase
The phase rate residuals are scaled by the average volume factor to
avoid too large weight on the gas phase rates.
This also makes the well convergence criteria more consistent with the
mass-balance residuals for the cells.
2015-05-06 08:55:49 +02:00
Atgeirr Flø Rasmussen
862abf6ac7 Merge pull request #371 from totto82/modify_welleq
Modify welleq
2015-05-05 11:54:15 +02:00
Tor Harald Sandve
f1d7e0c7ea Only add contribution from positive phase rates to the wellbore mixture
Instead of adding contribution from all wells with positive total rates,
each phase in each well are checked seperatly.
2015-05-04 10:22:43 +02:00
Atgeirr Flø Rasmussen
208b227ea8 Merge pull request #370 from blattms/fixes-comparison-warning
Prevent unsigned vs. signed int comparison warning
2015-04-30 16:54:19 +02:00
Markus Blatt
0329b0138d Prevent unsigned vs. signed int comparison warning 2015-04-30 15:47:09 +02:00
Markus Blatt
80056b8ef2 [bugfix] Pass parallel information to AMG preconditioner within CPR.
Previously only passed the parallel information to the ILU preconditioner,
but of course needs this information to set up the communication, too.
With this commit we pass the parallel information object to AMG's constructor.
2015-04-30 14:09:24 +02:00
Tor Harald Sandve
a860361217 Cleaning addWellEq
1) Comments are added
2) Variable names are made more descriptive
3) Unecessary usage of subset are removed by extracting needed
quantities for the perforation cells once in advance
2015-04-29 09:22:23 +02:00
Tor Harald Sandve
1cec10ce05 Clean updateWellControls
The function is simplified by removing the update of the primal
variables (the ADBs). As a consequence updateWellControls must be
called prior to the creation of the primal variables.
2015-04-29 09:22:23 +02:00
Tor Harald Sandve
302bc71d2c Use target values as initial conditions for BHP and SURFACE_RATE
BHP and SURFACE_RATE values are updated every step and not only when the
well controll has switched.
2015-04-29 09:22:23 +02:00
Tor Harald Sandve
b3f9997f6a BUGFIX Wellbore mixture calculations for multiphase injectors
Add phase rates and not total rates when calculating the wellbore rates.
2015-04-29 09:22:23 +02:00
Robert Kloefkorn
c846418446 BlackoilOutputWriter: fix restore when last step is selected. 2015-04-24 10:53:23 +02:00
Robert Kloefkorn
654c847b72 FullyImplicitBlockOil: increase max_allowed_residual to 1e7 to make SPE3 run through without adaptive time stepping. 2015-04-23 15:13:18 +02:00
Atgeirr Flø Rasmussen
f007bf561c Modify default solver parameters.
These should work well for both Norne and the SPE cases.
2015-04-21 12:40:21 +02:00