Commit Graph

155 Commits

Author SHA1 Message Date
Andreas Lauser
e3d0bbc144 specify the number of iterations where we use a "strict" Newton convergence criterion using a separate parameter
that parameter is called "max_strict_iter". This increases the
flexibility of this slightly and it avoids screwing up the default
value for the "max_iter" parameter in the future. The credits for this
patch go to [at]atgeirr for proposing it.
2017-06-14 14:22:22 +02:00
Andreas Lauser
e58fed9956 ignore the CNV convergence criterion for the last few newton iterations
the cell based residual can cause problems for cells with
almost-singular shapes and/or small pore volume.
2017-06-14 14:22:22 +02:00
Kai Bao
908b2bdf81 making wellMod_ in WellModelMatrixAdapter is actually a well model
instead of the BlackoilModelEbos, which reduces some confusion and also
removes a few unnecessary wrapping functions.
2017-06-07 14:26:00 +02:00
Tor Harald Sandve
f671af6cd6 Clean-up of the solvent implementation 2017-05-30 14:33:17 +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
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
Markus Blatt
79799a5c5c Use pressure for guiding coarsening in flow_ebos, too.
For flow_legacy the first component a block is used, which is the
oil pressure. As flow_ebos uses different indices this commit
explicitly uses BlackoilIndices::pressureSwitchIdx to tell the AMG
at which index the pressure is stored.
2017-05-22 12:09:58 +02:00
Andreas Lauser
48b7d6ea56 improve writing of the INIT file
now, the dune APIs are used whereever possible and the data is
computed for the global grid, i.e. for parallel runs it does not need
to be gathered across the processes anymore. Also, the INIT file is
now only written once instead of twice.

I've verified that the sequential and the parallel INIT files stay
identical for the Norne case and that the INIT file does not change
w.r.t. before this patch.
2017-05-12 15:44:55 +02:00
Andreas Lauser
e2e0e3290d flow_ebos: do no longer use the legacy object for geologic properties
it was already almost unused (except for output). Besides making the
overall flow_ebos code leaner because it reduces redundancies, this
patch also implies a small reduduction of memory consumption and a
minor performance improvement. the latter is due to the fact that the
transmissibilities now do not need to be calculated more often than
necessary anymore.
2017-05-12 15:43:51 +02:00
Andreas Lauser
f3e0b9c692 Merge pull request #1169 from totto82/prepare_solvent
Prepare for 2p and  extended models.
2017-05-08 13:47:43 +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
Arne Morten Kvarving
3c0cb9e950 adjust for changed ParameterGroup namespacing 2017-04-28 15:36:25 +02:00
Tor Harald Sandve
dad89974ae Make initial viscosity output similar with Ecl 2017-04-24 13:29:47 +02:00
Markus Blatt
b5612806ac Revert to using standard algorithms instead of using masks.
This is now possible as the values stored for ghost/overlap elements
(minimum where we compute the maxiumum, zero where we sum up)
will not influence the result of the computation any more.
2017-04-12 13:42:02 +02:00
Markus Blatt
0db663fe51 Only compute convergence markers for interior elements. 2017-04-12 13:42:02 +02:00
Markus Blatt
b72a167c76 Correctly compute maximum in a parallel flow_ebos run. 2017-04-12 13:42:02 +02:00
Kai Bao
e39ffefb2e performing prepareTimeStep in assemble for StandardWellsDense
instead of model->preppareStep()

to avoid segmenttation error from eclSimulator and also not intervening
with NonlinearSolver
2017-04-11 16:51:16 +02:00
Kai Bao
b21f577989 when there is VREP control, updateRateConverter in prepareStep
in BlackoilModelEbos.
2017-04-11 16:51:16 +02:00
Kai Bao
819aa90d84 adding prepareTimeStep() to the StandardWellsDense
to handle the well potential related calculation
2017-04-11 16:51:16 +02:00
Atgeirr Flø Rasmussen
189d91bc9e Merge pull request #1134 from andlaus/report-failure
flow_ebos: print statistics about failed time steps
2017-04-11 12:29:33 +02:00
Atgeirr Flø Rasmussen
2dff8ef141 Merge pull request #1135 from nairr/terminal_output_mod
Minor terminal output modifications
2017-04-11 11:39:27 +02:00
Andreas Lauser
ef2a560fb3 flow_ebos: print statistics about failed time steps
the performance summary at the end of a Norne run which are printed by
`flow_ebos` now looks like this on my machine:

```
Total time (seconds):         773.757
Solver time (seconds):        753.349
 Assembly time (seconds):     377.218 (Failed: 23.537; 6.23965%)
 Linear solve time (seconds): 352.022 (Failed: 23.2757; 6.61201%)
 Update time (seconds):       16.3658 (Failed: 1.13149; 6.91375%)
 Output write time (seconds): 22.5991
Overall Well Iterations:      870 (Failed: 35; 4.02299%)
Overall Linearizations:       2098 (Failed: 136; 6.48236%)
Overall Newton Iterations:    1756 (Failed: 136; 7.74487%)
Overall Linear Iterations:    26572 (Failed: 1786; 6.72136%)
```

