Commit Graph

3967 Commits

Author SHA1 Message Date
Roland Kaufmann
e79a65bb81 Terminology instead of Notation as section header
Notation implies that we are going to be given symbols which
represents values or such (which arguably could be true since the
path is a particular value, and from programming we are used to
multi-letter symbols perhaps also with whitespace, but it's a
stretch), but Terminology is more accurate, as this section
describes fits the definition better: it is a vocabulary of
technical terms.

Hat tip: @bska
2014-01-15 09:08:00 +01:00
Roland Kaufmann
d5a3db50c5 Document modules and structures in the build system
Give a brief description of each of the modules that comprises the build
system, and the suffices that is used to form a virtual structure of
variables for each project.
2014-01-14 21:14:17 +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
Roland Kaufmann
9bcb7aed30 Convert permeability to milli-Darcy when writing 2013-11-26 23:43:58 +01:00
Roland Kaufmann
d62226dd3c Introduce conversion function to avoid explicit copy
We already copy the data once from the OPM state into the ERT-managed
memory, so we may as well fudge a conversion routine in there (at the
expense of having to do this everywhere).
2013-11-26 23:22:25 +01:00
Roland Kaufmann
c3e0b83927 Write initial solution when the writer is initialized 2013-11-26 22:34:42 +01:00
Roland Kaufmann
7e349636c1 Propagate initial state to the writer as well
The writeTimeStep method is called *after* each timestep and does
not include the initial state of the reservoir. If the writer wants
to dump the initial state of the reservoir, this must be done in
writeInit, which is called before the simulator is run, but after
the initial state has been set up.
2013-11-26 22:34:42 +01:00
Roland Kaufmann
1c0051b40e Factor out code that writes solution field variables
We will reuse this later for also writing the initial solution.
2013-11-26 22:34:42 +01:00
Roland Kaufmann
e7da0053cf Allow timestep index to be overridden
The Eclipse timestep index can not always be retrieved from the
SimulatorTimer object; the initial state is 0 in Eclipse (and does not
have an index in OPM), and the timestep in OPM is not increased until
*after* the timestep is completed (i.e. it is not initialized to -1).
2013-11-26 22:34:42 +01:00
Roland Kaufmann
be7fd164b8 Don't write latest timestep twice for skipped report
If the simulator skips a reporting timestep, the latest timestep
should not be written twice to compensate (!).
2013-11-26 14:08:18 +01:00
Roland Kaufmann
7e2950f1dc Write the field data for the initial timestep 2013-11-26 14:08:18 +01:00
Roland Kaufmann
6becc16567 Don't use the wrong index for the timestep 2013-11-26 14:08:17 +01:00
Roland Kaufmann
f272f54e56 Make starting timestep more explicitly known
One-based or zero-based? Better be documented (in a way that doesn't
promote hard-coding in the clients!)
2013-11-26 12:44:37 +01:00
Roland Kaufmann
d15056be11 Added comment about header/data for each timestep
We would like to build up and write the header only once (with
ecl_sum_fwrite_smspec) and then the data for each timestep (with
ecl_sum_fwrite_step), but since the data attach to the summary
object and so does the header, how do we keep the header in memory
without also accumulating all the data?
2013-11-26 12:28:56 +01:00
Roland Kaufmann
bf19e48e67 Add virtual destructor to avoid memory loss upon free 2013-11-26 11:40:37 +01:00
Roland Kaufmann
a145c7489f Use forward list since we don't need random access 2013-11-26 11:19:39 +01:00
Roland Kaufmann
d67088b15d Let timestep and well report be owned by summary
Instead of calling the destroy functions for the timestep and well
report objects, the ERT memory allocated for these are contained in
the summary handle and freed together with that.

The timestep and well report objects thus becomes only views into this
memory; it is no longer allowed for these to outlive the summary section
(not that this was ever sensible in the first place).
2013-11-26 10:46:10 +01:00
Roland Kaufmann
e806be8f83 Setup a new summary section for each timestep
Although this will lead to parsing the same input data over and over
again (setting up the smspecs for the wells), the summary files contain
this redundant information because in Eclipse, wells can appear and
disappear during the run.
2013-11-26 10:16:30 +01:00
Bård Skaflestad
b59145e765 Merge pull request #440 from andlaus/fix_shellcheck_warnings
configure: fix all except one warning produced by shellcheck
2013-11-25 08:37:38 -08:00
Andreas Lauser
59e234b4d9 configure: fix all except one warning produced by shellcheck
thanks to @bska for pointing this tool out!
2013-11-25 14:51:59 +01:00
Roland Kaufmann
aff6fad661 Use more generic simulator state
We can dump the state of the two-phase incompressible simulators as
well as the blackoil simulators by just using the common interface.
2013-11-25 14:14:51 +01:00
Roland Kaufmann
754ff4c2ee Use std namespace for div function
Although GCC 4.6.3 implements div by including stdlib.h (where
everything is put in the global namespace), and then importing these
into std, not every compiler does this (one could for instance think
that in #include <stdlib.h> inside the namespace).
2013-11-25 14:14:50 +01:00
Roland Kaufmann
f45f7d19a0 Don't copy data needlessly 2013-11-25 14:14:50 +01:00
Roland Kaufmann
f83d581e42 Correct number of elements taken from strided arrays
If we have a stride > 1, then we take fewer elements from the array;
the old code would fill in a bunch of unrelated data at the end.
2013-11-25 14:14:50 +01:00
Roland Kaufmann
06fffedc4f Revert "Data copying takes an iterator"
The original rationale for commit c39d367 was to pass a pointer since
this was all we got from one of the APIs. However, just after the code
was changed to copy the data anyway since it would have to be converted
from double to float.

Reverting actually serves a purpose; as @bska pointed out, taking
&data[0] of an empty vector is undefined, whereas it now checks the
size and assert here (and not in the standard library) on that condition.
2013-11-25 14:14:50 +01:00
Roland Kaufmann
24b6bd8254 Refactor common code into a function 2013-11-25 14:14:50 +01:00
Andreas Lauser
e57d1697c2 Get dimensions for Cartesian grids
For SPE1, the output writer must also support specifying the grid
via the D[XYZ]V keywords instead of relying on the SPECGRID keyword
2013-11-25 14:14:50 +01:00
Andreas Lauser
f980350af2 Handle empty outputDir setting
The output dir must not be empty or else file names like "/FOO.INIT"
are generated which normally result in a segfault.
2013-11-25 14:14:50 +01:00