Commit Graph

1249 Commits

Author SHA1 Message Date
Bård Skaflestad
a612d2c96f Restore gravity effects
The refactorisation of class FullyImplicitBlackoilSolver<Grid> to
defer transmissibility and pore-volume calculation to the client in
order to support multipliers (net-to-gross &c) accidentally ended up
removing all effects of gravity.  This commit restores those effects.
2014-07-29 19:49:50 +02:00
Bård Skaflestad
167ed55b86 Merge pull request #172 from GitPaean/Fixing_including_iss170
Adding ErrorMacros.hpp to GeoProps.hpp
2014-07-29 12:43:00 +02:00
Kai Bao
2ac5146cfc Adding ErrorMacros.hpp to GeoProps.hpp
#include <opm/core/utility/ErrorMacros.hpp>
2014-07-29 11:40:52 +02:00
Bård Skaflestad
b98b71e401 Merge pull request #166 from andlaus/implement_multipliers
Implement pore volume and permeability multipliers
2014-07-28 14:38:56 +02:00
Andreas Lauser
faa98b4f74 add a unit test for the implementation of transmissibilty multipliers in DerivedGeology
for the legacy C-style grid the unit test is more or less complete (it
does not test FAULTMULT and NNC, etc, but these could be added with
sufficient determination), for Dune::CpGrid it currently does not
really check anything because I have not found a good way for CpGrid
to produce the "global" intersection index of an intersection...
2014-07-28 11:30:13 +02:00
Andreas Lauser
e07ef16a45 implement pore volume and transmissibility multipliers
this means that the NTG, MULTPV and MULT[XYZ]-? keywords are now
supported.

Actually FAULTS and MULTFAULT are supported too, but that's abstracted
away by opm-parser's TransMult class. (Kudos to [at]joakim-hove for
implementing this.)
2014-07-28 11:30:13 +02:00
Kai Bao
eb3445e6a1 Finishing compliation. 2014-07-27 17:31:00 +02:00
Kai Bao
1e8d5e65b7 Finishing changing. Testing Later 2014-07-25 19:13:23 +02:00
Kai Bao
013e4e452a Merge remote-tracking branch 'upstream/master' into New_BLACKOIL_SIMULATOR 2014-07-25 15:56:52 +02:00
Kai Bao
8da842d1f3 Commit for saving. 2014-07-24 17:06:43 +02:00
Andreas Lauser
63eaecf246 DerivedGeology: pass the EclipseState object to its constructor
this is required to implement pore volume and permeability multipliers
as discussed with [at]bska and [at]joakim-hove.

Note that this implies that the DerivedGeology class can't be
instantiated anymore if there is no EclipseState object. Thus all code
paths and tests that don't load a deck are removed by this patch. If
this is undesireable, there are two options: First, don't require
EclipseState for DerivedGeology which would imply to make the about 10
required multiplier functions part of the
BlackoilPropertiesAdInterface, or second, one can copy-and-paste the
DerivedGeology class as it was before this patch, derive from a newly
introduced DerivedGeologyInterface and pass DerivedGeologyInterface
objects to the simulator. IMHO, the second solution would be a bit
better but it would involve substantial overhead to implement and to
maintain it.

Anyway, in the mean time simulators cannot be instantiated without
decks.
2014-07-24 16:37:38 +02:00
Andreas Lauser
543d8d75b6 pass the DerivedGeology to the simulators
this was decided to be a good idea by [at]bska. (If I interpreted him
correctly, obviously.)
2014-07-24 16:37:38 +02:00
Bård Skaflestad
d2b529296f Merge pull request #169 from atgeirr/update-condition
Update phase condition vector from primary variables.

