Commit Graph

1677 Commits

Author SHA1 Message Date
Jørgen Kvalsvik
98a3a6a3f8 Read ROCK from EclipseState, not Deck 2016-12-20 12:24:27 +01:00
Jørgen Kvalsvik
3bdd674aac Read RS,RV,PRESSURE,SWAT,SGAS from EclipseState
Prefer reading these values from EclipseState rather than the Deck type.
2016-12-19 14:26:27 +01:00
Jørgen Kvalsvik
5278a1f193 Use Density from EclipseState 2016-12-15 16:06:46 +01:00
Jørgen Kvalsvik
f8b1bef974 Read PVTW from EclipseState
Read the PVTW table entries from EclipseState rather than manually
through the Deck object.
2016-12-06 14:53:41 +01:00
Andreas Lauser
7f4c23812a clean up and extend the SimulationReport class
it now also accounts for assembly, linear solve, update and output
write time and indicates if an operation has converged.
2016-11-30 11:27:49 +01:00
Atgeirr Flø Rasmussen
22fc88b2af Merge pull request #1103 from GitPaean/fixing_warning
warning fixed related to petsc
2016-11-23 12:37:31 +01:00
Jørgen Kvalsvik
ccd38c0cf7 Ask for reference depth at timestep. 2016-11-22 14:22:09 +01:00
Atgeirr Flø Rasmussen
b026295376 Merge pull request #1107 from GitPaean/fixing_findWellNode
Adding a flag to WellCollection whether group control active
2016-11-17 23:27:06 +01:00
Kai Bao
78b96d9c20 a flag to WellCollection whether group control active 2016-11-17 16:26:19 +01:00
Bård Skaflestad
ef3f7f78fa Merge pull request #1105 from andlaus/fix_valgrind_errors
fix some valgrind errors in the init code
2016-11-16 19:08:48 +01:00
Andreas Lauser
04c9b66107 fix some valgrind errors in the EQUIL code
this fixes some valgrind errors while doing the twophase capability
for flow_ebos: In all previously tested cases, these errors were
probably non-fatal because the memory illegally accessed here is
likely to be allocated (but after this function was finished it
contained garbage).

note that I'm not completely sure if this patch is semantically
correct, so I'd appreciate some input who understands it. (what is
"z"?)
2016-11-16 17:20:24 +01:00
Kai Bao
d48255d198 warning fixed related to petsc 2016-11-16 15:35:35 +01:00
Kai Bao
37e1fb0043 rewriting the findWellNode function
with assuming we should always find the well in the well collection.
2016-11-16 14:27:15 +01:00
Joakim Hove
9739b2167c Merge pull request #1101 from jokva/changes-in-grouptree
GroupTree interface changed upstream
2016-11-16 13:26:58 +01:00
Kai Bao
d7b2d3368c fixing the comments.
No change in the functions and results.
2016-11-16 11:40:10 +01:00
Kai Bao
0e6214723c addressing a few comments. 2016-11-16 09:51:06 +01:00
Kai Bao
6714c53dc8 adding target_updated_ flag to WellNode
to save some repeated efforts when updating Well Targets.
2016-11-16 09:43:28 +01:00
Kai Bao
ca52f1f59e checking whehter need to update before updateWellTargets. 2016-11-15 13:56:49 +01:00
Kai Bao
f4a44ec1dd cleaning up more unused flag from WellsGroup 2016-11-11 11:29:12 +01:00
Kai Bao
6c9c64cb3e removing a few not-used function with the new strategy. 2016-11-10 17:50:30 +01:00
Kai Bao
84910993c4 different strategy is using when updating the well targets
When the group has wells both under individual control and group
control, since the well rates under individual control changes each
iteration, the well targets for this kind of group need to be updated
each iteration.

