Commit Graph

1104 Commits

Author SHA1 Message Date
Atgeirr Flø Rasmussen
47e7dbe943 New implementation of AutoDiffMatrix, some tests.
Compiles and tests successfully, but test coverage very
limited. New approach based on relatively primitive
run-time switching instead of trying to use inheritance.
2015-09-07 12:58:51 +02:00
Atgeirr Flø Rasmussen
6a5a48e728 Work in progress on AutoDiffMatrix (not compiling). 2015-09-07 12:58:51 +02:00
Bård Skaflestad
63d34157ef Merge pull request #462 from blattms/fix-build
Removes unused experimental header include to fix build.
2015-09-07 11:23:59 +02:00
Atgeirr Flø Rasmussen
b08f61362b Merge pull request #461 from blattms/fixes-solve_welleq_initially-in-parallel
Fixes parallel runs with solve_welleq_initially
2015-09-07 11:14:46 +02:00
Markus Blatt
8ed72cdf9f Remove unused experimental header include.
The include of ParallelRestrictedAdditiveSchwarz.hh was a left over
from some experiments and should not be here yet.
2015-09-07 10:48:34 +02:00
Atgeirr Flø Rasmussen
b77e306688 Merge pull request #460 from blattms/parallel-interleaved
Fix parallel flow_cp for the interleaved case
2015-09-07 10:09:16 +02:00
Markus Blatt
02120d14d1 Directly initialize variable with global value.
Previously we initialized a variable for a global
(i.e. sum over all processes) value with the local
value first and the overwrote it with the computed
global. This meant the name did not reflect the value
during the first initialization.

With this commit we fix this by using an additional
variable for the local value that is used to compute
the global one.
2015-09-07 09:50:36 +02:00
Atgeirr Flø Rasmussen
09e254d9a3 Merge pull request #458 from totto82/new_defaults
Change defaults
2015-09-07 08:49:36 +02:00
Atgeirr Flø Rasmussen
9ceeba0e8c Merge pull request #459 from blattms/zoltan-well-aware
Use well information during load balancing.
2015-09-07 08:49:04 +02:00
Markus Blatt
4cc87c28f6 Fixes parallel runs with solve_welleq_initially
If this option was set there were some branches in
the code that did depend on the local number of wells
but should depend on the number of wells in the reservoir
no matter on which process they are stored.

With this commit we introduce BlackOilModelBase::localWellsActive()
which only takes local wells into account. The function now
BlackOilModelBase::wellsActive() considers all active wells in the
reservoir.
2015-09-05 20:24:50 +02:00
Markus Blatt
45fdb3ac48 [bugfix] Use correct parameters for ParallelIstlInformation::copyValuesTo.
The last parameter of this functions specifies how vector/martix
entries there are per index/cell of the grid. For the interleaved
versions all components end up in one block. Therefore this number
needs to be one here (in contrast to the number of phases for the
non-interleaved version).

This commit new uses the correct number.
2015-09-05 16:09:33 +02:00
Markus Blatt
0adde744bf [bugfix] Make sequential preconditioner live as long as the parallel one.
It holds a reference to the sequential code. Previously this reference
point to a temporary object that was deleted upon exit of
constructPrecond.

