Commit Graph
100 Commits
Author SHA1 Message Date
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 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
Tor Harald Sandve bef33ed00c Add an option for using values from TUNING in the timestepping.
if the paramter use_TUNING is set to true, the adaptive timestepper will
initalize with relevant values from the TUNING keywords.
2016-09-30 10:28:34 +02:00
Tor Harald Sandve 09a86747b5 Feed solvent wellrates to data::wells for summary output 2016-09-30 09:49:16 +02:00
Tor Harald Sandve 8e2657ce4d Some tuning in the Appleyard 2016-09-30 08:57:52 +02:00
Tor Harald Sandve 69811e9585 Use correct pvtregions in rsSat and rvSat calculations 2016-09-30 08:57:52 +02:00
Tor Harald Sandve 84c33e0e96 Add trivial well equation when there is no flow
Fixes case when all perforations in a well are crossflowing while
crossflow is not allowed
2016-09-30 08:57:52 +02:00
Tor Harald Sandve 07339be80e BUGFIX. Make frankenstein compile and run
- remove outout of initial timestep
- pass phaseUsage to report(...) in WellStateFullyImplicitBlackoil.hpp
2016-09-30 08:57:52 +02:00
Tor Harald Sandve 45eae4bbc8 Output solvent saturation
-- Compat.hpp is moved to opm-simulators
-- add SSOL if solvent is present
2016-09-27 08:40:04 +02:00
Tor Harald Sandve 7f91eade7e Move Compdat.hpp from opm-core to opm-simulators 2016-09-23 13:03:12 +02:00
Tor Harald Sandve 4c4b5233c0 Guard against non-existing file 2016-09-21 13:46:31 +02:00
Tor Harald Sandve 1bde4f4a22 Small fixes hardcodedTimestepControl
-- avoid using eof()
-- add comments
-- no longer assumes two lines of comments.
-- revert change to default value for timestep.initial_step_length
-- make contructer explicit
-- pass reference
2016-09-21 09:39:36 +02:00
Tor Harald Sandve 380fe6e2fd Timestepper based on userInput
A new timestepper that reads timesteps from a file generated using
ecl_summary "DECK" TIME
and applies it to the simulator

Also a parameter timestep.initial_step_length (default 1 day) is added
to controll the frist timestep.
2016-09-21 09:39:36 +02:00
Tor Harald Sandve cb5238f5dc BUGFIX
Updated solvent model after #825
Store rsSat and rvSat in simulator container for outut.
2016-09-19 11:10:14 +02:00
Tor Harald Sandve a84adf05a5 Merge pull request #2 from dr-robertk/frankenstein_mod
Avoid copying of matrices inside StandardWellsDense.
2016-09-14 16:03:19 +02:00
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
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