When we change to use implicit well potentials later, which is supposed
to be more accurate, we probably should always (unless we decided not to)
update the well targets each iteration.
2016-11-10 17:22:25 +01:00
Kai Bao
73b511f90a adding function findWellNode() to WellCollection
to return the WellNode* instead of WellGroupInterface*
2016-11-10 16:28:40 +01:00
Kai Bao
62dbf74bc9 cleaning up and adding more comments for better understanding.
No functional change.
2016-11-10 16:28:40 +01:00
Kai Bao
8ce422072e applying the efficiency factor to VREP control. 2016-11-10 16:28:40 +01:00
Kai Bao
fe7a77d80e adding VREP injection support.
not handling multiple injection wells for moment.
2016-11-10 16:28:40 +01:00
Kai Bao
0e3118af42 using variable only_group instead of hard-coded false.
when applying group production control.
2016-11-10 16:28:40 +01:00
Kai Bao
a77750c0b6 correcting the typo in efficiency
It was efficicency, which causes inconvenience when searching variables
or functions.
2016-11-10 16:28:40 +01:00
Kai Bao
099a62f07a adding basic support for group injection control.
more testing will be required later.
2016-11-10 16:28:40 +01:00
Kai Bao
f1123e4e4c applying efficiency factor to the group control. 2016-11-10 16:28:40 +01:00
Kai Bao
f922ed6ad9 function for accumulative efficiency factor for WellNode
This is the final efficiency factor that goes to the source/sink terms
in the material balance equations.
2016-11-10 16:28:40 +01:00
Kai Bao
194d9b161d adding efficiency factor to the WellsGroupInterface.
The one for the WellNode should be specified with WEFAC, which we are
not handling for the moment, so we just set it to be 1.0 for the moment.
2016-11-10 16:28:40 +01:00
Kai Bao
a67bff245b refactoring function updateWellProductionTargets()
To handle different types of control mode.
2016-11-10 16:28:40 +01:00
Kai Bao
be5f1e5c58 When NONE is specified, no group control enforcement.
NONE is specified in GCONPROD or GCONINJE.
2016-11-10 16:28:40 +01:00
Kai Bao
d3926a6a6a output cleanining up 2016-11-10 16:28:40 +01:00
Kai Bao
9bfe9d561a removing the use of cast between base class and derived class
between WellsGroupInterface and WellsGroup, WellNode.
2016-11-10 16:28:40 +01:00
Kai Bao
631ea6cf82 revising updateWellTargets to remove the dependency of WellState
avoiding template using here. It is possible we will need WellState
eventually, while only using the well_rates for the moment.
2016-11-10 16:28:40 +01:00
Kai Bao
1174da5326 fixing the comilation problem from rebasing. 2016-11-10 16:28:40 +01:00
Kai Bao
2ddb199f4f revising injectionGuideRate and productionGuideRate
for WellNode. It gives a better logic.
2016-11-10 16:28:40 +01:00
Kai Bao
3551ccac0a adding updateWellInjectionTargets updateWellProductionTargets
For WellsGroup. At least for the current moment, the updation of the
well targets for injectors and producers should be handled in a
seprate way.
2016-11-10 16:28:40 +01:00
Kai Bao
df745bafef functions for indicating injection and production upating.
it is for WellCollection, which is logically wrong. It should be done in
the group level, while things will be different for multi-level groups.

The current implementation basically works for current needs, that we
only have one group.
2016-11-10 16:28:40 +01:00
Kai Bao
86e41a8937 adding isProducer() and isProjector() to wellNode class.
Did not see type() function there, while it should still be a okay idea.
2016-11-10 16:28:40 +01:00
Kai Bao
7926a58fae parameter forced to only_group from applyInjGroup applyProdGroup
forced and only_group basically mean two opposite things. Having both of
them in the same context will be really confusing and error-prone.

And also, we do not do anything forcedly. We do things base on what
setup tells us to do.

