Commit Graph

3992 Commits

Author SHA1 Message Date
Joakim Hove
ad73015cb9 Using new function well_controls_invert_current(). 2014-01-06 12:08:29 +01:00
Joakim Hove
fdf7bdba85 Added new functions to set target and type and invert value of current control. 2014-01-06 12:06:36 +01:00
Joakim Hove
85984a72e4 Changes test_wells to use well_controls_get_xxx() functions. 2014-01-06 10:34:25 +01:00
Joakim Hove
9d9c6a5676 Changed test_wellsmanager to use well_controls_get_xxx() functions. 2014-01-06 10:26:46 +01:00
Joakim Hove
1462952511 Using well_controls_get_num() and well_controls_get|set_current() in WellsManager 2014-01-06 10:12:11 +01:00
Joakim Hove
0b37bdd1ec Temporarily added symbol HAVE_WELLCONTROLS before including well_controls.h - to get acces to the internal elements in struct WellControls. 2014-01-05 16:25:31 +01:00
Joakim Hove
5ef171b212 Reimplemnted struct WellControls access to use the set/get functions in well_controls.c 2014-01-05 16:23:22 +01:00
Joakim Hove
49f6ff9791 Added well_controls_get_xxx() and well_controls_set_xxx() functions. The well_controls_reserved() function is called from well_controls_add() and not explicitly. 2014-01-05 16:22:30 +01:00
Joakim Hove
35d46225b8 Removed #include <opm/core/well_controls.h> from wells.h and inserted explicit #include <opm/core/well_controls.h> where needed. 2014-01-05 15:03:30 +01:00
Joakim Hove
f4142899b3 Removed struct WellControlManagement and replaced with simple integer field cpty in the WellControls structure. 2014-01-05 14:54:56 +01:00
Joakim Hove
76deba58bd Moved well_controls implementation to separate file well_controls.c. 2014-01-05 14:47:15 +01:00
Joakim Hove
e75552750a Extracted everything related to well controls to separate header well_controls.h - to simplify introducing new parser. 2014-01-03 16:04:12 +01:00
Joakim Hove
61ec55403a Added test calls to wells_equal() and well_controls_equal(). 2014-01-03 16:01:15 +01:00
Joakim Hove
35b371dfa9 Added test_wellmanager which loads wellmanager from deck and tests many values. 2014-01-03 16:00:57 +01:00
Kristian Flikka
fd942e347d Implementation (not finished) of wells_equal, well_controls_equal, and tests. To build a WellsManager test for old and new parser
Conflicts:
	CMakeLists_files.cmake
2014-01-03 16:00:10 +01:00
Bård Skaflestad
b280af372b Merge pull request #449 from andlaus/fix_guard_macro
fix typo in guard macro of fsh.h
2013-12-16 05:52:18 -08:00
Andreas Lauser
b660419992 fix typo in guard macro of fsh.h
on CLang 3.4 svn this produced

```
/home/erne/src/opm-core/opm/core/pressure/fsh.h:20:9: warning: 'OPM_FSH_HEADER_INCLUDED' is used as a
      header guard here, followed by #define of a different macro [-Wheader-guard]
```

which is correct...
2013-12-15 18:10:27 +01:00
Bård Skaflestad
3528c1e988 Merge pull request #447 from akva2/add_rho
added: nonstandard 'RHO' field in eclipse grid parser
2013-12-12 03:54:24 -08:00
Arne Morten Kvarving
f1ba3d4b70 added: nonstandard 'RHO' field in eclipse grid parser
note that as this is a nonstandard field, there is no unit conversion
handling. use with caution
2013-12-12 12:43:30 +01:00
Bård Skaflestad
ee22e22897 Merge pull request #446 from andlaus/propertysystem_fixes
Property system: some simplifications and bugfixes
2013-12-11 09:15:48 -08:00
Andreas Lauser
34e26ae5bc Property system: some simplifications and bugfixes
this simplifies the template meta programming a bit. (Which does not
mean that it suddenly gets easy.) The main motivation for this work is
to make the splices feature work properly which allows eWoms to
properly select the spatial discretization at any point.

Further, the number of type tags a node can inherit from now is truely
unlimited thanks the the generic tuple reversal class provided by
https://sydius.me/2011/07/reverse-tuple-in-c/ . (before, the maximum
number of nodes from which a type tag could inherit was 11, so this
limitation did not really matter in practice.)
2013-12-11 17:26:24 +01:00
Bård Skaflestad
1871fe49ea Merge pull request #445 from rolk/445_asneeded
Only add linker option if it is not really there
2013-12-10 12:47:58 -08:00
Roland Kaufmann
ee7f4242b5 Only add linker option if it is not really there
This code is run unconditionally each time we do a reconfigure; if the
option is added at each time, they will accumulate (needlessly) on the
command-line, making it harder to inspect the log.
2013-12-10 21:01:22 +01:00
Bård Skaflestad
6c53185cf5 Merge pull request #444 from rolk/444_autodiff
Allow opm-autodiff to be used as a prerequisite
2013-12-06 15:43:34 -08:00
Roland Kaufmann
a9e71c0d84 Provide CMake find module for opm-autodiff
If the module root is not explicitly specified, the loading of its
configuration is delegated to a find module, which does a heuristic
search in known/surrounding directories. Most OPM modules use the
common logic in OpmPackage; this patch configures the search
specifically for opm-autodiff.
2013-12-06 23:31:57 +01:00
Roland Kaufmann
a62e2f4770 Search after new Eigen3 versions in sibling dirs
If we have checked out a newer Eigen3 directory in a sibling directory
to ours, assume that this is because the system version is obsolete and
that we want to use this one instead.
2013-12-06 23:26:57 +01:00
Roland Kaufmann
7d75c4f058 If given build tree as Eigen3 root, find source
Eigen3 is a template-library, so we must compile the source code
directly together with ours instead of linking to a library.

If the build script gives us the location of a "built" Eigen3,
meaning a directory in which CMake has been run, locate the true
source directory from the cache entries.
2013-12-06 23:26:37 +01:00
Atgeirr Flø Rasmussen
32af6d0cf2 Merge pull request #442 from bska/match-reference/properties
Synchronise Initialisation, Saturation Functions and PVT Models with MRST and ECLIPSE
2013-12-04 00:48:26 -08:00
Bård Skaflestad
9e1e50d159 Switch condition interface to phase presence facility
Commit a5a4d7b introduced density and viscosity evaluators into the
SinglePvtInterface that accepted an externally assignable condition
to distinguish saturated from unsaturated cases.  As a result of a
few low-level technical problems with that approach, this commit
changes those affected interfaces to use the black-oil specific
'PhasePresence' facility of commit a033329 instead.

Update tests and callers accordingly.

Suggested by: @andlaus
Approved by:  @atgeirr
2013-12-03 16:12:52 +01:00
Bård Skaflestad
a033329b14 Add a facility for checking/assigning presence of free phases
This is intentionally black-oil specific because we presently do no
know how to handle other cases (e.g., more phases or number of phases
different from number of components).
2013-12-03 15:56:18 +01:00
Bård Skaflestad
ee456f9851 Include <limits> for std::numeric_limits<> template 2013-12-03 15:52:07 +01:00
Bård Skaflestad
b92e120da0 Sort headers into logical groups.
This is an aesthetic-only change.
2013-12-03 15:43:06 +01:00
Bård Skaflestad
1b1f50ac45 Merge branch 'mrst' of github.com:totto82/opm-core into match-reference/properties 2013-12-03 15:17:16 +01:00
Bård Skaflestad
fd8f2e369f Merge pull request #424 from rolk/424_eclbin
Refactor BlackoilEclipseOutputWriter.
2013-12-02 04:57:27 -08:00
Roland Kaufmann
392c6b3892 Actually use transformation function that was passed 2013-11-28 19:34:47 +01:00
Tor Harald Sandve
a5a4d7ba39 Added functions for b and mu with isSaturated as input.
Functions for volume factor and viscosity that explicitly take a boolean
variable indicating whether the fluid is saturated or not is added to
the SinglePvtInterface.

Corresponding changes are done in the dependent PVT files.

The new functionality is tested in test_blackoilfluid
2013-11-28 15:56:17 +01:00
Tor Harald Sandve
78301dbc6d Change name to initBlackoilStateFromDeckUsingRS
The second input of initBlackoilStateFromDeck that computes surface
volumes based on gas/oil ratio is changed from
BlackoilPropertiesInterface to Props. To avoid duplication with the old
initBlackoilStateFromDeck its name is changed to
initBlackoilSurfvolUsingRS.
2013-11-28 15:56:17 +01:00
Tor Harald Sandve
dd20f9715f Compute initial saturations from surface volumes
Add new function is added that computes saturation from surface volumes
solving z = As for each cell. This function is used to compute an
intial guess to the saturations in initState_impl.hpp.
2013-11-28 15:56:17 +01:00
Tor Harald Sandve
1d3be7b85a Equality is now treated as saturated
The calculated gas resolution factor is compared to
the tabulated resolution to check wether the oil is saturated
or not. The new test judges equality as saturated. This
is cruscial as the gas resolution is set to equal the tabulated value
for the saturated case in the appleyard process.
2013-11-28 15:56:17 +01:00
Tor Harald Sandve
f7857a51a8 Changes in the 3p relperm definition
The relperm of water and gas is now evaluated at the water and gas
saturation, respectivly. The relperm of oil is still a combination of
the the 2p relperm of water/oil and oil/gas.
2013-11-28 15:56:17 +01:00
Tor Harald Sandve
f36a27595f Changes releative permeability to synch with Mrst
The derivative of the relative permeability at the minimum saturation
are no longer zero
2013-11-28 15:56:17 +01:00
Roland Kaufmann
7eeb381f45 Fix grammatical error in comment 2013-11-28 11:37:39 +01:00
Roland Kaufmann
039e549033 Allow sequentially layed out arrays to be indexed
If we want to index into two arrays that has been concatenated (for
instance oil phase pressure continuously, then water phase pressure
continuously), then this variant (courtesy of @bska) will cover both
variants (intermixed striding (where offset < stride) and sequentially
striding (where offset > stride)).
2013-11-28 11:10:52 +01:00
Roland Kaufmann
a997c17a51 Offset is irrelevant for the number of records
We are interested in how many records there are, since we extract one
item per record. The offset is just used to index into each record, and
doesn't affect the total number of records.
2013-11-28 01:04:03 +01:00
Roland Kaufmann
a0a574b01a Use the previous step length to calculate historic rate 2013-11-27 00:37:40 +01:00
Roland Kaufmann
8e95f522bf Provide routine to return the step length taken
The output routine needs to know which step that has been taken in the
past (to arrive at this result), not which step to take next going
forward.
2013-11-27 00:36:17 +01:00
Roland Kaufmann
9cba2591e9 Do without the timestep index adjustment
If the output routines are called at the right place in the simulator,
then the numbering scheme coincide with that of Eclipse, and no
adjustments are necessary.
2013-11-27 00:24:30 +01:00
Roland Kaufmann
ee78a79316 Replace unclear constant with better documentation
The step number is zero before the first timestep has been taken, and
one after. The step number is one before the second timestep has been
taken, and two after. This was not clear from the text.
2013-11-27 00:23:00 +01:00
Roland Kaufmann
e6c77c8afb Report after the timestep really is completed
If we report before we increment the timer, then we will report at
a time which is at the beginning and not at the end of the timestep.
2013-11-27 00:04:45 +01:00
Roland Kaufmann
57beb1c279 Don't write initial state in main timestep loop
The call to writeInit should take care of this instead.
2013-11-26 23:54:30 +01:00