Commit Graph

597 Commits

Author SHA1 Message Date
Tor Harald Sandve
f6146db122 Add support for SOF2 for 2p runs.
Make it possible to use SOF2 in combination with either
SGFN og SWFN for gas-oil and water-oil case respectivly.
2017-11-23 10:46:55 +01:00
Andreas Lauser
cb75a7ad6f Merge pull request #259 from andlaus/fix_n2_heatcap
N2: make the heat capacity consistent with the enthalpy again
2017-11-17 19:19:21 +01:00
Andreas Lauser
0d613a7c25 N2: make the heat capacity consistent with the enthalpy again
I missed the fact that in the enthalpy() function, the polynomial
coefficients are divided, i.e., this component defines a polynomial
for the heat capacity and integrates it for the enthalpy. (not
the other way around.)
2017-11-17 19:09:01 +01:00
Andreas Lauser
0e78de262d Merge pull request #258 from andlaus/fix_component_enthalpy
fix heatCapacity() and enthaply() of some components
2017-11-17 19:00:49 +01:00
Andreas Lauser
db87b77896 fix heatCapacity() and enthaply() of some components
I looked at all components: For the ones that use simple enthalpy
relations, heatCapacity() and enthalpy() should now be
consistent. (Here "simple" means "an approach that I understood without
reading literature for several hours".)
2017-11-16 16:30:24 +01:00
Tor Harald Sandve
ef91bbf7d2 SWATINIT Also scale capPres when water saturation is below residual
This assure that the initial state is in eqvilibrium also for cells with
where SWATINIT is set below residual value.
2017-09-21 14:50:08 +02:00
Andreas Lauser
93d448457c Merge pull request #246 from totto82/gasoil
Allow for 2p gasoil case
2017-09-05 21:28:14 +02:00
Tor Harald Sandve
a13a3a3f62 Allow for 2p gasoil case 2017-09-04 12:32:27 +02:00
Andreas Lauser
d68dd09aee Merge pull request #245 from andlaus/limit_VAPPARS
limit the reduction due to VAPPARS to a factor of 1000
2017-07-31 15:01:13 +02:00
Andreas Lauser
2457b4d5af VAPPARS: considerably increase the epsilon value for the numerator
again, the effect of this on the results should be negligible, but the
numerical performance should become much better.
2017-07-28 23:04:18 +02:00
Andreas Lauser
87122bb2f5 limit the reduction due to VAPPARS to a factor of 1000
a reduction of Rs and Rv of a factor 1000 should be enough physically
and the numerical stability is quite a bit better with this. In
particular, this is should not really matter because the whole concept
of VAPPARS is a staggeringly ugly hack from the outset.
2017-07-28 23:02:37 +02:00
Andreas Lauser
2f537717c8 Merge pull request #244 from andlaus/VAPPARS_limit_SoMax
VAPPARS: limit the maximum oil saturation to 1.0
2017-07-28 20:54:46 +02:00
Andreas Lauser
b631809de8 VAPPARS: limit the maximum oil saturation to 1.0
It should never become larger than 1, but during a Newton-Raphson
update it may happen anyway.
2017-07-28 19:13:10 +02:00
Andreas Lauser
3a65e712c9 Merge pull request #242 from andlaus/Evaluation_default_copy
Evaluation: use the trivial copy constructor and copy operator
2017-07-27 20:14:24 +02:00
Andreas Lauser
be96015760 Merge pull request #243 from andlaus/no_by_value_catch
TabulatedComponent: don't catch std::exception by value
2017-07-27 20:03:14 +02:00
Andreas Lauser
2b4114907e TabulatedComponent: don't catch std::exception by value
std::exception is a polymorphic type and catching these by values
generates warnings when using the latest GCC from SVN. Besides this,
catching objects by value is bad style and was unintended from the
start.
2017-07-27 18:04:43 +02:00
Andreas Lauser
6cdae5f4c2 Evaluation: update the generated code 2017-07-27 18:02:55 +02:00
Andreas Lauser
8a0de34ad0 Evaluation: use the trivial copy constructor and copy operator
this potentially allows the compiler to do better optimizations.
2017-07-27 18:02:55 +02:00
Andreas Lauser
a66273c6aa Merge pull request #241 from andlaus/keep_track_of_reservoir_temperature
BlackOilFluidSystem: Keep track of the reservoir temperature
2017-07-27 18:01:23 +02:00
Andreas Lauser
0bc9299010 BlackOilFluidSystem: Keep track of the reservoir temperature
In fact, the temperature at the reservoir is not constant, so this
should be more thought of as "representative temperature" of the
reservoir.

In ECL, this value is specified using the RTEMP or the RTEMPA
keywords, opm-parser provides this via the table manager. (NB: is this
really something that belongs there?)
2017-07-27 16:06:58 +02:00
Andreas Lauser
2f08e57ad8 Merge pull request #240 from andlaus/fix_headercheck
make all headers autonomous again
2017-07-20 13:10:44 +02:00
Andreas Lauser
b65defe489 make all headers autonomous again
i.e., they can be included without having other files included before them.
2017-07-20 12:08:47 +02:00
Andreas Lauser
9583b402c7 Merge pull request #237 from andlaus/remove_deprecated
RegularizedBrooksCoreyParams: remove long deprecated method
2017-06-30 14:33:17 +02:00
Andreas Lauser
99039f6d62 RegularizedBrooksCoreyParams: remove long deprecated method
this method is unused in the whole OPM project and has long been
renamed to setPcLowSw().
2017-06-29 18:42:39 +02:00
Andreas Lauser
3ddc7a5340 Merge pull request #234 from dr-robertk/PR/cleanup-scalar
[cleanup] make code compile when Scalar is non POD type.
2017-06-27 13:13:39 +02:00
Andreas Lauser
0a2591f3fd Merge pull request #236 from andlaus/fix_debug_mode_warning
fix an unused typedef warning that only occurs in debug mode
2017-06-27 13:13:01 +02:00
Andreas Lauser
e9dfe00335 Merge pull request #235 from andlaus/fix_critsat
EclEpsScalingPoints: make determining the critical saturations more robust
2017-06-26 13:29:30 +02:00
Andreas Lauser
3c7e12976f fix an unused typedef warning that only occurs in debug mode 2017-06-26 10:40:17 +02:00
Andreas Lauser
967af088bb EclEpsScalingPoints: make determining the critical saturations more robust
these loops are somewhat tricky. the new versions are infinitessimally
slower, but hopefully much more robust.
2017-06-24 13:13:02 +02:00
Robert Kloefkorn
aec9fe5834 [cleanup] make code compile when Scalar is non POD type. 2017-06-23 10:46:55 +02:00
Atgeirr Flø Rasmussen
d0ef28833a Merge pull request #220 from andlaus/eval_specializations_v2
Eval specializations v2
2017-06-15 10:39:57 +02:00
Andreas Lauser
72fd2c8a7e Merge pull request #233 from andlaus/densead_declutter
Densead declutter
2017-06-15 10:33:42 +02:00
Andreas Lauser
87222f3c6a disable a static assertation in the DenseAD convenience functions
the problem is that some of these function names clash with those for
code using AutoDiffBlock. This is normally not a problem because of
the SFINAE rule, but the static assertation makes the compiler bail
out before SFINAE kicks in.

IMO this is a little unfortunate because without this static_assert
compiler errors are bound to becomming quite a bit more obscure, but
as long there is code which uses both AD approaches at the same time,
I cannot see a way to keep the assert without moving one approach or
the other to a different namespace (or renaming the math function for
one).
2017-06-14 11:06:04 +02:00
Andreas Lauser
0f6540bdad DenseAD: make less fuzz about it
this patch converts to code to use the convenience functions instead
of the math toolboxes whereever possible. the main advantage is that
Opm::foo(x) will work regardless of the type of `x`, but it also
reduces visual clutter.

also, constant Evaluations are now directly created by assigning
Scalars, which removes further visual noise.

while I hope it improves the readability of the code,
functionality-wise this patch should not change anything.
2017-06-13 17:25:03 +02:00
Andreas Lauser
acfa7c43e5 convenience functions: use the raw type for results
i.e., we should not return references and we also should remove the
const qualifier in this context. (if these are wanted, the calling
scope should add them.)
2017-06-13 17:18:47 +02:00
Andreas Lauser
256fcd65d4 use log() instead of ln() to calculate the natural logarithm
it seems like ln() is non-standard and this piece of code only
compiled because that particular method is never instantiated.
2017-06-13 17:17:26 +02:00
Andreas Lauser
7050193167 update generated files 2017-06-07 15:20:01 +02:00
Andreas Lauser
ee5ee215bd explicitly include all Evaluations in the file for each specialization
indirectly this was already the case: Math.hpp includes
Evaluation.hpp, but this change should make it more explicit.
2017-06-07 15:20:01 +02:00
Andreas Lauser
1a1b17a5c8 revert optimizing the division code for evaluations 2017-06-07 15:20:01 +02:00
Andreas Lauser
19fb18dc20 clean up the code generator script for Evaluations a bit
this mainly removes superfluous newlines in the generated files, but
also makes them bit more consistent.
2017-06-07 15:20:01 +02:00
Andreas Lauser
2f86c78dd8 Revert "Revert "[WIP] Evaluation: specialize evaluations for used numbers in Blackoil setting""
This reverts commit cfc79fd6d5.
2017-06-07 15:20:01 +02:00
Andreas Lauser
2a69da14f0 Simplify usage of Evaluations in some places
The convenience functions allow to get rid of many direct calls to the
toolbox and constants can be directly returned as doubles.
2017-06-07 15:20:01 +02:00
Atgeirr Flø Rasmussen
14bf347ec3 Merge pull request #232 from nairr/term_output_mod
Minor changes to log type
2017-05-29 08:52:41 +02:00
Rohith Nair
0d70d3c32d Minor changes to log type 2017-05-24 11:31:16 +02:00
Andreas Lauser
ea7cc1f56e Merge pull request #229 from andlaus/implement_blackoil_solvent
black-oil: add a PVT class for solvents
2017-05-05 18:45:56 +02:00
Andreas Lauser
027c366dd1 black-oil: add a PVT class for solvents
this is anlogous to the dry gas PVT code but it uses the PVDS and
SDENSITY keywords.

Note that this object is only used by the eWoms black-oil solvent
code, i.e. it not used by the black oil fluid system or any other
opm-material code, but IMO opm-material is the right place for it
because of its similarity to dry gas.
2017-05-05 10:47:43 +02:00
Andreas Lauser
6b2fe9633b Merge pull request #228 from andlaus/fix_warning
FluidStateCompositionModules: fix some compiler warning
2017-05-04 14:21:29 +02:00
Andreas Lauser
db0086df29 FluidStateCompositionModules: fix some compiler warning
that warning was correct, but bogus: while this data was indeed used
without initialization, using the mass composition of a phase before
fully specifying the molar composition is incorrect and would have
trigger a valgrind complaint. (valgrind will still complain after that
patch.)
2017-05-04 13:14:43 +02:00
Andreas Lauser
34f3a35c97 Merge pull request #225 from atgeirr/silence-warnings
Silence warnings.
2017-04-12 10:19:12 +02:00
Atgeirr Flø Rasmussen
a229ba0945 Silence warnings.
One shadowing and one unused variable.
2017-04-12 07:49:31 +02:00