for the flow_legacy family, nothing changes.
2017-04-11 11:12:11 +02:00
Rohith Nair
1fd91b2ce0 edit 2017-04-11 10:03:22 +02:00
Rohith Nair
be74630699 minor changes to output tag 2017-04-11 09:49:59 +02:00
Atgeirr Flø Rasmussen
88e4646b71 Merge pull request #1084 from babrodtk/hysteresis_output
Adds hysteresis output and input (for restarting)
2017-04-11 07:44:59 +02:00
Rohith Nair
375e4e2678 Changed output classification of NaN residuals to "Bug" from "Problem" 2017-04-10 18:55:54 +02:00
Atgeirr Flø Rasmussen
db8523e849 Merge pull request #1082 from totto82/satTableIdWells
Support for saturation table for each well completion
2017-04-07 14:43:28 +02:00
babrodtk
1fd36e9451 Fixed hysteresis input/output in flow_legacy 2017-04-07 14:36:36 +02:00
Atgeirr Flø Rasmussen
98debed741 Fix minor output bug and refine output.
Previously the substep summary reports were cumulative, misleading the user.
Also, made output a little more compact and readable, ensuring numbers line up
unless unusually many digits are needed for times and iteration counts.
2017-04-06 14:54:08 +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
babrodtk
8340d26890 Adds hysteresis output and input (for restarting) 2017-04-06 14:17:15 +02:00
babrodtk
bd0507cc3b Added somax to input/output to restart file 2017-04-05 12:32:43 +02:00
Markus Blatt
30f3d4e2d0 Get rid off TypeTag system in StandardWellsDense.
Previously, we kind of hard coded the problem using the TypeTag system.
Instead of this we now simply pass the only additional thing needed, the
ElementContext, as an additional template parameter.

Removes the include of removed header BlackoilModelEbosTypeTags.hpp.
2017-04-04 11:08:17 +02:00
Markus Blatt
312aa24f86 Revert "Factor out ewoms typetag system to separate header."
This reverts commit 05c70491257a615472e68fb44776bcd7effb60b8.
2017-04-04 11:08:17 +02:00
Markus Blatt
6b8b8b971e Use global wellsActive to see whether wells are active at all.
This bug must have sneaked in during rebasing. Kudos to Atgeirr for
spotting this.
2017-04-04 11:08:17 +02:00
Markus Blatt
cde162b3d6 Use the global number of cells for the average.
This number is still wrong in master but well become correct once
PR #1107 is merged.
2017-04-04 11:07:57 +02:00
Markus Blatt
f6153f8133 Factor out ewoms typetag system to separate header.
We will need the typetag information also for the wells.
If it is not in a separate header we get problems
with recursive inclusion of the headers (BlackoilEbos.hpp
includes the header that also needs the typetag information).
2017-04-04 11:05:50 +02:00
Atgeirr Flø Rasmussen
1232a7a021 Merge pull request #1111 from blattms/make-updateState-work-for-non-interior-elements
Make update state  and getConvergence work for non interior elements
2017-04-04 10:47:39 +02:00
Atgeirr Flø Rasmussen
81dbfc8205 Merge pull request #1107 from blattms/fix-ebos-global-cell
[Ebos,bugfix] Correctly compute the global number of cells.
2017-04-04 10:33:22 +02:00
Markus Blatt
863bef4722 Fix superfluous dereferencing that broke compilation. 2017-03-24 08:22:32 +01:00
Markus Blatt
30e8753288 Use Interior_Partition when iterating over grid instead of if(..) continue.
Makes the code a bit cleaner.
2017-03-22 11:51:52 +01:00
Robert Kloefkorn
085df34183 [cleanup] Only iterate over grid once during getConvergence.
Resolved cherry-pick conflicts by @blattms.
2017-03-21 10:52:37 +01:00
Markus Blatt
990ea7c44c Remove unused variable warning for endElementIt.
It was redefined and initialized in an inner scope.
2017-03-20 19:53:27 +01:00
Markus Blatt
ad1fe8fac0 Prevent using dangling references in BlackoilModelEbos::getConvergence.
Using cachedIntensiveQuantities on parallel grids will cause/is causing
dereferencing a null pointer here. Therefore we resort to iterating over
the grid and using the element Context.

If this turns out ot be performance regression @andlaus owes me a beer!
2017-03-20 16:46:10 +01:00
Markus Blatt
aa5940a2ff Prevent using dangling references in BlackoilModelEbos::updateState.
Using cachedIntensiveQuantities on parallel grids will cause/is causing
dereferencing a null pointer here. Therefore we resort to iterating over
the grid and using the element Context.

If this turns out ot be performance regression @andlaus owes me a beer!

Closes #1110
2017-03-20 16:46:00 +01:00
Atgeirr Flø Rasmussen
0b0ef7e20f Merge pull request #1108 from andlaus/apply_wells_in_assemble
BlackoilModelEbos: apply the well residual in assemble()
2017-03-20 08:44:32 +01:00
Atgeirr Flø Rasmussen
2eb8816507 Merge pull request #1103 from totto82/output_rsrv_pc
Fix output of rs and rv.
2017-03-20 06:47:17 +01:00
Andreas Lauser
093310c437 BlackoilModelEbos: apply the well residual in assemble()
This used to be done in solveJacobianSystem(), but this method is only
supposed to solve the linearized system of equations, not to modify it
IMO.

I tested this patch with Norne: It did not change anything.
2017-03-17 11:39:41 +01:00
Markus Blatt
bb7934b1a2 [Ebos,bugfix] Correctly compute the global number of cells.
Currently, all parallel DUNE grid store some cells in addition to
interior cells. Therefore assuming that the global number of cells
(i.e. the number of cells a sequential grid needs to cover the same
whole domain with indentical cells) is not the sum of the number of
cells of the local grid. Previously, the latter was used.
2017-03-17 10:26:00 +01: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