Commit Graph

196 Commits

Author SHA1 Message Date
Atgeirr Flø Rasmussen
bad64de4f2 Add currentControls() field to well state class.
This is done since the solver will need to be able to switch well controls
during Newton iterations. The current control specified in the Wells struct
will be used as default and initial value for currentControls().
2014-03-25 11:11:19 +01:00
Atgeirr Flø Rasmussen
33d58792de Fix sign bug in well contribution to mass balance. 2014-03-24 15:28:46 +01:00
Atgeirr Flø Rasmussen
fd4f5f5a26 Merge branch 'master' into new_well_formulation
Conflicts:
	opm/autodiff/FullyImplicitBlackoilSolver.cpp

To resolve conflicts, WellState was changed to WellStateFullyImplicitBlackoil
in multiple places, and perfRate() changed to perfPhaseRate() in
WellDensitySegmented.
2014-03-20 10:04:45 +01:00
Atgeirr Flø Rasmussen
f99b9b90a4 Merge pull request #101 from andlaus/sim_fibo_ad_use_new_wellmanager
sim_fibo_ad: convert to the new-style wells manager
2014-03-20 09:07:03 +01:00
Atgeirr Flø Rasmussen
d21e310d01 Merge pull request #98 from andlaus/reverse_increment_write_order_again
go back to incrementing the current simulation time first, then calling EclipseWriter::writeSolution()
2014-03-20 09:04:10 +01:00
Andreas Lauser
49a5b67137 sim_fibo_ad: fix writing
the initial condition was written multiple times. We now fix this by
not writing anything in the simulator and moving this logic to the
main loop..
2014-03-19 17:40:51 +01:00
Atgeirr Flø Rasmussen
295677c8c1 Use WellStateFullyImplicitBlackoil class instead of WellState. 2014-03-18 11:27:40 +01:00
Atgeirr Flø Rasmussen
e7f4637461 Add WellStateFullyImplicitBlackoil class.
This is intended to be used instead of the WellState class in the fully
implicit blackoil simulator. It contains a WellState to reuse the init()
method and to enable users to call functions requiring a WellState.
This is done with containment and an access member function,
basicWellState(), instead of with inheritance to minimize surprises.
2014-03-18 11:23:05 +01:00
Atgeirr Flø Rasmussen
e8ee805717 Work in progress: use WellDensitySegmented class.
This is work in progress since it is non-working: phaseRates() is
not used correctly, and changes must be made to WellState or equivalent.
2014-03-18 08:48:34 +01:00
Atgeirr Flø Rasmussen
737affb077 Minor whitespace adjustments. 2014-03-17 10:23:40 +01:00
Atgeirr Flø Rasmussen
d821afe11f Whitespace fix. 2014-03-17 10:14:45 +01:00
Andreas Lauser
0ce6093b69 go back to incrementing the current simulation time first, then calling EclipseWriter::writeSolution()
for this not to trigger an assertation after the last time step, the
changes of OPM/opm-parser#141 are required.
2014-03-11 16:05:00 +01:00
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