Commit Graph

234 Commits

Author SHA1 Message Date
Andreas Lauser
1383eadf8f fix the fallout of the SimulatorTimer::currentTime() -> SimulatorTimer::simulationTimeElapsed() rename 2014-03-11 16:01:59 +01:00
Tor Harald Sandve
a19aff63e7 Adds new well formulation
Todo: incorporate WellDensitySegment. Currently values of the pressure
drop is hardcoded to make the rest of the code work
Todo: make it possible to shut perforation with crossflow.
2014-03-11 14:30:54 +01:00
Tor Harald Sandve
9cb7e8635e Adds -= operator
An elementwise -= operator is added to the autodiff class.
2014-03-11 14:30:54 +01:00
Joakim Hove
0c36af631f Using well_controls_well_is_open() function 2014-03-04 14:49:54 +01:00
Atgeirr Flø Rasmussen
5bcca58d31 Make BlackoilPropsAdInterface pure virtual again.
Done by adding (throwing) implementation to BlackoilPropsAd class.
2014-03-04 13:09:23 +01:00
Atgeirr Flø Rasmussen
3de050b19f Merge pull request #87 from osae/hysteresis
Hysteresis.
2014-03-04 10:30:07 +01:00
Atgeirr Flø Rasmussen
3627d9ec02 Make spline interpolation possible.
This restores the logic for choosing monotone splines for dead oil/gas pvt
tables, but the option is inactive (samples set to zero at top).
2014-03-03 10:31:21 +01:00
Atgeirr Flø Rasmussen
2cc5f0b421 Bugfix: PVDCO->PVCDO. 2014-03-03 10:30:39 +01:00
Atgeirr Flø Rasmussen
b4fe41249a Fix error output. Also very minor whitespace issues. 2014-03-03 10:29:13 +01:00
Joakim Hove
3208c61472 Merge pull request #89 from andlaus/parser-integrate_new_simulatortimer
Parser integrate new simulatortimer
2014-02-27 14:43:00 +01:00
Andreas Lauser
dd080c4515 first write out the result of a time step, then increment the timer
if done the other way round we would make an assertation in TimeMap
false and also the values returned by SimulationTimer would be for the
next time step and not the current one...
2014-02-21 16:06:26 +01:00
osae
305512cc21 Hysteresis.
SimulatorFullyImplicitBlackoil reports saturation values at each
completed time-step, allowing detection of hysteris behavior.
2014-02-18 14:50:29 +01:00
Andreas Lauser
f7541aa27a BlackoilPropsAdFromDeck: Add support for PVTO 2014-02-14 17:56:20 +01:00
Andreas Lauser
198f805c2a switch to the new parser's table utility classes 2014-02-14 17:56:08 +01:00
Andreas Lauser
2deeeef4e4 really use the new parser
in the previous commit this was #if 0'ed...
2014-02-14 17:56:08 +01:00
Andreas Lauser
7f485626a2 use the new parser to read the PVT and grid data from the deck
the old code has not yet been removed, but in the long term, this is
probably the way to go.
2014-02-14 17:56:07 +01:00
Andreas Lauser
627b1f3906 make the deck from opm-parser available to the black-oil PVT property classes 2014-02-14 17:56:07 +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
Atgeirr Flø Rasmussen
0b14af943b Forward declare PhaseUsage as struct, not class. 2014-02-07 14:38:57 +01:00
Markus Blatt
e05675bd41 Fixes warning about initialization order in FullyImpliciteBlackOilSolver. 2014-02-03 18:14:49 +01:00
Atgeirr Flø Rasmussen
614c3f35af Removed dead code.
The code was partially kept as a reminder to implement
proper well reporting and mass balance reporting. Now
well reporting has been taken care of, so we remove
the code.
2014-01-31 09:07:53 +01:00
Atgeirr Flø Rasmussen
436624f662 Write initial values to eclipse format output.
This yields output files that have the same behaviour as
eclipse in terms of number of steps, and what the steps mean.
2014-01-30 14:57:58 +01:00
Atgeirr Flø Rasmussen
38a48dd149 Fix indexing error in if-test. 2014-01-27 10:42:17 +01:00
Atgeirr Flø Rasmussen
f9ea03fe67 Renamed SegmentedWellModel->WellDensitySegmented. 2014-01-24 15:54:01 +01:00
Atgeirr Flø Rasmussen
2f7697e00d Merge branch 'master' into seg-well-model 2014-01-24 15:48: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
19f0a81db1 Fixed from bitwise to logical operator
The && is used instead of &
2014-01-24 13:15:29 +01:00
Tor Harald Sandve
b2ac4c7aac Fixed missing documentation 2014-01-24 13:14:08 +01:00
Atgeirr Flø Rasmussen
5d386f2a49 Bugfixes in treatment of perforation depths and final accumulation. 2014-01-23 12:42:57 +01:00
Atgeirr Flø Rasmussen
98371f660f Fix mixture calculation for volatile oil case. 2014-01-23 12:40:54 +01:00
Atgeirr Flø Rasmussen
ac6209640b Documented interface for SegmentedWellModel. 2014-01-22 13:55:22 +01:00
Atgeirr Flø Rasmussen
ad81cc6a37 Initial version of segmented well model.
This computes pressure differences with respect to the bottom-hole pressure
for each well perforation, based on the well flows. It is explicit and not
implicit, using the previous time step's flow rates to calculate the necessary
densities.
2014-01-22 12:53:05 +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
Tor Harald Sandve
3c5b0b9e73 Add interface for wet gas
The pvt interface is extened to handle wet gas
1. A function for rvSat is added to the interface
2. An interface that takes rv and the fluid condition as an input for
the gas properties is added. The old interface without rv and the fluid
condition is kept in the file.
3. The new interface is implemented in BlackoilPropsAd and
BlackoilPropsAdFromDeck.

