OPM/opm-autodiff — pull request #74 by totto82 (2014-01-10 15:45:06+00:00)
Title: Implemention 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 PR 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 in OPM. (Then both fails to converge on
several steps.)

The following things are lacking in order to run and match SPE3
1. Read DISGAS and VAPOIL keyword (This is currently found in an ad-hoc way)
2. Read SWFN,SGFN and SOF3 keyword (For now these keywords are converted to manually to SWOF and SGOF
3. The density of the fluid mixture in the wells are not properly computed.
4. Proper implementation of rate constrains in the wells.