Commit Graph

689 Commits

Author SHA1 Message Date
Atgeirr Flø Rasmussen
2056623044 Complete pressure test for dead-oil deck. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
95ce3c4657 Modify test data. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
55fcdec734 Add (defaulted) gravity argument in some places.
This is done to facilitate testing, using gravity = 10 m/s^2 for example.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
33a2030170 Still working on test_equil.cpp. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
b9589097fc Fix contact depths in test deck. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
ba4461a26c Throw exception if datum not in oil zone.
We are not capable of handling this, and must abort.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
6362621c13 Created simple data for init testing. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
7997917c07 Add (unfinished) test case. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
97014713ce Removed RK4IVP's inheritance from binary_function.
Three reasons:
 - class is a unary functor,
 - the typedefs obtained were not used,
 - binary_function is deprecated in C++11.
2018-01-02 14:28:06 +01:00
Bård Skaflestad
ba82e3fa5e Add a layer of glue to extract data from deck
This is a work in progress.
2018-01-02 14:28:06 +01:00
Bård Skaflestad
30ba1b0f86 Install crude handling of data point outside vertical span
The initial implementation of RK4IVP<>::operator() failed to take
into account the possibility that we might need to evaluate the
function outside the vertical span for which it was initially
defined.  This situation occurs, for instance, in the not uncommon
cases of the GOC being above or the WOC being below the model.

This commit installs a crude Hermitian extrapolation procedure to
handle these cases.  Refinements are likely.
2018-01-02 14:28:06 +01:00
Bård Skaflestad
4779b43e88 Include <numeric> for std::iota()
Header was missing in earlier revision.
2018-01-02 14:28:06 +01:00
Bård Skaflestad
693612c0e2 Document requirements of CellRange. 2018-01-02 14:28:06 +01:00
Bård Skaflestad
5cdcd77820 Document public interface of phasePressures(). 2018-01-02 14:28:06 +01:00
Bård Skaflestad
9ddca948ff Add reverse look-up mapping for region vectors
Class RegionMapping<> provides an easy way of extracting the cells
that belong to any identified region (e.g., as defined by EQLNUM) of
the deck.
2018-01-02 14:28:06 +01:00
Bård Skaflestad
9bd0a58b35 Test cell subset phase pressure assignment. 2018-01-02 14:28:06 +01:00
Bård Skaflestad
d9766b0f6d Compute phase pressures in subset of cells
This commit adds support for assigning the initial phase pressure
distribution to a subset of the total grid cells.  This is needed in
order to fully support equilibration regions.  The existing region
support (template parameter 'Region' in function 'phasePressures()')
was only used/needed to define PVT property (specifically, the fluid
phase density) calculator pertaining to a particular equilibration
region.
2018-01-02 14:28:06 +01:00
Bård Skaflestad
1a182d4a48 Add basic equilibration facility
This commit adds a simple facility for calculating initial phase
pressures assuming stationary conditions, a known reference pressure
in the oil zone as well as the depth and capillary pressures at the
water-oil and gas-oil contacts.

Function 'Opm::equil::phasePressures()' uses a simple ODE/IVP-based
approach, solved using the traditional RK4 method with constant step
sizes, to derive the required pressure values.  Specifically, we
solve the ODE

      dp/dz = rho(z,p) * g

with 'z' represening depth, 'p' being a phase pressure and 'rho' the
associate phase density.  Finally, 'g' is the acceleration of
gravity.  We assume that we can calculate phase densities, e.g.,
from table look-up.  This assumption holds in the case of an ECLIPSE
input deck.

Using RK4 with constant step sizes is a limitation of this
implementation.  This, basically, assumes that the phase densities
varies only smoothly with depth and pressure (at reservoir
conditions).
2018-01-02 14:28:06 +01:00
Andreas Lauser
b5e9bb14ec Merge pull request #249 from andlaus/adapt_to_thermal_laws
adapt to the refactoring of the thermal laws in opm-material
2017-12-14 11:41:33 +01:00
Andreas Lauser
a99ef4af4f Merge pull request #251 from andlaus/maintainance
Maintainance
2017-12-13 13:19:06 +01:00
Andreas Lauser
a619a1115b finger_immiscible_ecfv_adaptive: update reference solution
for some reason it changed slightly.
2017-12-13 00:54:25 +01:00
Andreas Lauser
db2977b0bf adapt to the refactoring of the thermal laws in opm-material 2017-12-11 17:39:56 +01:00
Andreas Lauser
c0f013e25e use BlackOilFluidState from opm-material
this has recently been moved there. Since redundancy is considered to
be bad, switch eWoms to it.

