Пример #1
0
    static Evaluation vaporPressure(const Evaluation& temperature)
    {
        typedef MathToolbox<Evaluation> Toolbox;

        if (temperature > criticalTemperature())
            return criticalPressure();
        if (temperature < tripleTemperature())
            return 0; // N2 is solid: We don't take sublimation into
                      // account

        // note: this is the ancillary equation given on page 1368
        const Evaluation& sigma = 1.0 - temperature/criticalTemperature();
        const Evaluation& sqrtSigma = Toolbox::sqrt(sigma);
        const Scalar N1 = -6.12445284;
        const Scalar N2 = 1.26327220;
        const Scalar N3 = -0.765910082;
        const Scalar N4 = -1.77570564;
        return
            criticalPressure() *
            Toolbox::exp(criticalTemperature()/temperature*
                         (sigma*(N1 +
                                 sqrtSigma*N2 +
                                 sigma*(sqrtSigma*N3 +
                                        sigma*sigma*sigma*N4))));
    }
Пример #2
0
    static Evaluation vaporPressure(const Evaluation& T)
    {
        typedef Opm::MathToolbox<Evaluation> Toolbox;

        if (T > criticalTemperature())
            return criticalPressure();
        if (T < tripleTemperature())
            return 0; // water is solid: We don't take sublimation into account

        static const Scalar n[10] = {
            0.11670521452767e4, -0.72421316703206e6, -0.17073846940092e2,
            0.12020824702470e5, -0.32325550322333e7, 0.14915108613530e2,
            -0.48232657361591e4, 0.40511340542057e6, -0.23855557567849,
            0.65017534844798e3
        };

        Evaluation sigma = T + n[8]/(T - n[9]);

        Evaluation A = (sigma + n[0])*sigma + n[1];
        Evaluation B = (n[2]*sigma + n[3])*sigma + n[4];
        Evaluation C = (n[5]*sigma + n[6])*sigma + n[7];

        Evaluation tmp = 2.0*C/(Toolbox::sqrt(B*B - 4.0*A*C) - B);
        tmp *= tmp;
        tmp *= tmp;

        return 1e6*tmp;
    }
Пример #3
0
    static Evaluation molarLiquidDensity_(Evaluation temperature)
    {
        typedef MathToolbox<Evaluation> Toolbox;

        temperature = Toolbox::min(temperature, 500.0); // regularization
        temperature = Toolbox::max(temperature, 250.0);

        const Scalar Z_RA = 0.2556; // from equation
        const Evaluation& expo = 1.0 + Toolbox::pow(1.0 - temperature/criticalTemperature(), 2.0/7.0);
        const Evaluation& V = Consts::R*criticalTemperature()/criticalPressure()*Toolbox::pow(Z_RA, expo); // liquid molar volume [cm^3/mol]

        return 1.0/V; // molar density [mol/m^3]
    }
Пример #4
0
    static Evaluation heatVap(const Evaluation& temperature, const Evaluation& /*pressure*/)
    {
        typedef MathToolbox<Evaluation> Toolbox;

        Evaluation T = Toolbox::min(temperature, criticalTemperature()); // regularization
        T = Toolbox::max(T, 0.0); // regularization

        const Scalar T_crit = criticalTemperature();
        const Scalar Tr1 = boilingTemperature()/criticalTemperature();
        const Scalar p_crit = criticalPressure();

        //        Chen method, eq. 7-11.4 (at boiling)
        const Scalar DH_v_boil =
            Consts::R * T_crit * Tr1
            * (3.978 * Tr1 - 3.958 + 1.555*std::log(p_crit * 1e-5 /*Pa->bar*/ ) )
            / (1.07 - Tr1); /* [J/mol] */

        /* Variation with temp according to Watson relation eq 7-12.1*/
        const Evaluation& Tr2 = T/criticalTemperature();
        const Scalar n = 0.375;
        const Evaluation& DH_vap = DH_v_boil * Toolbox::pow(((1.0 - Tr2)/(1.0 - Tr1)), n);

        return (DH_vap/molarMass());          // we need [J/kg]
    }
Пример #5
0
 /*!
  * \brief Molar volume of a component at the critical point [m^3/mol].
  */
 static Scalar criticalMolarVolume(unsigned compIdx)
 {
     return
         (compIdx == H2OIdx)
         ? H2O::criticalMolarVolume()
         : (compIdx == C1Idx)
         ? 0.290*R*criticalTemperature(C1Idx)/criticalPressure(C1Idx)
         : (compIdx == C3Idx)
         ? 0.277*R*criticalTemperature(C3Idx)/criticalPressure(C3Idx)
         : (compIdx == C6Idx)
         ? 0.264*R*criticalTemperature(C6Idx)/criticalPressure(C6Idx)
         : (compIdx == C10Idx)
         ? 0.257*R*criticalTemperature(C10Idx)/criticalPressure(C10Idx)
         : (compIdx == C15Idx)
         ? 0.245*R*criticalTemperature(C15Idx)/criticalPressure(C15Idx)
         : (compIdx == C20Idx)
         ? 0.235*R*criticalTemperature(C20Idx)/criticalPressure(C20Idx)
         : 1e100;
 }