Commit Graph

1107 Commits

Author SHA1 Message Date
Robert Kloefkorn
2a2b5b91de tests: added checks with Scalar=float. All tests compile with Scalar=float, but only
some work.
2016-01-14 17:28:07 -07:00
Robert Kloefkorn
92062f009c PengRobinson: make compile when Scalar is not double. 2016-01-14 17:27:44 -07:00
Robert Kloefkorn
c6c44acb4c LiveOilPvt/WetGasPvt: return value of vectorCopy is std::vector<double>. 2016-01-14 17:27:11 -07:00
Andreas Lauser
e468219af7 Merge pull request #107 from andlaus/fix_tables
fix the table handling code for live oil
2016-01-14 19:41:05 +01:00
Andreas Lauser
cf7d072399 remove some unneeded spaces 2016-01-14 19:35:21 +01:00
Andreas Lauser
890fdf54f7 fix the table handling code for live oil
the recent table refactoring replaced the compile-time-safe approach
to columns (i.e., table.getFooColumn()) by a generic method which
requires a magic cookie (i.e., table.getColumn("FOO")). Unfortunately,
this went belly-up with the viscosity column of the PVTO table (here
the magic constant is "MU" and not "MUO". Note that in this respect,
opm-parser is inconsistent w.r.t. the column of the formation volume
factor which is called "BO" and not "B".)

there were also some additional typos: the gas dissolution factor is
"RS" and the pressure of oil is "P".