Only_group may not be the final name, while deinitely a better one than
forced.
2016-11-10 16:28:40 +01:00
Kai Bao
a9335266c6 putting more things in the prototyping test. 2016-11-10 16:28:40 +01:00
Kai Bao
999b80a91a keeping adding group control related in. 2016-11-10 16:28:40 +01:00
Kai Bao
26cc5de202 keeping putting group controlling in. 2016-11-10 16:28:40 +01:00
Kai Bao
4d57b641a8 adding a non-const wellCollection() in WellsManager.
For the WellModel from the simulator to use. Not decided totally,
    well_collection might need to be updated during the simualtion due
    to the update the target of wells.
2016-11-10 16:28:40 +01:00
Kai Bao
59ab9b8424 not returning zero from double WellNode::productionGuideRate
Current understanding. Two ways might prevent to return the guide_rate here
1. preventing the well from group control with keyword WGRUPCON
2. the well violating some limits and working under limits. We do not have strategy
to handle this situation yet.
2016-11-10 16:28:40 +01:00
Kai Bao
3150b94ed6 Not return from the WellNode:applyInjGroupControl
unless we prevent the well from group control with keyword WGRUPCON.
2016-11-10 16:28:40 +01:00
Kai Bao
2e9929e2af To make the injection well be able to receive the target.
Very hacky way here. The logic of the code is that only
a well is specified under GRUP control, it is under group
control. Which is not the case observed from the result.
From the result, if we specify group control with GCONPROD
and WCONPROD for a well, it looks like the well will be
under group control. TODO: make the logic correct here
instead of using `false` here.
2016-11-10 16:28:40 +01:00
Kai Bao
0640c963fc group can be both injection group and production group.
Change if else to two ifs.
2016-11-10 16:28:40 +01:00
Kai Bao
f93fd52c26 adding support for the FLD for the control type of group control.
And also adding support for the liquid rate type of guide rate type.
2016-11-10 16:28:40 +01:00
Jørgen Kvalsvik
478ac16a1b GroupTree interface changed upstream
Updates to the slightly modified GroupTree interface from opm-parser.
2016-11-09 13:04:33 +01:00
Arne Morten Kvarving
f9fa1a6a8c fixed: use correct indices for well state completion data 2016-11-04 16:40:09 +01:00
Joakim Hove
a1f31c55ce Merge pull request #1098 from jokva/phase-in-runspec
Read phase information from EclipseState.runspec
2016-11-02 11:52:24 +01:00
Andreas Lauser
c910ec11da Merge pull request #1096 from andlaus/Evaluation_accessors
use accessor methods to access the value and derivatives of Evaluation objects
2016-11-01 13:16:05 +01:00
Jørgen Kvalsvik
3bde655e12 Read phase information from EclipseState.runspec 2016-11-01 11:37:27 +01:00
Andreas Lauser
ced224378f use accessor methods to access the value and derivatives of Evaluation objects 2016-10-27 16:53:52 +02:00
Atgeirr Flø Rasmussen
5662c32605 Fix saturation family diagnostics for two-phase case. 2016-10-27 11:58:50 +02:00
Atgeirr Flø Rasmussen
4aa14a4dcb Adapt to changed data::Wells API. 2016-10-25 10:41:16 +02:00
Atgeirr Flø Rasmussen
9253969828 Merge pull request #1093 from dr-robertk/PR/fix-wellmanager-constructor
Make WellsManager compile with c++-11.
2016-10-23 07:36:08 +02:00
Atgeirr Flø Rasmussen
de1e3327d2 Merge pull request #1075 from jokva/output-data-wells-sans-vectors
WIP: Restore from data::Wells without vector dumps
2016-10-21 14:58:10 +02:00
Robert Kloefkorn
81189135bf Merge remote-tracking branch 'upstream/master' into PR/fix-wellmanager-constructor 2016-10-21 13:55:21 +02:00
Atgeirr Flø Rasmussen
a108b0fb72 Merge pull request #1090 from atgeirr/convergence-failure-problem-not-error
Convergence failure is "problem" not "error"
2016-10-21 12:49:10 +02:00
Robert Kloefkorn
ca7c3070a2 [bugfix] Make WellsManager compile with c++-11. 2016-10-21 10:43:32 +02:00
Atgeirr Flø Rasmussen
e4faa86973 Add option to enable logging (default true).
This makes it possible to avoid logging from this class in a parallel setting.
2016-10-20 22:39:08 +02:00
Andreas Lauser
ce4d7c586e RelpermDiagnostics: fix the build
this broke because EclEpsScalingPointsInfo::extractScaled() now
requires the deck and the EclipseState as additional parameters.
2016-10-20 20:01:03 +02:00
Jørgen Kvalsvik
486223f958 Restore from data::Wells without vector dumps
opm-output's data::Wells interface changed to no longer just accept a
dump of opm-core's WellState object. Update WellState to restore itself
from this new interface rather than reading the dumped vectors as-is.
2016-10-20 16:36:47 +02:00
Jørgen Kvalsvik
a52724ae97 Update to shared_ptr-less parser interface. 2016-10-20 10:14:41 +02:00
Atgeirr Flø Rasmussen
f889306c05 Undo premature API change adaption. 2016-10-18 15:34:53 +02:00
Atgeirr Flø Rasmussen
fb3e09fb39 Merge pull request #1085 from andlaus/opm-parser_units
consolidate the units code to opm-parser
2016-10-18 15:25:20 +02:00
Andreas Lauser
fabdfbafcb consolidate the unit system to opm-parser
since the unit code within opm-parser is now a drop-in replacement,
this simplifies things and make them less error-prone.

