Commit Graph

152 Commits

Author SHA1 Message Date
Joakim Hove
b1e889f619 Update deck access api 2021-11-18 15:12:30 +01:00
Markus Blatt
868531e414 Extrapolate for values not in domain (UniformTabulated2DFunction/liquidDensity).
Extrapolate liquidDensity for unreasonable
pressure/temperature (Brine) and in UniformTabulated2DFunction.
In the current code the interpolation actually already works if the
values are outside of the tabulated region.

With this change there is now an additional function parameter
If it is true we will interpolate for every value instead of throwing
and aborting (was the case always before).
2021-09-28 16:34:42 +02:00
Arne Morten Kvarving
8cdc05caf0 fixed: need to include Deck.hpp in test 2021-04-26 12:04:35 +02:00
Paul Egberts
809c1d3f1b fix of the wrong number of template arguments error in test_fluidmatrixintercations.cpp 2021-03-11 16:07:53 +01:00
Tor Harald Sandve
28dd5a2b36 Merge pull request #427 from totto82/co2pvt
Add a co2brine pvt model
2020-10-02 12:26:19 +02:00
Tor Harald Sandve
15ff65ffcd Add a co2brine pvt model
The CO2BRINE model is activated by setting CO2STOR in the RUNSPEC section

The CO2 and brine pvt properties are computed based on pvt models in opm-material
- CO2 density is from Span and Wager (1996) as given in co2table.inc
- CO2 viscosity is from Fenhour et al (1998)
- Brine density and viscosity is based on H20 + correction based on Batzle and Wang (1992)
- H20 density is from Hu et al (2007)
- H20 viscosity is computed from density based on correlation given in IAPWS 97

At the current stage the oil-phase is used to model the brine. If a proper gas-water
simulator is made, the Brine PVT should be moved to the water phase.

Known limitations:
- Currently the viscosity of the Brine does not depend on the composition
- Salinity is assumed to be constant and given by SALINITY [mol/kg].
2020-10-01 16:15:39 +02:00
Joakim Hove
1315acfe51 Remove unusued #include common excpetions 2020-09-21 10:56:05 +02:00
Tor Harald Sandve
b4c8dd5e86 make the water PVT salt dependent 2020-07-02 13:42:58 +02:00
Joakim Hove
68e779a827 Use std::shared_ptr for Python handle 2020-03-31 10:46:17 +02:00
Joakim Hove
b68bdea6e4 Add Python arg to Schedule constructor 2020-03-25 18:32:46 +01:00
Arne Morten Kvarving
a2d52da69f rename EclMaterialLawManager::initFromDeck to initFromState
no deck usage any more
2020-03-09 11:42:37 +01:00
Arne Morten Kvarving
51d644b96c changed: get rid of last deck usage in BlackoilFluidSystem
rename initFromDeck to initFromState. Pass the Schedule instead
of the deck.
2020-03-03 15:57:58 +01:00
Arne Morten Kvarving
efdb6a4dfc use compressed field properties in EclMaterialLawManager 2020-02-28 13:07:03 +01:00
Arne Morten Kvarving
0668699179 fixed: use std::numeric_limits<Scalar> in one more spot 2020-02-10 15:57:25 +01:00
Arne Morten Kvarving
9af6f1fe4d changed: do not call initParamsForElements in initFromDeck 2020-01-21 11:32:57 +01:00
Trine S. Mykkeltvedt
1841b05b16 implemented simple salt/brine option 2020-01-07 09:30:08 +01:00
Joakim Hove
ba798c5c22 Add PORO to testdata 2019-11-29 11:19:04 +01:00
Tor Harald Sandve
a62ea4b0f1 Add log10 AD function 2019-06-03 11:22:42 +02:00
Andreas Lauser
14351c5794 black oil PVT: make the maximum oil saturation a evaluation
the maximum oil saturation *can* depend on the most current solution,
so it needs to include derivatives. Note that this fix should not
change the converged solution, only the convergence behaviour, i.e.,
if changes in the results are encountered, these are likely only
numerical noise.
2019-05-03 14:30:30 +02:00
Atgeirr Flø Rasmussen
77c963167f Merge pull request #328 from atgeirr/interpolation_2d_miscibility_fix
Interpolation 2d miscibility fix
2019-04-02 08:20:02 +02:00
Atgeirr Flø Rasmussen
322c6fb0ff Address review issues. 2019-03-29 11:48:35 +01:00
hnil
5399d72477 Change 2D interpolation of live oil and wet gas.
Interpolation is now done parallel to the saturated/unsaturated boundary lines,
instead of axis-aligned.
2019-03-22 14:08:28 +01:00
Kai Bao
6fe8e1c74f adding a few more tests for DynamicEvaluation in test_densead 2019-03-22 08:51:16 +01:00
Kai Bao
bf4bf1aa1f adding staticSize to the template parameters for Evaluation and DynamicEvaluation 2019-03-21 11:51:45 +01:00
Andreas Lauser
f4330e9771 Merge pull request #319 from andlaus/fix_style_issues
Fix coding style issues and rename XYTabulated2DFunction
2019-01-08 13:34:06 +01:00
Joakim Hove
d4332da83e Do not create ParseContext in tests 2019-01-07 12:23:11 +01:00
Andreas Lauser
7c1bda6df1 rename XYTabulated2DFunction to IntervalTabulated2DFunction
... because every 2D function depends on two variables which are
usually called X and Y. The name of that class is still clunky,
suggestions are appreciated.

