Commit Graph
100 Commits
Author SHA1 Message Date
Tor Harald Sandve f66fb298db keep using the block inversion algorithm in OPM 2018-04-24 11:25:33 +02:00
Tor Harald Sandve 6a3b869331 Merge pull request #1452 from andlaus/dissolve_aux
adapt to the removal of the `ewoms/aux` directory
2018-04-11 12:50:12 +02:00
Tor Harald Sandve 4e9403b8f8 Correct the RESV calculation for unsaturated cases
Make sure that the reservoar volumes always stays positive. i.e. we can
not remove more dissolved gas from the rate than the total volume amout
of gas.
2018-03-23 15:23:47 +01:00
Tor Harald Sandve 975a9a6766 Fix intial fluid distribution in the well
Solve the well equation in order to determine the initial fluid content
of the well used for the hydrostatic pressure calculation in the well.
2018-03-23 12:56:19 +01:00
Tor Harald Sandve 7c9dab1a64 Add reportStep method in SimulatorReport and use it 2018-03-12 14:48:34 +01:00
Tor Harald Sandve 15aeac3f90 Add option for relaxed CNV tolerance
Use a relaxed tolerance for individual cells (CNV) when iter >
max_strict_iter.

tolerance_cnv_relaxed_ is defauled to 1.0e9
This assure the same behaviour as current master, where CNV criterion is
ignored when iter > max_strict_iter

TODO: Test this with a stricter default ( <= 1.0)
2018-03-12 08:23:57 +01:00
Tor Harald Sandve 0c4ae5991f Use advanceTimeLevel() and updatedFailed() methods from model 2018-03-06 13:18:03 +01:00
Tor Harald Sandve 5f33a1a1bc Bugfix. enableStorageTerm=false
Shift intensiveQuantities each timestep
2018-03-05 14:53:59 +01:00
Tor Harald Sandve bcb501e3d3 Fix default output dir 2018-02-19 13:09:07 +01:00
Tor Harald Sandve a89a6af854 Some more cleaning in the output code in opm-output, ewoms and opm-
simulator

1) Don't depend on legacy code for communicating the data::wells
2) Bugfix. Store globalIdx instead localIdx in data::wells::complitions
3) Move ThreadHandle to ebos
2018-02-12 08:44:43 +01:00
Tor Harald Sandve cdeefc3a34 Fix command line argument for double precision restart output 2018-01-29 08:56:55 +01:00
Tor Harald Sandve 84a8b8eca6 Pass empty regionSummaryData and blockSummaryData to output 2018-01-29 08:56:55 +01:00
Tor Harald Sandve b38430ea2e Output TCPU for every substep. 2018-01-29 08:56:55 +01:00
Tor Harald Sandve f980c39e6c Change directory of parallel restart test 2018-01-29 08:56:55 +01:00
Tor Harald Sandve 6d0c716d76 Clean-up FIP 2018-01-29 08:56:55 +01:00
Tor Harald Sandve 36f6b7ad00 Remove writInit()
The EGRID and INIT files are written using ebos
2018-01-29 08:56:55 +01:00
Tor Harald Sandve 137ff53ae7 Remove output of FIP 2018-01-29 08:54:30 +01:00
Tor Harald Sandve c583e3d2eb start using parallelRestartTest 2018-01-05 14:54:07 +01:00
Tor Harald Sandve 73563db6a6 Merge pull request #5 from akva2/useEbosEclOutput
add support for parallel restart tests
2018-01-05 14:52:53 +01:00
Tor Harald Sandve 0e6fe26a61 Start using ecl output from Ebos
The wells, FIP and initial output of NNCs is still handled
by code in opm-simulators. The plan is to move more of the
functionality to ebos.

All tests pass and MPI restart works
2018-01-04 09:29:58 +01:00
Tor Harald Sandve 7567748f2d Adapt to changed initial FluidState type in ebos 2017-12-15 08:19:01 +01:00
Tor Harald Sandve 4097a07572 Change dp_max_rel default from 1.0 to 0.3 2017-12-14 11:16:16 +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 c787f5a251 Handle WEFAC
Added test combining WEFAC and GEFAC
2017-11-30 13:45:05 +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 90fcf0b132 Fix pvtIndex map for cases with non-active eqlnum regions. 2017-11-27 13:40:09 +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 85aa6d41cc Adress PR review issues 2 2017-11-24 10:52:57 +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 6862ed0b35 Fix 2p bug 2017-11-22 09:24:52 +01:00
Tor Harald Sandve 197019d865 Adress PR review issues 2017-11-22 08:31:57 +01:00
Tor Harald Sandve 5bb7bc1185 Remove the usage of partition_unif_idx() from opm-core 2017-11-21 15:01:52 +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 d6ea5cc402 Cleaning the initialization code
-remove whitespaces
-fix documentation
2017-11-21 12:52:07 +01:00
Tor Harald Sandve 0ef82665f5 Use &ref not shared_pointer to MaterialLawManager 2017-11-21 12:08:10 +01:00
Tor Harald Sandve 51f48fcd13 Remove blackoilPhases and phaseUsage from the initialization code
Note 1: The initialization code now always consider 3 phases.
For 2-phase cases a trivial (0) state is returned.
Note 2: The initialization code does not compute a BlackoilStats,
but instead pass the initialization object with the initial state.
2017-11-21 12:08:10 +01:00
Tor Harald Sandve 36e8f1bfec Remove BlackoilProps from equil initalization code
Use FluidSystem and materialLaw from opm-material
directly not via the BlackoilProps in opm-core
2017-11-21 12:08:10 +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 4b123f839a Update the swatinit test base on fix in opm-material#248 2017-10-11 09:39:12 +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 d643476ea5 Fix fallout if no group controll (NONE) is specified for a group 2017-08-18 08:56:26 +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 6b55b8316b Add interface for passing cell pressures directly in wellState.init(...) 2017-08-03 10:31:10 +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 d247b05b6b Add polymer to phase usage. 2017-06-16 13:40:29 +02:00
Tor Harald Sandve 655b81c8d7 Add polymer to blackoilstate 2017-06-12 15:37:57 +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 d7fa66197f Add SSOL to blackoilState
Stores the solvent saturation in the simulator container.
2017-05-10 11:14:53 +02:00
Tor Harald Sandve 9e504da6a1 Add solvent to phaseUsage 2017-05-08 10:29:51 +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 9a1a26b267 FIX memory leakage in well_controls
The Alq and vfp is set free in well_controls_destroy to avoid memory
leakage.
2017-04-20 12:58:16 +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 214e9764b2 Add sat table id to well struct 2017-04-06 13:52:27 +02:00