Commit Graph

5469 Commits

Author SHA1 Message Date
Arne Morten Kvarving
8fa165c0d7 bump version to 2019.04 2019-05-08 08:29:45 +02:00
Arne Morten Kvarving
8ff950227f bump version to 2019.04-rc3 2019-05-03 10:42:48 +02:00
Joakim Hove
bc5aeaf4bf Internalize a global WHISTCTL setting in the Schedule object 2019-05-03 10:40:26 +02:00
Atgeirr Flø Rasmussen
0108437201 Bugfix: do not keep old control modes.
They will be treated as limits, and cause wrong behaviour.
2019-05-03 08:59:01 +02:00
Arne Morten Kvarving
828fe797f0 bump version to 2019.04 rc2 2019-04-29 08:50:42 +02:00
Jostein Alvestad
8f24032612 Added a improvement to the handling of MSW data for writing to restart file
Improvement to handle more general MSW data  for writing to
Eclipse compatible restart file
2019-04-26 09:40:50 +02:00
Joakim Hove
ee6bfbd76f Add configuration for keyword FLUXTYPE 2019-04-25 12:33:57 +02:00
Markus Blatt
54ee583112 Reintroduce overeagerly removed const qualifiers before function parameters.
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.
2019-04-25 11:38:51 +02:00
Markus Blatt
b69010cfc9 reintroduce some const with elegance 2019-04-25 11:38:51 +02:00
Markus Blatt
2859980cb4 Removes nearly all warnings experienced with g++-8.3
Namely:
- unused parameter
- type qualifiers ignored ...
- catchinhg polymorphic type ... by value
2019-04-25 11:38:51 +02:00
Joakim Hove
3ffefd8098 Fix bug in WellSegments== 2019-04-25 08:31:32 +02:00
Joakim Hove
852fdd7ac4 Add "size" : 1 attribute to CARFIN keyword 2019-04-25 08:31:32 +02:00
Arne Morten Kvarving
47a43daeac bump versions to 2019.04-rc1 2019-04-12 10:29:12 +02:00
Joakim Hove
b562bef1af
Merge pull request #719 from joakim-hove/aquancon-segfault
Aquancon segfault
2019-04-11 15:29:02 +02:00
Andreas Lauser
414b6820b4
Merge pull request #721 from andlaus/fix_FILEUNIT
fix FILEUNIT
2019-04-11 14:51:04 +02:00
Andreas Lauser
5dbc22484e fix FILEUNIT
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.
2019-04-11 14:20:44 +02:00
Joakim Hove
8b838264dd Add comment about face when comparing AQUANCON records 2019-04-11 14:09:28 +02:00
Joakim Hove
c533e1206f Protect against nullptr access when combining AQUANCON records 2019-04-11 14:09:28 +02:00
Joakim Hove
d87f9edf60 Minor refactor of temporary variable
- Move declaration inside { ... } scope
 - Use vector.push_back() instead of resize() and at()
