Commit Graph
100 Commits
Author SHA1 Message Date
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
Andreas Lauser 1415168729 Merge pull request #5 from totto82/dense_well
WIP New well model
2016-08-19 14:19:08 +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
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
Andreas Lauser 77f103fca5 instantiate the ebos Simulator object in SimulatorFullyImplicitBlackoilEbos
this gets rid of some ugly hacks with static variables...
2016-08-09 18:38:23 +02:00
Andreas Lauser 3027e1f39d flow_ebos: do no longer use the generic FlowMain class
this will allow to boil the code down.
2016-08-09 18:38:23 +02:00
Andreas Lauser 50ebb66041 make SimulatorFullyImplicitBlackoilEbos independent of SimulatorBase
currently this involves a lot of copy and paste but, it will be boiled
down soon.
2016-08-09 18:38:23 +02:00
Andreas Lauser 4d63a4b0ba BlackoilModelParameters: add the file name of the deck
this is needed by the ebos based model.
2016-08-09 12:23:29 +02:00
Andreas Lauser 4a66b4495b flow: move the internal classes to separate files
i.e., the contents of the Opm::details namespace, the IterationReport
and the DefaultBlackoilSolutionState classes. the purpose of this is
to share the code between the existing flow variants and flow_ebos.
2016-08-09 12:23:29 +02:00
Andreas Lauser 415bb25166 allow StandardWells.hpp to be included independently
i.e., without BlackoilModelBase.hpp.
2016-08-09 12:23:29 +02:00
Andreas Lauser bec3ce31fd distinguish between the number of non linear iterations and the number of linearizations
while the printed number of "Non linear iterations" was correct in a
strict sense, it was very confusing if one was working on the
linearization code because the last Newton iteration of each time step
was linearized but not solved for (and the solution was thus not
updated hence it does not count as a "non linear iteration"). This
makes sense for large problems were the total runtime is completely
dominated by the performance of the linear solver, but smaller
problems exhibit the opposite behavior (i.e., for them, runtime is
typically dominated by the linearization proceedure), so one is more
interested in the number of linearizations, not the number of linear
solves.
2016-08-02 12:14:10 +02:00
Andreas Lauser 5410d97701 pass the simulation timer object instead of the time step size
models may need a more detailed picture of where they are in the
simulation. Note that since the timer objects are available at every
call site, this is also not a very deep change.
2016-07-12 15:55:12 +02:00
Andreas Lauser 88519d70c4 adapt to the EclMaterialLawManager's rename of the *Pointer methods 2016-07-06 13:00:35 +02:00
Andreas Lauser a8df55e02f rename some variables from "*Lad" to "*Eval"
this was an involuntary omission in the "local AD" to "dense AD"
rename...
2016-06-07 11:12:33 +02:00
Andreas Lauser 87c7b2c720 Merge pull request #704 from andlaus/localad_to_densead
rename "local AD" to "dense AD"
2016-06-06 14:03:09 +02:00
Andreas Lauser d45ba7732e rename "local AD" to "dense AD" 2016-06-02 20:20:04 +02:00
Andreas Lauser 4baf0f6acf Merge pull request #654 from andlaus/nested_ad
Fix build
2016-04-18 11:01:39 +02:00
Andreas Lauser 0405953a64 adapt code w.r.t. the removal of the tags for Opm::Evaluation 2016-04-15 18:49:29 +02:00
Andreas Lauser 29f4be0f6c use the error macros from opm-common 2016-04-14 11:32:08 +02:00
Andreas Lauser b27aadc083 adapt the the table related API changes of opm-parser 2016-04-14 11:32:07 +02:00
Andreas Lauser 5b5f6e6aa6 Glue in support for the grid property modifier keywords
this basically means using Opm::EclipseState instead of the raw deck
for these keywords.

with this, property modifiers like ADD, MULT, COPY and friends are
supported for at least the PERM* keywords. If additional keywords are
required these can be added relatively easily as well.

