Commit Graph

41 Commits

Author SHA1 Message Date
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
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
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
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
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
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
45da261142 move the '&' of references and the '*' of pointers to the type name
i.e., the new-style is `TypeName& var` instead of
`TypeName &var`. this patch is analogous to part of OPM/ewoms#83.
2017-01-18 17:57:54 +01:00
Andreas Lauser
19f1a27447 place the OPM_UNUSED macro after the variable name
this is analogous to OPM/ewoms#134.
2017-01-18 17:55:58 +01:00
Jørgen Kvalsvik
2532f1e56e Update to shared_ptr-less parser interface. 2016-10-13 14:49:48 +02:00
Andreas Lauser
30d3b68df4 implement the E100 VAPPARS keyword
this is yet another crazy Eclipse hack: it prevents the dissolved
component to be fully assimilated by solvent phases if the maximum oil
phase saturation seen during the simulation stays below a given
limit...
2016-07-05 17:16:58 +02:00
Andreas Lauser
9bbe67d19f rename "LocalAd" to "DenseAd"
Since "dense automatic differentiation" describes what this code is
all about much better in my opinion. ("Local AD" is just a possible
use case in the context of PDE discretization.)
2016-06-03 21:28:45 +02:00
Andreas Lauser
47c3d11403 Evaluation<>: remove the concept of "tags"
In my recent experience it did more harm than good: tags often made
the compiler errors mucht longer and more unreadable, and I have not
encountered a single instance where they were really helpful...
2016-04-17 11:40:59 +02:00
Andreas Lauser
8679d3a23c initialize MPI for all unit tests
This started to cause crashes for me. I don't really have an idea why,
but it is not too bad of a thing to do anyway...
2016-04-17 11:28:06 +02:00
Andreas Lauser
da401551be clean up the licensing preable of source files
this patch removes the in-file lists in favor of a global list of in
the COPYING file. this is done because (a) maintaining a list of
authors at the beginning of each source file is a major pain in the
a**, (b) for this reason, the list of authors was not accurate in
about 85% of all cases where more than one person was involved and (c)
this list is not legally binding in any way (the copyright is at the
person who authored a given change; if these lists had any legal
relevance, one could "aquire" the copyright of the module by forking
it and replacing the lists...)
2016-03-15 00:58:09 +01:00
Andreas Lauser
20c78f5757 test_fluidsystems: improve the naming of the template arguments of the test functions 2016-02-12 18:43:15 +01:00
Andreas Lauser
abc0caea7a black-oil PVT: provide inverse formation volume factors
this makes things go less in circles: before this patch, the
interpolation happened on the inverse formation volume factors, the
PVT classes inverted the result to get the FVF and then the calling
code divided by what fell out of this. Now, the calling code can
directly multiply with the result of the interpolation.
2016-01-29 19:42:09 +01:00
Andreas Lauser
fa5a2f66a1 make the meat of the unit tests for fluid states and fluid systems available publicly 2016-01-29 19:27:52 +01:00
Andreas Lauser
54cb64bcb0 enable testing for Scalar == float for all unit tests
for some unit tests the precision of `float` is insufficient. To at
least enforce that the tested code compiles with `float` as Scalar,
they are wrapped by `while(false)` statements.
2016-01-15 16:07:40 +01:00
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
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
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
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
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
Atgeirr Flø Rasmussen
b9b3a232c4 Silence warnings from Dune includes. 2015-11-10 11:11:24 +01:00
Andreas Lauser
731d2fccf1 various improvements
- add unit tests for the EclMaterialLawManager and the black-oil PVT classes
- rework the API of the blackoil PVT classes so that it follows the
  initFromDeck() pattern and uses multiplexer classes instead of
  dynamic polymorphism to select the concrete PVT approach
- the former change allowed to use the BlackOil fluid system with
  arbitrary Evaluations, i.e., it is not limited to a single
  Evaluation class which is specified as a class template argument
  anymore.
- more fixes for GCC and clang warnings. now it should be reasonably
  hard to trigger warnings using these compilers.

this commit squashes the following patches:

- add a unit test for the EclMaterialLawManager
- black oil: simplify the WaterPvtInterface
- add a unit test for the PVT classes of the black oil fluid system
- black oil: improvements to the PVT classes
- blackoil PVT: remove dynamic polymorphism
2015-09-29 14:09:19 +02:00
Andreas Lauser
a6499a01aa fix most of the warnings enabled by masochists
most of these people like to inflict pain on themselfs (i.e., warnings
in their own code), but they usually don't like if pain is inflicted
on them by others (i.e., warnings produced by external code which they
use). This patch should make these kinds of people happy. I'm not
really sure if the code is easier to understand with this, but at
least clang does not complain for most of the warnings of
"-Weverything" anymore.
2015-09-23 12:36:52 +02:00
Andreas Lauser
7cbffc22c6 introduce SimpleModularFluidState and make ModularFluidState not depend on the FluidSystem anymore
it is called "simple" because the usage is somewhat simpler: The
quantities are stored and those which are not can be specified using
simple boolean template arguments instead of having to pass the class
names of the storage modules. The definition of the class is quite a
bit more involved than the non-"simple" variant, though.
2015-07-28 17:24:27 +02:00
Andreas Lauser
99a61df00a re-add the vim and emacs modelines
conceptually, this may not be the purest conceivable solution, but it
is the most practical one.
2015-06-18 13:47:26 +02:00
Andreas Lauser
26c8553902 make all fluid systems local-AD aware
also, adapt the unit test make sure they can be used synchronously
with function evaluations as well as scalars.
2015-05-21 15:33:16 +02:00
Andreas Lauser
e009e640c5 make the fluid states ready for the local-AD framework
in fact they wouldn't have needed any modification, but returning
constant references instead of copies of the stored values saves quite
a few calls to copy constructors.

besides this, fluid states are now required to export the 'Scalar'
type, which allows to use it outside of the FluidState without
resorting to the c++ 'decltype' construct.
2015-05-21 15:33:14 +02:00
Andreas Lauser
5b08de4244 incorperate all infrastructural classes required into opm-material itself
they used to be in opm-core, but this allows to be more flexible with
the dependency order: What's now called "opm-core" can easily depend
on opm-material which might come in handy for the refactoring.

Besides moving in classes from opm-core, the infrastructural code
which was still in opm-material is moved to the directory
opm/material/common. The intention is to collect these classes at a
central location to make it easy to move them to a real "core" module.
(if this is ever going to happen.)
2015-04-28 12:17:49 +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
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
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
249592a57d fix the screw-ups caused by a0101ee 2013-12-03 12:13:53 +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
19db7481fd Cosmetic change: remove the subdirectories for sources of the tests
that was a leftover of eWoms/Dumux...
2013-11-11 13:23:55 +01:00