Commit Graph
100 Commits
Author SHA1 Message Date
Tor Harald Sandve 7567748f2d Adapt to changed initial FluidState type in ebos 2017-12-15 08:19:01 +01:00
Tor Harald Sandve d099d88625 Add SPE1CASE2_OILGAS test case 2017-12-05 09:38:21 +01:00
Tor Harald Sandve 095b82212c Use the initial solution from Ebos 2017-12-04 10:35:30 +01:00
Tor Harald Sandve 8ae24f7f02 Increase max_iter for ctests SPE5 and 2D_THREEPHASE_POLY_HETER 2017-11-30 08:45:03 +01:00
Tor Harald Sandve a1dbeec4d4 Use 1 day as default initial time step 2017-11-28 15:12:48 +01:00
Tor Harald Sandve 2d2f9285c5 Only read use_TUNING param once.
Just to clean up the .DEBUG file.
2017-11-28 14:25:25 +01:00
Tor Harald Sandve e350c04871 Fix date for long simulation times 2017-11-28 13:37:00 +01:00
Tor Harald Sandve 9edb351d34 Put the ebosSimulator start and end methods were it belongs
Move the beginEpisode/endEpisode call to ebos to beginReportStep/
endReportStep and beginTimeStep/endTimeStep call to ebos to prepareStep/
afterStep
2017-11-24 15:16:03 +01:00
Tor Harald Sandve ba358c0522 Only update TUNING when TUNING_CHANGE event 2017-11-23 14:24:40 +01:00
Tor Harald Sandve dd97fc8908 Some clean up. 2017-11-23 11:15:50 +01:00
Tor Harald Sandve c076ed6485 Move Rateconverter and pvtIdx to the wellInterface 2017-11-23 08:37:30 +01:00
Tor Harald Sandve 054361d537 Make it possible to combine solvent and RESV
Compute the conversion factor for solvent using the RateConverter.hpp
2017-11-22 15:21:21 +01:00
Tor Harald Sandve 2a7d7b8ae5 Pass ref instead of shared pointer to initEquil 2017-11-21 14:29:08 +01:00
Tor Harald Sandve 31bfb22273 Adapt to the refactoring of the Equil initialization code
Most noteably the blackoilState is not returned by the initialization
code anymore, instead the initialization class is returned.
2017-11-21 13:52:07 +01:00
Tor Harald Sandve c03dbc1693 Support TUNING in schdule section. 2017-11-21 11:12:16 +01:00
Tor Harald Sandve 614f75d9b9 Fix size of perf radius and length vectors. 2017-11-13 12:16:39 +01:00
Tor Harald Sandve 5647485daa Apply the well residuals to cell residuals in SolveJacobianSystem
This was moved to assemble() some time ago but according to my logic it
belongs in the solve method since this is only a trick to solve the well
equations simultaneously with the reservoir equations.

A buggy side effect of the currect implementation was that the well
residual was considered in the convergence test. I.e. this move changes
the convergence behaviour of the simulator.
2017-11-09 08:40:08 +01:00
Tor Harald Sandve a73208f41c Address issues raised in the review of the PR 2017-11-08 15:48:30 +01:00
Tor Harald Sandve 4bb5213f37 BUGFIX Update the solution variable in ebos
Updating the solution variable in updateState() was conceptually wrong
and lead to incorrect results if the linear solver failed before the
updateState() method was called. i.e. in the first iteration.
2017-11-08 14:21:31 +01:00
Tor Harald Sandve b9bc4b00cb Make the wellModel self-contained
The wellModel is now persistent over the time steps,
with an update method called every reportStep/episode.

This allows the following simplifications:

    1. move the wellState to the WellModel
    2. add a ref to the ebosSimulator to the wellModel
    3. clean up the parameters passed to the wellModel methods
    4. move RESV handling to the WellModel and the rateConverter
    5. move the econLimit update to the WellModel
2017-11-08 13:57:36 +01:00
Tor Harald Sandve dc8f811cbe Remove WellStateFullyImplicitBlackoilDense
After the restructuring of of the well model, keeping an extra class for
the "Dense" model is not needed. The only thing still left in
WellStateFullyImplicitBlackoilDense was some solvent related stuff, this
PR moves this to WellStateFullyImplicitBlackoil and removes
WellStateFullyImplicitBlackoilDense.