I've tested this with Norne: No measureable difference, as expected.
2017-12-04 13:02:51 +01:00
Andreas Lauser
6fcfd3a363 Merge pull request #235 from andlaus/update_refsols
Update refsols
2017-11-17 19:01:03 +01:00
Andreas Lauser
c7a60b31ea update the reference solution for the tutorial
this changed because the density for LNAPL was changed to a more
realistic value of 690 kg/m^3 (same as iso-octane) from the previous
890 kg/m^3.
2017-11-17 14:03:04 +01:00
Andreas Lauser
b2d9bf1a82 update the reference solution for finger_immiscible_vcfv
for some reason the results have changed. (IMO, the new ones look more
correct in paraview.) The reason this was not discovered earlier is
that this test depends on the presence of dune-alugrid and the CI
infrastructure does not deal with this.
2017-11-17 14:03:04 +01:00
Andreas Lauser
fa1516bcd0 Merge pull request #225 from andlaus/minor_fixes
Minor fixes
2017-10-04 10:49:15 +02:00
Andreas Lauser
aca56a43e3 make all headers self-sufficient again
after the recent changes, some additional headers are required to be
included.
2017-10-03 12:48:21 +02:00
Andreas Lauser
0fccd5acb7 reference solutions: do not use symbolic links anymore
the reason is that cmake cannot file(COPY) them. this is probably due
to constraints of a crappy operating system that is made by a
microscopical and tender company which is based close to Seattle.
2017-10-03 12:39:46 +02:00
Arne Morten Kvarving
93d6eff3be Merge pull request #209 from andlaus/remove_dune_2_3_support
remove support for dune < 2.4
2017-09-22 11:39:59 +02:00
Andreas Lauser
38414a8325 Merge pull request #220 from andlaus/propertysystem_mcu
make the property system work with multiple compile units
2017-09-05 21:29:33 +02:00
Andreas Lauser
b93a61fd38 make the property system work with multiple compile units
so far, the linker bailed out due to duplicate definitions of
variables if multiple compile units used the same type tag. This is
problematic if the sources are split into separate compile units and
that use the same type tag; in particular, this applies for
traditional libraries.

Due to various C++ peculiarities, this patch complicates the internal
implementation of the property system quite a bit, but given that the
usage of it (as well as the compile time) stay unchanged, I do not
consider this to be a big problem. Note that the introspection code is
particularly problematic because it needs static initializers that do
not cause the linker to choke in the case of multiple compile units.

Finally, to prevent future regressions, this patch adds a unit test
for the lens problem which uses multiple compile units. (This test is
called lens_immiscible_ecfv_ad_mcu and basically identical to the
existing lens_immiscible_ecfv_ad test and I thus think that it is
pretty unimaginative -- improvement proposals are welcome.)
2017-09-03 15:27:35 +02:00
Andreas Lauser
69ad7630d6 Merge pull request #162 from andlaus/vcfv_ad
make AD work for the vertex-centered finite volume discretization
2017-07-25 12:19:16 +02:00
Andreas Lauser
2ff14fb13e remove the Stokes model
there seems to be only a *very* limited amount of interest, the code
of the model is quite complex and there are currently no suitable
discretizations for free-flow equations in eWoms (i.e., the model
tends to be very unstable and oscillates a lot). Combined, all of this
makes maintaining this model a pain in the back, so let's remove it
some interest in these kinds of problems surfaces and until
appropriate discretizations -- like staggered grid methods -- are
available.
2017-07-21 21:38:13 +02:00
Andreas Lauser
a626ab869e make the vertex centered FV method work with automatic differentiation
This works by having a "focus degree of freedom" during
linearization. When evaluating the local residual, all derivatives of
the residual/fluxes are with regard to the primary variables of that
DOF.

The two main offenders were the Forchheimer velocity model and the
model for the Stokes equations. To ensure that they continue to work,
the "powerinjection" and the "stokestest2c" problems are now both
compiled and tested with both, automatic differentiation and finite
differences, and the results of these tests is compared against the
same reference solution.

The majority of the time required to develop this patch was actually
required for testing: All tests compile and pass with debugging and
aggressive optimization flags with at least GCC 5, GCC 7 and clang
3.8, as well as Dune 2.3 and 2.4. Also, the results of flow_ebos stay
identical for Norne whilst the performance difference is below the
measurement noise on my machine. (the version with this patch applied
was actually about 1% faster.)
2017-07-21 18:35:08 +02:00
Andreas Lauser
1107b39c77 remove support for dune < 2.4
this allows quite a substantial amount of code decluttering, mainly
because Dune 2.4 renamed mapper.map() to mapper.index().
2017-07-13 14:08:02 +02:00
Andreas Lauser
23642bd9f7 Merge pull request #206 from andlaus/compositional_improvements
Compositional improvements
2017-06-29 17:54:48 +02:00
Andreas Lauser
6bff521319 NCP, PVS models: refine the primary variable update proceedure slightly
now, the saturation delta is guaranteed not to be larger than 20% for
each iteration. this is inspired by flow's updateState() code.
2017-06-29 17:23:24 +02:00
Andreas Lauser
41916443ee Merge pull request #159 from andlaus/fix_data_file_location
fix the location of fracture.art.dgf data file
2017-03-14 16:36:09 +01:00
Andreas Lauser
040f704207 fix the location of fracture.art.dgf data file
this belongs to the `tests/data` directory, not into the toplevel
`data` directory. Also, the input ART file for this has been renamed
to `fracture-raw.art` to avoid race conditions.
2017-03-14 14:21:11 +01:00
Andreas Lauser
ed353e7c70 update reference solution
for reasons which are mysterious to me, this slipped through. anyway,
it only bit if dune-alugrid was installed.
2017-03-01 21:10:57 +01:00
Andreas Lauser
1041f25565 Merge pull request #155 from andlaus/fix_2p_gradients_with_vcfv
fix the two-point gradient calculator
2017-03-01 20:55:17 +01:00
Andreas Lauser
30952313e8 fix the two-point gradient calculator
for the vertex-centered finite volume discretization, the relevant
position for calculating the gradient is *not* the position of the
center of the *sub*-control volume, but the center of the whole
control volume.

Since this patch changes the gradients of all VCFV simulations that
use twopoint gradients, quite a few new reference solutions are
required by this PR. I've looked at all of them manually and made sure
that they look reasonable. (The PR also includes a new reference
solution for the test for the adaptive finger problem -- which uses
ECFV -- but that's because the grid refinement seems to be quite
sensitive to the solution proceedure for that problem, not because
there's any difference in the solutions that can be noticed visually.)

note that all simulations that use element centered finite volume
discretization because there sub-control volumes are identical to full
control volumes. In particular, ebos -- and by extension `flow_ebos`
-- is unaffected because it does not even use that code.
2017-03-01 15:02:58 +01:00
Atgeirr Flø Rasmussen
6e8b38952c Merge pull request #151 from andlaus/move_valgrind_crs
adapt to the move of the valgrind client requests into the Opm namespace
2017-02-10 10:22:19 +01:00
Andreas Lauser
8a10a4d901 adapt to the move of the valgrind client requests into the Opm namespace 2017-02-09 18:25:44 +01:00
Andreas Lauser
8d398772e7 Merge pull request #146 from andlaus/fix_istl_solverwrapper
Fix istl solverwrapper build
2017-01-21 21:26:32 +01:00
Andreas Lauser
a9f53f9d87 Groundwater problem: use the conjugated gradient solver from dune-istl
the groundwater problem should be symmetric because it uses an
incompressible fluid, is a single phase problem and uses the
immiscible model. (i.e., there should never be a difference between
the upstream and the downstream cells.)

the main purpose of this commit is to have a test that uses a linear
solver wrapper which was generated by the internal
EWOMS_WRAP_ISTL_SOLVER macro.
2017-01-21 21:17:00 +01:00
Andreas Lauser
99304f9689 change the order of OPM_UNUSED and variable name
it seems like some compilers (GCC 4.9.2?) are picky about this and
require

```c++
TypeName VariableName __attribute__ ((__unused__))
```
2017-01-17 13:28:56 +01:00
Andreas Lauser
bc01257087 Merge pull request #133 from andlaus/handbook_improve_hyperref
handbook: use more sensible options for the hyperref package
2017-01-17 12:29:08 +01:00
Andreas Lauser
bdb8c8eeff slightly improve the handbook build script
if some command fails, it now stops.
2017-01-16 15:32:16 +01:00