This resolves #168.
2014-07-23 18:13:30 +02:00
Atgeirr Flø Rasmussen
1faf5da05b Added test to ensure active gas phase. 2014-07-23 11:41:06 +02:00
Joakim Hove
99f1620963 Merge pull request #167 from andlaus/do_not_pass_shared_ptr_to_EclipseWriter
pass a reference to the UnstructuredGrid to EclipseWriter instead of a shared_ptr
2014-07-18 11:51:31 +02:00
Andreas Lauser
8645d2c207 pass the EclipseState and the PhaseUsage objects to EclipseWriter 2014-07-18 11:22:28 +02:00
Atgeirr Flø Rasmussen
92f20c6040 Update phase condition vector from primary variables.
This is necessary as an interim measure, since the phase condition vectors are
still used in property calculations.
2014-07-17 14:34:07 +02:00
Andreas Lauser
6727fe28fe adapt construction of to EclipseWriter
i.e., don't pass around the UnstructuredGrid object directly, but use
the "generic" interface which is also used in the case Dune::CpGrid.
2014-07-14 17:55:30 +02:00
Bård Skaflestad
263e337136 Merge pull request #165 from andlaus/test_for_extended_std__regex
use extended regular expressions in the test for std::regex
2014-07-08 13:40:22 +02:00
Andreas Lauser
9169bee053 use extended regular expressions in the test for std::regex
for some compilers (e.g., GCC < 4.9) the default is buggy and
opm-parser thus uses extended expressions...

thanks to [at]bska for digging this up!
2014-07-08 13:24:34 +02:00
Bård Skaflestad
9acd5840c3 Merge pull request #164 from andlaus/use_std__regex_if_available
FindCXX11Features: check for a usable std::regex
2014-07-07 23:02:32 +02:00
Andreas Lauser
4e298bb4f9 FindCXX11Features: check for a usable std::regex
and add a config.h variable in the opm-parser test.
2014-07-07 17:58:07 +02:00
Atgeirr Flø Rasmussen
cc4504c405 Merge pull request #159 from bska/fix-gpot
Fix one-sided gravity potential calculation
2014-07-07 15:36:41 +02:00
Atgeirr Flø Rasmussen
23739ea009 Merge pull request #158 from osae/equil
Include EQUIL-based inititalisation for 3-phase.
2014-07-07 15:29:44 +02:00
Atgeirr Flø Rasmussen
9314b3e50a Merge pull request #146 from bska/nphase
Fix a few two-phase implementation errors
2014-07-07 14:44:55 +02:00
Bård Skaflestad
1257c03d26 Fix one-sided gravity potential calculation
Commit 5112b8a misinterpreted the role of index 'i' and, as a result,
installed code that would only define one-sided gravity potentials of
the first cell (roughly)--albeit eventually using the geometry of the
last active cell.

This commit restores the original, intended behaviour.
2014-07-03 00:27:39 +02:00
Bård Skaflestad
a5d3017062 assemble: Fix out-of-bounds indexing
The 'material_balance_eq' is indexed by active, not canonical, phase
indices.  Replace 'Oil' and 'Gas' with the appropriate 'phase_pos'
values.
2014-07-03 00:27:18 +02:00
Bård Skaflestad
78b87b8857 variableState: Don't form objects when references suffice
There's no need to form new objects, especially for the 'xvar', when
there are existing objects to which read-only references can be
bound.
2014-07-03 00:27:17 +02:00
Bård Skaflestad
eccc5c9694 variableState: Use pre-computed list of "all cells"
Class FullyImplicitBlackoilSolver<Grid> already features a list of
"all" cells, built at object construction time.  There's no need to
re-compute that list on every call to variableState() (when Gas is
active).
2014-07-03 00:27:17 +02:00
Bård Skaflestad
f69530a7d4 variableState: Defer r{s,v}Sat calculation
Quantities rsSat and rvSat are not needed unless we have an active
Gas phase.  Don't calculate them until we know that they are
actually needed.
2014-07-03 00:27:17 +02:00
Bård Skaflestad
35d883319b variableState: Don't reference non-existing variable
The "xvar" exists only if Gas is active.  Therefore, we cannot
extract that variable from "vars" unless we know that Gas is an
active phase.  Failing to do so would wrongfully increment 'nextvar'
whence the final BHP variable would be an out-of-bounds access.
2014-07-03 00:27:17 +02:00
Bård Skaflestad
13d3a42448 Fix phase property references
Methods 'computeRelperm()' and 'computePressures()' *always* return
a three-element vector of phase properties.  We must therefore
translate to canonical phase indices before indexing into the
results.
2014-07-03 00:27:17 +02:00
Atgeirr Flø Rasmussen
390bb2b3f1 Merge pull request #162 from andlaus/sync_Findopm-parser.cmake
Sync findopm parser.cmake
2014-07-02 11:38:08 +02:00
Andreas Lauser
af60949051 add the boost::regex library as a prerequisite
this is required for regex-matching keywords. Once GCC 4.9 is the
minimum compiler version to be supported, this can be dropped in favor
of std::regex ...
2014-07-02 11:25:57 +02:00
Andreas Lauser
5cdece9e3e Findopm-parser.cmake: Fix it up, next try
thanks to Arne Morten Kvarving, Bård Skaflestad and Roland Kaufmann
for the discussion.
2014-07-02 11:24:14 +02:00
osae
24506cc637 Include EQUIL-based inititalisation for 3-phase. 2014-06-26 15:11:34 +02:00
Atgeirr Flø Rasmussen
caa49bf3ce Merge pull request #155 from bska/154_cmake
Synchronise build system with OPM-Core
2014-06-17 08:37:44 +02:00
Arne Morten Kvarving
132657e478 added: hook for conditionally compiled files
backport from opm-upscaling PR#100
2014-06-16 15:53:01 +02:00
Bård Skaflestad
c5bbf19fce Disable search for Boost in parser detection
This changeset disables the effect of commit 778e87d.  There appears
to be an unforeseen interaction between the calls to

    Find_Package (Boost)