unfortunately, this requires quite a few PRs. (most are pretty
trivial, though.)
2016-10-10 17:50:26 +02:00
Joakim Hove
8c55e258c7 Header file moved in opm-output. 2016-10-06 14:23:47 +02:00
Jørgen Kvalsvik
3c2ebf9cfd Schedule::getGroup returns reference, not pointer 2016-10-05 15:24:14 +02:00
Atgeirr Flø Rasmussen
6a1ad6f3fe Merge pull request #1078 from andlaus/fix_initial_rs_and_rv
set the Rv and Rs factors to the saturated values for cells which have no gas and no oil
2016-09-30 14:40:06 +02:00
Arne Morten Kvarving
0728d503b6 update petsc code
- api changes in newer versions
- do not manually destroy the preconditioner. this is, and has always
  been, owned by the ksp object and dies with its destruction.
2016-09-29 14:19:48 +02:00
Andreas Lauser
7d1b59d697 set the Rv and Rs factors to the saturated values for cells which have no gas and no oil
the purpose of this is to get a more defined behaviour when doing the
gravity correction/upstream cell determination in the flux term.

I consider this to be just a kludge, so if anyone has a better idea of
what the composition for the non-existing gas and oil phases is,
please tell me. (note that generic compositional models do not exhibit
this issue because the composition of all fluids is always fully
defined because each component is assumed to dissolve in every phase.)
2016-09-28 16:38:40 +02:00
Atgeirr Flø Rasmussen
35ce9f5884 Avoid shadowing warning by using explicit scope. 2016-09-23 15:15:17 +02:00
Atgeirr Flø Rasmussen
2cc3be1629 Forward declare structs as same to avoid warning. 2016-09-23 15:14:36 +02:00
Markus Blatt
2d115888de Zero initialize wells with no perforations.
For these wells access its well_cells might read of the bounds
an array if they are the last wells in the struct. Therefore
we cannnot initialiue first_cell and the well control is uninitialized,
to.

