Commit Graph

58 Commits

Author SHA1 Message Date
Atgeirr Flø Rasmussen
295677c8c1 Use WellStateFullyImplicitBlackoil class instead of WellState. 2014-03-18 11:27:40 +01:00
Atgeirr Flø Rasmussen
f84b0a6a4d Remove rs_or_sg_eq from the residual.
This has not been used since the introduction of live gas changed
the treatment of rs (and rv) values to make a more compact system.
2014-02-07 16:33:19 +01:00
Markus Blatt
e05675bd41 Fixes warning about initialization order in FullyImpliciteBlackOilSolver. 2014-02-03 18:14:49 +01:00
Tor Harald Sandve
cdd312fa55 Comment out unused code
Part of the code that is no longer in use is commented out.
2014-01-24 13:35:04 +01:00
Tor Harald Sandve
825c9be0db Fixed white spaces 2014-01-24 13:27:32 +01:00
Tor Harald Sandve
b2ac4c7aac Fixed missing documentation 2014-01-24 13:14:08 +01:00
Tor Harald Sandve
ed02b4a91f Implementation of live gas
The simulator now handles live gas as well as live oil.
The primary variables are Po,Sw and Rs,Rv or Sg depending on fluid
condition
State 1 Gas only (Undersaturated gas): Po, Sw and Rv
State 2 Gas and oil: Po, Sw and Sg
State 3 Oil only (Undersaturated oil): Po, Sw and Rs

This commit includes:
1. New interfaces for the vapor oil/gas ratios (Rv)
2. Modifications in the equations to handle rvs
3. New definition of ADI variable to handle changing primary variables
4. Modifications in the solution updates to handle changing primary
variable
5. Some changes in the appleyard process to sync with Mrsts livegas
implementation.

NOTE:
The implementation is tested on the liveoil cases SPE1 and a simplified
SPE9 and produces the same results as the old code.
The simulator is not yet able to converge on SPE3 with livegas present.
For SPE3 to converge a more robust well implementation is needed. The
current simulator reproduce the results of Mrst when a similar well
model is used in Mrst as is currently implemented OPM.
2014-01-10 16:07:32 +01:00
Joakim Hove
bd1417b164 Changed to use well_controls_get_current_distr(). 2014-01-09 12:09:19 +01:00
Joakim Hove
427f55940e Changed direct access to struct WellControls to use well_controls_get_xxx() api. NB: Do check the calls to well_control_iget_distr(). 2014-01-09 09:39:16 +01:00
Andreas Lauser
58afaa5069 fix the rebase fallout 2013-12-06 10:33:58 +01:00
Andreas Lauser
6f2fd5ae69 use the reference pressure to calculate the transmiscibility factors 2013-12-06 10:19:08 +01:00
Andreas Lauser
977395fccd include capillary pressure in the PDEs
I'm neither sure that this is fully correct nor that I found all
occurences (so far, the output writing code is missing in this patch),
but it seems to work for SPE1...
2013-12-06 10:17:58 +01:00
Bård Skaflestad
cb483e92cc Switch condition interface to phase presence facility
Commit 4aa0eaf introduced density and viscosity evaluators into the
BlackoilPropsAdInterface 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 opm-core's commit a033329.

Update callers accordingly.
2013-12-03 18:12:54 +01:00
Tor Harald Sandve
4aa0eaff67 Whether the fluid is saturated or not is explicitly passed to the pvts
The criteria for whether the fluid is saturated or not is moved from the
within the pvt calculations to the solver, and passed to the pvt
calculations as a array of boolean values.
2013-11-28 15:57:00 +01:00
Bård Skaflestad
faa3646a52 Fix convergence failure exception message
The message was a leftover from the ImpesTPFA solver and should
reflect the actual location.

Noticed by: qilicun (Liu Ming)
Fixes: Issue #50
2013-10-22 10:11:53 +02:00
Bård Skaflestad
cf9d417cad Merge pull request #34 from totto82/bugfixes
Changes in gravity potential to match Eclipse and Mrst
2013-09-24 04:02:55 -07:00
Bård Skaflestad
243432142e Merge pull request #32 from atgeirr/minor_improvements
A collection of minor improvements
2013-09-24 01:31:15 -07:00
Tor Harald Sandve
34cc4f7da0 1. The geo_.z() is now called directly instead of first converted to ADB
vector
2. Added some whitespaces fro readability
2013-09-24 09:33:33 +02:00
Tor Harald Sandve
f3d51c4a22 Compute gravity potensial using the face average as in Eclipse and Mrst 2013-09-19 15:43:11 +02:00
Atgeirr Flø Rasmussen
85f79c0e84 Rename AutoDiff::ForwardBlock -> Opm::AutoDiffBlock.
Also moved AutoDiffHelpers.hpp content to Opm namespace, and modified other
files as required by these two changes.
2013-09-19 12:53:28 +02:00
Tor Harald Sandve
5a88259da4 The porevolume was multiplied twice in computeAccum for the gas phase dissolved in the oil 2013-09-19 10:44:10 +02:00
Andreas Lauser
0582ef08d8 explicitly include <iostream>
instead of relying on relying that some header includes it...
2013-09-05 12:28:16 +02:00
Andreas Lauser
8ee63106c5 Replace THROW by OPM_THROW 2013-09-05 12:28:16 +02:00
Andreas Lauser
a26483b51d Replace the ASSERT and ASSERT2 macros by assert 2013-09-03 15:27:08 +02:00
Atgeirr Flø Rasmussen
baf11ec591 Bugfix: perforation parts must be mapped to wells. 2013-06-07 14:03:17 +02:00
Atgeirr Flø Rasmussen
07027d3a09 Added rock compressibility to fully implicit solver. 2013-06-03 14:14:48 +02:00
Atgeirr Flø Rasmussen
20079f763a Merge remote-tracking branch 'bska/fully-implicit' into fully-implicit 2013-06-03 09:01:17 +02:00
Atgeirr Flø Rasmussen
04eb340a3b Fix two bugs in solver.
- Using x/x.abs() instead of a proper sign function led to problems
   when x = 0. Solved by using new sign() utility.
 - Pass pressure instead of rs as parameter to fluidRsMax().