In addition to a cleaning code this PR fixes missing solvent well output.
2017-10-11 10:54:59 +02:00
Tor Harald Sandve ebc2f46967 Use pore volume weighted averaged hydrocarbon state in rateConverted.
- pressure, rs and rv is averaged using hydrocarbon pore volume weights.
- pvtRegions is used as input in the conversion factor calculations.
- the pvt cell of the first well cell is used as the pvt index.
(Completing a well in two different PVT regions sounds like a very bad
idea anyway)
- FIP region support is added to the rate converter also for the ebos
interface.
2017-10-03 10:25:56 +02:00
Tor Harald Sandve 5839962e31 Some trivial cleaning 2017-09-21 12:16:46 +02:00
Tor Harald Sandve 992ab84435 Remove support and tests for pseudo 2p model in flow ebos 2017-09-20 08:11:44 +02:00
Tor Harald Sandve b452d16f46 Fix parallell run 2017-09-19 11:16:34 +02:00
Tor Harald Sandve 69c608829f Include RESV in the scaling factor
- solvent + RESV is not correct. Make the simulator throw until this is
sorted out.

- remove unused parameter
2017-09-18 11:28:13 +02:00
Tor Harald Sandve 352dccd5e9 Make 2p gas oil compile and runs
-- use mapping from canonicalToActiveCompIdx from Ebos
-- add guards againts non-existing components
2017-09-18 11:28:13 +02:00
Tor Harald Sandve 210f1edf25 Add test for invert 4x4 matrix specialization 2017-08-29 11:01:20 +02:00
Tor Harald Sandve 6716ca63c9 Force solvent saturation between [0,1] 2017-08-23 09:50:40 +02:00
Tor Harald Sandve 55fc987af8 Add 4x4 invertMatrix specialization in FMatrix
The specialization is added in the ISTLSolver, not in fmatrix.h in dune-
common since 1) we need it now 2) the special treatment of singular and
near singular matrices may be specifiy to the solvent model.
2017-08-23 09:50:19 +02:00
Tor Harald Sandve 6146190844 Fixes comments from PR
Don't sum ghost cells in the RateConverter
Some cleaning and comments.
2017-08-18 08:46:44 +02:00
Tor Harald Sandve 6bca2ea69c Fix rebase 2017-08-17 11:34:33 +02:00
Tor Harald Sandve 2bf8d48272 Remove redundant local state in ParallelDebugOutput 2017-08-17 11:13:00 +02:00
Tor Harald Sandve 593546da4b Fix 2p case in relativeChange(...) in BlackoilModelEbos 2017-08-17 11:13:00 +02:00
Tor Harald Sandve ce84a59b29 Remove reservoirState from BlackoilModelEbos
1) Use the solution variable directly in RelativeChange(...)
2) Add a method in the RateConverter that takes the simulator instead of the state.
3) Pass the reservoir pressure directly to the well initialization.
4) Move convertInput(...) to SimulatorFullyImplicitBlackoilEbos.hpp.
This code is only used to convert the initial reservoir state.
5) Modify  updateState(...). The solution variable is updated directly and adaptPrimaryVariable(...)
from ewoms is used to switch primary variables. An epsilon is passed to adaptPrimaryVarible(...) after a switch
of primary variables to make it harder to immediately switch back.

The following code used by flow_ebos still uses the reservoirState
1) the initialization
2) restart
3) output of the initial state
4) the step methods in AdaptiveTimeStepping and NonlinearSolver.
The reservoirState is not used by this methods, so after the initial step, an empty reservoirState is passed around in the code.
2017-08-17 11:13:00 +02:00
Tor Harald Sandve 30c12eb874 Merge pull request #1245 from GitPaean/fixing_polymer_running
fixing the running of polymer cases.
2017-07-31 15:28:41 +02:00
Tor Harald Sandve 082e00d4ec Ask ebos to formulate the equation by surface volumes directly 2017-06-29 13:58:20 +02:00
Tor Harald Sandve 1c05402209 Fix 2p case after rebase 2017-06-26 08:40:30 +02:00
Tor Harald Sandve 1bc2550541 Fix polymer in well model for producers. 2017-06-26 08:03:54 +02:00
Tor Harald Sandve e9a1aa2a83 Clean up after rebase 2017-06-26 08:03:54 +02:00
Tor Harald Sandve 8088347c96 Move adjustment of water mobility caused by polymer to getMobility() 2017-06-26 08:03:54 +02:00
Tor Harald Sandve 17ada607eb Assume polymer and water is fully mixed in the well 2017-06-26 08:03:54 +02:00
Tor Harald Sandve 0068c175a7 Add polymer option to flow_ebos
No extra equation is added for polymer in the well equation.

Seperate executables are added for polymer: flow_ebos_polymer
and solvent: flow_ebos_solvent

Tested and verified on the test cases in polymer_test_suite

This PR should not effect the performance and results of the blackoil
simulator
2017-06-26 08:03:54 +02:00
Tor Harald Sandve 2a66aa23a9 Merge pull request #1198 from dr-robertk/PR/fix-densewell-for-2p
[bugfix] Fix invalid read in WellDenseStandard when used with 2P Model.
2017-06-07 13:57:44 +02:00
Tor Harald Sandve f671af6cd6 Clean-up of the solvent implementation 2017-05-30 14:33:17 +02:00
Tor Harald Sandve 8b75e2eedc Minor fixes solvent model
1) Fix GRAT controlled wells
2) Fix seg_fault in computeWellPotentials for solvent simulations
3) Fix mem_issus for RESV combinded with solvent
2017-05-30 14:22:19 +02:00
Tor Harald Sandve 683ba7e929 Fix fallout from rebase 2017-05-30 14:22:19 +02:00
Tor Harald Sandve 441a8895ac Improvments for solvent model
- add dss to appleyard chopping
- support for bhp injectors with solvent
- copy perfSolventRates between the time steps.
- fix bug in well access indicies when numComponents ~= numPhases
2017-05-30 14:22:19 +02:00
Tor Harald Sandve 50c1a1404a Remove BlackoilSolventState
The solvent saturation is added to BlackoilState and the
BlackoilSolventState is thus redundant.
2017-05-30 14:22:19 +02:00
Tor Harald Sandve b987e4b324 Implement solvent model in flow_ebos
1) Extends the well model to account for solvent surface volumes
2) Add solvent to updateState
3) Add solvent to well and field output

The solvent parts is encapsled in if (has_solvent_) and should not effect
the standard runs.
2017-05-30 14:22:19 +02:00
Tor Harald Sandve 434f96db0a FIX output the correct next timestep after convergece failure 2017-05-29 09:48:34 +02:00
Tor Harald Sandve 095c580933 Merge pull request #1174 from totto82/FIX_flowsolvent
BUGFIX Don't try to compute effective properties for FIP if no solvent
2017-05-22 15:02:09 +02:00
Tor Harald Sandve a5fed26486 BUGFIX Don't try to compute effective properties for FIP if no solvent 2017-05-15 10:13:22 +02:00
Tor Harald Sandve 4ecc01d30a Don't output SSOL if no solvent 2017-05-12 14:45:00 +02:00
Tor Harald Sandve 2af3019299 Dummy commit 2017-05-10 15:36:20 +02:00
Tor Harald Sandve 6084721812 Prepare for extended models.
Let the code loop over number of components instead of phase
Pass TypeTag as template parameter instead of all the properties.
2017-05-08 09:52:30 +02:00
Tor Harald Sandve dad89974ae Make initial viscosity output similar with Ecl 2017-04-24 13:29:47 +02:00
Tor Harald Sandve ac36ad5ad1 BUGFIX. Store soMax also for the solvent model 2017-04-06 14:39:30 +02:00
Tor Harald Sandve cd564ade5f Support for saturation table for each well completion
Compute relperms for each well completion based on saturation table ids
(satnums)

