LhsEval density_(int regionIdx,
                  const LhsEval& temperature,
                  const LhsEval& pressure) const
 {
     const LhsEval& Bw = formationVolumeFactor_(regionIdx, temperature, pressure);
     Scalar rhowRef = BlackOilFluidSystem::referenceDensity(waterPhaseIdx, regionIdx);
     return rhowRef/Bw;
 }
    LhsEval viscosity_(int regionIdx,
                       const LhsEval& temperature,
                       const LhsEval& pressure) const
    {
        // Eclipse calculates the viscosity in a weird way: it
        // calcultes the product of B_w and mu_w and then divides the
        // result by B_w...
        Scalar BwMuwRef = waterViscosity_[regionIdx]*waterReferenceFormationVolumeFactor_[regionIdx];
        const LhsEval& Bw = formationVolumeFactor_(regionIdx, temperature, pressure);

        Scalar pRef = waterReferencePressure_[regionIdx];
        const LhsEval& Y =
            (waterCompressibility_[regionIdx] - waterViscosibility_[regionIdx])
            * (pressure - pRef);
        return BwMuwRef/((1 + Y*(1 + Y/2))*Bw);
    }
Example #3
0
    LhsEval density_(int regionIdx,
                     const LhsEval& temperature,
                     const LhsEval& pressure,
                     const LhsEval& XgO) const
    {
        Scalar rhooRef = BlackOilFluidSystem::referenceDensity(oilPhaseIdx, regionIdx);
        Scalar rhogRef = BlackOilFluidSystem::referenceDensity(gasPhaseIdx, regionIdx);

        const LhsEval& Bg = formationVolumeFactor_(regionIdx, temperature, pressure, XgO);

        LhsEval rhog = rhogRef/Bg;

        // the oil formation volume factor just represents the partial density of the gas
        // component in the gas phase. to get the total density of the phase, we have to
        // add the partial density of the oil component.
        const LhsEval& Rv = XgO/(1 - XgO) * (rhogRef/rhooRef);
        rhog += (rhogRef*Rv)/Bg;

        return rhog;
    }