Commit Graph

3928 Commits

Author SHA1 Message Date
Tor Harald Sandve
cd749b3452 Fix seg-fault for cases without wells 2016-09-09 15:17:34 +02:00
Tor Harald Sandve
49f3306abe Some micro performance improvments and cleaning
-- The jacobian and residual in the reservoir is updated directly
-- The sparsity pattern are provided to the well matrices.
-- Some cleaning in updateWellState()
2016-09-09 14:58:54 +02:00
Tor Harald Sandve
3d86cc3668 Add THP support in the denseAD well model
Tested on a set of modified SPE1DECK with VFP for injectors and
producers
2016-09-09 11:33:34 +02:00
Tor Harald Sandve
0c21f2e3de Only solve the linear system when it is not converged. 2016-09-08 11:24:24 +02:00
Tor Harald Sandve
902eff18a5 Revert changes to NewtonIterationBlackoilInterleaved.cpp
Some tempory changes is removed in
NewtonIterationBlackoilInterleaved.cpp to make flow run again.
2016-09-08 11:23:41 +02:00
Tor Harald Sandve
746f9a56cc add and use class wellModelMatrixAdapter
The well contribution is substracted in the MatrixAdapter
i.e. Ax - BinvDCx
2016-09-07 14:37:48 +02:00
Tor Harald Sandve
a4dcc4b13d Remove unused code and remove Eigen vectors
-- isRS and phaseCondition is removed and hydroCarbonState in the state
is used instead
-- input of pressurediffs to computeHydrostaticCorrection() is changed
to double from Vector in WellHelpers.hpp
2016-09-07 12:25:54 +02:00
Tor Harald Sandve
83ff3271af New updateState
-- a new updateState is implemented based on dune vectors
-- the old is kept for comparision in this PR
-- the updateState is not identical.
Tested on spe1, spe9 and norne and it improves the convergence compares
to the old one.
2016-09-07 10:37:42 +02:00
Tor Harald Sandve
952ccf8338 Some cleaning and small changes
- unused code is removed
- the scaled normed is stored in residual_norm_history for usage in
stabilized newton
- number of linear iterations is outputted
- linear solver tolerance is reduced to 0.01
- make compute wellFlux local
- rewrite ADB::V to std::vector<double>
2016-09-06 13:52:43 +02:00
Andreas Lauser
1d2a5d7f1b fix the headers
remove the now unnecessary inclusion of
"NewtonIterationBlackoilInterleaved.cpp" (mind the .cpp extension!)
and include "dune/istl/solvers.hh" instead.
2016-08-28 15:48:18 +02:00
Andreas Lauser
75d99fa335 Merge pull request #6 from totto82/reorg_wells
Remove usage of ADB and the residual struct.
2016-08-28 15:47:43 +02:00
Andreas Lauser
49f13e6664 Merge remote-tracking branch 'origin/master' into frankenstein 2016-08-28 15:36:11 +02:00
Tor Harald Sandve
bfddaa3402 Merge pull request #1 from dr-robertk/ebos_restruct
make code compile and run.
2016-08-26 12:34:10 +02:00
Robert Kloefkorn
b092b2504c make code compile and run. 2016-08-26 11:54:59 +02:00
Tor Harald Sandve
699a0ede01 Remove remaning usage of ADBs
-- the code is still kept for comparison
2016-08-26 10:55:09 +02:00
Tor Harald Sandve
190076f5da Temperary commit
-- works on SPE1 but not SPE9
-- if number of perforations are increased to 3 in SPE1 the same error
as in SPE9 occur.
2016-08-25 15:25:01 +02:00
Arne Morten Kvarving
a563360e74 Merge pull request #798 from akva2/add_multiconfiguration
add multiconfiguration support to jenkins build script
2016-08-24 16:02:21 +02:00
Arne Morten Kvarving
4f779b7a01 add multiconfiguration support to jenkins build script
also unifies build.sh and build-pr.sh and gets rid of
build-opm-simulators.sh
2016-08-23 14:26:06 +02:00
Joakim Hove
5602e654c3 Merge pull request #795 from joakim-hove/arg-reorder
Illustrate support of properties like KRW and FLUX in restart file.
2016-08-23 11:30:36 +02:00
Tor Harald Sandve
4bdf74eb11 Reorganize the wellModel
- All well-related stuff is moved to StandardWellsDense.hpp
- Some unused functions are removed from BlackoilModelEbos.hpp
2016-08-23 09:58:21 +02:00
Atgeirr Flø Rasmussen
183d2f4477 Merge pull request #762 from qilicun/messages-for-keywords-options
Handle partially supported options manually.
2016-08-23 08:07:29 +02:00
Joakim Hove
71491cac6c Merge pull request #796 from akva2/simplify_after_ert_reorg
simplify jenkins build scripts after ert reorganization
2016-08-22 17:29:40 +02:00
Arne Morten Kvarving
cd822bc714 simplify jenkins build scripts after ert reorganization 2016-08-22 13:57:32 +02:00
Liu Ming
95ab7038ea Rename addUnsupported to addSupported. 2016-08-22 16:14:37 +08:00
Joakim Hove
0f7c9f4b97 Added optional simProps argument to restart. 2016-08-20 20:10:50 +02:00
Joakim Hove
56a7775fee Changed order of arguments to match opm-output. 2016-08-20 20:09:56 +02:00
Andreas Lauser
1415168729 Merge pull request #5 from totto82/dense_well
WIP New well model
2016-08-19 14:19:08 +02:00
Tor Harald Sandve
b023cb15a5 Reset wellcontrols from well_state 2016-08-19 13:50:27 +02:00
Tor Harald Sandve
cd76816ea5 Stay in sync with changes in restartWriter in the eclipseState 2016-08-19 10:30:49 +02:00
Tor Harald Sandve
0c9c5a031f Add copy constructure and operator to WellStateFullyImplicitBlackoil 2016-08-19 10:28:54 +02:00
Tor Harald Sandve
f60e26faf7 Minor convergence improvments
- set current control when initializing the wellstate
- re calculate wellVariable after well control has changed.
2016-08-18 12:23:46 +02:00
Tor Harald Sandve
49f478480d Remove usage of state in the model
1) The wellsolution is stored in wellVariables as a vector of DenseAD
objects. The wellVariables is computed from the wellstate  in
setWellVariables()
2) BHP and well fluxes are not stored directly but calculated based on
the wellVariables
3) The initial well accumulation term is stored as a vector of doubles.
4) addWellFluxEq() uses DenseAd flux and accumulation terms
5) computePropertiesForWellConnectionPressures() no longer uses state as
input. The wellstate is used to get the bhp pressure.
6) The current wellcontrol is set when updated in updateWellControls()
in order to use well_controls_get_current_type(wc) insted of
well_controls_iget_type(wc, currentIdx)

Tested on SPE1, SPE9 and Norne.
Effects the convergence but the results are identical.
2016-08-18 12:23:46 +02:00
Tor Harald Sandve
dec60a8bd8 The well model no uses the fluidState and fluidsystem from ebos
The well model is modified to use the fluidState and fluidsystem from
ebos. UpdateLegacyState() is no longer needed.
2016-08-18 12:23:46 +02:00
Tor Harald Sandve
1754181761 BUGFIX Make the wellVariables constant
The wellVariables where left out in makeConstantState()
With this fix norne runs
2016-08-18 12:23:45 +02:00
Tor Harald Sandve
5cd7468b51 Implement new well model
Start using the well model desribed in SPE 12259 "Enhancements to the
Strongly Coupled, Fully Implicit Well Model: Wellbore CrossFlow Modeling
and Collective Well Control"

The new well model uses three well primary variables: (the old one had
4)
1) bhp for rate controlled wells or total_rate for bhp controlled wells
2) flowing fraction of water Fw = g_w * Q_w / (g_w * Q_w + q_o * Q_o +
q_g + Q_g)
3) flowing fraction of gas  Fg = g_g * Q_g / (g_w * Q_w + q_o * Q_o +
q_g + Q_g)
where g_g = 0.01 and q_w = q_o = 1;

Note 1:
This is the starting point of implementing a well model using denseAD
The plan is to gradually remove Eigen from the well model and instead
use the fluidState object provided by the Ebos simulator
Note 2:
This is still work in progress and substantial cleaning and testing is
still needed.
Note 3: Runs SPE1, SPE9 and norne until 950 days.
2016-08-18 12:23:45 +02:00
Atgeirr Flø Rasmussen
c14b19c48b Merge pull request #792 from qilicun/fix-polymer-inflow
look for water injector only, if not find, just continue to next step.
2016-08-15 17:35:15 +02:00
Andreas Lauser
3e8792b9cc some output related fixes
there was a screw-up with the output directory (to set it you need to
modify the EclipseState by means of the IOConfig object? WTF?) and it
seems like the FlowMain.hpp was modified since FlowMainEbos.hpp was
added so there was some terminal output missing.
2016-08-14 21:44:47 +02:00
Andreas Lauser
c919b1e6e1 flow_ebos: set the correct pressure value in all cases
for the gas-only case with vaporized oil enabled, the oil pressure was
used, but ebos uses the gas pressure as a primary variable in that
case. (the reason is that it is faster to check if oil appears if the
gas pressure is available in that case.) This patch corrects that and
does no longer use the PrimaryVariables::set$FOO_PV() methods because
these methods are hard to keep in sync with the indices for the
primary-variables-as-a-Dune::FieldVector feature (which is actually
quite important for the linear solver).
2016-08-12 16:52:36 +02:00
Joakim Hove
f03fd5feee Merge pull request #794 from jokva/parser-restart-config
Match RestartConfig interface in opm-parser
2016-08-12 15:46:31 +02:00
Liu Ming
5f059da0a4 look for water injector only, if not find, just continue to next step. 2016-08-12 08:27:07 +08:00
Jørgen Kvalsvik
ab95133d1c Match RestartConfig interface in opm-parser 2016-08-11 09:59:07 +02:00
Andreas Lauser
2e56597d0e fix Dune 2.3 build issue
this time I tested it.
2016-08-10 15:05:31 +02:00
Andreas Lauser
4b4ecb1145 fix a build issue with dune 2.3
(hopefully)
2016-08-10 14:45:20 +02:00
Andreas Lauser
068ee3bc18 flow_ebos: no need to update the properties object
ebos does this internally. in flow_ebos these objects are only needed
for the well model...
2016-08-09 18:38:23 +02:00
Andreas Lauser
92eefb4718 flow_ebos: make the ebos simulator less verbose 2016-08-09 18:38:23 +02:00
Andreas Lauser
8e81023e1d BlackoilModelEbos: remove redundant constructor parameters 2016-08-09 18:38:23 +02:00
Andreas Lauser
626d3e1da5 flow_ebos: only instantiate a single deck and a single EclipseState 2016-08-09 18:38:23 +02:00
Andreas Lauser
17c1e1083e only instanciate the grid once
i.e., pass through the one which is created by ebos...
2016-08-09 18:38:23 +02:00
Andreas Lauser
adb8a2cf96 fix the end-of-episode detection code 2016-08-09 18:38:23 +02:00
Andreas Lauser
f29bf8f694 flow_ebos: retrieve the simulation grid from the ebos simulator object 2016-08-09 18:38:23 +02:00