With this commit use a unique_ptr to store the parallel
preconditioner. It also gets a custom deleter that will delete the
nested sequential iterator during destruction.
2015-09-05 16:09:33 +02:00
Markus Blatt
6890e8db71 Renames ParallelPreconditionerDeleter and moves it to a separate header.
The class is not limited to parallel preconditioners. To reflect this
we rename it to AdditionalObjectDeleter. As it will also be used for
the parallel interleaved version we move the class to a separate header.
2015-09-05 16:09:33 +02:00
Atgeirr Flø Rasmussen
6f0f90d1b6 Merge pull request #448 from totto82/WCONINJH
Add support for WCONINJH
2015-09-04 15:27:40 +02:00
Markus Blatt
c527e15b63 Use well information during load balancing.
With this commit we pass the well information to
the loadbalance method of CpGrid to ensure that
each well is stored completely on one process.
2015-09-03 20:28:13 +02:00
Tor Harald Sandve
fd48a6e004 Change defaults
Use the more stable interleaved solver instead of CPR as default
Solve well equation initially as default
2015-09-03 12:38:03 +02:00
Tor Harald Sandve
53c1195b64 Rename variable from i to injector 2015-09-03 11:29:12 +02:00
Tor Harald Sandve
944092bd89 Add support for WCONINJH
Explicitly adds bhp control on rate controlled history matching
injector.The default bhp limit is a large number to make sure that the
well does not switch. Alternativly bhp limit can be specified using
WELTARG. This is typically done to make sure the bhp limit stays within
the pressure limits in the PVT tables. Support for WELTARG is also added
to the history matching producers (WCONHIST)
2015-09-03 11:26:07 +02:00
Tor Harald Sandve
3a78cd4635 BUGFIX Fix out of bounds error 2015-09-03 09:33:46 +02:00
Atgeirr Flø Rasmussen
59fccb2f86 Merge pull request #422 from andlaus/satfunc_refactoring
add a few missing "#include <Evaluation.hpp>"
2015-09-02 15:23:16 +02:00
Andreas Lauser
73710a01d2 move the code which creates a compressed to cartesian cell index map to a separate free function 2015-09-02 14:50:41 +02:00
Atgeirr Flø Rasmussen
bbd1395d3f Merge pull request #451 from babrodtk/fix_warnings
Fixed warnings
2015-09-02 14:31:31 +02:00
babrodtk
6dd24640c9 Changed c-style cast to c++-style cast 2015-09-02 14:23:35 +02:00
babrodtk
e1632b8522 Fixed bug reading directly into data owned by string 2015-09-02 14:18:52 +02:00
babrodtk
7ea047b9c7 Removed superfluous changes 2015-09-02 14:16:56 +02:00
babrodtk
91a6f4fc4a Fixed a few more warnings 2015-09-02 13:14:20 +02:00
babrodtk
5b287e0ea8 Fixed warnings 2015-09-02 13:02:27 +02:00
Andreas Lauser
9515ec6cfb BlackoilPropsAdFromDeck: improve the documentation for the constructors 2015-09-02 12:32:41 +02:00
Andreas Lauser
0e5d8da66b adapt to the change of the API due to using compressed instead of cartesian indices 2015-09-02 12:32:41 +02:00
Andreas Lauser
a394af6734 flow: initialize the parameters for the material law only once
this saves some memory and some time at initialization.
2015-09-02 12:32:41 +02:00
Joakim Hove
009ae54523 Merge pull request #449 from joakim-hove/table-refactor
Using TableManager to get tables.
2015-09-02 11:58:17 +02:00
Markus Blatt
ff669bc32b [bugfix] Correctl resize satOilMax in a parallel run.
Previously, we tried to make an empty container bigger by
resizing it with its current size. Of course this is wrong and does
not change anything. With this commit we use the size of another
container which already has the correct size.
2015-09-01 20:30:30 +02:00
Joakim Hove
9bd8d73a26 Using TableManager to get tables. 2015-09-01 13:14:51 +02:00
Atgeirr Flø Rasmussen
957290c459 Merge pull request #440 from babrodtk/thp_control_fix
Targets for switching to/from THP control (Vertical flow performance)
2015-08-24 09:35:43 +02:00
babrodtk
9148b3f23c Added missing config.h include 2015-08-21 12:49:18 +02:00
babrodtk
6c590d4bdb Implemented proper targets for switching to/from THP control 2015-08-19 17:03:41 +02:00
Atgeirr Flø Rasmussen
36ccfca172 Silence unused variable warning (release mode only). 2015-08-19 13:33:38 +02:00
Atgeirr Flø Rasmussen
3c1c3a30ab Merge pull request #430 from babrodtk/vfpprod
Vertical flow performance
2015-08-19 13:27:37 +02:00
babrodtk
407512382a Minor fixes for PR 2015-08-19 12:48:20 +02:00
babrodtk
e89a40ec99 Fixed misleading comments 2015-08-19 12:42:50 +02:00
babrodtk
f3553313d2 Rewrote function finding interpolation data 2015-08-19 12:37:54 +02:00
babrodtk
62c2373a9d Minor refactoring 2015-08-19 11:46:29 +02:00
Atgeirr Flø Rasmussen
6e1bb5de0e Silence unused argument warning. 2015-08-19 11:41:22 +02:00
babrodtk
b2335ced24 Minor fixes for PR 2015-08-19 11:32:38 +02:00
babrodtk
6b3356e74d Minor fixes for comments in PR 2015-08-19 08:07:51 +02:00
babrodtk
b75baac8fc Fixed sign issue with vfpprod->bhp(flo) 2015-08-18 14:53:36 +02:00
babrodtk
139071d39e Minor performance improvement for non-VFP runs 2015-08-18 10:24:57 +02:00
Tor Harald Sandve
554f1ec9c6 Add comments to the well equations
Gas and solvent is combinded and solved together
The input in the well equation is then the
total gas phase = hydro carbon gas + solvent gas
This may need to be reconsidered later, as the model
is tested.
2015-08-18 07:24:08 +02:00
Tor Harald Sandve
cca5410ebb Fix minor comments in PR#425 2015-08-18 07:24:08 +02:00
Tor Harald Sandve
3b99338bd0 Rename Extended to Solvent
- classes and files are renamed to use solvent instead of extended in
their names.
2015-08-18 07:24:08 +02:00
Tor Harald Sandve
332ded52e8 Add support for ssfn
The SSFN keyword is used in the solvent model to modify the gas/solvent
rel.perm values.
2015-08-18 07:24:08 +02:00
Tor Harald Sandve
17cddaf126 Add support for solvent properties
-surface density are specified using the Eclipse keyword SDENSITY
and the pvt properties (viscosity (mu) and formation volume factor (b)
using PVDS
2015-08-18 07:24:08 +02:00
Tor Harald Sandve
76fae686c7 Supporting changes in WSOLVENT during simulations 2015-08-18 07:24:08 +02:00
Tor Harald Sandve
b596637c95 Add missing files 2015-08-18 07:24:08 +02:00
Tor Harald Sandve
971e7e19cb Add simple solvent model
assumes:
- solvent is immiscible in the oil phase
- gas pvt and relperms are used for the solvent
- no initial solvent in the model

Solvent is injected using the WSOLVENT keyword
TODO: Make it possible to change WSOLVENT
2015-08-18 07:24:08 +02:00
Atgeirr Flø Rasmussen
d41bd90a40 Change assert() to use actual variables present. 2015-08-17 17:06:54 +02:00
Atgeirr Flø Rasmussen
9af29fd496 Merge pull request #434 from atgeirr/fix-minor-memleak
Fix minor memory leak
2015-08-17 16:38:18 +02:00
Atgeirr Flø Rasmussen
18a3b0b7a2 Minor whitespace fix. 2015-08-17 16:36:01 +02:00
Atgeirr Flø Rasmussen
c9b76880b6 Fix minor memory leak. 2015-08-17 15:44:58 +02:00
Kai Bao
997616658b adding 0th phase only once when computing sparse pattern 2015-08-17 15:33:33 +02:00
Kai Bao
ce4b25f0b8 removing the unused SparseMatrix A 2015-08-17 15:12:13 +02:00
Kai Bao
7d7b05a126 removing unused Span variable. 2015-08-17 15:04:31 +02:00
Kai Bao
a816f4c06c optimizing the formInterleavedSystem().
The current implementation avoids the using of formEllipticSystem() and
vercatCollapseJacs(), which take a significant amount of computing time
during the non-linear solutions.
2015-08-17 13:36:44 +02:00
babrodtk
3fddf86eef Initialized well connection pressures first
in assemble(...). This makes VFPINJ behave as expected, and
  VFPPROD for the "trivial table". For the nontrivial table,
  VFPPROD does not match expected behaviour.
2015-08-17 13:05:32 +02:00
babrodtk
657a7c58b8 Added hydrostatic correction for vfp table depth
Closer to reproducing proper results, but som oscillating
 behaviour in plots of actual BHP.
2015-08-14 14:48:15 +02:00
babrodtk
748440eea6 Fixed bug with VFPPROD tables 2015-08-12 15:15:33 +02:00
babrodtk
c513ed4a17 Implemented support for VFPINJ tables. Runs through synthetic non-trivial example 2015-08-11 16:31:43 +02:00
babrodtk
2994d1d932 Refactoring 2015-08-11 12:21:06 +02:00
babrodtk
08dd631a8d Refactoring/restructuring 2015-08-11 10:24:55 +02:00
babrodtk
5af128bcb6 Refactoring 2015-08-11 09:47:06 +02:00
Atgeirr Flø Rasmussen
9a0ff41221 Silence warnings. 2015-08-11 09:20:35 +02:00
babrodtk
503885fd93 Fixed warnings 2015-08-10 15:34:19 +02:00
babrodtk
bc2fb23af9 Minor beatuifications of code 2015-08-10 15:04:21 +02:00
babrodtk
d45543b8fb Proper integration of derivatives for THP 2015-08-10 08:55:06 +02:00
babrodtk
ff403afb1d Fixed bug in superset when index list empty 2015-08-10 08:55:06 +02:00
babrodtk
22b94b75e6 VFP table which maps THP==BHP gives identical results 2015-08-10 08:55:06 +02:00
babrodtk
7eb94caeba Updated integration of VFP tables. Produces almost identical results to bhp control 2015-08-10 08:55:05 +02:00
babrodtk
16a4580219 Implemented test to check derivatives for interpolateplane 2015-08-10 08:55:05 +02:00
babrodtk
34edf3a5b8 Changed API of VFPProperties to take ADBs 2015-08-10 08:55:05 +02:00
André R. Brodtkorb
66c13d9b96 Added proper scaling for derivatives 2015-08-10 08:55:05 +02:00
André R. Brodtkorb
99c23d3810 Bugfix interpolation 2015-08-10 08:55:05 +02:00
babrodtk
1a3d12deac implemented struct to keep track of derivatives during interpolation 2015-08-10 08:55:05 +02:00
babrodtk
f424a26651 Added initial calculation of derivatives 2015-08-10 08:55:05 +02:00
babrodtk
0d36d81e51 Implemented test for case when bhp(thp) == bhp 2015-08-10 08:55:05 +02:00
babrodtk
32e4c8caab Minor bug-fixes 2015-08-10 08:55:05 +02:00
babrodtk
926f7ba175 Return zero for e.g., the gas:oil-ratio if no oil 2015-08-10 08:54:34 +02:00
babrodtk
79410685ca Refactoring and updated tests 2015-08-10 08:54:34 +02:00
babrodtk
0467af953c Added function to compute THP from BHP using VFP tables 2015-08-10 08:54:34 +02:00
babrodtk
d27403b427 Initial integration of VFPProdTables 2015-08-10 08:54:34 +02:00
babrodtk
3260e978da Minor refactoring of VFPProperties to prepare for support for VFPINJ tables 2015-08-10 08:53:42 +02:00
babrodtk
15d3171ae1 Partial integration of VFPProperties into BlackoilModel 2015-08-10 08:53:42 +02:00
André R. Brodtkorb
066e54bbfc Updated VFPProperties to support a vector VFPProdTable's 2015-08-10 08:50:26 +02:00
André R. Brodtkorb
179a210ad5 Updated VFPProperties to use the newly implemented VFPProdTable class in opm-parser (with units) 2015-08-10 08:50:26 +02:00
André R. Brodtkorb
ab445a6d9a Added proper error checking and partial units 2015-08-10 08:50:26 +02:00
André R. Brodtkorb
ccf06c2c1c Added tests for computing the flo/wfr/gfr values based on the aqua/liquid/vapour flow rates 2015-08-10 08:50:26 +02:00
André R. Brodtkorb
3dfd9ad56d Added ADB version of bhp function 2015-08-10 08:50:25 +02:00
André R. Brodtkorb
0e3b951cd0 Added skeleton of interpolation using ADBs as input 2015-08-10 08:50:25 +02:00
André R. Brodtkorb
7b0132b110 Added linear extrapolation 2015-08-10 08:50:25 +02:00
André R. Brodtkorb
106467e889 Tabs to spaces 2015-08-10 08:50:25 +02:00
André R. Brodtkorb
67b55f873c Created tests for the VFPProperties class 2015-08-10 08:50:25 +02:00
André R. Brodtkorb
a54804c0cc Added initial version of VFPProperties 2015-08-10 08:50:25 +02:00
Robert Kloefkorn
9cf207f1fb DuneMatrix: remove hackery of defining private as protected. This issues has been
resolved in dune-2.4.
2015-08-07 12:08:06 +02:00
Joakim Hove
6a841cfa83 Added new 'false' argument to writeTimeStep() 2015-08-05 13:46:17 +02:00
chflo
077f3d8ea7 OPM-218: Fix for restart interval write 2015-08-02 22:36:50 +02:00
Robert Kloefkorn
affc64f346 SimulatorBase: avoid using update operator for bool. 2015-07-29 10:21:55 +02:00
Atgeirr Flø Rasmussen
e24cb27ad4 Merge pull request #420 from dr-robertk/PR/bug-fix-is-parallel-init
SimulatorBase[bugfix]: is_parallel_run_ was not initialized correctly.
2015-07-27 18:14:35 +02:00
Robert Kloefkorn
3ef2e883f8 SimulatorBase[bugfix]: is_parallel_run_ was not initialized when output_terminal was
false.
2015-07-27 13:08:36 +02:00
Markus Blatt
67d5a1f503 Prevents initializing std::shared_ptr from nullptr.
For g++-4.4 support for nullptr is not complete. Using it
to initialize an empty shared_ptr breaks compilation:

/home/mblatt/src/dune/opm/opm-autodiff/opm/autodiff/AutoDiffHelpers.hpp: In constructor ‘Opm::HelperOps::HelperOps(const Grid&, Opm::EclipseStateConstPtr)’:
/home/mblatt/src/dune/opm/opm-autodiff/opm/autodiff/AutoDiffHelpers.hpp:87: error: no match for ternary ‘operator?:’ in ‘(bool)eclState ? eclState->.Opm::EclipseState::getNNC() : nullptr’
/home/mblatt/src/dune/opm/opm-autodiff/opm/autodiff/AutoDiffHelpers.hpp:87: note: candidates are: operator?:(bool, const Opm::NNC* std::__shared_ptr<const Opm::NNC, (__gnu_cxx::_Lock_policy)2u>::*, const Opm::NNC* std::__shared_ptr<const Opm::NNC, (__gnu_cxx::_Lock_policy)2u>::*) <built-in>
/home/mblatt/src/dune/opm/opm-autodiff/opm/autodiff/AutoDiffHelpers.hpp:87: note:                 operator?:(bool, const Opm::NNC* std::__shared_ptr<const Opm::NNC, (__gnu_cxx::_Lock_policy)2u>::*, T*) <built-in>

Here no conversion to shared_ptr happens.

/home/mblatt/src/dune/opm/opm-autodiff/opm/autodiff/ImpesTPFAAD.cpp: In constructor ‘Opm::HelperOps::HelperOps(const Grid&, Opm::EclipseStateConstPtr) [with Grid = UnstructuredGrid]’:
/home/mblatt/src/dune/opm/opm-autodiff/opm/autodiff/ImpesTPFAAD.cpp:160: error: no matching function for call to ‘std::shared_ptr<const Opm::EclipseState>::shared_ptr(const dune_nullptr_t&)’
/usr/include/c++/4.4/bits/shared_ptr.h:1263: note: candidates are: std::shared_ptr<_Tp>::shared_ptr(std::shared_ptr<_Tp>&&) [with _Tp = const Opm::EclipseState]
/usr/include/c++/4.4/bits/shared_ptr.h:1238: note:                 std::shared_ptr<_Tp>::shared_ptr() [with _Tp = const Opm::EclipseState]
/usr/include/c++/4.4/bits/shared_ptr.h:1236: note:                 std::shared_ptr<const Opm::EclipseState>::shared_ptr(const std::shared_ptr<const Opm::EclipseState>&)

Here the DUNE's nullptr implementation is used with std::shared_ptr which are not
compatible.

We fix this by using the emptry constructor of std::shared_ptr to create a nullptr.
2015-07-23 15:33:45 +02:00
Atgeirr Flø Rasmussen
de2a52bbda Fixed Eigen array dimensions must be respected in resize(). 2015-07-15 13:26:34 +02:00
Bård Skaflestad
c5ae85e480 Merge pull request #415 from atgeirr/fix-nnctreatment
Fix nnc treatment
2015-07-13 22:09:10 +02:00
Atgeirr Flø Rasmussen
61b1a67140 Bugfix: do not call method on pointer that can be null. 2015-07-13 11:24:21 +02:00
Atgeirr Flø Rasmussen
eda6899571 Simplify rhs of conditional. 2015-07-13 11:23:56 +02:00
Robert Kloefkorn
752f80572e GridHelpers: added specialization for PolyhedralGrid. 2015-07-10 14:16:43 +02:00
Tor Harald Sandve
ab872b15e3 Remove old constructor
Pass Null pointer as default argument for the EclipseState to enable all
users to use the new constructor.
2015-07-10 10:30:29 +02:00
Tor Harald Sandve
662849637c Change size_t to int to avoid comparison warnings
and add some white spaces
2015-07-10 05:08:04 +02:00
Tor Harald Sandve
f1e91b8b87 Use the gridhelpers to make it run with cp-grid 2015-07-09 12:18:52 +02:00
Tor Harald Sandve
065b2f595c Add support for NNC in the simulator
1) NNC are added the grad, div and average operators
2) NNC are added the upwindSelector
3) NNC transmissibilities are added to the face transmissibilities
2015-07-09 12:15:59 +02:00
Atgeirr Flø Rasmussen
41eefa188f Removed unneeded Opm:: qualifier, and reindent. 2015-07-09 13:45:15 +02:00
Atgeirr Flø Rasmussen
c64222ce33 Avoid unused argument warning. 2015-07-09 13:37:20 +02:00
Robert Kloefkorn
db36dd6f43 GeoProps: initialize scaledFaceNormal with zero. 2015-07-08 13:46:03 +02:00
Robert Kloefkorn
3c1bf1a669 GeoProps: avoid complications if dune is not found. 2015-07-08 13:18:52 +02:00
Robert Kloefkorn
bdb30ec023 GeoProps: fix the use_local_perm implementation for flow_cp. The problem that the
faceNormals are scaled differently remains.
2015-07-08 13:15:00 +02:00
Bård Skaflestad
8cd014f937 Merge pull request #408 from atgeirr/performance-opt
Performance enhancements and simplifications for BlackoilModelBase
2015-07-01 14:41:50 +02:00
Atgeirr Flø Rasmussen
f0db1974cf Merge pull request #409 from andlaus/use_fluidstates_for_satfuncs
adapt to the opm-core API change in the SaturationFunctionsFromDeck to always use non-uniform tables
2015-07-01 12:58:13 +02:00
Robert Kloefkorn
5b51a5b7b1 Merge remote-tracking branch 'upstream/master' into PR/merge-flow-and-flow_cp 2015-06-30 13:39:03 +02:00
Atgeirr Flø Rasmussen
98dfe892f5 Undo the order changes in commit 1524a1.
This is done to eliminate changes in simulation results.
2015-06-29 16:44:10 +02:00
Andreas Lauser
78f7097798 adapt to the opm-core API change in the SaturationFunctionsFromDeck to always use non-uniform tables 2015-06-26 15:32:10 +02:00
Atgeirr Flø Rasmussen
4cb8556f42 Simplify fluid interfaces, reuse formation volume factor.
The simplifications are:
 - Do not pass cell indices to fluidViscosity(), fluidReciprocFVF().
 - Pass b (reciprocal f.v.f.) to fluidDensity() instead of pressure etc.