Does not work in combination with hysteresis.
2017-04-06 14:21:59 +02:00
Tor Harald Sandve ef78f01715 Add sat table id to well struct 2017-04-06 13:52:27 +02:00
Tor Harald Sandve 6c859836f3 Hack to make the intial output of rs and rv Ecl compatible.
For cells with swat == 1 Ecl outputs; rs = rsSat and rv=rvSat, in all
but the initial step where it outputs rs and rv values calculated by the
initialization. To be compatible we overwrite rs and rv with the values
passed by the localState. Volume factors and densities needs to be
recalculated with the updated rs and rv values.
2017-03-16 10:22:27 +01:00
Tor Harald Sandve d640a16e5a Update rs and rv value for free oil and gas case
The rs and rv values are not used by the simulator for the case with
free oil and gas (or water only case), but they must be updated for
output.
2017-03-16 10:20:09 +01:00
Tor Harald Sandve 19a16ceeca Set timesteps after events
The time step after an event can either be set using
timestep_in_days_after_event or using the TUNING keyword in the deck.
2017-03-09 08:54:44 +01:00
Tor Harald Sandve ce2aa77cbd BUGFIX Pass solution from flowEbos to ebos initially
The initial solution in ebos and  in flowebos are different in cases where
swatinit is present. Pass the initial solution and recalculate the
intensive quantities make sure that the flowEbos initial solution is
used.
2017-01-19 09:18:55 +01:00
Tor Harald Sandve e4f345d124 Start using face geometry computed the Ecl way
Face centers are computed using the cell corners. With this
implementation the face center seen from a cell may be different from the
face center seen from its neighbour.

Face normals with area lenghts are calculated using the face corners
directly not using a triangulation point in the center of the face.

This gives transmissibility almost equal to eclipse.
2017-01-19 08:27:01 +01:00
Tor Harald Sandve 28bbe20344 Merge pull request #1012 from andlaus/cleanup_StandardWellsDense
small improvements to StandardWellsDense
2017-01-12 10:27:18 +01:00
Tor Harald Sandve 5990201ee9 Fix SOIL restart initialization 2017-01-05 10:02:50 +01:00
Tor Harald Sandve bb83504172 Let the simulator to re-assemble when iteration == minIter()
Let the simulator re-assemble and re-calculate the residuls for the case
when the simultor is converged but it was forced to take one more
iteration due to iteration < minIter().
2016-12-20 10:46:03 +01:00
Tor Harald Sandve 4fdf57db04 Consider the timestep converged only when number of iteration > minIter 2016-12-19 10:55:28 +01:00
Tor Harald Sandve a4bc2d455e Fix rebase 2016-12-19 10:55:28 +01:00
Tor Harald Sandve ae5d812bc5 BUGFIX cache reuse.
invalidate cachedQuantities when updated and when timestep fails
2016-12-19 10:55:28 +01:00
Tor Harald Sandve f65f5d2c3b Store whether timestep failed or not
Used in flow ebos to tell the simulator to recalculate the cached
quantities for failed timesteps.
2016-12-19 10:52:59 +01:00
Tor Harald Sandve d856510b74 Merge pull request #980 from totto82/bugfix_flowebos_density
BUGFIX pass pvtnum to density in convertResults() in FlowEbos
2016-12-15 15:26:47 +01:00
Tor Harald Sandve ad6b3f995f BUGFIX pass pvtnum to density in convertResults() in FlowEbos 2016-12-15 13:20:09 +01:00
Tor Harald Sandve 5cf9cf5c65 Merge pull request #979 from andlaus/flow_ebos-fix-initial-output
FlowMainEbos: fix the output of the initial condition
2016-12-15 12:26:23 +01:00
Tor Harald Sandve 2bfa96fddf Templatize to avoid hardcoded typedef
Prepare for changing the size of the blocks by templatize BVectors and
Evalution
2016-12-12 14:52:30 +01:00
Tor Harald Sandve 4ac69d51d1 Don't force rs<rsSat and rv<rvSat in updateState 2016-12-12 12:54:57 +01:00
Tor Harald Sandve 4f052e466b Fixes in solvent model related to handling vapoil in the well model
Tested on SPE5 and Model2
2016-12-12 10:12:39 +01:00
Tor Harald Sandve e614c42818 Avoid hard-coded appelyard parameter in flow_ebos
Start using the parameters in the parameter file instead of the hard-
coded ones.
Unify the restriction of the drs and drv in black-oil and black-oil-
solvent updateState
2016-12-05 13:44:33 +01:00
Tor Harald Sandve 6e03b9706f Apply Appleyard fixes to solven model
Tested on SPE5 and Model2 + co2
2016-12-05 13:44:33 +01:00
Tor Harald Sandve 294ca31fc8 Fixes in the Appelyard in updateState and updateWellState
1) changes dp_max_rel default to 0.2
2) introduces a dbhp_max_rel paramter to restrict the bhp update in the
updateWellState() (instead of using the dp_max_rel) Default is set to
1.0
3) Restrict rs and rv between 0,and the satruation value
4) Set rs and rv to zero for the water only cases
5) Guard against zero rs and rv when calcuating the maximum allowed rs
and rv change.

