Hello,
After thinking this all over multiple times, I have come to another
question, the answer to which may settle things in my head.
See, we initially have oil phase with some known concentrations, and we
inject gas, and at some point the gas phase appears because the
concentrations of the light components go up. The instantiation of the
gas phase is the job of PrimaryVariableSwitch. It takes "only second
phase" primary variables, that is, pressure + (Nc - 1) mole fractions in
oil phase, and returns "both phases" primary variables, that is,
pressure + saturation + (Nc - 2) mole fractions in gas phase.
Now, what are the assumptions that must be kept for the
PrimaryVariableSwitch? Must it keep the overall mole fractions, or must
it keep the mole fractions in the oil phase that were in the primary
variables? Or I am over-thinking this and it does not matter?
Best regards,
Dmitry
On 14.04.2021 14:35, Dmitry Pavlov wrote:
Hello,
I am having trouble with yet another numerical experiment and hope
that somebody can give an advice.
Basically, I am injecting gas into oil using the 2pnc model. I took
the Spe5 fluid system and removed the water phase and the water
component from it. So I am left with 6 components (C1, C3, C6, C10,
C15, C20) and two phases (gas, oil). I use the Peng-Robinson EOS that
is provided in DuMux in link with Spe5.
Initially, the reservoir contains only oil phase, and gas phase is
injected, as in Table 5 in the SPE5 paper [1].
What I am getting is
Calculating the gasPhase composition failed. Initial {x} = {0.166667
0.166667 0.166667 0.166667 0.166667 0.166667}, {fug_t} = {1.07818e+07
2.01958e+06 28947.1 4787.76 362.543 7.82472}, p = 3.33396e+07, T =
344.261
The gas phase actually does not appear in the reservoir (not in my
simulation, anyway, since the simulation stops almost instantly). I
will be grateful for any pointers and also to answers to the following
questions
1. Why it is necessary to solve the composition for gas phase when the
gas phase does not exist in the reservoir and only one phase (oil) is
present? I see the code in 2pnc/volumevariables.hh
if (phasePresence == secondPhaseOnly) { ...
ComputeFromReferencePhase::solve() ... }
and do not understand the idea behind it.
2. If I manage to run the simulation to the point where phase presence
changes from "oil" to "oil + gas", can I (in this particular case)
rely on the built-in TwoPNCPrimaryVariableSwitch?
Best regards,
Dmitry
[1] http://www.ipt.ntnu.no/~kleppe/pub/SPE-COMPARATIVE/papers/fifth.pdf
_______________________________________________
DuMux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux