Commit Graph

1077 Commits

Author SHA1 Message Date
Andreas Lauser
feeedb7428 properly deal with water compressibility and water "viscosibility" 2014-08-15 16:26:50 +02:00
Andreas Lauser
39cfb4e38a Make it work if HAVE_OPM_PARSER is false
currently, this can't happen because opm-material depends mandatorily
on opm-core which in turn requires opm-parser. In the future, this
might change, though...
2014-08-15 14:01:44 +02:00
Andreas Lauser
197fe4b1e3 black oil fluid system: fix stupid bug when setting the gas viscosity
gas viscosity != gas formation volume factor (even if the values are
somewhat similar)
2014-08-12 16:45:19 +02:00
Andreas Lauser
1051a964e0 black oil fluid system: rename surfaceDensity() to referenceDensity()
because it seems like what eclipse uses in the DENSITY keyword is not
really for surface pressure but at the pressure where the phase's
formation volume factor is one. (this pressure does not seem to be
specified and can potentially be different for every fluid phase.)
Thus rename surfaceDensity() to referenceDensity() and remove the
logic to allow volume formation factors which are not equal to one at
the reference pressure. (i.e., formerly the surface pressure.)
2014-08-12 15:49:01 +02:00
Andreas Lauser
d4a58aefd3 fluid systems: return human readable strings for the phaseName() method
this avoids a bit of guess-work...
2014-08-07 19:19:03 +02:00
Andreas Lauser
883f032aa0 {Spline,PiecewiseLinear}TwoPhaseMaterial: limit the relperms to [0, 1]
it used to be the range of the sampling points. If for some reason the
sampling points describe a subset of the full range, the material laws
use extrapolation outside of the table and properly limit the values
of that operation.

In the real world, the effect of this change is rather limited because
all tested tables used the range...

TODO: adapt the evalDerivative() methods. This is not very urgent, though
because they are usually not used...
2014-08-06 14:53:42 +02:00
Andreas Lauser
34f50e6613 fluid-matrix interactions: add a tabulated two-phase pc/kr law which uses splines
compared to the variant which uses linear interpolation, this makes
the resulting curves smoother and thus hopefully improves the
convergence rates of the simulations.
2014-08-06 13:52:23 +02:00
Andreas Lauser
1108f24c33 black oil fluid system: fix build on GCC 4.4
this compiler is for some reason not able to determine the number of
phases for externally defined attributes the way it was done. this is
most likely a compiler bug (or it is a left-over ideosyncrasy from
c++-2003 which was not yet removed for GCC 4.4...)
2014-08-06 11:26:25 +02:00
Andreas Lauser
20b63fdb6e Black oil fluid system: implement support for multi-region PVT tables
it is slightly hacky that the ParameterCache is used to specify the
PVT region. Having said that, the multiple PVT regions stuff in no way
based on physical assumptions, but is just a way to fit the black-oil
model to the measured values of real reservoirs...
2014-08-05 16:27:08 +02:00
Andreas Lauser
fbf81ef8ec Black oil fluid system: add support for decks which only specify gas-saturated oil in PVTO
SPE-9, I'm looking at you!!! (this is probably still different from
what Eclipse does, but it should be more or less okay from the
thermodynamic POV.)
2014-07-29 16:01:11 +02:00
Andreas Lauser
9534d56f13 black oil fluid system: don't use the numerical value for the surface pressure directly
this is just a minor clean up which does not change anything...
2014-07-25 15:06:15 +02:00
Andreas Lauser
291928955a black oil fluid system: remove commented out density calculation code
I thought about this a bit and came to the conclusion that since the
composition of oil is already fixed in that context, only the pressure
dependance needs to be included in addition.
2014-07-25 15:06:15 +02:00
Andreas Lauser
c5f55c1cd2 black oil fluid system: keep the saturation pressure spline consistent
It was not updated if the set PvtoTable was used which then lead to
segfaults.
2014-07-25 15:06:14 +02:00
Andreas Lauser
a43fec22cc black-oil fluid system: remove debugging artifact
*grr* which idiot forgot this one?
2014-07-24 18:48:38 +02:00
Andreas Lauser
4d61a9dc3f Black-oil fluid system: do not explicitly include the composition in the tabulated density
It might have to be included, but it made the reservoir test in eWoms
fail...
2014-07-24 14:12:05 +02:00
Andreas Lauser
de558bdd3b black oil system: use the UniformXTabulated2DFunction class for the oil formation factor
this means that undersaturated oil is now properly supported.
2014-07-24 14:12:05 +02:00
Andreas Lauser
8f52b80448 refactor the 2D tabulation classes
- the StaticTabulated2DFunction class and the base class
  (Tabulated2DFunction) are gone