that are implied by module 'opm-parser-prereqs.cmake' and the one
that's directly invoked in 'Findopm-parser.cmake'.  Until the
situation can be fully analysed and a complete solution implemented,
this is a temporary measure to restore the build of opm-core and
downstream OPM modules.
2014-06-16 15:50:21 +02:00
Andreas Lauser
778e87d710 Findopm-parser.cmake: invoke FindBoost unconditionally
even if boost was found previously, it might still miss a few
libraries. thanks to @akva2 for catching this.
2014-06-16 15:50:02 +02:00
Andreas Lauser
d530dcfe17 Findopm-parser.cmake: make sure that the ERT libraries are available
and some other minor cleanups to the module. For me it still works,
but this being the build system, I can't guarantee more...
2014-06-16 15:50:01 +02:00
Andreas Lauser
99b4cf5067 allow the opm-parser test to fail
since the module currently calls the tests for cJSON and boost with
the REQUIRED flag set, cmake aborts completely even if opm-parser is
not REQUIRED. For modules which depend on opm-core that's currently a
non-issue because core has a requirement on parser, but the parser may
be useful for external projects as well, so we play nice.

Also, with this patch the config.h variable HAVE_OPM_PARSER is set...
2014-06-16 15:50:00 +02:00
Bård Skaflestad
9006824822 Merge pull request #153 from andlaus/fix_sim_fibo_ad_cp
sim_fibo_ad_cp: make it compile
2014-06-14 14:13:26 +02:00
Andreas Lauser
7c767e8686 sim_fibo_ad_cp: make it compile
The constructor for the simulator class changed recently...
2014-06-13 18:07:51 +02:00
Alf Birger Rustad
2ffaeae466 Merge pull request #144 from totto82/primalvariable
Refactor primary variable switching
2014-06-13 16:18:51 +02:00
Tor Harald Sandve
02ce468c01 Support Oil/Water case
The updatePrimalVariableFromState is now only called when
the gas phase is active.
2014-06-13 14:44:21 +02:00
Tor Harald Sandve
3e3b39df07 Introduce primaryVariable_ and use it to switch primary variables 2014-06-13 14:31:40 +02:00
Tor Harald Sandve
8a600747fa Read DISGAS and VAPOIL from deck and pass them to the simulator 2014-06-13 14:29:52 +02:00
Bård Skaflestad
aecfa3ed50 Merge pull request #150 from andlaus/enable_property_modifiers
glue in support for property modifiers
2014-06-11 22:46:36 +02:00
Alf Birger Rustad
4f777f9f41 Merge pull request #151 from andlaus/include_array
explicitly include <array>
2014-06-10 12:23:13 +02:00