2019-04-11 14:09:15 +02:00
Joakim Hove
dbff25f79b Remove m_ prefix from local variables 2019-04-11 14:03:08 +02:00
Joakim Hove
4b657fc4cf Use reference instead of value 2019-04-11 14:03:08 +02:00
Joakim Hove
a4e66a5484 White space change 2019-04-11 14:03:08 +02:00
Joakim Hove
226bfbe524
Merge pull request #718 from joakim-hove/weltarg
Weltarg
2019-04-11 12:14:23 +02:00
Joakim Hove
164ab30fa1 The WELTARG treatment is moved out from Schedule.cpp 2019-04-11 12:13:43 +02:00
Joakim Hove
d5ce2b6a76
Merge pull request #713 from joakim-hove/cjson-update
Update cJSON library to version 1.7.10
2019-04-10 09:19:36 +02:00
Joakim Hove
2997338eb2
Merge pull request #712 from joakim-hove/udq-tokens
Internalize UDQ tokens in the UDQ define keyword
2019-04-09 18:29:27 +02:00
Joakim Hove
ebedc9b0b6
Merge pull request #711 from joakim-hove/prod-properties-refactor
Refactor WellProductionProperties construction
2019-04-09 18:27:04 +02:00
Joakim Hove
ac58d8428c Refactor WellProductionProperties construction
Use default copy constructor and handleWCONPROD() and handleWCONHIST() for
prediction and history wells respectively.
2019-04-09 17:25:00 +02:00
Joakim Hove
ba58cbc166 Update cJSON library to version 1.7.10 2019-04-09 00:34:49 +02:00
Joakim Hove
bd0c0f6356 Internalize UDQ tokens in the UDQ define keyword 2019-04-08 15:12:15 +02:00
Joakim Hove
de9a93377c
Merge pull request #710 from andlaus/implement_FILEUNIT
Implement FILEUNIT
2019-04-05 12:07:19 +02:00
Atgeirr Flø Rasmussen
55057540e2
Merge pull request #709 from bska/restart_msw_fix
RSEG: Index Results by Segment Number
2019-04-05 10:49:20 +02:00
Andreas Lauser
fe1272a2e6 add the FILEUNIT keyword
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.
2019-04-04 16:55:19 +02:00
Andreas Lauser
c25275d0ee add parseContext and errorGuard parameters to Opm::checkDeck()
this requires a small downstream cleanup.
2019-04-04 16:55:19 +02:00
Bård Skaflestad
ffba48d7f2 RSEG: Index Results by Segment Number
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
2019-04-04 15:26:15 +02:00
Joakim Hove
dbfad81253
Merge pull request #700 from bska/print-pvtfunc-to-init-pt1
Structurally Correct PVT Tables in INIT File (Part 1)
2019-04-04 15:11:20 +02:00
Joakim Hove
a0aafc5d5b
Merge pull request #672 from jalvestad/restart_conn_test
Unit tests for writing well connection data to Eclipse Compatible restart file
2019-04-04 15:06:00 +02:00
Andreas Lauser
9afaa32ca7 checkDeck(): only require a const reference to the deck 2019-04-04 14:17:30 +02:00
Bård Skaflestad
68a254ffdc Create Prop-Func Table: Elucidate Motives for Unusual Loop Counters
Thanks to my colleague Francesca Watson for wording assistance.
2019-04-04 14:11:07 +02:00
Bård Skaflestad
4dafe9456a Create Prop-Func Table: Switch to std::function
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
2019-04-04 14:11:07 +02:00
Bård Skaflestad
8e49c35c18 Create Prop-Func Table: Prune Vacuous Assignment
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'.
2019-04-04 14:11:07 +02:00
Bård Skaflestad
25d7b538aa Tables: Add Structurally Correct Gas PVT Output from PVTG
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.
2019-04-04 14:11:07 +02:00
Bård Skaflestad
877ff028be Tables: Add Structurally Correct Gas PVT Output from PVDG
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.
2019-04-04 14:11:07 +02:00
Bård Skaflestad
c5eca4b1e4 Tables: Add Structurally Correct Oil PVT Output from PVTO
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.
2019-04-04 14:11:07 +02:00
Bård Skaflestad
b4915e7b55 Tables: Add Structurally Correct Oil PVT Output from PVDO
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.
2019-04-04 14:11:07 +02:00
Bård Skaflestad
b2a37d1e54 Tables: Add Structurally Correct Oil PVT Output from PVCDO
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.
2019-04-04 14:11:07 +02:00
Bård Skaflestad
466341fa0f Tables: Add Structurally Correct Water PVT Output
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.
2019-04-04 14:11:07 +02:00
Bård Skaflestad
c279184229 Tables: Make Table Constructor More Generally Callable
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.
2019-04-04 14:11:07 +02:00
Bård Skaflestad
bd73bb6c55 Linearised Table: Add Constructor with User-Defined Fill Value
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.
2019-04-04 14:11:07 +02:00
Joakim Hove
78170ccfce
Merge pull request #704 from joakim-hove/rft_config
Add class RFTConfig
2019-04-04 14:05:07 +02:00