With this commit theses wells are now detected and theor bhp, thp, and well_rates
are initialized to zero.
2016-09-21 12:23:34 +02:00
Anders Matheson
c89b84eeed Remove unused parameter warning 2016-09-20 10:00:50 +02:00
Anders Matheson
afaa3c5669 Pass PhaseUsage to WellState::report 2016-09-20 09:41:20 +02:00
Atgeirr Flø Rasmussen
2261999c1e Merge pull request #1062 from blattms/refactor-parallel-wellsmanager
Use provided set of deactivated wells in parallel.
2016-09-19 13:42:37 +02:00
Tor Harald Sandve
fa16d6c172 use table.size() instead of read from deck. 2016-09-16 10:31:41 +02:00
Tor Harald Sandve
b317124d94 Bugfix: Let NTMISC determine number of MISC tables
Number of misc tables is given by NTMISC (MISCNUM) and not NTSFUN
(SATNUM)
2016-09-16 10:31:41 +02:00
Markus Blatt
29dc9a1880 Use an unordered_set of string to identify defunct wells.
We do not rely on the order of the set and hope that the lookup
might be faster as it prevents string comparisons.
2016-09-13 10:55:15 +02:00
Markus Blatt
60ba51aea0 Do exclude SHUT wells from lookup of deactivated wells.
This should be prevent some unnecessary find calls in the set.
2016-09-13 10:55:15 +02:00
Markus Blatt
2875b64faf Revert "Use index according to eclipse schedule to identify deactivated wells."
This reverts commit 09205dfa074af24b381595d02c15e799523ddb2b.

We cannot use the index as it might change for a well between different
report steps. Unfortunately the only persistent way to identify wells
over all report steps in the schedule seems to be the well name.
2016-09-13 10:55:15 +02:00
Markus Blatt
10bfa5dfa8 Use index according to eclipse schedule to identify deactivated wells. 2016-09-13 10:55:15 +02:00
Markus Blatt
012edac7ce Use provided set of deactivated wells in parallel.
Before this commit we tried to compute whether a well is represented on
the processor using the grid information. Due to the overlap region and
possible completion on deactivated cells of the global grid this is not
even possible. E.g. we cannot distinguish whether a completion is just
not represented on the domain of a process or the corresponding cell is
not active in the simulation.

With this commit we refactor to passing the well manager an explicit
list of name of wells that should be completely neglected. This information
can easily by computed after the loadbalancer has computed partitions.
2016-09-13 10:55:15 +02:00
babrodtk
929cc619f6 Fixed warnings 2016-09-06 07:50:02 +02:00
Pål Grønås Drange
7ff2328f3f transmult and initconfig are ref's, use ref for EclipseState constructor 2016-08-08 10:02:53 +02:00
Andreas Lauser
c4e5db2153 also keep track of the number of linearizations needed for the simulation 2016-08-02 14:05:14 +02:00
Andreas Lauser
2f3cdfd9e0 fix incorrect derivative of rock compressibility w.r.t. pressure
since

f(x) = 1 + 0.5*g(x)*g(x)

the derivative is

f'(x) = 0 + 2*0.5*g(x) * g'(x) = g(x)*g'(x)

note that the previous incorrect values do not affect the quality of
the obtained results (if the tolerance of the non-linear solver is
chosen to be small enough), but it may have deteriorated convergence
rates.
2016-07-19 18:19:30 +02:00
Kai Bao
b0a4387573 adding default constructor for DynamicListEconLimited 2016-07-04 16:21:55 +02:00
Kai Bao
18b76331eb addressing comments.
no functional change.
2016-06-30 16:20:38 +02:00
Kai Bao
b4fa2b4944 removing some commented lines. 2016-06-30 15:17:13 +02:00
Kai Bao
28636aad5c adding stopped wells list to DynamicListEconLimited
when well is closed due to rate economic limits, based on the auto
shut-in configuration, the well can be STOP or SHUT.

When well is closed due to all the connections are closed, it should be
SHUT.
2016-06-30 14:41:14 +02:00
Kai Bao
eb163e648c handling connection closing in DynamicListEconLimited
due to econ limits.
2016-06-30 14:41:14 +02:00
Kai Bao
c64d33fbd3 adding list_econ_limited to setupWellControls 2016-06-30 14:41:14 +02:00
Kai Bao
7dac2201bb WIP in adding class DynamicListEconLimited
to handle the closed wells and connection dynamically based on the
economic limits provied by keyword WECON
2016-06-30 14:41:14 +02:00