- the DynamicTabulated2DFunction class has been renamed to
  UniformTabulated2DFunction
- a new class called UniformXTabulated2DFunction has been
  introduced. Like UniformTabulated2DFunction, it assumes uniform
  intervalls of the sampling points in X direction, but in contrast to
  UniformTabulated2DFunction, the Y locations of the sampling points
  can be set freely (as long as they are specified in increasing order
  for each x value)
- add a unit test for the two tabulation classes
2014-07-24 14:12:04 +02:00
Andreas Lauser
a7126a7a13 peng-robinson test: fix it, so that it produces correct output 2014-07-23 17:45:12 +02:00
Andreas Lauser
b02cff76b1 black oil density: correct the gas mass fraction in saturated oil 2014-07-22 19:16:55 +02:00
Andreas Lauser
a1de23b4fc peng-robinson test: correct calculation of the Rs factor 2014-07-08 12:43:44 +02:00
Andreas Lauser
506700d579 BlackOilFluidSystem: some improvements
the biggest one was that the Rs factor was used incorrectly: instead
of "surface volume of gas per volume of saturated reservoir oil" it is
defined as "surface volume of gas which a volume unit of surface oil
dissolves at reservoir pressure".

Besides this, there are a few smallish improvements like the oil
density being a function which can be called without having the
boilerplate objects (i.e., the fluid state and parameter cache
objects) instantiated.
2014-07-07 12:09:45 +02:00
Andreas Lauser
d9e24bb5c0 improve a few comments and error messages 2014-07-07 12:07:48 +02:00
Andreas Lauser
ced870fbd2 fix another off-by-one error
quite certainly, this won't be the last...
2014-05-23 14:02:13 +02:00
Andreas Lauser
3d91ac3577 1p/2p fluid systems: rename them to more sensfull class names
they were totally inconsistent with the remaining fluid systems
because their file names stated with a number and "P" was used instead
of "Phase"...
2014-05-08 17:02:28 +02:00
Andreas Lauser
5eaedaddf6 make the EclDefaultMaterial actually work
in the sense that it is now used by an eWoms simulator
2014-04-28 19:11:53 +02:00
Andreas Lauser
90e1375e0b Black-oil fluid system: take advantage of opm-parser
this considerably simplifies reading blackoil PVT parameters from an
ECL deck file.
2014-04-25 17:10:44 +02:00
Andreas Lauser
805750a82d convert to opm-parser
and fix some (likely) bugs...
2014-04-16 12:30:13 +02:00
Andreas Lauser
c0a7947357 fluid systems: rename unexpressive phase and component indices
These index names have been fully fluid system dependent for a while
and are supposed to be just used for convenience. This means that
phase names are now actual camelCase words.
2014-04-03 17:27:22 +02:00
Andreas Lauser
96b3d753e2 EclDefaultMaterial: fix sign error 2014-03-27 19:06:50 +01:00
Andreas Lauser
1c374b8391 fluid-matrix interactions: remove "3p" folder
because fluid-matrix interactions have been independent of the number
of phases for a while. The only law left in this folder (implementing
the Parker-van Genuchten law) has been moved one folder up and been
cleaned up considerably.
2014-03-27 19:06:50 +01:00
Andreas Lauser
df9efcf342 some documentation and stylistic updates 2014-03-05 16:30:54 +01:00
Benjamin Faigle
9674745464 Add functions for the heat capacity to the components air and co2
Enabled access to these methods in the co2-brine-fluidsystem (only
pure-phase heat capacities are used). reviewed by Klaus

Dumux-Svn-Revison: 12462
Ported-By: Andreas Lauser <and@poware.org>
2014-02-23 15:10:04 +01:00
Andreas Lauser
b77ecb46c5 h2o-n2 fluid system: use the total pressure to calculate the component enthalpies
this is analogous to commit r12402 of dumux. The current approach was
doing the "compositional consideration" twice. (and the difference
between using the partial pressure for the enthalpy and using the
total one in conjunction with weighting by mass fraction should be
neglectible for "almost ideal" gases, i.e., for low pressure and
temperature scenarios.)
2014-02-04 22:02:00 +01:00
Andreas Lauser
b333007fc3 FluidSystems::BlackOil: increase the fugacity coefficient of gas in water by a factor of 1000
this makes the PVS model work with SPE-9 and the NCP model to converge
better...
2014-01-24 15:15:22 +01:00
Andreas Lauser
f386599669 remove all vim and emacs modelines
for emacs, add a toplevel .dir-locals.el file instead...
2014-01-16 18:41:00 +01:00
Andreas Lauser
78a30208d8 simplify the valgrind client request helpers
the macros where used to make the influence of the valgrind calls zero
even for debug builds if valgrind client requests were
unavailable. Since this resulted in some inconsistencies, and the
performance hit is not terribly large, we now always use the same
inlined functions. For optimized builds the impact of those is still
zero...
2013-12-14 12:03:44 +01:00
Andreas Lauser
249592a57d fix the screw-ups caused by a0101ee 2013-12-03 12:13:53 +01:00
Andreas Lauser
019d188efb update the in-file copyright holder statements
this patch is quite large as there were various bug fixes to the
script which generates these statements
2013-12-02 17:26:34 +01:00
Andreas Lauser
a0101ee033 replace in-source copyright comments by the standard OPM ones 2013-12-02 16:35:57 +01:00
Andreas Lauser
96f38877f5 remove all print statements in classes intended for use of other modules
because these classes should not have any side effects. case in point:
the warnings intended to be printed once get printed once per process
which can be quite a few times for parallel simulations with thousands
of cores. This could also be avoided by checking the MPI rank, but
IMHO this is way too much boilerplate code for a feature of questionable
value.
2013-11-23 00:47:49 +01:00
Andreas Lauser
79c38f94b7 Parker-Lenhard: work around a debug mode bug of GCC 4.4
The resize() method for std::vector seems to copy an uninitialized
object for the new objects in the array on GCC 4.4. This means that we
should not assume that the copied objects are finalized in the
Parker-Lenhard parameters. Strangely enough this only seems to affect
older GCCs (at least 4.4) and only in debug mode...
2013-11-16 10:10:42 +01:00
Andreas Lauser
72bc625357 EclDefaultMaterial: produce something meaningful for krn()
at least mathematically meaningful. whether it makes sense phyiscally
is still to be determined...
2013-11-15 17:10:48 +01:00
Andreas Lauser
34d1934e60 Capillary pressure laws: enforce that parameter objects are finalized before they are used
this only has an effect if compiled in debug mode, i.e., if the NDEBUG
symbol is not defined.
2013-11-15 16:15:10 +01:00
Andreas Lauser
e1ad7112b0 add a tabulated piecewise linear two-phase material law
this is intended to be used for ECLIPSE saturation curves, but the
code is more generic. (Be aware that using cubic splines for the
interpolation between sampling points is probably a better choice in
most cases.)
2013-11-14 18:46:27 +01:00
Andreas Lauser
555154661e fix headercheck 2013-11-14 11:55:11 +01:00
Andreas Lauser
a7f6049a96 make EclDefaultMaterial three-phase API conformant 2013-11-14 11:55:00 +01:00
Andreas Lauser
5c57117365 guard macros: _HH -> _HPP 2013-11-13 18:45:52 +01:00
Andreas Lauser
62e7aad7f5 test_fluidmatrixinteractions: mark some variables as OPM_UNUSED
this should prevent some warnings on GCC 4.6. Thanks to Arne Morten
Kvarving for investigating this.
2013-11-13 12:27:37 +01:00
Andreas Lauser
696503c51e Brooks-Corey: explicitly include <cmath>
it seems to be implicitly included by newer compilers, but not GCC
4.4. In this case I agree with GCC 4.4...

Thanks to Bård Skaflestad for the hat-tip.
2013-11-13 11:37:37 +01:00
Andreas Lauser
8811400173 rename "pcwn" to "pcnw" and "pcng" to "pcgn"
because it is p_n - p_w and p_g - p_n instead of the other way round.
2013-11-12 18:11:40 +01:00