Commit Graph

36 Commits

Author SHA1 Message Date
Atgeirr Flø Rasmussen
dcb78877eb Separate phase and material concepts. 2015-09-30 14:44:50 +02:00
Atgeirr Flø Rasmussen
4f72bfdbcf Added phaseName() method. 2015-09-30 13:28:08 +02:00
Atgeirr Flø Rasmussen
aac34009e1 Use active and not canonical phases in getConvergence() etc. 2015-09-30 13:28:08 +02:00
Kai Bao
b1b9c171b3 update scaling factors for mass balance equations. 2015-09-08 10:57:18 +02:00
babrodtk
38865cac31 Cleaned up comments 2015-09-07 13:01:31 +02:00
Atgeirr Flø Rasmussen
097542a527 Whitespace fixes.
It turns out I accidentally used tabs for a while, this commit
fixes that for all touched files.
2015-09-07 13:00:41 +02:00
Atgeirr Flø Rasmussen
c795113ce3 Changes to make flow compile with AutoDiffMatrix. 2015-09-07 13:00:02 +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
babrodtk
62c2373a9d Minor refactoring 2015-08-19 11:46:29 +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
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
15d3171ae1 Partial integration of VFPProperties into BlackoilModel 2015-08-10 08:53:42 +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
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
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
dd945a5d5e Add more parameters to addWellContributionToMassBalanceEq.
Also: - call using asImpl(),
      - remove extraAddWellEq().
2015-06-18 14:25:53 +02:00
Kai Bao
7e9014f155 changing dx to dwells in defination of updateWellState 2015-06-16 17:03:53 +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
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
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
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
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
05bb1e4f42 Use the Curiously Recurring Template Pattern for BlackoilModel. 2015-05-24 17:36:29 +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