This saves one call to fluidReciprocFVF(), that is removed from
fluidDensity(). Instead the previously stored quantity is passed
to fluidDensity() as an argument.
2015-06-24 10:22:23 +02:00
Atgeirr Flø Rasmussen
1524a10e31 Change order of computation to reduce overhead. 2015-06-24 10:06:40 +02:00
Atgeirr Flø Rasmussen
c96a33124c Refactor addWellEq().
The method has been split in three parts:
        computeWellFlux(const SolutionState& state,
                        const std::vector<ADB>& mob_perfcells,
                        const std::vector<ADB>& b_perfcells,
                        V& aliveWells,
                        std::vector<ADB>& cq_s);

        void
        updatePerfPhaseRatesAndPressures(const std::vector<ADB>& cq_s,
                                         const SolutionState& state,
                                         WellState& xw);

        void
        addWellFluxEq(const std::vector<ADB>& cq_s,
                      const SolutionState& state);

This reduces the function length, although most of the content of addWellEq()
now is in computeWellFlux(), so that function is still quite long. It also
allows us to use smaller sets of function arguments, which makes methods easier
to understand.

Finally, it makes it easier to create derived models with custom behaviour.
2015-06-22 11:34:10 +02:00
Atgeirr Flø Rasmussen
ae6caaac61 Move parallel overload into HAVE_MPI block. 2015-06-19 14:06:27 +02:00
Atgeirr Flø Rasmussen
f3623270cc Fix case in include statement. 2015-06-19 13:35:36 +02:00
Atgeirr Flø Rasmussen
700ce9e13d Move forming interleaved matrix to own function/ 2015-06-19 11:33:30 +02:00
Atgeirr Flø Rasmussen
5e513642d7 Add paralell preconditioner, enable parallel case. 2015-06-19 10:53:33 +02:00
Atgeirr Flø Rasmussen
a3d115ff22 Add (disabled) parallel version.
Disabled because the constructPreconditionerAndSolve() method does
not have a way currently to construct a parallel preconditioner.
2015-06-19 10:53:33 +02:00
Atgeirr Flø Rasmussen
5476b7a6ac Clean up headers, copyright. 2015-06-19 10:53:33 +02:00
Atgeirr Flø Rasmussen
ca74b18784 Add missing include. 2015-06-19 10:53:33 +02:00
Atgeirr Flø Rasmussen
4eb77bebb4 Further cleanup: includes, copyright, whitespace. 2015-06-19 10:53:33 +02:00
Atgeirr Flø Rasmussen
9e28857933 Remove functions that were moved to NewtonIterationUtilities. 2015-06-19 10:53:33 +02:00
Atgeirr Flø Rasmussen
c8cae85ea2 Move functions needed by several NewtonIteration-classes to separate file. 2015-06-19 10:53:33 +02:00
Atgeirr Flø Rasmussen
d86de7bb79 Only use pressure jacobian to form sparsity pattern.
Also clean up by eliminating commented-out debugging code.
2015-06-19 10:53:33 +02:00
Atgeirr Flø Rasmussen
8cbce1bfdf Working interleaved solver implemented. 2015-06-19 10:53:32 +02:00
Atgeirr Flø Rasmussen
8af1ea1e42 Add (disabled) experimental part, not changing the A matrix.
This seems to cause a significant increase in iterations and failures,
which is why it is disabled for now.
2015-06-19 10:53:32 +02:00
Atgeirr Flø Rasmussen
63285bf6f9 Remove usage of CPRPreconditioner. 2015-06-19 10:53:32 +02:00
Atgeirr Flø Rasmussen
5d0f654443 Add class NewtonIterationBlackoilInterleaved.
Initially it is just a copy of the NewtonIterationBlackoilCPR class.
Also, add use_interleaved parameter to use the class.
2015-06-19 10:53:32 +02:00
Atgeirr Flø Rasmussen
dd945a5d5e Add more parameters to addWellContributionToMassBalanceEq.
Also: - call using asImpl(),
      - remove extraAddWellEq().
2015-06-18 14:25:53 +02:00
Robert Kloefkorn
10725c0b70 Merged main program for flow and flow_cp to avoid code duplication. 2015-06-17 13:00:37 +02:00
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