A simulator that tests wet gas is not yet implemented.
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
Joakim Hove
37274035bc Changed direct access to struct WellControls to rather use well_controls_get_xxx() api. 2014-01-09 09:39:08 +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
Andreas Lauser
65d86c4dec make the phase-presence docstring understandable for mere mortals 2013-12-04 12:35:21 +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
Bård Skaflestad
fc25415066 Merge branch 'mrst' of github.com:totto82/opm-autodiff into match-reference/properties 2013-12-02 17:00:15 +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
Andreas Lauser
2cf32b6f4f Use EclipseWriter from opm-core
Note: The interface here requires opm/opm-core#424.
2013-11-27 15:45:45 +01:00
Andreas Lauser
1c62934034 fix some clang 3.3 warnings
The most severe change probably is the removal of the AutoDiff
debugging helper functions which were useful from within a debugger
but unfortunately had to rely on a presumed linker bug in order not to
be removed in the final binary.

Also, some private attributes were unused. These have been removed and
the constructors of their respective classes have been adapted. Once
their intended functionality is actually implemented, they should be
brought back on an as-needed basis.

Thanks to @bska for the review!
2013-11-14 14:33:38 +01:00
Atgeirr Flø Rasmussen
258d8e0e24 Avoid infinite loop with two constant operands. 2013-10-24 13:41:55 +02:00
Atgeirr Flø Rasmussen
1eec8b16d6 Fix bug in operator+ introduced by previous commit.
Also make documentation clearer.
2013-10-24 00:17:15 +02:00
Atgeirr Flø Rasmussen
46a17945a3 Fix minor whitespace issue. 2013-10-23 22:42:32 +02:00
Atgeirr Flø Rasmussen
b996959c61 Add new AutoDiffBlock::constant() overload without block sizes.
This should simplify some uses of the autodiff code. The internals
have been changed to allow for objects to have an empty vector of
Jacobians, always treating that object as a constant.
2013-10-23 20:09:55 +02: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
Atgeirr Flø Rasmussen
f40271d96c Minimal fix for Eigen versions lacking pow(Eigen::Array). 2013-10-20 22:02:32 +02:00
Bård Skaflestad
7b395fabbb Guard against null-pointer dereference.
This restores the check that was lost in commit 79562ca.
2013-10-03 16:30:54 +02:00
Atgeirr Flø Rasmussen
e50033e3a2 Merge pull request #39 from atgeirr/master
Fix boundary condition checking bug.
2013-10-03 07:21:54 -07:00
Atgeirr Flø Rasmussen
79562ca3cc Fix boundary condition checking bug. 2013-10-03 16:19:21 +02:00
Bård Skaflestad
8ad532c5b8 Fix warnings about "unused" parameters and typedefs.
CLang and recent GCC warn about the "typedef" 'OneColInt' in
AutoDiffHelpers.hpp being unused.  Similarly, GCC warns about unused
parameters in various place at level "-Wunused".  This change-set
either removes ('OneColInt') or suppresses those messages.
2013-09-26 19:21:45 +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
Atgeirr Flø Rasmussen
cc58bc3cef Fix minor issues pointed out by bska. 2013-09-23 13:02:56 +02:00
Atgeirr Flø Rasmussen
edd7e1487b Documented class FullyImplicitBlackoilSolver. 2013-09-20 14:55:43 +02:00
Atgeirr Flø Rasmussen
cb892d6a18 Documented class DerivedGeology. 2013-09-20 14:55:24 +02:00
Atgeirr Flø Rasmussen
56e50f02fd Documented BlackoilPropsAdFromDeck. 2013-09-20 14:42:12 +02:00
Atgeirr Flø Rasmussen
a10eb61b66 Require deck and remove simple source term in fully implicit sim. 2013-09-20 14:32:29 +02:00
Atgeirr Flø Rasmussen
ad78cb8713 Document class BlackoilPropsAd. 2013-09-20 14:31:57 +02:00
Tor Harald Sandve
5dcc4aab3a Added an option to write well reports to a .mat file 2013-09-19 15:43:11 +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
9337a6227b Renamed misleading adfi -> fi.
Some classes and a program were renamed since they were not fully implicit
solvers despite their names indicating it.
2013-09-19 14:52:39 +02:00
Atgeirr Flø Rasmussen
0aa96af329 Documentation refinement. Added main doc file. 2013-09-19 14:45:40 +02:00
Atgeirr Flø Rasmussen
9a20c1ee02 Documented AutoDiffBlock. 2013-09-19 14:07:05 +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
Atgeirr Flø Rasmussen
e9b933bf4f Rename AutoDiff::Forward -> Opm::AutoDiff. 2013-09-19 11:32:47 +02:00
Atgeirr Flø Rasmussen
86e9e04d2f Remove unnecessary include statement. 2013-09-19 11:32:29 +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
Atgeirr Flø Rasmussen
a33f7e964b Let sim_2p_comp_ad throw if not given an input deck.
There is some code in place now to create wells for the no-deck case,
but since it does not work correctly yet, the simulator intercepts this
and throws.
2013-09-19 10:09:53 +02:00
Atgeirr Flø Rasmussen
6e2cdfc33f Add helpers grad, fullngrad, fulldiv. 2013-09-18 14:32:09 +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
Jens Olav Nygaard
383b88252a Modified according to comments in pull-request discussion. 2013-08-05 09:47:47 +02:00
Jens Olav Nygaard
d3a02e4891 Added ForwardBlock operator* for scalars. 2013-08-02 12:24:12 +02:00
Bård Skaflestad
a43fe760c1 Use the shared_ptr<> from Boost.
Not all implementations support the TR1, and if they do, the type
might not be in a namespace called std::tr1 .  Favour the
implementation from Boost for reasons of portability.

This is inspired (and necessitated) by commit OPM/opm-core@68eb3fb
which, incidentally, cleaned up some header pollution on which we
inadvertently depended.
2013-07-04 20:59:29 +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
Atgeirr Flø Rasmussen
90f3886d20 Add sign() utility function. 2013-06-03 00:32:44 +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
b23e622a61 Remove accidentally added file. 2013-06-02 08:59:00 +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