no ctest regressions have been observed with this patch on my machine.
2016-04-14 11:32:07 +02:00
Andreas Lauser 12ece55907 rename all "newParserDeck" objects to "deck"
The "new" parser is now "the" parser...
2016-04-14 11:32:07 +02:00
Andreas Lauser c89e1ed0b6 convert the examples and the tests to opm-parser 2016-04-14 11:32:07 +02:00
Andreas Lauser f0e86b98e3 catch all exceptions in all tutorials and examples 2016-04-14 11:32:07 +02:00
Andreas Lauser e8458e9a23 convert THROW to OPM_THROW 2016-04-14 11:32:07 +02:00
Andreas Lauser 068519bd19 replace boost::scoped_ptr by std::unique_ptr
thanks to Bård Skaflestad, Atgeirr Rasmusen and Roland Kaufmann for
the hint.
2016-04-14 11:32:07 +02:00
Andreas Lauser b9f5fb8b78 dune.module: add all modules which opm-autodiff depends on explicitly
this restores the ability to build opm-autodiff and all dependencies
using `dunecontrol`. Except for opm-common adding these dependencies
is not really required because they were inherited from other modules,
but stating them explicitly is good style IMO.
2016-04-04 15:43:31 +02:00
Andreas Lauser bf283f8684 threshold pressures: consider the saturated case and fix a typo
the typo was caused the surface density of the oil phase to be used
instead of the one of gas. This caused the density to be off by a
factor of typically about 900.

using saturated FVFs does not change much, but it does not hurt
because it is also done that way in the simulator.

This makes the defaults for the threshold pressures reasonable again,
but for some reason they are not exactly the same as in the old
implementation. (although the differences are very tolerable.)

On the question why only "Model 2" is affected by this: the other
decks don't use threshold pressures (SPE-X) or do not default any
values (Norne).
2016-03-08 14:52:09 +01:00
Andreas Lauser b39e579197 fix the fallout of the removal of the opm-core black-oil PVT classes 2016-03-07 11:32:12 +01:00
Andreas Lauser 1f1dfbfc65 replace the blackoil PVT classes by the ones of opm-material
the opm-material classes are the ones which are now used by
opm-autodiff and this patch makes it much easier to keep the opm-core
and opm-autodiff results consistent. Also, the opm-material classes
seem to be a bit faster than the opm-core ones (see
https://github.com/OPM/opm-autodiff/pull/576)

I ran the usual array of tests with `flow`: SPE1, SPE3, SPE9 and Norne
all produce the same results at the identical runtime (modulo noise)
and also "Model 2" seems to work.
2016-03-05 19:11:44 +01:00
Andreas Lauser 7c3020822a properly create state.temperature in the FullyImplicitCompressiblePolymerSolver class 2016-02-22 15:16:44 +01:00
Andreas Lauser 099c958137 fix the deprecation warnings caused by OPM/opm-parser#687 2016-02-21 17:45:56 +01:00
Andreas Lauser e775df6d23 fix the build
it broke because EclipseState::get*GridProperty() now returns a
pointer to a constant object.
2016-02-15 15:06:05 +01:00
Andreas Lauser 13d2f35493 BlackoilPropsAdFromDeck: fix a few typos
these definitively do not change the results.
2016-02-11 17:07:24 +01:00
Andreas Lauser 64c94aebc7 use the blackoil PVT classes from opm-material instead of the opm-core ones 2016-01-29 12:56:19 +01:00
Andreas Lauser 976d38bf37 implement abililty to change the geology during the simulation run
i.e. it now supports stuff like MULTFLT in the schedule
section. Possibly, the MPI-parallel code paths need some fixes. (but
if the geology is not changed during the simulation, the parallel code
will do the same as before.)

the most fundamental change of this patch is that the
reference/pointer to the DerivedGeology object is made
non-constant. IMO that's okay, though, becase the geology can no
longer assumed to be constant over the whole simulation run.
2015-11-26 13:35:33 +01:00
Andreas Lauser e0a1abba09 adapt to the "mutable geology" changes from opm-autodiff 2015-11-26 12:20:15 +01:00
Andreas Lauser 70614e2fd6 adapt to the threshold pressure related API changes
to be able to determine the threshold pressure from the initial
condition it needs to be able to access the initial condition, i.e.,
the initial simulator state, material properties object and gravity
constant need to be passed to the thresholdPressure() function.
2015-11-13 16:09:20 +01:00
Andreas Lauser 4f23ef92e3 adapt to the threshold pressure related API changes
to be able to determine the threshold pressure from the initial
condition it needs to be able to access the initial condition, i.e.,
the initial simulator state, material properties object and gravity
constant need to be passed to the thresholdPressure() function.
2015-11-13 15:38:28 +01:00
Andreas Lauser 7e05127c48 thresholdPressures(): move the code which calculates the maximum gravity corrected pressure difference between EQLNUM regions to its own function
requested by [at]atgeirr
2015-11-13 15:36:50 +01:00
Andreas Lauser 77893e415e thresholdPressures(): split several long lines
as requested by [at]atgeirr
2015-11-13 15:13:28 +01:00
Andreas Lauser f13e7fd300 thresholdPressures(): constify all local variables which can be made constant
I have doubts if this will change anything in the binaries (and in my
personal opinion, these 'const's look quite ugly and are sometimes a
(small) annoyance when debugging), but I don't mind using the coding
style used by most of the rest of opm-core here.
2015-11-13 15:13:15 +01:00
Andreas Lauser 0df880ce43 cdash: update dropsite 2015-11-11 16:50:25 +01:00
Andreas Lauser 3ccc0b5aa0 THPRES: only update the threshold pressure between regions if the saturation of the upstream cell is larger than the residual saturation
before it was 0. Again, thanks to [at]totto82 for the suggestion.
2015-11-05 15:39:29 +01:00
Andreas Lauser df9a927c5b THPRES: change the sign of the gravity correction
we're correcting the pressure at the cell center depths to get the
pressure at the face depth, not the other way around. This is
confusing...

thanks to [at]totto82 for discovering this.
2015-11-05 12:29:19 +01:00
Andreas Lauser 028cd32f11 fix a compressed vs logically Cartesian cell index bug
PVTNUM is for logically Cartesian indices, but was accessed by
compressed ones.
2015-11-05 12:29:19 +01:00
Andreas Lauser 6d86e9bd20 implement determining the threshold pressure from the initial condition
This needs to be done if a equilibration region transition is
mentioned by the THPRES keyword, but no value is given for this record
in the third item. (it seems that this is used quite frequently.)

Also, the approach taken by this patch also does not collide with the
restart machinery as far as I can see. This is because the initial
condition is applied by the simulator before the state at the restart
time is loaded. (I interpreted the code that way, but I could be
wrong, could anyone verify this?)

since it is pretty elaborate to calculate initial condition, this
patch is pretty messy. I also do not know if Eclipse does include
capillary pressure in this calculation or not (this patch does). Huge
kudos go to [at]totto82 for reviewing, testing and debugging this.
2015-11-05 12:29:19 +01:00
Andreas Lauser 651bd91482 use the error macros from opm-common 2015-10-12 15:24:59 +02:00
Andreas Lauser 72b0cb2c3e use the error macros from opm-common 2015-10-08 12:08:28 +02:00
Andreas Lauser 13fd63e2b3 use the error macros from opm-common 2015-10-08 11:42:15 +02:00
Andreas Lauser f46189ee1e restore dunecontrol compatibility after the opm-cmake -> opm-common rename 2015-09-08 11:57:14 +02:00
Andreas Lauser 5eef205551 only initialize the satfuncs once
this makes the main files more similar to the primary simulator (i.e., flow.cpp)
2015-09-02 14:56:38 +02:00
Andreas Lauser 73710a01d2 move the code which creates a compressed to cartesian cell index map to a separate free function 2015-09-02 14:50:41 +02:00
Andreas Lauser 9515ec6cfb BlackoilPropsAdFromDeck: improve the documentation for the constructors 2015-09-02 12:32:41 +02:00
Andreas Lauser 0e5d8da66b adapt to the change of the API due to using compressed instead of cartesian indices 2015-09-02 12:32:41 +02:00
Andreas Lauser a394af6734 flow: initialize the parameters for the material law only once
this saves some memory and some time at initialization.
2015-09-02 12:32:41 +02:00
Andreas Lauser 78f7097798 adapt to the opm-core API change in the SaturationFunctionsFromDeck to always use non-uniform tables 2015-06-26 15:32:10 +02:00
Andreas Lauser 659f9e76e4 Merge pull request #3 from atgeirr/andlaus-simplify_simulator
Suggested changes to PR
2015-05-29 15:44:55 +02:00
Andreas Lauser 5940a007d9 Merge pull request #1 from atgeirr/andlaus-simplify_simulator
Use unique_ptr instead of shared_ptr.
2015-05-29 15:43:02 +02:00
Andreas Lauser 9c78d5ef00 do not use std::shared_ptr where it is deemed inappropriate by the maintainers
note that I don't agree with this change and will assume no
responsibility if something goes down the gutter.
2015-05-29 14:36:34 +02:00
Andreas Lauser 496c32d2a6 do not use std::shared_ptr where it is deemed inappropriate by the maintainers
note that I don't agree with this change and will assume no
responsibility if something goes down the gutter.
2015-05-29 14:34:47 +02:00
Andreas Lauser 2b085e0062 fully implicit simulators: various cleanups
these are mostly stylistic: the function bodies of most new methods
have been moved to the _impl.hpp file and the Simulator classes are
now templated on the grid type, so it should be not too hard to switch
them to Dune::CpGrid.
2015-05-29 12:59:40 +02:00
Andreas Lauser 5666df807b some stylistic changes
in particular, where to put empty lines and spaces. Also added a
copyright statement for myself to a few files and added a comment. the
new comment was requested by [at]bska, the rest was requested by
[at]atgeirr.
2015-05-29 12:35:56 +02:00
Andreas Lauser 01555da823 remove the run() method from SimulatorFullyImplicitCompressiblePolymer
With this the simulator is basically done, but since
FullyImplicitCompressiblePolymerSolver has not yet been converted to
the NewtonSolver plus Model approach, the solver cannot be removed and
thus still contains quite a bit of copy-and-pasted code.
2015-05-28 13:56:07 +02:00
Andreas Lauser d27fb2bc45 properly use the SimulatorBase class for SimulatorFullyImplicitBlackoilPolymer and SimulatorFullyImplicitCompressiblePolymer 2015-05-28 13:56:07 +02:00
Andreas Lauser 0f1a7a16d7 unify the run() methods and the constructors of the 2p-compressible and the flow_polymer with the one from flow 2015-05-28 13:56:07 +02:00
Andreas Lauser a816ab9a0c start to use the SimulatorBase class for SimulatorFullyImplicitCompressiblePolymer
since SimulatorFullyImplicitCompressiblePolymer is now a template, the
opaque pointer stuff is also removed and the contents of the .cpp file
basically became _impl.hpp. for SimulatorFullyImplicitBlackoilPolymer,
the opaque pointer stuff was removed for the same reasons as for
SimulatorFullyImplicitBlackoil.

the actual unification of code is not yet done, but this patch points
out the direction of where this will go.

Also note that some synchronization with the ordinary blackoil
simulator (FLOW) was necessary to make it compile.

Finnally, the parser currently likes to throw an exception (also for
the opm-polymer master) when eating the opm-data polymer test
case. This prevented me from properly testing this patch:

```
and@heuristix:~/src/opm-polymer|simplify_simulator > ./bin/flow_polymer deck_filename=/home/and/src/opm-data/polymer_test_suit/simple2D/2D_THREEPHASE_POLY_HETER.DATA

================    Test program for fully implicit three-phase black-oil flow     ===============

---------------    Reading parameters     ---------------
deck_filename found at /, value is /home/and/src/opm-data/polymer_test_suit/simple2D/2D_THREEPHASE_POLY_HETER.DATA
output not found. Using default value 'true'.
output_dir not found. Using default value 'output'.
Program threw an exception: IOConfig: Reading GRIDFILE keyword from GRID section: Output of GRID file is not supported
terminate called after throwing an instance of 'std::runtime_error'
  what():  IOConfig: Reading GRIDFILE keyword from GRID section: Output of GRID file is not supported
Aborted
```
2015-05-28 13:56:07 +02:00
Andreas Lauser 553f32e6cf SimulatorBase: move the new method bodies from the .hpp to the _impl.hpp file 2015-05-28 13:55:54 +02:00
Andreas Lauser 662cd9791e SimulatorBase: only care about the solver in the run() method
this is necessary because some older simulations only provide the
full-fledged solver class but no physical model.

(also, this allows to use something else than the standard newton
solver.)
2015-05-28 13:55:54 +02:00
Andreas Lauser a154c8394d Simulator, Model: add everthing which is required by the polymer simulators
basically, this adds some hooks to the SimulatorBase class and the
model and introduces a few types to the SimulatorTraits.
2015-05-28 13:55:54 +02:00
Andreas Lauser 45fb80f547 SimulatorBase: remove the opaque pointer pattern
because the class is (and will stay) a template and for templates the
benefits of the opaque pointer pattern go from "small" to "zero".
2015-05-28 13:55:53 +02:00
Andreas Lauser 3eec9f3432 introduce a "SimulatorBase" class
so, far it is just a copy of the old "SimulatorFullyImplicitBlackoil"
class (which became a simple forward to the base class). The intention
is to unify the common simulator code in this class to avoid excessive
copy-and-pasting.
2015-05-28 13:55:53 +02:00
Andreas Lauser 9abbc45571 remove the obsolete 'm4' subdirectory
as far as I can see, it provided M4 macros for autotools based
projects which wanted to use OPM. I have severe doubts that this was
used by anyone because it most likely does not even work. (e.g. the M4
macros does not seem to specify the ERT and opm-parser prerequisites.)

Note that I'm not 100% sure of the above, so if I'm wrong, state so
loudly and I'll close the PR...
2015-04-10 16:17:14 +02:00
Andreas Lauser a9d0306fe8 reduce the default optimization level from -O3 to -O2
-O3 is sometimes declared "unsafe"
(cf. https://wiki.gentoo.org/wiki/GCC_optimization ) and it seems like
it bit us in https://github.com/OPM/opm-material/issues/23 if GCC 4.8
was used. so let's play safe and use -O2 for now...
2015-04-10 15:09:23 +02:00
Andreas Lauser e2180effce FindCXX11Features.cmake: check for the c++-2011 "final" specifier 2015-04-10 15:09:21 +02:00
Andreas Lauser e0dd62a226 only generate debugging symbols for the build types "Debug" and "RelWithDebInfo" 2015-04-10 15:09:21 +02:00
Andreas Lauser 89129aaaf6 build system: do not separate the debugging symbols by default
the reason is that the tools for profiling and for coverage analysis
(i.e., gprof and gcov) have trouble with this and crash. if you want
this to be enabled for whatever reason, use the cmake flag
-DSTRIP_DEBUGGING_SYMBOLS=ON or pass configure the
--enable-strip-debug option.
2015-04-10 15:09:20 +02:00
Andreas Lauser 2bb5159a97 FindAlugrid.cmake: do not try to include the whole grid
first this makes the test very slow, second (and more importantly) it
makes the test fail on dune master as the header relies on the
presence of the DUNE_GRID_VERSION* macros which are not present at the
configure stage of the build...
2015-04-10 15:09:19 +02:00
Andreas Lauser 50ec899a3d eWoms: silence an annoying bogous deprecation warning on Dune 2.4 2015-04-10 15:09:17 +02:00
Andreas Lauser fa04799855 remove the obsolete 'm4' subdirectory
as far as I can see, it provided M4 macros for autotools based
projects which wanted to use OPM. I have severe doubts that this was
used by anyone because it most likely does not even work. (e.g. the M4
macros does not seem to specify the ERT and opm-parser prerequisites.)

Note that I'm not 100% sure of the above, so if I'm wrong, state so
loudly and I'll close the PR...
2015-04-10 15:09:16 +02:00
Andreas Lauser 87afe12cda Finddune-grid.cmake: always enable the experimental grid extensions
this is now done by a config.h macro. The reason is that quite a bit
of code depends on boundary IDs which are only available as an
"experimental" grid extension in recent Dune releases...
2015-04-10 15:06:06 +02:00
Andreas Lauser ba4fca5a77 Revert "also pass the deck to the output writer"
This reverts commit 88730e855f.
2015-03-31 12:11:45 +02:00
Andreas Lauser 239547e794 Revert "pass the deck to the output writer"
This reverts commit 71987ae3b038c141a673ae1c1037f63ed695e595.
2015-03-31 12:10:16 +02:00
Andreas Lauser 206d7b56e4 pass the deck to the output writer 2015-03-26 17:33:20 +01:00
Andreas Lauser 88730e855f also pass the deck to the output writer 2015-03-26 17:33:13 +01:00
Andreas Lauser f0c3a6f892 add glue code needed for thermal gas PVT 2015-03-17 13:34:29 +01:00
Andreas Lauser 924818f445 add glue code needed for thermal oil PVT 2015-03-17 13:34:29 +01:00
Andreas Lauser debb8a1a04 add glue code needed for thermal water PVT 2015-03-17 13:34:29 +01:00
Andreas Lauser ff09e87787 add the glue code required for temperature dependent viscosity 2015-02-03 15:27:38 +01:00