(also, UniformXTabulated2DFunction is a bad name. I also take
suggestions for that.)
2018-12-20 13:38:03 +01:00
Andreas Lauser
7a4c6546b4 fix some coding style isses in new class XYTabulated2DFunction and its test 2018-12-20 13:38:03 +01:00
Kai Bao
17264e0873 addressing reviewing comments from PR#137 2018-12-11 10:58:49 +01:00
Kai Bao
9bf6d01acc adding a test for XYTabulated2DFunction 2018-12-06 13:19:04 +01:00
Andreas Lauser
6cb7df3541 remove the Opm::FluidSystems namespace
this has mildly annoyed me for quite some time, and finally managed to
bring myself to changing it: The Opm::FluidSystems namespace is pretty
useless because the number of classes contained within it is quite
small and mismatch between the naming convention of the file names the
actual classes is somewhat confusing IMO. Thus, this patch changes the
naming of fluid systems from `Opm::FluidSystems::Foo` to
`Opm::FooFluidSystem`.

(also, flat hierarchies currently seem to be popular with the cool
people!?)

this patch requires some simple mop-ups for `ewoms` and `opm-simulators`.
2018-07-27 12:57:09 +02:00
Andreas Lauser
f316b0699e add an Opm::blank(Evaluation) function
this creates an uninitialized "compatible" evaluation that is
compatible with its argument. For primitive floating point types and
statically-sized Evaluations, this is identical to calling the default
constructor, for dynamically sized ones, it creates an uninitialized
Evaluation object of identical size as the argument.

thanks to [at]GitPaen for the heads up.
2018-06-28 17:27:48 +02:00
Andreas Lauser
328efa793c add dynamic evaluations to the unit test for dense-AD
this requires a medium-sized refactoring of the test.
2018-06-28 17:27:48 +02:00
Arne Morten Kvarving
53b24d482a adjustments for moved eclipse support (now in opm-common) 2018-03-05 12:49:22 +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
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
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
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
1f0be92300 add a unit test for BlackOilFluidSystem 2017-12-11 15:35:01 +01:00
Andreas Lauser
9c57728405 fluid systems: remove the complex relations flag from the fluid systems
this flag is way too non-descript (a complex relation for one person
may be a simple one for another), the implementation is pretty
inconsistent and it makes the code more complicated and harder to
maintain. Thus, IMO the approach turned out to be a bummer, so let's
pull the plug.
2017-12-04 11:08:50 +01:00
Andreas Lauser
7cb5e91e2b add a tailor-made fluid state for black-oil models
this is basically a slightly cleaned up version of
Ewoms::BlackOilFluidState.
2017-12-01 17:25:08 +01:00
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
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
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
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
Atgeirr Flø Rasmussen
a229ba0945 Silence warnings.
One shadowing and one unused variable.
2017-04-12 07:49:31 +02:00
Andreas Lauser
e88216d9d5 test_components: check the API comprehensively
for some reason some methods were untested up now.
2017-04-10 11:22:54 +02:00
Atgeirr Flø Rasmussen
cfc79fd6d5 Revert "[WIP] Evaluation: specialize evaluations for used numbers in Blackoil setting" 2017-03-28 13:26:10 +02:00
Andreas Lauser
2f44918a2b dense AD: fix a few stupid bugs
e.g., looping over the wrong range or an infinite loop. also, the
dense-AD unit test is shortend to test one specialization and the
unspecialized class.
2017-03-17 20:48:39 +01:00