This change has been made in both BlackoilPropsAdInterface
and BlackoilPropsAdFromDeck. Only remaining overloads are
those using AD objects and passing the PhasePresence for
each data point.
1) swatinit() is changed to setSwatInitScaling() to make it obvious that
we are modifying the props.
2) the descriptions of saturation and pc now makes more sense
3) the method is removed from the sibling class and the interface and
the type of new_props is changed from BlackoilPropsAdInterface to
BlackoilPropsAdFromDeck
5) The same modification is added to sim_fibo_ad_cp
The capillary pressure function in new_props is scaled to match the
capillary pressure function in props.
This is a temporary workaround while the simulator uses two different
property object.
With this commit we add the possibility to start with a global representation
of a simulator that is read on each process and afterwards this presentation
is redistributed among the processors together with the properties and
state data needed to initialize the simulation.
There still is no parallel well handling and no parallel output. But with the
equilibrium example of @dr-robertk and deactivated output we can already
perform parallel runs.
In the parallel simulator we will have to be able adress only poperties on
some part of the global grid. To create thos properties we need to be able
to copy the grid independant data of the properties object and resize the rest.
This commit adds a construct taking a properties object for reading and a
new number of cells to accomplish this.
The initial definition of the phase indices seems to be in
opm/core/props/BlackoilPhases.hpp. Nevertheless there were
several redefinitions of the same or similar enums (either
Aqua, Liquid, and Vapor, or Water, Oil, and Gas). Surprisingly
most often these definitions did not use the original values.
This is bound to break if there is a change upstream.
This patch limits the definition to one place in opm-autodiff,
namely opm/autodiff/BlackoilPropsAdInterface.hpp. To avoid
downstream confusion we define both the Water and Aqua triplets.
In addition we define the maximum number of phases to use at compile
time.
Note that this patch does not introduce any real temperature
dependence but only changes the APIs for the viscosity and for the
density related methods. Note that I also don't like the fact that
this requires so many changes to so many files, but with the current
design of the property classes I cannot see a way to avoid this...
When this kw is active, BlackoilPropsAdFromDeck now modifies rvSat
and rsSat curves cell-wise by a power of (sat_oil_cell /
sat_oil_cell_historical_max). Currently, the associated jacobians do
not reflect terms of type d/d_sat_oil, but code for doing this is given
as comments to BlackoilPropsAdFromDeck::applyVap(ADB& r, ...).
i.e. reading the grid properties from EclipseState instead of from the
raw deck. This requires that all deck files exhibit a GRID and a
SCHEDULE section or else EclipseState will throw in the constructor.
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.
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.
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.
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.