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.
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...
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.
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.
- 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().
- 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.
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.