blackoil: fix some screw ups with wet gas
This commit is contained in:
@@ -501,7 +501,7 @@ private:
|
||||
// calculate the mass of the gas component [kg/m^3] in the oil phase. This is
|
||||
// equivalent to the gas dissolution factor [m^3/m^3] at current pressure times
|
||||
// the gas density [kg/m^3] at standard pressure
|
||||
const LhsEval& rho_oG = gasDissolutionFactorTable_[regionIdx].eval(pressure, /*extrapolate=*/true) * rho_gRef;
|
||||
const LhsEval& rho_oG = gasDissolutionFactor_(regionIdx, temperature, pressure) * rho_gRef;
|
||||
|
||||
// we now have the total density of saturated oil and the partial density of the
|
||||
// gas component within it. The gas mass fraction is the ratio of these two.
|
||||
@@ -522,9 +522,7 @@ private:
|
||||
Scalar MO = BlackOilFluidSystem::molarMass(oilCompIdx, regionIdx);
|
||||
|
||||
LhsEval avgMolarMass = MO/(1 + XoG*(MO/MG - 1));
|
||||
LhsEval xoG = XoG*avgMolarMass/MG;
|
||||
|
||||
return xoG;
|
||||
return XoG*avgMolarMass/MG;
|
||||
}
|
||||
|
||||
void updateSaturationPressureSpline_(int regionIdx)
|
||||
|
||||
@@ -489,14 +489,15 @@ private:
|
||||
Scalar rho_gRef = BlackOilFluidSystem::referenceDensity(gasPhaseIdx, regionIdx);
|
||||
Scalar rho_oRef = BlackOilFluidSystem::referenceDensity(oilPhaseIdx, regionIdx);
|
||||
|
||||
// calculate the mass of the oil component [kg/m^3] in the oil phase. This is
|
||||
// equivalent to the gas dissolution factor [m^3/m^3] at current pressure times
|
||||
// the gas density [kg/m^3] at standard pressure
|
||||
const LhsEval& rho_oG = oilVaporizationFactor_(regionIdx, temperature, pressure) * rho_gRef;
|
||||
// calculate the mass of the oil component [kg/m^3] in the gas phase. This is
|
||||
// equivalent to the oil vaporization factor [m^3/m^3] at current pressure times
|
||||
// the oil density [kg/m^3] at standard pressure
|
||||
const LhsEval& Rv = oilVaporizationFactor_(regionIdx, temperature, pressure);
|
||||
const LhsEval& rho_gO = Rv * rho_oRef;
|
||||
|
||||
// we now have the total density of saturated oil and the partial density of the
|
||||
// oil component within it. The gas mass fraction is the ratio of these two.
|
||||
return rho_oG/(rho_oRef + rho_oG);
|
||||
return rho_gO/(rho_gRef + rho_gO);
|
||||
}
|
||||
|
||||
template <class LhsEval>
|
||||
@@ -513,9 +514,7 @@ private:
|
||||
Scalar MO = BlackOilFluidSystem::molarMass(oilCompIdx, regionIdx);
|
||||
|
||||
const LhsEval& avgMolarMass = MO/(1 + (1 - XgO)*(MO/MG - 1));
|
||||
const LhsEval& xgO = XgO*avgMolarMass/MG;
|
||||
|
||||
return xgO;
|
||||
return XgO*avgMolarMass/MO;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user