blackoil: fix some screw ups with wet gas

This commit is contained in:
Andreas Lauser
2015-09-03 19:34:51 +02:00
parent ac14e53129
commit fb79b732d8
2 changed files with 9 additions and 12 deletions

View File

@@ -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)

View File

@@ -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: