Commit Graph

867 Commits

Author SHA1 Message Date
Andreas Lauser
7b12d493d7 make the "shrubbery" of dense-AD aware of dynamic evaluations
i.e., adapt the math routines.
2018-06-28 17:27:48 +02:00
Andreas Lauser
362965c198 update the generated source files 2018-06-28 17:27:48 +02:00
Andreas Lauser
fec2428c3e evaluation code gen: add a dynamically-sized variant of evaluation
this works by passing -1 as the template argument for the number of
derivatives. most of the code is identical, but creation of such
objects requires the number of derivatives passed to the constructor
or the copy constructor must be used.

Finally `DynamicEvaluation<Scalar>` is provided as a more expressive
alias for `Evaluation<Scalar, -1>`.
2018-06-28 17:27:47 +02:00
Tor Harald Sandve
2a8b6e8974 Merge pull request #300 from andlaus/1_for_EHSYTR_item_2
implement support for "1" of the second item of EHYSTR
2018-06-28 07:42:52 +02:00
Andreas Lauser
bcec72a7db implement support for "1" of the second item of EHYSTR
this means Carlson's hysteresis model for the relperm of the
non-wetting phase and the imbibition instead of the drainage curve for
the relperm of the wetting phase.
2018-06-19 14:37:09 +02:00
Andreas Lauser
311c1a6ae1 ECL hysteresis: fix the imbibition number
so far, compressed element indices have been used to access data for
logical cartesian cells. this does not matter if there is only a
single saturation region for imbibition and thus IMBNUM is
uniform. (e.g., this is the case for Norne as far as I can see.)
2018-06-19 14:29:40 +02:00
Andreas Lauser
86a377dc1e make the quadruple precision math support code compatible with dune-fem
the stream operators are actually the ones for double precision.
2018-05-17 11:30:31 +02:00
Atgeirr Flø Rasmussen
6dd79068fd Merge pull request #292 from andlaus/rename_internal_vars
SPECROCK thermal law: rename internal variables
2018-03-28 12:21:37 +02:00
Andreas Lauser
898af59418 use the midpoint rule to integrate linear functions
this used to be the unmodified quadratic function that results from
integrating a linear function. using the midpoint rule is quite a bit
simpler and should yield the same results.

thanks to [at]atgeirr for pointing this out.
2018-03-28 09:45:29 +02:00
Andreas Lauser
038f9c7bf1 thermal PVT and rock laws: fix the integration of the heat capacities
this was quite embarrassing. thanks to [at]atgeirr for pointing it out.
2018-03-27 14:00:41 +02:00
Andreas Lauser
01403ccdb3 thermal laws: rename some internal variables
using `u` or `h` for heat capacities is very confusing because the
variables can easily be mistaken for the internal energy or enthalpy.
2018-03-27 13:52:51 +02:00
Andreas Lauser
e773914399 Merge pull request #291 from andlaus/fix_dune_master
make it work with the latest dune master
2018-03-12 15:16:00 +01:00
Andreas Lauser
9891b2a3c7 make it work with the latest dune master
Dune::set_singularity_limit() has been removed there and std::real()
gets used by the dense matrix-vector code (this causes trouble if
`quad` is selected as scalar type)
2018-03-12 13:58:45 +01:00
Arne Morten Kvarving
283550a702 Merge pull request #290 from akva2/adjust_ecl
adjustments for moved eclipse support (now in opm-common)
2018-03-06 15:34:34 +01:00
Arne Morten Kvarving
53b24d482a adjustments for moved eclipse support (now in opm-common) 2018-03-05 12:49:22 +01:00
Andreas Lauser
52321e5c04 Merge pull request #289 from andlaus/fix_warnings
Fix warnings
2018-03-03 13:30:38 +01:00
Andreas Lauser
ed0e839eb5 avoid single precision floating point underflows in MiscibleMultiPhaseComposition
for single-precision FP scalars, this was the same as setting a
tolerance of 0. maybe this should be done instead?!
2018-03-03 13:17:33 +01:00
Andreas Lauser
135f81073d add a few OPM_UNUSED decorations to variables which are only used within static_assert
for some reason icc produces a warning about this.
2018-03-03 13:17:33 +01:00
Atgeirr Flø Rasmussen
a7d929e638 Merge pull request #288 from atgeirr/missing-include
Include <stdexcept> for std::runtime_error.
2018-02-14 14:46:06 +01:00
Atgeirr Flø Rasmussen
da4b160438 Include <stdexcept> for std::runtime_error. 2018-02-14 13:02:40 +01:00
Andreas Lauser
e5e43fa7a8 Merge pull request #287 from andlaus/separate_opm-common_concerns
move some basic infrastructure from opm-common to here
2018-02-08 16:24:51 +01:00
Andreas Lauser
27386851a2 move some basic infrastructure from opm-common to here
all of these classes have only been used in opm-material and its
downstreams in the first place.
2018-02-07 16:44:44 +01:00
Joakim Hove
9aa47b2969 Merge pull request #282 from andlaus/cp_to_cv
Cp to cv
2018-01-31 17:51:13 +01:00
Atgeirr Flø Rasmussen
94f0f8b985 Merge pull request #283 from akva2/relocate_files_in_common
changed: opm/common/[->utility/]ConditionalStorage.hpp
2018-01-31 13:17:57 +01:00
Andreas Lauser
7fece91b76 Merge pull request #284 from atgeirr/master
Silence some warnings
2018-01-30 15:47:43 +01:00
Atgeirr Flø Rasmussen
a9018ece34 Add OPM_UNUSED to unused temperature arguments. 2018-01-30 15:06:26 +01:00
Atgeirr Flø Rasmussen
578426f4cd Remove unused arguments. 2018-01-30 15:06:13 +01:00
Atgeirr Flø Rasmussen
904a5c674b Put code in separate scope to avoid shadowing. 2018-01-30 15:05:48 +01:00
Arne Morten Kvarving
46892f54f0 changed: opm/common/[->utility/]ConditionalStorage.hpp 2018-01-30 12:24:04 +01:00
Andreas Lauser
096c22be92 ECL thermal: assume heat capacities for constant volume instead for constant pressure
this implies that the internal energy instead of the enthalpy is
specified by the fluid PVT classes.
2018-01-30 12:19:17 +01:00
Andreas Lauser
be4245a397 improve the documentation of the NCP flash solver 2018-01-30 12:18:34 +01:00
Andreas Lauser
b86664f3a9 Merge pull request #280 from andlaus/fix_fluidstate_getters2
fix Opm::getInvB_(fluidState) once more
2018-01-22 16:09:48 +01:00
Andreas Lauser
64eae1c92f fix Opm::getInvB_(fluidState) once more
after #278, the generic version of getInvB_() was always used because
no argument for fluidState.invB() was specified when invoking the
GENERATE_HAS_MEMBER() macro, so has_invB<FluidState>() returned false
for any fluid state. since the getInvB_() function is not used by the
master version of `flow` yet, it was unaffected by this issue and this
is also the reason why neither Jenkins complained nor any performance
regression could be seen after #278. That said, for implementing
non-trivial boundary conditions, it is very helpful to have a unified
code path for the case where boundary conditions are specified using
generic fluid states and black-oil model specific ones as well as with
the flux computations in the interior of the domain.

Note that I only found this issue due to the fact that on my current
WIP branch linearization got 10% slower for Norne. This means that the
generic version of this function must be correct and, considering the
fact that the massFraction() method is quite elaborate for
BlackOilFluidState, this is also a very strong indication that on
modern processors the performance of even the linearization part of
the simulation is more limited by memory latency than by the execution
speed of the ALUs.
2018-01-22 14:24:41 +01:00
Andreas Lauser
a03f9a73cc Merge pull request #278 from andlaus/fix_fluidstate_getters
Fix fluid state getters for blackoil quantities
2018-01-19 13:01:17 +01:00
Andreas Lauser
fdf506794f make the ordering of the template parameters of the get*_(fluidState) functions consistent
the order of template parameter now always is FluidSystem, FluidState,
Evaluation. This requires some downstream mop-up patches.
2018-01-19 11:40:25 +01:00
Andreas Lauser
f46b23fcbb add the PVT region index as a parameter for getInvB_()
this is only relevant for the generic-fluidstate version. In most
cases, 0 should be passed as the PVT region index.
2018-01-19 11:38:18 +01:00
Andreas Lauser
4416b4ae83 fix typo in version of getInvB_() for generic fluid states 2018-01-19 11:31:50 +01:00
Andreas Lauser
d3b20fa5c5 use has_invB() to decide if the generic or trivial versions of getInvB_() are used
this used to be has_pvtRegionIndex(). While there currently is no
difference in practice because the only fluid state that exhibits a
pvtRegionIndex() method also has invB(), a bug is a bug...
2018-01-19 11:30:55 +01:00
Andreas Lauser
847213f36e Merge pull request #275 from andlaus/implement_TOLCRIT
implement support for the TOLCRIT ECL keyword
2018-01-08 15:41:03 +01:00
Andreas Lauser
68ed9ea7b3 implement support for the TOLCRIT ECL keyword 2018-01-08 11:58:53 +01:00
Andreas Lauser
e4d4454671 Merge pull request #273 from andlaus/avoid_heat
thoroughly rename the thermal laws
2018-01-05 13:59:35 +01:00
Andreas Lauser
86a0e9befc ECL thermal gas PVT: add the heat of vaporization to the gas enthalpy
this does only matters for temperature changes due to dissolution and
evaporization of gas in oil or oil in gas. The comprehensive solution
would be to make the enthalpy of the phases composition dependent, but
ECL does not seem to support this when using the black-oil model.
2018-01-04 15:25:12 +01:00
Andreas Lauser
bf3cffa6b4 thoroughly rename the thermal laws
this was only partially done so far: the term "heat" should be avoided
if possible because it is a somewhat fuzzy concept. Thus, replace it
by "energy" and "thermal" where it is not a well established
term. ("well established" basically means "heat capacity".)
2018-01-04 15:25:11 +01:00
Andreas Lauser
d2588eac7d compute the inverse formation volume factor for generic fluid states
before, if the fluid state did not provide an invB() method,
Opm::getInvB_() just returned 0.0. with this, it uses the composition
and density of the phase in question to compute that quantity.

(also, this commit contains a few stylistic cleanups for
BlackOilFluidSystem)
2018-01-02 10:33:22 +01:00
Andreas Lauser
1f114a2bc9 Merge pull request #268 from andlaus/improve_BlackOilFluidState
improve the BlackOilFluidState class
2017-12-15 09:26:51 +01:00
Andreas Lauser
644240e6b9 improve the BlackOilFluidState class
now the assign() function should work and all functions should exhibit
a doxygen string. note that the inverse formation volume factors are
zero if the fluid state passed as the argument to assign() does not
feature an invB() member function.
2017-12-14 17:54:22 +01:00
Andreas Lauser
a4aa334c02 Merge pull request #267 from andlaus/implement_blackoil_energy
Implement blackoil energy
2017-12-14 10:44:33 +01:00
Andreas Lauser
f8ecd7ceaa implement the ECL thermal laws
Like for the material laws, an EclThermalLaw manager class is provided
to simplify initialization of the parameter objects from ECL decks.
2017-12-14 10:43:54 +01:00
Andreas Lauser
7b8951ed83 refactor the "heat conduction" laws into "thermal laws"
thermal laws are the heat conduction laws plus "solid energy laws"
which can be used to specify the relations which govern the volumetric
internal energy of the solid matrix of the porous medium.
2017-12-14 10:43:54 +01:00
Andreas Lauser
f195effcdd VanGenuchtenParams: remove superfluous include 2017-12-14 10:43:54 +01:00