Commit Graph

9578 Commits

Author SHA1 Message Date
Arne Morten Kvarving
86bf452059 move computeWellConnectionDensitesPressures to StandardWellConnections 2022-11-25 12:56:47 +01:00
Arne Morten Kvarving
dcc333dac3 make member variables private in StandardWellConnections 2022-11-25 12:56:23 +01:00
Arne Morten Kvarving
1d058a4edf rename StandardWellConnections::getRho() to just rho() 2022-11-25 12:56:23 +01:00
Arne Morten Kvarving
9aeb48887c rename computePropertiesForWellConnectionPressure to computePropertiesForPressure
that it applies to connections are now implied by class
2022-11-25 12:56:23 +01:00
Arne Morten Kvarving
d1c1aecac7 move implementation of computePropertiesForWellConnectionPressure to StandardWellConnections 2022-11-25 12:56:20 +01:00
Arne Morten Kvarving
100a7b0582 rename computeConnectionDensities to computeDensities
that it applies to connections are now implied by class
2022-11-25 12:55:39 +01:00
Arne Morten Kvarving
5d1b5d9426 rename computeConnectionPressureDelta to computePressureDelta
that it applies to connections are now implied by class
2022-11-25 12:55:39 +01:00
Arne Morten Kvarving
0d72bba326 move computeConnectionDensities to StandardWellConnections
this necessitates expanding the template parameter list
2022-11-25 12:55:36 +01:00
Arne Morten Kvarving
7cadeb5206 changed: move StandardWellConnections out of inheritance hierarchy
instead hold a member in StandardWellEval
2022-11-25 12:54:56 +01:00
Arne Morten Kvarving
b08c165384 rename StandardWellGeneric to StandardWellConnections 2022-11-25 12:54:56 +01:00
Arne Morten Kvarving
0389465bbf StandardWellGeneric: clean includes and forwards 2022-11-25 12:54:53 +01:00
Tor Harald Sandve
22d27bdf5f Adapt to change of enum to enum class for primary variable meaning 2022-11-25 10:53:48 +01:00
Tor Harald Sandve
a190668800 adapt to rename of waterSaturationIdx -> waterSwitchIdx 2022-11-25 10:53:48 +01:00
Tor Harald Sandve
0c6d29a352 adapt to primary variable refactoring 2022-11-25 10:53:48 +01:00
Arne Morten Kvarving
c7016854d9 changed: make the deck an implementation detail in Opm::readDeck 2022-11-24 13:00:38 +01:00
Arne Morten Kvarving
f4f8c033d8 EclGenericVanguard: remove deck member 2022-11-24 12:10:52 +01:00
Bård Skaflestad
e524acd5b2
Merge pull request #4283 from akva2/stdwellass_simplify
StandardWellAssemble: simplify by using primary variables class
2022-11-23 23:29:42 +01:00
Arne Morten Kvarving
4f6665076c StandardWellAssemble: simplify by using primary variables class
- pass primary variables as parameter
- use the evaluation type
2022-11-23 21:19:06 +01:00
Arne Morten Kvarving
2da1322697 fix regression in wells
we need to call WellInterface::getTHPConstraint,
not WellBhpThpCalculator::getTHPConstraint
2022-11-23 15:37:04 +01:00
Bård Skaflestad
5b69890ece Report Solution GOR and OGR at Segment Level
This enables calculating the SOFRF and SGFRF summary vectors.
2022-11-22 18:06:05 +01:00
Bård Skaflestad
fa1ea7f997
Merge pull request #4282 from totto82/fixInjTemp2
remove derivative in thermal flux for injectors
2022-11-22 17:29:24 +01:00
Markus Blatt
42fdc38ae0
Merge pull request #4273 from Tongdongq/add-test
Add test for cusparseSolver
2022-11-22 13:55:11 +01:00
Arne Morten Kvarving
3cd87a8c89 StandardWellPrimaryVariables: store values as Scalar 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
8e3121113c drop unnecessary wrapper StandardWell::updateExtraPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
f64628f72d StandardWellPrimaryVariables: make data members private
and add generic read-only accessors
2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
4bbcdf0646 add checkFinite to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
999d4c6be9 add StandardWellPrimaryVariables::updateNewtonPolyMW
extracted from StandardWell::updatePrimaryVariablesNewton
2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
23a8aed4e8 move getWQTotal to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
fbf99889b2 move getBhp to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
ff26a9e001 remove StandardWell::updatePrimaryVariables
no need for the wrapper any longer as the implementation
is now in StandardWellPrimaryVariables.
2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
b5f5a24af6 relaxationFactorFractionsForProducer: no need to pass values any longer 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
bc3680f822 updateNewton: avoid copying 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
e5e6e21122 relaxationFactorRate: no need to pass entire vector 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
2fbc699007 make relaxationFactorRate an anon helper in StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
3f6c4922b0 move updatePrimaryVariablesNewton to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
0cddc4516e make relaxationFactorFractions an anon helper in StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
7b8e88bdd5 move relaxationFactorFractionsForProducer to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
cd3388f7c0 move processFractions to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
435bd67732 move getQs to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
1aa74a9830 move wellSurfaceVolumeFraction to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
2fb53a4ef6 move wellVolumeFractionScaled to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
d6a6671eb0 move wellVolumeFraction to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
93a151f6e1 move (most of) updatePrimaryVariables to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
f55d4334f1 move (most of) updateWellStateFromPrimaryVariables to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
412e561cd8 move updateWellStateFromPrimaryVariablesPolyMW to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
f964169914 move updatePrimaryVariablesPolyMW to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
15d49e745e added: StandardWellPrimaryVariables
this is a container class for the primary variables in
standard well
2022-11-22 13:11:17 +01:00
Bård Skaflestad
9cde51cbc6
Merge pull request #4276 from akva2/stdwell_assemble
Added: StandardWellAssemble
2022-11-22 13:09:46 +01:00
Markus Blatt
d8ca55fe34
Merge pull request #4265 from totto82/well_temp
adapt to changes in temperature location in opm-common
2022-11-22 12:26:46 +01:00
Arne Morten Kvarving
3033f3784b changed: make StandardWellEquations data members private
use a friend declaration for StandardWellEquationAccess to
give the assembler access to the matrices/vectors.
2022-11-22 12:22:18 +01:00
Arne Morten Kvarving
5eac7cae4e added: StandardWellEquations::residual()
this returns a const reference to the residual vector.
use this in StandardWellEval::getWellConvergence
2022-11-22 12:22:18 +01:00
Arne Morten Kvarving
5bab68cb1f added: StandardWellEquationAccess
this is a proxy class for accessing the equation system
in StandardWellAssemble.
use the new class for vector/matrix access in StandardWellAssemble.
2022-11-22 12:22:18 +01:00
Arne Morten Kvarving
68bc90b3be added: StandardWellAssemble::assembleSourceEq
extracted from StandardWell::assembleWellEqWithoutIterationImpl
2022-11-22 12:22:18 +01:00
Arne Morten Kvarving
5bbf205619 added: StandardWellAssemble::asembleZFracEq
extracted from StandardWell::assembleWellEqWithoutIterationImpl
2022-11-22 12:22:18 +01:00
Arne Morten Kvarving
f720cc6dde added: StandardWellAssemble::assemblePerforationEq
extracted from StandardWell::assembleWellEqWithoutIterationImpl
2022-11-22 12:22:18 +01:00
Arne Morten Kvarving
57ecd2a5e9 added: StandardWellAssemble::assembleInjectivityEq
extracted from StandardWell::handleInjectivityEquations
2022-11-22 12:22:18 +01:00
Arne Morten Kvarving
10e967653b added: StandardWellAssemble
this handles assembly of the equation system for standardwell.
start by moving assembleControlEq into the new class
2022-11-22 12:22:18 +01:00
Arne Morten Kvarving
d2c028fb74 StandardWell_impl.hpp: remove some unused headers 2022-11-22 10:37:41 +01:00
Arne Morten Kvarving
4b4898d6ec added: StandardWellEquations::sumDistributed
this sums up the global equation system for distributed wells
2022-11-22 10:37:41 +01:00
Arne Morten Kvarving
e9ed80d644 added: StandardWellEquations::extractCPRPressureMatrix()
this adds the cpr pressure matrix to a matrix.
this is the core of StandardWellEval::addWellPressureEquations
use the new method in the implementation.
2022-11-22 10:37:41 +01:00
Arne Morten Kvarving
b24f22312e added: StandardWellEquations::getNumBlocks()
this returns the number of blocks in in B/C matrices.
use the new method in the well implementation.
2022-11-22 10:37:40 +01:00
Arne Morten Kvarving
f2d8a073f9 added: StandardWellEquations::extract(SparseMatrixAdapter)
this adds the well matrices to a sparse matrix adapter.
this is the core of StandardWellEval::addWellContributions.
use the new method in the implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
65efe8e1fc added: StandardWellEquations::extract(WellContributions&)
this adds the well matrices to a WellContributions object.
this is the core of StandardWellEval::addWellContributions.
use the new method in the implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
40640e9da6 added: StandardWellEquations::recoverSolutionWell()
this recovers the well solution from a solution vector.
use the new method in the well implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
daf0f90fe5 added: StandardWellEquations::solve()
this applies the inverted D matrix to the residual vector.
use the new method in the well implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
83c41e3f9c added: StandardWellEquations::invert()
this inverts the D matrix.
use the new method in the well implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
033718f027 added: StandardWellEquations::apply(r)
this applies the equation system to a vector.
use the new method in the well implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
21bb4dc955 added: StandardWellEquations::apply(x,Ax)
this applies the equation system to a vector.
use the new method in the well implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
97d158da38 added: StandardWellEquations::init
this initializes the equation system.
use the new method in the well implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
d05081417e added: StandardWellEquations::clear
this zeros the equation system.
use the new method in the well implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
a8c912ccfa add: StandardWellEquations
this is a container for the standard well equation system
2022-11-22 10:36:54 +01:00
Markus Blatt
58d8ca144e
Merge pull request #4259 from blattms/do-dereference-unset-optional
[bugfix] Do not unconditionally dereference std::optional.
2022-11-22 10:26:30 +01:00
Tor Harald Sandve
f9ab7e6b07 remove derivative in thermal flux for injectors 2022-11-22 09:40:39 +01:00
Bård Skaflestad
910f10d43b
Merge pull request #4280 from akva2/well_instantations_simplify
simplify instantations
2022-11-21 16:27:16 +01:00
Tong Dong Qiu
a8e568f4c5 Moved initializing CUDA device to constructor 2022-11-21 15:54:14 +01:00
Bård Skaflestad
eeae2442a8
Revert "remove derivative in thermal flux for injectors" 2022-11-21 15:20:45 +01:00
Tor Harald Sandve
5c26be0c28
Merge pull request #4214 from totto82/glift3_fix
Fixes related to gaslift stage 2
2022-11-21 14:40:52 +01:00
Bård Skaflestad
c3dceef6e0
Merge pull request #4237 from akva2/relax_factor_pass_double
changed: pass the actual update value to relaxationFactorRate
2022-11-21 13:49:02 +01:00
Kai Bao
48fa688a17
Merge pull request #4274 from GitPaean/handle_small_fractions_for_sicd
not calculating emulsionViscosity for small liquid_fraction
2022-11-21 13:26:17 +01:00
Kai Bao
9a1520a367
Merge pull request #4262 from totto82/fixInjTemp2
remove derivative in thermal flux for injectors
2022-11-21 13:25:24 +01:00
Arne Morten Kvarving
8a32d6bf33 simplify instantations
more readable
2022-11-21 12:48:50 +01:00
Tor Harald Sandve
c45d90650e fix checking of group target
- use the actual delta rate in checkOilTarget etc
- add check for total gas rate = gas rate + alq
2022-11-21 09:17:24 +01:00
Tor Harald Sandve
7d7b2803a5 renaming and adding more comments based on review 2022-11-21 08:58:49 +01:00
Tor Harald Sandve
9c8f778495 Compute the group rates that takes into account limitation on the sublevels 2022-11-21 08:58:49 +01:00
Tor Harald Sandve
1a09608263 Fix removeSurplus alq
Add water rate target limit
Add the gradient to the checkXXXTarget so that surplus alq is removed
until it would go below the target. I.e. the group still want to produce it  target
2022-11-21 08:58:49 +01:00
Tor Harald Sandve
cd09c130b3 pass group name to getRateWithGroupLimit to avoid checking for that 2022-11-21 08:58:49 +01:00
Håkon Hægland
c313a0a4b2 Remove unused variables 2022-11-21 08:58:49 +01:00
Håkon Hægland
43244c2132 Change condition under which stage 2 is done.
It only makes sense to try to optimize the distribution of lift gas if
the amount of lift gas is constrained either by the maximum allowed
gaslift or total gas or the group is under individual control.
2022-11-21 08:58:49 +01:00
Håkon Hægland
686a6a969d Calculate gradients with group limits.
Take into account group limits when calculating gradients for individual
wells in stage 2 of gas lift optimization.
2022-11-21 08:58:49 +01:00
Håkon Hægland
9c61262329 Changed formatting. 2022-11-21 08:58:49 +01:00
Håkon Hægland
bc566e3981 Also check LRAT group target in stage2
Also account for a group LRAT limit when removing surplus ALQ in gaslift
optimization stage 2.
2022-11-21 08:58:49 +01:00
Håkon Hægland
61ed803740 Do stage2 even if GLIFTOPT is not defined 2022-11-21 08:58:49 +01:00
Tong Dong Qiu
5620b08033 Fix segfaults rocalutionSolver 2022-11-18 14:19:10 +01:00
Tong Dong Qiu
21b23b7aa4 Combine multiple defines into one 2022-11-18 13:09:39 +01:00
Kai Bao
5e35477ce1 a little different form to keep the derivatives 2022-11-17 22:57:42 +01:00
Kai Bao
3ddb830ae9 not calculating emulsionViscosity for small liquid_fraction
it might introduce inf/nan in the Jacobian matrix.
2022-11-17 15:20:56 +01:00
Bård Skaflestad
936e9e87e7 Convey More Dynamic State Values per Segment to Output Layer
In particular, report local condition segment flow velocities,
segment holdup fractions, and segment phase viscosities.
2022-11-17 11:49:29 +01:00
Bård Skaflestad
085ccccb1e Capture More Dynamic State Per Segment
In particular, calculate segment flow velocities, segment holdup
fractions, and segment phase viscosities when updating the well
state.  This is purely for reporting purposes and does not affect
the multisegmented model.
2022-11-17 11:49:29 +01:00
Bård Skaflestad
2da83fa680 Expose Internal Support for Inferring Rs/Rv From Surface Volumes 2022-11-17 11:49:29 +01:00
Bård Skaflestad
7d9beb3506 Support Using Different Types for Surface and Reservoir Rates
Simplifies using pointers here.
2022-11-17 11:49:29 +01:00