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
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.
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
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).
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
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.
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.
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.
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.
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)).
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.
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.
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.
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).
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.
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).
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?
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).
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.
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).
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.