Actually, the compiler does not complain about const in void func(const T type).
It just complains about const qualifiers before by-value return types.
the FILEUNIT functionality currently does not work because the name of
the unit system specified by the keyword is almost always fully
capitalized (e.g., "FIELD"), while the name of the unit system
returned by the parser isn't (e.g., "Field"). This patch "fixes" this
by simply capitalizing all strings.
currently, this keyword is basically ignored: setting the unit system
of a file to something different than the deck unit system will cause
`Opm::checkDeck()` to produce a warning.
This commit switches the segment result reload code to indexing the
RSEG vector primarily by the segment number from the input file.
The original scheme of using the linear index and extracting the
segment number from ISEG was based on a terrible misunderstanding [%].
This is the second half of commit 0a730d94 (PR #697)
[%] Pointy Hat: @bska
This commit switches to using the explicit type std::function rather
than an implied callable entity whose interface is defined only in a
comment. That adds compiler type checking at the cost of (possibly)
introducing virtual function calls. The size overhead in the object
file is mostly negligible in Release mode.
Suggested by: [at]joakim-hove
Left over from when the function was extracted from the saturation
function code. While here, fix an incorrect comment that mistakenly
implied that the primary key of PVTO is pressure rather than the
dissolved gas/oil ratio (Rs), and correct a type in 'composition'.
This commit expands the private member function
Tables::addGasPVTTables(const EclipseState&)
to create structurally correct TAB vector entries from the PVTG
(wet gas) input table data when gas is an active phase in a
simulation run. Specifically, the main result array has the columns
[ Rv, 1/Bg, 1/(Bg*mu_g), d(1/Bg)/dRv, d(1/(Bg*mu_g))/dRv ]
and the ancillary table (base pointer JBPVTG) holds the gas pressure
nodes.
Note that while we do create structurally correct output tables, we
do not fill in undersaturated states that have been defaulted in the
input table.
The number of table rows in the main table is equal to number of PVT
regions times the number of declared pressure nodes (TABDIMS item 4,
NPPVT) times the number of declared composition nodes (TABDIMS item
6, NRPVT). In other words, the main result array is expanded to
fill NRPVT rows per gas pressure node per PVT region. Fill value
-2.0e+20. We have verified the results with ECLIPSE 100. The
ancillary table is expanded to the number of declared pressure nodes
for each PVT region. Here the fill value is +2.0e+20.
As an OPM extension, we will use the maximum number of active
composition and pressure nodes across all PVTG tables if the
declared maximum pressure nodes in TABDIMS is too small. This will
create TAB vector representations that are not compatible with
ECLIPSE, but which will nevertheless be useful in the context of
ResInsight's flux calculation.
Add unit tests for all gas-related PVT tables.
This commit expands the public member function
Tables::addPVTTables(const EclipseState&)
to call into a new private member function
Tables::addGasPVTTables(const EclipseState&)
which will create structurally correct TAB vector entries from the
PVDG (dry gas) input table data when gas is an active phase in a
simulation run. Specifically, the result array has the columns
[ Pg, 1/Bg, 1/(Bg*mu_g), d(1/Bg)/dPg, d(1/(Bg*mu_g))/dPg ]
The number of table rows is equal to number of PVT regions times the
number of pressure nodes declared in input keyword TABDIMS (NPPVT,
Item 4). In other words, the result array is expanded to fill NPPVT
rows per PVT region. Fill value +2.0e+20. We have verified the
results with ECLIPSE 100.
As an OPM extension, we will use the maximum number of active
pressure nodes across all PVDG tables if the declared maximum
pressure nodes in TABDIMS is too small. This will create a TAB
vector that is not compatible with ECLIPSE, but which will
nevertheless be useful in the context of ResInsight's flux
calculation.
This commit expands the private member function
Tables::addOilPVTTables(const EclipseState&)
to create structurally correct TAB vector entries from the PVTO
(live oil) input table data when oil is an active phase in a
simulation run. Specifically, the main result array has the columns
[ Po, 1/Bo, 1/(Bo*mu_o), d(1/Bo)/dPo, d(1/(Bo*mu_o))/dPo ]
and the ancillary table (base pointer JBPVTO) holds the composition
nodes.
Note that while we do create structurally correct output tables, we
do not fill in undersaturated states that have been defaulted in the
input table.
The number of table rows in the main table is equal to number of PVT
regions times the number of declared composition nodes (TABDIMS item
6, NRPVT) times the number of declared pressure nodes (TABDIMS item
4, NPPVT). In other words, the main result array is expanded to
fill NPPVT rows per Rs node per PVT region. Fill value +2.0e+20.
We have verified the results with ECLIPSE 100. The ancillary table
is expanded to number of declared composition nodes for each PVT
region. Fill value +2.0e+20.
As an OPM extension, we will use the maximum number of active
pressure and composition nodes across all PVTO tables if the
declared maximum pressure nodes in TABDIMS is too small. This will
create a TAB vector representations that are not compatible with
ECLIPSE, but which will nevertheless be useful in the context of
ResInsight's flux calculation.
Add unit tests for all supported oil-related PVT tables.
This commit expands the private member function
Tables::addOilPVTTables(const EclipseState&)
to create structurally correct TAB vector entries from the PVDO
(dead oil) input table data when oil is an active phase in a
simulation run. Specifically, the result array has the columns
[ Po, 1/Bo, 1/(Bo*mu_o), d(1/Bo)/dPo, d(1/(Bo*mu_o))/dPo ]
The number of table rows is equal to number of PVT regions times the
number of pressure nodes declared in input keyword TABDIMS (NPPVT,
Item 4). In other words, the result array is expanded to fill NPPVT
rows per PVT region. Fill value +2.0e+20. We have verified the
results with ECLIPSE 100.
As an OPM extension, we will use the maximum number of active
pressure nodes across all PVDO tables if the declared maximum
pressure nodes in TABDIMS is too small. This will create a TAB
vector that is not compatible with ECLIPSE, but which will
nevertheless be useful in the context of ResInsight's flux
calculation.
This commit expands the public member function
Tables::addPVTTables(const EclipseState&)
to call into a new private member function
Tables::addOilPVTTables(const EclipseState&)
which will create structurally correct TAB vector entries from the
PVCDO input table data when oil is an active phase in a simulation
run. Specifically, the result array has the columns
[ Po, Bo, Co, mu_o, Cv ]
in which 'Co' denotes the oil compressibility and 'Cv' denotes the
oil viscosibility. The number of table rows is equal to number of
PVT regions times the number of pressure nodes declared in input
keyword TABDIMS (NPPVT, Item 4). In other words, the result array
is a copy of the input table but expanded to fill NPPVT rows per PVT
region. Fill value -1.0e+20. We have verified the results with
ECLIPSE 100.
At present the function is not called by Flow's INIT file writer.
This commit adds a new public member function
Tables::addPVTTables(const EclipseState&)
that calls into a new private member function
Tables::addWaterPVTTables(const EclipseState&)
to create structurally correct TAB vector entries from the PVTW
input table data when water is an active phase in a simulation run.
Specifically, the result array has the columns
[ Pw, 1/Bw, Cw, 1/(Bw * mu_w), Cw - Cv ]
in which 'Cw' denotes the water compressibility and 'Cv' denotes the
water viscosibility. Column 4 and 5 follow ECLIPSE 100 conventions.
Number of table rows equal to number of PVT regions. This result
array differs from the existing Tables::addPVTW() member function in
the treatment of viscosity and viscosibility data. We have verified
the results with ECLIPSE 100.
At present the function is not called by Flow's INIT file writer.
Add a unit test to exercise the new member function.
In particular, expose the internals of
SatFunc::detail::createSatfuncTable()
as a new free function, createPropfuncTable(). The latter knows
about sub-tables as present in live oil (PVTO) and wet gas (PVTG)
input data and will loop over all primary keys of a single table
(i.e., region) before advancing to the next table.
The primary purpose of createPropfuncTable() is to support creating
the normalised (ECLIPSE 100 style) INIT file tables for PVT data.
Reimplement original constructor in terms of the new constructor.
The main purpose of the new constructor is to support PVT tables
which use a fill/padding value different from 1.0e+20.