It probably gets time to make the opm-core/opm-autodiff PVT code use
the stuff from opm-material so that this receives some run-time
testing with `flow` during development. (currently this is only used
by `ebos`...)
2016-01-14 19:33:39 +01:00
Joakim Hove
df618f43a6 Merge pull request #103 from joakim-hove/table-column
Using new table api
2016-01-08 15:29:04 +01:00
Joakim Hove
d8898a1c1a Update EclMateriallawmanager to use new Table api. 2016-01-08 14:35:23 +01:00
Joakim Hove
20310cdd81 Updated LiveOilPvt and WetGasPvt to new Table api. 2016-01-08 14:35:22 +01:00
Andreas Lauser
e2e05f53f6 Merge pull request #106 from andlaus/remove_asserts
EclEpsScalingPoints: Remove some spurious asserations
2016-01-05 12:10:46 +01:00
Andreas Lauser
24324e4e94 Merge pull request #105 from joakim-hove/remove-assert
Removed assert - allow nonzero min swat.
2016-01-05 12:08:17 +01:00
Joakim Hove
bc56a40992 Removed assert - allow nonzero min swat. 2016-01-05 12:02:22 +01:00
Andreas Lauser
10f2397c6a EclEpsScalingPoints: Remove some spurious asserations
these were added to make sure that the input data confirms to what is
required by the ECL documentation. It is better to do these
consistency checks externally, though. (and also not just in debug
mode.)
2016-01-05 12:00:39 +01:00
Atgeirr Flø Rasmussen
18f5863d4e Merge pull request #102 from andlaus/blackoil_API_refactor
Blackoil api refactor
2016-01-05 08:20:20 +01:00
Andreas Lauser
7068aa3669 fix clang-3.5 and GCC-4.9 extra-pedantic warnings
hopefully this fixes all of them. While doing this, I noticed that the
warnings produced by GCC 5 and GCC 4.9 differ. I did not try to
compile it with GCC 5, though.
2016-01-04 15:31:43 +01:00
Andreas Lauser
b515b9ddc0 remove some unneeded consts
they do not affect the result of the compilation and IMO just look
ugly. (I'm aware that there are other opinions.)
2016-01-04 15:31:38 +01:00
Andreas Lauser
b6bca92907 NcpFlash: change the default tolerances
for the most common case (i.e., Scalar == double) the previous method
lead to a tolerance of 10^-3 (relative) which is way too much if an
absolute tolerance of 10^-8 kg/(m^3*s) is required by the model.
2016-01-04 15:31:36 +01:00
Andreas Lauser
9c0fe9eb4c black-oil fluid system: some stylistic and comment cleanups 2016-01-04 15:31:34 +01:00
Andreas Lauser
8d1e470559 black-oil fluid system: some functional changes
- avoid the discontinuity between saturated and undersaturated
  hydrocarbon density and viscosity. This introduces a dependency of
  density and viscosity on the saturation of gas and oil which does
  not make much sense from a physical POV. (note that the dependency
  on the phase saturations was already there, but it was a
  discontinuous one, i.e., it dependeded on S_{o,g} > 0 instead of on
  S_{o,g})
- fixes for the fugacityCoefficient() method (it now also works for
  wet gas and dead oil, i.e., it avoids a division by zero for
  immiscible hydrocarbon phases.)
2016-01-04 15:31:32 +01:00
Andreas Lauser
91508eb6e1 black-oil fluid system: introduce black-oil specific variants of the methods
i.e., the PVT region index is passed directly to them and the
ParameterCache objects are not required. also:

- convert all methods to fluid states instead of passing the dependent
  parameters directly.
- do no longer encode the phase or component names in the method names
  of the fluid system.
2016-01-04 15:31:30 +01:00
Andreas Lauser
862f808e74 black-oil fluid system: introduce methods to convert Rs and Rv to their respective mass and mole fractions
going from Rs/Rv to the mole fractions is intentionally a bit clumsy
because it is relatively expensive computationally.
2016-01-04 15:31:28 +01:00
Andreas Lauser
5bf8cba955 Fluid systems: export the type which is used to represent scalar values 2016-01-04 15:31:25 +01:00
Andreas Lauser
8bb8864140 fix setting the live oil properties from the saturated quantities 2016-01-04 15:31:23 +01:00
Andreas Lauser
f1548f5c72 improve the API of the low-level blackoil PVT classes
- they are not concerned with fugacity anymore:
  - as a consequence, they are now more self contained:
    - they do not need to know the molar mass of each component anymore
    - they do not need to call methods of the other PVT classes
      anymore (that was only needed to be able to calculate the
      fugacity coefficients consistently.)
    - quite a few methods could be removed
- also, some methods where renamed for consistency.
2016-01-04 15:31:21 +01:00
Andreas Lauser
1a8d9a30c4 fix the LiveOilPvt w.r.t. setting the saturated viscosities from ECL input 2016-01-04 15:31:18 +01:00
Andreas Lauser
a9a648a667 make the API of the Spline class more similar to the Tabulated*Function classes 2016-01-04 15:31:16 +01:00
Atgeirr Flø Rasmussen
b5bc9b1324 Merge pull request #98 from andlaus/saturated_blackoil_PVT
Saturated blackoil pvt
2015-11-27 11:53:28 +01:00
Andreas Lauser
f89d3bab70 extend the PVT tables in the same way as the opm-core code 2015-11-26 15:29:06 +01:00
Andreas Lauser
e47db7cfca test the API of the black-oil fluid system more extensively
note that currently this only means that it compiles, correct runtime
behaviour is not (yet?) ensured.
2015-11-26 15:29:06 +01:00
Andreas Lauser
1d2ad56ba1 ConstantCompressibilityWaterPvt: calculate the viscosity the same way as the current opm-core code
this is *NOT* equivalent to the equation given by the ECL
documentation, but it makes it possible to compare it with the current
implementation. (also, the differences are pretty small: about < 10^-8
for SPE3.)
2015-11-24 18:13:32 +01:00
Andreas Lauser
f2d8a4e7a6 Tabulated1DFunction: Unify the code paths for local AD and scalars
this is analogous to 8a06000e which did the same for
UniformXTabulated2DFunction.
2015-11-24 18:13:32 +01:00
Andreas Lauser
126375db7d blackoil: introduce saturated{Oil,Gas}{Density,Viscosity}() methods and use them in the fluid system
this eliminates minor differences with the current opm-core PVT
classes which were due to extrapolation of the untersaturated
tables. (Also, the result should be slightly faster if both, oil and
gas are present.)

I'm not really sure if this is always a good thing, though: It implies
discontinuities at the saturated <-> undersaturated transition which
may sometimes deter convergence rates of the non-linear solver.
2015-11-24 18:13:32 +01:00
Andreas Lauser
b7b1d91c94 Merge pull request #100 from andlaus/some_fixes
Some fixes
2015-11-18 17:48:21 +01:00
Andreas Lauser
adb28d4a0e LiveOilPvt: get rid of a "local variable is unused" compiler warning
this only occured if the PVT object was not initialized via
initFromDeck().
2015-11-18 17:29:21 +01:00
Andreas Lauser
ce1a7b35c5 NcpFlash: catch Dune::FMatrixError by constant reference
the difference should not be detectable performance-wise but it is
better style to do it like this.
2015-11-18 17:28:15 +01:00
Andreas Lauser
49356ba0c4 NcpFlash: actually respect the tolerance and improve automatic tolerance determination
so far, the tolerance passed to the solve() method has been silently
ignored. Besides this, the approach to determine the tolerance if none
was given is changed and a negative value is used to indicate that the
tolerance should be determined automatically.
2015-11-18 17:25:17 +01:00
Andreas Lauser
ee67dfd176 geometricMean(): fix a most stupid bug
*meaculpa!*. so far, this did not matter because the geometricMean() function was
is not used within opm-material yet. (or rather the results are
ignored.)
2015-11-18 17:23:16 +01:00
Andreas Lauser
475ff74ad3 Merge pull request #96 from atgeirr/silence-warnings
Silence warnings from Dune includes.
2015-11-10 11:38:34 +01:00
Atgeirr Flø Rasmussen
b9b3a232c4 Silence warnings from Dune includes. 2015-11-10 11:11:24 +01:00
Andreas Lauser
2dfc2723a1 black-oil: prefix XoGToRs() and XgOToRv() with "convert"
this makes it consistent with the method naming scheme while keeping
the method names reasonably brief.

thanks to [at]atgeirr for the suggestion.
2015-11-09 14:51:29 +01:00
Andreas Lauser
ee91d9aad4 blackoil PVT: convert the gas PVT interface to use Rv instead of XgO 2015-11-04 14:21:54 +01:00
Andreas Lauser
925c176477 black oil PVT: use Rs to specify the composition of the oil phase
IMO, the gas mass fraction is more natural, but given the fact that
E100 is all about Rs, this simplifies using opm-material's PVT
relations in opm-autodiff.
2015-11-04 14:21:54 +01:00
Andreas Lauser
8f5093aa2f Merge pull request #93 from andlaus/fix-test_2dtables
fix a test failure for the 2D tables test
2015-10-29 14:36:34 +01:00
Andreas Lauser
2f68011270 fix a test failure for the 2D tables test
this was caused by trying to get a value outside of the tabulated
region. for some reason I do not fully understand, this did not
trigger until now...
2015-10-29 13:54:37 +01:00
Andreas Lauser
812f556e97 Merge pull request #77 from blattms/redistribute-EclMaterialLawManager
Give access to the shared_ptr of the parameters.
2015-10-28 11:51:01 +01:00
Andreas Lauser
8f63cb9d70 Merge pull request #91 from andlaus/compile_without_opm-parser
make it compile again if opm-parser is not available
2015-10-27 12:31:27 +01:00
Andreas Lauser
76e31b3323 make it compile again if opm-parser is not available
this is basically a simple #if HAVE_OPM_PARSER which was forgotten...
2015-10-27 12:28:03 +01:00
Andreas Lauser
e1088c8a3f Merge pull request #90 from akva2/add_fuzz
fix for tests
2015-10-26 11:47:23 +01:00
Arne Morten Kvarving
ce972c003a fix for tests
add some fuzz to make them pass on other archs
2015-10-26 11:16:45 +01:00
Andreas Lauser
351c8ac775 Merge pull request #81 from andlaus/fix_stone1
Fixes for the stone1 ECL material law
2015-10-26 11:10:08 +01:00