2013-06-03 00:33:05 +02:00
Bård Skaflestad
8bab9f9ff8 Merge remote-tracking branch 'atgeirr/fully-implicit' into fully-implicit 2013-06-03 00:16:04 +02:00
Bård Skaflestad
a67ca87fd3 Encapsulate DUMP contents in "do { ... } while (0)"
This makes the macro more function-like and easier to read.
2013-06-03 00:15:40 +02:00
Atgeirr Flø Rasmussen
0376cb0fff Initialize and update qs primary variable. 2013-06-02 23:50:21 +02:00
Atgeirr Flø Rasmussen
765ce23c3e Work in progress on well flux equations. 2013-06-02 08:58:30 +02:00
Atgeirr Flø Rasmussen
74a5e10f7b Renames variables dtpv->pvdt and Rs->rs. 2013-06-02 08:19:21 +02:00
Atgeirr Flø Rasmussen
adf291a30c Work in progress on well flux equations. 2013-06-02 08:17:13 +02:00
Bård Skaflestad
2606d94935 Merge remote-tracking branch 'atgeirr/fully-implicit' into fully-implicit 2013-05-31 16:07:12 +02:00
Bård Skaflestad
7a44eb8254 Remove blank lines at EOF 2013-05-31 16:07:03 +02:00
Atgeirr Flø Rasmussen
9a3bad000a Do not evaluate properties at well perforation pressures.
Always use quantities derived from cell properties.
2013-05-31 16:03:00 +02:00
Atgeirr Flø Rasmussen
adbbebeeea Properly compute well pressure differentials.
Properly here means using a simple algorithm like
in CompressibleTpfa and ImpesTPFAAD.
2013-05-31 15:02:03 +02:00
Atgeirr Flø Rasmussen
514c48aa31 Use DUMP macro in useful places. 2013-05-31 15:01:28 +02:00
Atgeirr Flø Rasmussen
d49be41cae Corrected fluidDensity() function to account for dissolved gas. 2013-05-31 14:59:56 +02:00
Atgeirr Flø Rasmussen
59e36f72b3 Add DUMP macro for debugging. 2013-05-31 14:59:24 +02:00
Atgeirr Flø Rasmussen
932660a18c New updateState() method, changes to fluid interfaces.
- updateState() is a new method that modifies the state object after solution,
   this was formerly done in solveJacobianSystem().
 - Implemented Appleyard chop (not verified yet) for handling variable switching.
 - Added rs as input to fluid interfaces to include rs-derivatives.
2013-05-30 14:43:32 +02:00
Atgeirr Flø Rasmussen
2c206e0cd4 Finished initial attempt at miscibility support.
Not yet tested. Also, no way to initialize gas-oil ratio yet.
2013-05-27 11:32:35 +02:00
Atgeirr Flø Rasmussen
cbb7b07496 Added method fluidRsMax(), added rs as a primary variable.
Also increased amount of whitespace between methods for readability.
2013-05-27 10:29:04 +02:00
Atgeirr Flø Rasmussen
78fa581417 Fix some bugs: referring to the wrong phase in two places. 2013-05-27 00:24:38 +02:00
Atgeirr Flø Rasmussen
09c4362e3c Added solveJacobianSystem() method, finished step().
Code is now functionally complete apart from lacking miscibility,
not writing to all promised output variables and not writing the
promised output to disk. Initial testing has been unsuccessful,
so there are bugs in the code.
2013-05-26 11:49:44 +02:00
Atgeirr Flø Rasmussen
1d4af250ac Add well contributions to mass balance residuals. 2013-05-26 09:52:58 +02:00
Atgeirr Flø Rasmussen
8a740eeab4 Merge remote-tracking branch 'bska/fully-implicit' into fully-implicit 2013-05-25 10:50:00 +02:00
Atgeirr Flø Rasmussen
b88dfd6af2 Added assembly of well equations.
This has not been tested.
Well contributions to mass balance equations are not done yet.
2013-05-25 10:47:22 +02:00
Atgeirr Flø Rasmussen
2ebd58fad2 Added bhp as a primary variable.
Changed interface of constantState() and variableState() to also
take a WellState as input. Some comments added with minor layout
changes.
2013-05-24 23:20:15 +02:00