Kai Bao
0366037fca
cleaning up to remove 'unused' warnings
2015-06-17 09:49:11 +02:00
Kai Bao
20746f65dc
assert the number of the well equations.
2015-06-16 17:03:53 +02:00
Kai Bao
f2089f5a1b
avoiding creating dx_V unnecessarily
...
by using dx.array() in function solveWellEq().
2015-06-16 17:03:53 +02:00
Kai Bao
919286d700
removing repeated code by using do_while
...
in function solveWellEq().
2015-06-16 17:03:53 +02:00
Kai Bao
f8e35535fc
using lower case for solve_wellEq_initially_
2015-06-16 17:03:53 +02:00
Kai Bao
0f123a8890
correcting typo in 'to large'
2015-06-16 17:03:53 +02:00
Kai Bao
6f388f5b6d
correcting the indentation in updateWellState()
2015-06-16 17:03:53 +02:00
Kai Bao
7e9014f155
changing dx to dwells in defination of updateWellState
2015-06-16 17:03:53 +02:00
Kai Bao
285d777937
removing the unused dqs and dbhp
...
in function updateState
2015-06-16 17:03:53 +02:00
Kai Bao
043d542e29
check wellsActive() before handling well equations in assemble()
2015-06-16 17:03:53 +02:00
Kai Bao
079c3a467f
adding a space after comma between function agruments
2015-06-16 17:03:53 +02:00
Kai Bao
ce7ca517cd
5 blank lines between functions in BlackoilModelBase_impl
2015-06-16 17:03:52 +02:00
Kai Bao
df5bd78d0c
change the '2' to 'To' in addWellContribution2MassBalanceEqi
2015-06-16 17:03:52 +02:00
Kai Bao
14dbc9e7be
removing s from the name of function variableWellStateIndices()
2015-06-16 17:03:52 +02:00
Tor Harald Sandve
8a166ebbd6
Add option for solving the wellEq seperatly
...
The well equations is solved seperatly in order to provide more accurate
initinal values to the reservoir model.
2015-06-16 17:03:52 +02:00
Tor Harald Sandve
86922e45e6
Seperate wells stuff from the reservoir stuff
...
The seperation is done in order to better accommodate solving the well
equation seperatly.
2015-06-16 17:03:52 +02:00
Atgeirr Flø Rasmussen
512d18a669
Create solver and model parameters only once.
2015-06-01 13:07:45 +02:00
Atgeirr Flø Rasmussen
af9a5992a3
Merge pull request #389 from andlaus/simplify_simulator
...
Simplify simulator
2015-05-29 15:46:38 +02:00
Atgeirr Flø Rasmussen
9b30e2e0d7
Use unique_ptr instead of shared and raw pointers.
2015-05-29 14:57:49 +02:00
Atgeirr Flø Rasmussen
2bec485184
Fix a few warnings.
2015-05-29 14:57:30 +02:00
Andreas Lauser
496c32d2a6
do not use std::shared_ptr where it is deemed inappropriate by the maintainers
...
note that I don't agree with this change and will assume no
responsibility if something goes down the gutter.
2015-05-29 14:34:47 +02:00
Andreas Lauser
5666df807b
some stylistic changes
...
in particular, where to put empty lines and spaces. Also added a
copyright statement for myself to a few files and added a comment. the
new comment was requested by [at]bska, the rest was requested by
[at]atgeirr.
2015-05-29 12:35:56 +02:00
Atgeirr Flø Rasmussen
3c7a79c16a
Fix unsigned/signed comparison warning.
2015-05-28 14:07:25 +02:00
Andreas Lauser
553f32e6cf
SimulatorBase: move the new method bodies from the .hpp to the _impl.hpp file
2015-05-28 13:55:54 +02:00
Andreas Lauser
662cd9791e
SimulatorBase: only care about the solver in the run() method
...
this is necessary because some older simulations only provide the
full-fledged solver class but no physical model.
(also, this allows to use something else than the standard newton
solver.)
2015-05-28 13:55:54 +02:00
Andreas Lauser
a154c8394d
Simulator, Model: add everthing which is required by the polymer simulators
...
basically, this adds some hooks to the SimulatorBase class and the
model and introduces a few types to the SimulatorTraits.
2015-05-28 13:55:54 +02:00
Andreas Lauser
45fb80f547
SimulatorBase: remove the opaque pointer pattern
...
because the class is (and will stay) a template and for templates the
benefits of the opaque pointer pattern go from "small" to "zero".
2015-05-28 13:55:53 +02:00
Andreas Lauser
3eec9f3432
introduce a "SimulatorBase" class
...
so, far it is just a copy of the old "SimulatorFullyImplicitBlackoil"
class (which became a simple forward to the base class). The intention
is to unify the common simulator code in this class to avoid excessive
copy-and-pasting.
2015-05-28 13:55:53 +02:00
Atgeirr Flø Rasmussen
a991eb55e3
Merge pull request #385 from atgeirr/polymorphism-for-blackoilmodel
...
Static polymorphism for black-oil model
2015-05-28 13:28:43 +02:00
Atgeirr Flø Rasmussen
4a4039e448
Introduce parenthesis to preserve old evaluation order.
...
While results would be equivalent, they would not be identical
to old results without this.
2015-05-26 16:50:49 +02:00
Atgeirr Flø Rasmussen
3246fd479d
Renamed rq_.head to rq_.dh, since it is used for head differences.
...
Also moved multiplication with transmissibilities so that dh does not
include them (so it really is the head difference).
2015-05-26 16:33:00 +02:00
Atgeirr Flø Rasmussen
153c091aef
Clean up in computeMassFlux().
2015-05-26 16:16:27 +02:00
Atgeirr Flø Rasmussen
d9c2a5bd5b
Add members isSg_, isRs_ and isRv_.
...
This replaces local variables that were used in more
than one place, and initialised locally in the exact
same way depending only on primalVariable_.
Now they are updated once when primalVariable_ has changed,
simplifying the code for variableState() and updateState().
2015-05-26 14:38:25 +02:00
Atgeirr Flø Rasmussen
6e5fac16d1
Add extraAddWellEq() hook in addWellEq().
...
This allows extended models to add functionality to the well treatment.
2015-05-26 14:07:08 +02:00
Atgeirr Flø Rasmussen
614afad74b
Add Next enum member for later extension.
2015-05-26 11:41:54 +02:00
Atgeirr Flø Rasmussen
52d035940e
Fix vector sizing bug.
2015-05-26 11:41:34 +02:00
Atgeirr Flø Rasmussen
143b213f53
Make method calls in variableState() polymorphic.
...
Achieved by using asImpl().
2015-05-26 11:19:52 +02:00
Atgeirr Flø Rasmussen
9aaf428f29
Refactor variableState().
...
Has been split into multiple methods to give more flexibility
to extended models.
2015-05-26 11:16:21 +02:00
Atgeirr Flø Rasmussen
1cc4b28c05
Removed declaration of unused method.
2015-05-26 01:57:16 +02:00
Atgeirr Flø Rasmussen
eb962aafa9
Use asImpl() pattern for static polymorphism.
...
Not yet applied to all method calls, but only ones needed for
polymer solver after initial refactoring.
2015-05-26 01:48:45 +02:00
Atgeirr Flø Rasmussen
74784522ea
Remove commented-out code.
2015-05-26 01:29:26 +02:00
Atgeirr Flø Rasmussen
7088304214
Remove unused overload of computePressures().
2015-05-26 01:19:37 +02:00
Atgeirr Flø Rasmussen
85436c4890
Move mass balance equations to separate function.
...
Note that well contributions are added on later in addWellEq() as before.
2015-05-26 00:31:50 +02:00
Atgeirr Flø Rasmussen
c2f4397bcf
Remove unused constantState() method.
2015-05-26 00:08:33 +02:00
Atgeirr Flø Rasmussen
0d7fa1a82c
Using ReservoirState and WellState consistently.
...
This means that for extended models the functions in BlackoilModelBase will
be compiled with the types used by those models and not BlackoilState and
WellStateFullyImplicitBlackoil (which are specified by BlackoilModel).
2015-05-25 23:49:09 +02:00
Atgeirr Flø Rasmussen
1cc5643d14
Moved enums to a separate file.
2015-05-25 23:06:03 +02:00
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
Markus Blatt
2180ccddbc
Activates the parallelism in the adaptive time stepping schemes.
...
It does this simply by passing the information about the
parallelization to the adaptive time stepper.
2015-05-22 21:12:10 +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
Robert Kloefkorn
2badc765a6
std::runtime_error --> LinearSolverProblem when linear solver was not converged.
...
Since LinearSolverProblem is derived from std::runtime_error everything should work as
before.
2015-04-16 11:41:28 +02:00
Arne Morten Kvarving
39e1d29176
fixed: use size_t and not unsigned long
...
fixes builds on i386
2015-04-14 10:25:21 +02:00
Atgeirr Flø Rasmussen
f82df94d2e
Use generic function instead of UnstructuredGrid interface.
2015-04-13 10:37:23 +02:00
Atgeirr Flø Rasmussen
e2a920b1fe
Merge pull request #335 from totto82/minpv-fill
...
Use average NTG values for merged cells due to MINPV algorithm
2015-04-13 10:20:36 +02:00
Robert Kloefkorn
a73c725b9d
CPRPreconditioner: make compile with DUNE 2.2.
2015-04-08 14:23:35 +02:00
Atgeirr Flø Rasmussen
78ea73fa0a
Fix convergence table labels (water, oil swapped).
2015-04-08 13:33:42 +02:00
Robert Kloefkorn
1ccf74eb4e
NewtonIterationBlackoilCPR: fix uninitialized parameter and make the parameters const.
2015-04-08 11:48:16 +02:00
Atgeirr Flø Rasmussen
62d3f37b1d
Merge pull request #342 from dr-robertk/PR/some-improvemnts-on-solvers
...
More parameter for solvers.
2015-03-31 18:00:40 +02:00
Robert Kloefkorn
1b23de0b1c
CPR: add verbosity as a parameter.
2015-03-31 12:54:26 +02:00
Robert Kloefkorn
632bc7a809
CPR: FastAMG seems not to be faster, so use regular AMG.
2015-03-31 12:42:58 +02:00
Robert Kloefkorn
adac4a7995
CPRPreconditioner: added tolerance and max iter as a parmeter.
...
Parameters are now a separate class to avoid long constructor parameter list.
2015-03-31 12:15:54 +02:00
Andreas Lauser
ba4fca5a77
Revert "also pass the deck to the output writer"
...
This reverts commit 88730e855f
.
2015-03-31 12:11:45 +02:00
Robert Kloefkorn
90a7faf1a8
FullyIBOS: added parameter for minimal number of newton iterations, default stays at 0.
...
Also, don't throw an exception when the solver did not converge, just return -1
indicating that there was a problem.
2015-03-31 11:16:44 +02:00
Robert Kloefkorn
20316e0a8e
NewtonBOCPR: allow to use either GMRes or BiCGStab. This will be revised once the new
...
linear solver interface is in place.
2015-03-31 11:04:31 +02:00
Atgeirr Flø Rasmussen
05bee313d3
Merge pull request #339 from andlaus/use_deck_units_for_summary_output
...
also pass the deck to the output writer
2015-03-27 12:30:20 +01:00
Andreas Lauser
88730e855f
also pass the deck to the output writer
2015-03-26 17:33:13 +01:00
Atgeirr Flø Rasmussen
061e1bcbd7
Merge pull request #324 from andlaus/implement_temperature_dependent_density
...
Implement temperature dependent density
2015-03-26 15:10:28 +01:00
Atgeirr Flø Rasmussen
eb9b62697e
Make vertcatCollapseJacs() handle constants properly.
...
With this, any or all of the input vector element may have
an empty jacobian vector. Any element with a non-empty
jacobian vector must still have the same block pattern.
2015-03-24 09:48:31 +01:00
Atgeirr Flø Rasmussen
085c279a0a
Use vertcatCollapseJacs() for improved performance.
2015-03-20 11:19:42 +01:00
Atgeirr Flø Rasmussen
07258f0249
Add function vertcatCollapsJacs().
2015-03-20 11:19:42 +01:00
Tor Harald Sandve
388ce7548e
Averaging multiple layers of NTG values
2015-03-19 12:27:08 +01:00
Atgeirr Flø Rasmussen
ad3da1d946
Re-add copying overload of AutoDiffBlock::function().
2015-03-19 11:46:48 +01:00
Tor Harald Sandve
65199735e2
Use average NTG values for merged cells due to MINPV algorithm
...
The volume weighted averaged NTG values are used to get more
reasonable x and y transmissibilities for the cells effected by the
MINPV grid processing algorithm.
This commit starts the process of supporting the MINPV-FILL keyword
where upscaled properties are used for the merged/filled cells.
2015-03-19 11:37:03 +01:00
Andreas Lauser
f0c3a6f892
add glue code needed for thermal gas PVT
2015-03-17 13:34:29 +01:00
Andreas Lauser
924818f445
add glue code needed for thermal oil PVT
2015-03-17 13:34:29 +01:00
Andreas Lauser
debb8a1a04
add glue code needed for thermal water PVT
2015-03-17 13:34:29 +01:00
Atgeirr Flø Rasmussen
0a76af1b14
Include <utility> for std::move().
2015-03-17 09:46:15 +01:00
Atgeirr Flø Rasmussen
f0ba4a5797
Use swap() and move() to reduce copying in formEllipticSystem().
2015-03-16 14:22:32 +01:00
Atgeirr Flø Rasmussen
a4a3505fae
Remove unused method computeRelPermWells().
2015-03-16 14:22:32 +01:00
Atgeirr Flø Rasmussen
04b255a03f
Make more use of move semantics in AD code.
...
This makes some API changes to AutoDiffBlock.
- Add overload for the constant() constructor taking rvalue ref.
- Add overload for the variable() constructor taking rvalue ref.
- Make the function() constructor *require* rvalue refs.
- Add a swap() function.
The remaining changes in this commit are follow-ups especially
to the third change (adding std::move in many places), and
some removal of unnecessary block pattern arguments from calls to
the constant() static method.
2015-03-16 14:22:32 +01:00
Atgeirr Flø Rasmussen
635f3db814
Use references in computeRelperm().
2015-03-16 14:22:32 +01:00
Atgeirr Flø Rasmussen
5d5ab267d2
Use std::move() in variableState().
2015-03-16 14:22:31 +01:00
Bård Skaflestad
531bc7fd73
Merge pull request #333 from atgeirr/reduce-recalculation
...
Reduce recalculation of phase pressures
2015-03-11 09:20:51 +01:00
Robert Kloefkorn
11ef164865
SimFullyImplBO: write simulation state at all report step and in the end when adaptive
...
TS is enabled.
2015-03-10 12:12:31 +01:00
Atgeirr Flø Rasmussen
f6b28b0f66
Add helper computeGasPress(), use to improve performance.
...
This avoids excessive calling of constantState().
2015-03-09 10:56:35 +01:00
Atgeirr Flø Rasmussen
ec9f5c1634
Move initial term computation to assemble().
2015-03-09 10:56:35 +01:00
Atgeirr Flø Rasmussen
8f91296974
Eliminate extra computePressure() calls.
...
The function still gets called more than necessary,
but that is due to its use in variableState() and that
constantState() calls variableState().
2015-03-09 10:56:35 +01:00
Atgeirr Flø Rasmussen
818b653c15
Removed extra overload of relperm().
2015-03-09 09:40:30 +01:00
Atgeirr Flø Rasmussen
a347e35304
Removing extra overloads of rsSat() and rvSat().
...
Also a few minor fixes to docs and indentation while in the area.
2015-03-09 09:40:30 +01:00
Atgeirr Flø Rasmussen
17117e7a0e
Avoid storing return value in reference.
...
Normally this is OK for by-value returns, but here the right hand side
was changed to call ADB::value(), which returns by reference.
2015-03-05 16:07:04 +01:00
Atgeirr Flø Rasmussen
17b2a0e726
Merge pull request #327 from atgeirr/simplify-props
...
Simplify properties
2015-03-05 14:01:41 +01:00
Robert Kloefkorn
b20733eb29
nitpick adjustments.
2015-03-05 11:28:11 +01:00
Robert Kloefkorn
05260e9582
added number of linear and newton iterations to output.
2015-03-05 10:40:20 +01:00
Robert Kloefkorn
e5eec509d2
make terminal output a parameter to avoid output.
2015-03-05 10:40:20 +01:00
Robert Kloefkorn
06396b4b82
FullyImplicitBlackoilSolver: added tolerance for well convergence as parameter.
2015-03-05 10:40:15 +01:00
Atgeirr Flø Rasmussen
fbf06c06e7
Remove extra overloads of bWat(), bOil() and bGas().
...
Remaining method is the one taking AD objects. This modification
required changes to a few more places than anticipated:
- RateConverter
- FullyImplicitBlackoilSolver::computeWellConnectionPressures()
In these places, the call now is a little more complex and there
might be a very minor performance loss, until we optimize the
bX() functions to check for the no-derivatives case.
2015-03-03 14:33:19 +01:00
Robert Kloefkorn
96bda6a453
FullImplicitBlackOil and CPR: allow for dynamically changed tolerances from parameter
...
file. Default is as before.
2015-03-03 13:42:03 +01:00
Atgeirr Flø Rasmussen
1195ced57a
Remove obsolete comment.
2015-03-03 13:19:42 +01:00
Atgeirr Flø Rasmussen
1d68f7e846
Remove extra overloads of muGas() and muWat().
...
This change has been made in both BlackoilPropsAdInterface
and BlackoilPropsAdFromDeck. Only remaining overloads are
those using AD objects and passing the PhasePresence for
each data point.
2015-03-03 13:14:31 +01:00
Atgeirr Flø Rasmussen
965be0471f
Remove non-AD overload of muWat().
...
The AD version is made a little smarter, detecting the
case of input with no derivatives. Existing use of the
non-AD rewritten.
2015-03-03 12:56:30 +01:00
Bård Skaflestad
5a390f0d27
Merge pull request #323 from blattms/uggridhelpers-completion
...
Moves functions that do not depend on Eigen to Opm::UgGridHelpers. [3/3]
2015-03-02 18:50:06 +01:00
Markus Blatt
5e66f2844b
Moves include of iterterator facades to cornerpoint
2015-03-02 16:22:22 +01:00
Markus Blatt
aaf82d2a65
[bugfix] read only from the sendState in BlackoilStateDataHandle.
...
During BlackoilStateDataHandle::gather we did read values from the
state where we should only receive values to. With this commit we
read from the state where we should send values.
Kudos to Bard for noticing this.
2015-03-02 11:10:02 +01:00
Atgeirr Flø Rasmussen
94742bd560
Remove unused variable.
2015-03-02 10:33:44 +01:00
Atgeirr Flø Rasmussen
09f6e8aacb
Merge pull request #319 from blattms/removes-uggridhelpers-cpgrid
...
Moves Opm::UgGridHelpers from opm-autodiff to dune-cornerpoint
2015-03-02 10:10:26 +01:00
Atgeirr Flø Rasmussen
22d0d7cd27
Remove extra call to extractPvtTableIndex().
2015-02-27 12:26:12 +01:00
Atgeirr Flø Rasmussen
635fea1cad
Remove pvtTableIdx_ from BlackoilPropsAdFromDeck.
...
It was not used by the properties, this commit also fixes the bug that
pvtTableIdx_ was initialized instead of cellPvtRegionIdx_.
2015-02-27 10:20:30 +01:00
Atgeirr Flø Rasmussen
ba86dc191c
Fix handling of multiple pvt-regions in BlackoilPropsAdFromDeck.
2015-02-27 10:20:30 +01:00
Atgeirr Flø Rasmussen
f3cfe26edb
Correct function comment.
2015-02-23 13:42:51 +01:00
Atgeirr Flø Rasmussen
d9ce8625cf
Remove unused classes.
...
After this, the two affected tests fail due to bugs in PVT region
support in BlackoilPropsAdFromDeck.
2015-02-23 13:42:51 +01:00
Markus Blatt
d62264d567
Moves functions that do not depend on Eigen to Opm::UgGridHelpers.
...
As a result we only have one faceCentroid(int) function the returns const double* and
FieldVector<double,3> for UnstructuredGrid and CpGrid, respectively. The codes is
adapted to this.
2015-02-23 12:24:40 +01:00
Markus Blatt
97fcd69d77
Removes empty namespace regions.
2015-02-23 11:38:03 +01:00
Markus Blatt
9fa1bba8da
Moves Opm::UgGridHelpers from opm-autodiff to dune-cornerpoint
...
For historic (or no apparent) reason the free function grid interface
was added to opm-autodiff. As it depends on whether or not dune-cornerpoint
is present this seems rather unnatural. Therefore this commit removes the
functionality unconditionally from opm-autodiff.
Note that there is a corresponding commit in dune-cornerpoint that adds it
there.
2015-02-23 11:02:13 +01:00
Atgeirr Flø Rasmussen
eb89236552
Merge pull request #317 from blattms/generic-equil
...
Modified sim_fibo_ad_cp to also allow running with EQUIL keyword.
2015-02-20 18:24:05 +01:00
Atgeirr Flø Rasmussen
0ce57cb6db
Merge pull request #316 from blattms/parallel-verbose-on-0
...
Print status output only on rank 0 for parallel runs.
2015-02-20 18:11:38 +01:00
Markus Blatt
bc58cfb3b9
Corrects missing space around if and operators.
2015-02-20 16:06:19 +01:00
Markus Blatt
fd10c97e46
Fxied typo wether -> whether.
2015-02-20 16:03:08 +01:00
Markus Blatt
bcc3ab7d95
Rename variable verbosity_ to terminal_output_.
2015-02-20 16:02:06 +01:00
Markus Blatt
62507b9cf6
[bugfix] Do not check verbosity when increase omega due to oscillation.
...
If oscillating then the same measures have to be taken on all
processes. This was not the case before the commit. Instead only
process 0 would have adapted omegas and we have produced wrong
results.
Kudos to Atgeirr for detecting this while reading the code.
2015-02-20 15:56:34 +01:00
Markus Blatt
46e0e0b0f7
Makes one argument constructors explicit to prevent type conversion.
2015-02-20 15:31:38 +01:00
Markus Blatt
007acfe018
Modified sim_fibo_ad_cp to also allow running with EQUIL keyword.
...
With now generic implementation of the initStateEquil in opm-core
we added the necessary grid helper functionlality for CpGrid and activated
the processing if the EQUIL keyword is there.
2015-02-20 12:23:35 +01:00
Markus Blatt
d35d301a4b
Print status output only on rank 0 for parallel runs.
2015-02-20 11:35:47 +01:00
Atgeirr Flø Rasmussen
1ba856ebfe
Merge pull request #314 from totto82/avg_press
...
Use the average well block pressure when evaluating the properties
2015-02-20 08:36:49 +01:00
Atgeirr Flø Rasmussen
ab835ec443
Merge pull request #308 from atgeirr/resv-injectors
...
Implement RESV limit targets for INJECTOR wells.
2015-02-19 15:45:18 +01:00
Atgeirr Flø Rasmussen
fec50b491a
Merge pull request #311 from totto82/fix_verticalscaling
...
Apply the swatinit scaling to new_props
2015-02-19 11:29:00 +01:00
Atgeirr Flø Rasmussen
1e5b691a49
Merge pull request #313 from blattms/redistgridhandle-without-grid
...
Remove the unsused grid members from BlackoilPropsDataHandle.
2015-02-19 10:03:43 +01:00
Tor Harald Sandve
70a6a2ebf8
Use the average well block pressure when evaluating the properties
...
The average well block pressure is used instead of the well cell
pressure when the well properties are evaluated.
Temperature, rs, rv, phase conditions are still well cells values.
Perforation pressures are stored in the well state
2015-02-19 09:58:17 +01:00
Markus Blatt
5e72774b89
Remove the unsused grid members from BlackoilPropsDataHandle.
...
Previously BlackoilPropsDataHandle did hold a grid for sending
and receiving that were either not used or we could prevent their
usage. Therefore this commit removes them from the class and queries
all needed information from the property objects.
2015-02-19 09:35:18 +01:00
Atgeirr Flø Rasmussen
e96036bdb3
Move helper functions to namespace detail.
...
These were in the anonymous namespace, which was not wrong but lead to
false-positive unused function warnings on some compilers, probably due
to being used only from within templates. This allows us to keep the
warning activated by default.
2015-02-19 09:07:42 +01:00
Atgeirr Flø Rasmussen
b83bb7bf92
Remove unused function.
2015-02-19 09:03:22 +01:00
Tor Harald Sandve
44e9d2a34e
Fix PR comments
...
1) swatinit() is changed to setSwatInitScaling() to make it obvious that
we are modifying the props.
2) the descriptions of saturation and pc now makes more sense
3) the method is removed from the sibling class and the interface and
the type of new_props is changed from BlackoilPropsAdInterface to
BlackoilPropsAdFromDeck
5) The same modification is added to sim_fibo_ad_cp
2015-02-19 08:34:55 +01:00
Tor Harald Sandve
013d1d3499
Apply the swatinit scaling to new_props
...
The capillary pressure function in new_props is scaled to match the
capillary pressure function in props.
This is a temporary workaround while the simulator uses two different
property object.
2015-02-19 08:18:39 +01:00
Atgeirr Flø Rasmussen
f0190dd2bb
Remove const from bool return type.
...
Since it has no effect for value types, and generates a warning.
2015-02-17 13:45:14 +01:00
Atgeirr Flø Rasmussen
850845c61d
Suppress re-declaration warning.
2015-02-17 13:44:52 +01:00
Atgeirr Flø Rasmussen
17ade0457f
Suppress unused argument errors.
2015-02-17 13:44:33 +01:00
Atgeirr Flø Rasmussen
a4024a3f9e
Remove unused functions.
2015-02-17 13:42:26 +01:00
Atgeirr Flø Rasmussen
355bfb0e70
Suppress signed/unsigned warning.
...
Also fix formatting.
2015-02-17 13:41:31 +01:00
Atgeirr Flø Rasmussen
7cdb65cff3
Suppress unused argument warnings.
2015-02-17 13:41:00 +01:00
Atgeirr Flø Rasmussen
bd2f659770
Adapt to API change in WellsManager.
2015-02-17 13:22:43 +01:00
Markus Blatt
3eb13e74dd
Adds braces to if() return;
2015-02-16 11:42:42 +01:00
Atgeirr Flø Rasmussen
3ade13d235
Implement RESV limit targets for INJECTOR wells.
2015-02-16 11:08:57 +01:00
Markus Blatt
60cdc583ae
Make right hand passed to the linear solver consistent.
...
Previously, we had to use two layers of overlap cells such the
innermost layer contains the rightvalues automatically (as it is
surrounded by internal edges). No we use communication to get
the correct values in the whole overlap region and one layer
suffices as it should.
2015-02-12 21:33:41 +01:00
Markus Blatt
01ea7bacba
Adds data redistribution capabilities and makes sim_fibo_ad_cp parallel.
...
With this commit we add the possibility to start with a global representation
of a simulator that is read on each process and afterwards this presentation
is redistributed among the processors together with the properties and
state data needed to initialize the simulation.
There still is no parallel well handling and no parallel output. But with the
equilibrium example of @dr-robertk and deactivated output we can already
perform parallel runs.
2015-02-12 21:33:41 +01:00
Markus Blatt
fc137afcd5
Adds a constructor to BlackoilPropsAdFromDeck that allows copy the grid independant part.
...
In the parallel simulator we will have to be able adress only poperties on
some part of the global grid. To create thos properties we need to be able
to copy the grid independant data of the properties object and resize the rest.
This commit adds a construct taking a properties object for reading and a
new number of cells to accomplish this.
2015-02-12 21:33:41 +01:00
Joakim Hove
c021b66c18
The stream::open() functions require c_str()
2015-02-12 17:25:40 +01:00
Markus Blatt
70fb0e7b79
Store the boost::any of ParallelIstlInformation by value.
...
During the constructor the underlying object only holds smart
pointers and an empty vector. The FullyImplicitBlackoilSolver
obtains a reference to it from the NewtInterationInterface instances.
Therefore copying boost::any and storing it by value should be cheap
and safe.
2015-02-12 14:04:53 +01:00
Markus Blatt
d1239d0a35
Adds space between parameters and stops eliding zeros.
2015-02-12 10:41:45 +01:00
Markus Blatt
be7221aa9b
Moved output parameters to the end of the list in extractParallelGridInformationToISTL
2015-02-12 10:41:44 +01:00
Markus Blatt
11848acf0c
Added braces around else statement (coding guidelines)
2015-02-12 10:41:44 +01:00
Markus Blatt
a37421d2ad
Rely on delete being null safe.
2015-02-12 10:41:44 +01:00
Markus Blatt
bf281a74b8
Make symbol extractParallelGridInformationToISTL available if CpGrid is there.
2015-02-12 10:41:44 +01:00
Markus Blatt
dd63c2489f
Do not reimplement null_deleter from dune-common.
...
Instead we use Dune::stackobject_to_shared_ptr to create a
shared_ptr that does not delete the pointer.
2015-02-12 10:41:44 +01:00
Markus Blatt
39a6e19099
Fixes compilation issues when no MPI is available.
2015-02-12 10:41:44 +01:00