Commit Graph

158 Commits

Author SHA1 Message Date
Kai Bao
84cc1ed81d correcting the determination of wells_active_. 2016-04-06 14:36:51 +02:00
Kai Bao
9972dae32a updating for the comments.
implement wells(), localWellsActive() and wellsActive() for the
BlackoilModelBase and its derived classed.
2016-04-06 12:54:01 +02:00
Kai Bao
4ad5d81296 fixing wrong codes from the rebase process and cleanup. 2016-04-06 12:54:01 +02:00
Kai Bao
8a52dd743b making StandardWells a simple class. 2016-04-06 12:54:01 +02:00
Kai Bao
3947ff5b1d moving localWellsActive and wellsActive to StandardWells
maybe later it can be something general for different types of wells.
2016-04-06 12:54:01 +02:00
Kai Bao
23288ce2e5 fixing the compilation after updated with master branch. 2016-04-06 12:54:01 +02:00
Kai Bao
bef4b8c077 moving the wellOps to the StandardWells class. 2016-04-06 12:54:01 +02:00
Kai Bao
8367eaacb3 first attempt to introduce StandardWells struct.
To replace the const Wells struct in BlackoilModelBase.
Only testing with Flow for the moment. Will update other Flow siblings
later.
2016-04-06 12:54:00 +02:00
Tor Harald Sandve
764d8a1c3f Remove leftovers from a merge process going wrong 2016-04-05 09:03:22 +02:00
Tor Harald Sandve
89e540cb2c Pass solutionState as first parameter
output parameters go last...
2016-04-05 08:57:07 +02:00
Tor Harald Sandve
9cd0383d36 Factor out computation of properties for well connection pressures
Computation of properties used in computeConnectionPressureDelta
is factored out to computePropertiesForWellConnectionPressures
The motivation is to be able to use a modified version of
computePropertiesForWellConnectionPressures in the solvent model
2016-04-05 08:57:07 +02:00
Tor Harald Sandve
7b81facfb0 Make use of extractWellPerfProperties to avoid code duplication
The following changes are done in order to remove the duplicated code in
assemble().
- extractWellPerfProperties takes SolutionState as input (only used in
the solvent model)
- the computation of effective parameters is moved to computeAccum()
With these changes the solvent model can use assemble() from the base
model.
2016-04-05 08:53:09 +02:00
Tor Harald Sandve
bd81bda57b Remove well_perforation_pressure_diffs fr WellStateFullyImplicitBlackoil
- Calculate the well perforatino pressure difference based on bhp and
perforation pressures instead of storing it in
WellStateFullyImplicitBlackoil
2016-04-04 08:35:59 +02:00
Tor Harald Sandve
30bd24f2fe Compute well potentials
The well potentials are caculated based on the well rates and pressure
drawdown at every time step. They are used to calculate default guide
rates used in group controlled wells.