Tested on norne, model 2 and model 2.2

Number of problems for the different models with and without this fix
Case
this PR master
Norne
10
45
Model 2
21
78
Model 2.2
200
248
2016-12-05 13:44:33 +01:00
Tor Harald Sandve d23270c98f Fix the 2p simulator
Only tested for oil+water case
The blockmatrix and vectors are hardcoded to be 3
and a trivial equation is used for the Gas phase.
2016-11-22 15:01:48 +01:00
Tor Harald Sandve b66bb27a65 Revert som changes in default values
Make sure flow in Frankenstein and flow in master uses the same default
values
2016-11-16 15:09:54 +01:00
Tor Harald Sandve b04f79b15f Fix 2phase celldata output 2016-11-15 12:48:25 +01:00
Tor Harald Sandve f8bf7c392c Fix some temporary fallouts in the outputwriter 2016-11-15 12:23:46 +01:00
Tor Harald Sandve 739c0906ef Improvments in convergence for flow_ebos
- restrict pressure changes. Set default to 1.0 (this also effects flow)
- change default number of linear iterations to 150
- tell stabilized newton the residual occilates even if it occilates in
only one phase (this also effects flow)
- avoid problems realated to division on small numbers

Tested on SPE9, norne and Model 2 with significant improvments.
2016-11-14 13:26:38 +01:00
Tor Harald Sandve 36ce159411 Calculation the original FIP at the beginning 2016-11-14 10:16:57 +01:00
Tor Harald Sandve 5a917a4828 Output FIP in flow_ebos 2016-11-14 09:34:40 +01:00
Tor Harald Sandve 77d5c8fa38 Remove Eigen from StandardWellsDense 2016-11-01 14:27:05 +01:00
Tor Harald Sandve f1a9b1f21b Remove unused file and #includes
removes StandardWellsDense_impl.hpp
2016-11-01 13:44:38 +01:00
Tor Harald Sandve 362968c315 New WellStateFullyImplicitBlackoilDense
The WellStateFullyImplicitBlackoil is reverted to master and all
extentions moved to WellStateFullyImplicitBlackoilDense
2016-11-01 13:44:38 +01:00
Tor Harald Sandve ae0ebf1200 Merge branch 'frankenstein' of git://github.com/OPM/opm-simulators into frankenstein 2016-11-01 13:42:04 +01:00
Tor Harald Sandve 1e67b30f94 Merge branch 'master' of git://github.com/OPM/opm-simulators into frankenstein 2016-11-01 13:41:41 +01:00
Tor Harald Sandve 7eb6f3abd1 Merge pull request #874 from dr-robertk/PR/remove-Eigen-from-BMEbos
Remove Eigen from BlackoilModelEbos.
2016-11-01 11:32:42 +01:00
Tor Harald Sandve a083f46d44 Make it possible to set initial timestep
Default is kept at -1.0. I.e. this PR does not change the current
behaviour.
2016-10-28 09:03:29 +02:00
Tor Harald Sandve 3600c45619 Merge pull request #865 from andlaus/frankenstein_fix_valgrind_errors
frankenstein: fix some valgrind complaints
2016-10-19 12:35:10 +02:00
Tor Harald Sandve 89fcbe3e60 InvalidateCache when restaring the timestep
Keep track of whether it is a restart or not and invalidate the
intensive quantitiesCache in ebos when restarting the timestep due to
convergence issues.
2016-10-19 12:08:49 +02:00
Tor Harald Sandve 0458d9357c Merge pull request #854 from andlaus/frankenstein_must_solve
flow_ebos: only invalidate the intensive quantities after an iteration if necessary
2016-10-10 08:26:13 +02:00
Tor Harald Sandve 22f1df612b Allow crossflow if all perforations is crossflowing 2016-10-03 09:54:28 +02:00
Tor Harald Sandve e034bbc7ad Add initalizer for adaptiveTimeStepper that uses values from TUNING
Some of the tuning values from the TUNING keywords is used to tune the
timestepping.
2016-09-30 10:36:30 +02:00