well_perforation_pressure_diffs is stored in
WellStateFullyImplicitBlackoil as it is needed in the well potential
calculations.
2016-04-01 14:58:46 +02:00
Atgeirr Flø Rasmussen
b5c216f4f3 Merge pull request #621 from totto82/fix_lrat
Bugfix. Fix setting initial rates in updateWellControls
2016-03-31 14:33:33 +02:00
Joakim Hove
18c07d5d66 Replaced SimulatorState -> SimulationDataContainer 2016-03-29 10:48:36 +02:00
Tor Harald Sandve
d91831b971 Avoid comparsion of floating point numbers 2016-03-18 14:30:47 +01:00
Tor Harald Sandve
94aa360fe6 Bugfix. Fix setting initial rates in updateWellControls
- The initial rates are only set to target values for single phase
producers (orat, wrat, grat).
- For injectors compi is used to determine the initial target rates.
2016-03-18 13:16:23 +01:00
Atgeirr Flø Rasmussen
b0b42d7dc7 Add missing initializer for 'singlePrecision'. 2016-02-29 11:17:54 +01:00
Jørgen Kvalsvik
6ae1613765 Add missing opm-parser headers
opm-parser pull #695
https://github.com/OPM/opm-parser/pull/695
2016-02-26 11:56:44 +01:00
Robert Kloefkorn
2eebf73e1a computeWellFlux: use operator -= when possible. 2016-02-16 10:25:57 +01:00
Robert Kloefkorn
37e49a62c8 BlackoilModelBase: use single precision for solver when dt < 20 days. 2016-02-12 12:14:02 +01:00
Robert Kloefkorn
4111797822 BlackoilModelBase: added parameter singlePrecision and print residual to large at right
place.
2016-02-12 12:14:02 +01:00
Tor Harald Sandve
dee96db6b2 Cleaning and adding comments 2016-02-12 10:42:26 +01:00
Tor Harald Sandve
c85f10046c Density and viscosity as inputs instead of computed in computeMassFlux
Density and viscosity are given as input instead of calculated inside
computeMassFlux. This allow for modifying the properties prior to
calling computeMassFlux which avoids code duplication in the solvent
implementation.
2016-02-12 10:42:26 +01:00
Atgeirr Flø Rasmussen
2505183887 Improve threshold pressure mismatch error message. 2015-12-28 09:22:53 +01:00
Atgeirr Flø Rasmussen
bd82e5ade9 Merge pull request #554 from totto82/nnc_thpress
NNC and threshold pressure
2015-12-14 11:33:30 +01:00
Markus Blatt
afc3ad3522 Guard access of well variable with asImpl().localWellsActive()
Since PR #541 the arrays cq_s, mob_perfcells, and b_perfcells are
empty if there are no wells in the domain of the process. This
caused segementation faults at various places where we compute
on the wells. With this commit we now guard this places using
asImpl().localWellsActive() and only using the array if the call
returns true.
2015-12-09 15:18:03 +01:00
Tor Harald Sandve
e3393c5ee9 Handle combination of threshold_pressure and nnc
The nncs threshold pressures are calculated and appended to the face
threshold pressures
2015-12-08 11:03:05 +01:00
Tor Harald Sandve
99ddc46318 Store the nncs in geoprops 2015-12-08 10:38:58 +01:00
Kai Bao
0022bb8465 adding one missing #pragma line resulting from rebasing conflicts. 2015-12-01 00:06:46 +01:00
Atgeirr Flø Rasmussen
a40d93a170 Comment out changes to residual output. 2015-12-01 00:06:46 +01:00
Atgeirr Flø Rasmussen
61cccfebf8 Refactor updatState() to use numWellVars().
This allows us to use the base version of updateState().
2015-12-01 00:06:45 +01:00
Kai Bao
fcd31d74ac restoring the original wellstate when solveWelleq fails. 2015-12-01 00:06:45 +01:00
Atgeirr Flø Rasmussen
233a275191 Made the solveWellEq() method return if it converged.
Also use this to avoid updating if not converged in the
multi-segment version.
2015-12-01 00:06:45 +01:00
Kai Bao
b6ede37ca3 WIP for fixing the solveWellEq running for ms wells.
refactoring needs to be done to finish it.
2015-12-01 00:06:45 +01:00
Kai Bao
c8fbb0b80d clearning up some comments and debugging output 2015-12-01 00:06:45 +01:00
Atgeirr Flø Rasmussen
e82828527c Make some methods const.
The methods are: computeWellFlux(), updatePerfPhaseRatesAndPressures()
and extractWellPerfProperties().
2015-12-01 00:06:45 +01:00
Kai Bao
50938effc4 output the well equation residual. 2015-12-01 00:06:45 +01:00
Kai Bao
7d11b49732 re-organizing the output.
no functional change.
2015-12-01 00:06:44 +01:00
Atgeirr Flø Rasmussen
4dd8536afa Make multi-segment model use Base::addWellContribution...() method.
Also make assemble() more similar to base version, using the
extractWellPerfProperties() member from Base.

To do this it was necessary to change the well_cells member of the
WellOps to be correct for the multi-segment wells (since they may
have different perforation order for some wells).
2015-12-01 00:06:44 +01:00
Atgeirr Flø Rasmussen
44f36c45cf Add well_cells to WellOps to avoid recreating. 2015-12-01 00:06:44 +01:00
Atgeirr Flø Rasmussen
920eeed3b2 Improve assemble() with new method extractWellPerfProperties(). 2015-12-01 00:06:44 +01:00
Atgeirr Flø Rasmussen
e6a81fca83 Make convergence methods work for multi-segment wells.
The convergenceReduction() method no longer takes a number-of-wells argument,
instead it infers the number of well fluxes to check from the size of the
well_flux_eq member of the residual.

After this, a custom getConvergence() method is no longer required for the
multi-segment well model.
2015-12-01 00:06:44 +01:00
Atgeirr Flø Rasmussen
1c4f4c646d Add asImpl() to some method calls.
This enables those methods (mostly well related) to be used polymorphically.
2015-12-01 00:06:44 +01:00
Kai Bao
504dc45de2 some information output
for debugging puropose.
2015-12-01 00:06:44 +01:00
Kai Bao
8c522ccc34 correcting a bug in pressure initialization in WellStateMultiSegment
for the pressure of top segment and peforations.
2015-12-01 00:06:44 +01:00
Kai Bao
02b187e14c friend class BlackoilModelBas in BlackoilMultiSegmentModel
and adding asImp() when using variableWellStateInitials and
variableWellStateInitials.
2015-12-01 00:06:43 +01:00
Kai Bao
76be27a64c recovering BlackoilModelBase BlackoilModelBase_impl
to be the same with the master branch.
The multisegment part should be in a new model.
2015-12-01 00:06:42 +01:00
Kai Bao
d2728fbfc6 chaning the naming of the member functions of WellStateMultiSegment
segPressures   -> segPress
perfPressures  -> perPress
to keep consist with the WellState
2015-12-01 00:06:42 +01:00