Esempio n. 1
0
    static Evaluation gasViscosity(const Evaluation& temperature, const Evaluation& /*pressure*/)
    {
        typedef MathToolbox<Evaluation> Toolbox;

        const Scalar Tc = criticalTemperature();
        const Scalar Vc = 90.1; // critical specific volume [cm^3/mol]
        const Scalar omega = 0.037; // accentric factor
        const Scalar M = molarMass() * 1e3; // molar mas [g/mol]
        const Scalar dipole = 0.0; // dipole moment [debye]

        Scalar mu_r4 = 131.3 * dipole / std::sqrt(Vc * Tc);
        mu_r4 *= mu_r4;
        mu_r4 *= mu_r4;

        Scalar Fc = 1 - 0.2756*omega + 0.059035*mu_r4;
        const Evaluation& Tstar = 1.2593 * temperature/Tc;
        const Evaluation& Omega_v =
            1.16145*Toolbox::pow(Tstar, -0.14874) +
            0.52487*Toolbox::exp(- 0.77320*Tstar) +
            2.16178*Toolbox::exp(- 2.43787*Tstar);
        const Evaluation& mu = 40.785*Fc*Toolbox::sqrt(M*temperature)/(std::pow(Vc, 2./3)*Omega_v);

        // convertion from micro poise to Pa s
        return mu/1e6 / 10;
    }
Esempio n. 2
0
    static Evaluation liquidHeatCapacity(const Evaluation& temperature,
                                         const Evaluation& /*pressure*/)
    {
        /* according Reid et al. : Missenard group contrib. method (s. example 5-8) */
        /* Mesitylen: C9H12  : 3* CH3 ; 1* C6H5 (phenyl-ring) ; -2* H (this was to much!) */
        /* linear interpolation between table values [J/(mol K)]*/
        Evaluation H, CH3, C6H5;
        if(temperature<298.) {
            // extrapolation for temperature < 273K
            H = 13.4 + 1.2*(temperature-273.0)/25.;       // 13.4 + 1.2 = 14.6 = H(T=298K) i.e. interpolation of table values 273<T<298
            CH3 = 40.0 + 1.6*(temperature-273.0)/25.;     // 40 + 1.6 = 41.6 = CH3(T=298K)
            C6H5 = 113.0 + 4.2*(temperature-273.0)/25.;   // 113 + 4.2 =117.2 = C6H5(T=298K)
        }
        else if((temperature>=298.0)&&(temperature<323.)){ // i.e. interpolation of table values 298<T<323
            H = 14.6 + 0.9*(temperature-298.0)/25.;
            CH3 = 41.6 + 1.9*(temperature-298.0)/25.;
            C6H5 = 117.2 + 6.2*(temperature-298.0)/25.;
        }
        else if((temperature>=323.0)&&(temperature<348.)){// i.e. interpolation of table values 323<T<348
            H = 15.5 + 1.2*(temperature-323.0)/25.;
            CH3 = 43.5 + 2.3*(temperature-323.0)/25.;
            C6H5 = 123.4 + 6.3*(temperature-323.0)/25.;
        }
        else {
            assert(temperature>=348.0);

            // extrapolation for temperature > 373K
            H = 16.7+2.1*(temperature-348.0)/25.; // probably  leads to underestimates
            CH3 = 45.8+2.5*(temperature-348.0)/25.;
            C6H5 = 129.7+6.3*(temperature-348.0)/25.;
        }

        return (C6H5 + 3*CH3 - 2*H)/molarMass(); // J/(mol K) -> J/(kg K)
    }
Esempio n. 3
0
    static Evaluation gasEnthalpy(const Evaluation& temperature,
                                  const Evaluation& /*pressure*/)
    {
        // method of Joback
        const Scalar cpVapA = 31.15;
        const Scalar cpVapB = -0.01357;
        const Scalar cpVapC = 2.680e-5;
        const Scalar cpVapD = -1.168e-8;

        // calculate: \int_0^T c_p dT
        return
            1/molarMass()* // conversion from [J/(mol K)] to [J/(kg K)]

            temperature*(cpVapA + temperature*
                         (cpVapB/2 + temperature*
                          (cpVapC/3 + temperature*
                           (cpVapD/4))));

//#warning NIST DATA STUPID INTERPOLATION
//        Scalar T2 = 300.;
//        Scalar T1 = 285.;
//        Scalar h2 = 311200.;
//        Scalar h1 = 295580.;
//        Scalar h = h1+ (h2-h1) / (T2-T1) * (T-T1);
//        return h ;
    }
Esempio n. 4
0
 static Evaluation gasInternalEnergy(const Evaluation& temperature,
                                     const Evaluation& pressure)
 {
     return
         gasEnthalpy(temperature, pressure) -
         1/molarMass()* // conversion from [J/(mol K)] to [J/(kg K)]
         IdealGas::R*temperature; // = pressure * spec. volume for an ideal gas
 }
Real
BrineFluidProperties::massFractionToMoleFraction(Real xnacl) const
{
  // The average molar mass of brine from the mass fraction
  Real Mbrine = molarMass(xnacl);
  // The mole fraction is then
  return xnacl * Mbrine / _Mnacl;
}
Esempio n. 6
0
void initComchanMolars(Comchan &comchan) {
	comchan.carbonM = 12.0107;
	comchan.hydrogenM = 1.008;
	comchan.oxygenM = 15.9994;
	comchan.carbondioxideM = molarMass(0,1,2, comchan);
	comchan.ethanolM = molarMass(6,2,1, comchan);
	comchan.waterM = molarMass(2,0,1, comchan);
	comchan.monosaccharideM = molarMass(12,6,6, comchan);
	comchan.disaccharideM = molarMass(22,12,11, comchan);

	comchan.ethanolEoC = 1058000;
	comchan.sucroseEoC = 5648000;
	comchan.enthalpyC = comchan.sucroseEoC - comchan.ethanolEoC*4;

	comchan.watergL = 1000;
	comchan.ethanolgL = 789;
	comchan.carbondioxidegL = 1.98;
	comchan.disaccharidegL = 1590;
	comchan.monosaccharidegL = 1540;

	comchan.lastLoaded = -1;
	comchan.currentElement = 0;
}
Esempio n. 7
0
    static Evaluation gasHeatCapacity(const Evaluation& temperature,
                                      const Evaluation& /*pressure*/)
    {
        // method of Joback
        const Scalar cpVapA = 31.15;
        const Scalar cpVapB = -0.01357;
        const Scalar cpVapC = 2.680e-5;
        const Scalar cpVapD = -1.168e-8;

        return
            1/molarMass()* // conversion from [J/(mol K)] to [J/(kg K)]

            cpVapA + temperature*
            (cpVapB + temperature*
             (cpVapC + temperature*
              (cpVapD)));
    }
Real
BrineFluidProperties::rho(Real pressure, Real temperature, Real xnacl) const
{
  Real n1, n2, n11, n12, n1x1, n20, n21, n22, n23, n2x1, Tv;
  Real water_density;

  // The correlation requires the pressure in bar, not Pa.
  Real pbar = pressure * 1.0e-5;
  Real pbar2 = pbar * pbar;
  Real pbar3 = pbar2 * pbar;

  // The correlation requires mole fraction
  Real Xnacl = massFractionToMoleFraction(xnacl);

  n11 = -54.2958 - 45.7623 * std::exp(-9.44785e-4 * pbar);
  n21 = -2.6142 - 2.39092e-4 * pbar;
  n22 = 0.0356828 + 4.37235e-6 * pbar + 2.0566e-9 * pbar2;
  n1x1 = 330.47 + 0.942876 * std::sqrt(pbar) + 0.0817193 * pbar - 2.47556e-8 * pbar2 +
         3.45052e-10 * pbar3;
  n2x1 = -0.0370751 + 0.00237723 * std::sqrt(pbar) + 5.42049e-5 * pbar + 5.84709e-9 * pbar2 -
         5.99373e-13 * pbar3;
  n12 = -n1x1 - n11;
  n20 = 1.0 - n21 * std::sqrt(n22);
  n23 = n2x1 - n20 - n21 * std::sqrt(1.0 + n22);

  // The temperature Tv where the brine has the same molar volume as pure water
  // Note: correlation uses temperature in Celcius
  n1 = n1x1 + n11 * (1.0 - Xnacl) + n12 * (1.0 - Xnacl) * (1.0 - Xnacl);
  n2 = n20 + n21 * std::sqrt(Xnacl + n22) + n23 * Xnacl;
  Tv = n1 + n2 * (temperature - _T_c2k);

  // The density of water at temperature Tv
  // Note: convert Tv to Kelvin to calculate water density
  water_density = _water_fp->rho(pressure, Tv + _T_c2k);

  // The brine density is given by the water density scaled by the ratio of
  // brine molar mass to pure water molar mass
  return water_density * molarMass(xnacl) / _Mh2o;
}
Esempio n. 9
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]
    }
Esempio n. 10
0
 static Evaluation liquidDensity(const Evaluation& temperature, const Evaluation& /*pressure*/)
 { return molarLiquidDensity_(temperature)*molarMass(); }
Esempio n. 11
0
 static Evaluation gasDensity(const Evaluation& temperature, const Evaluation& pressure)
 { return IdealGas<Scalar>::density(Evaluation(molarMass()), temperature, pressure); }
Esempio n. 12
0
 static Evaluation liquidEnthalpy(const Evaluation& temperature, const Evaluation& /*pressure*/)
 {
     return 120.0/molarMass() * temperature; // [J/kg]
 }
Esempio n. 13
0
 static Evaluation gasPressure(const Evaluation& temperature, const Evaluation& density)
 {
     // Assume an ideal gas
     return IdealGas::pressure(temperature, density/molarMass());
 }
Esempio n. 14
0
 static Evaluation gasDensity(const Evaluation& temperature, const Evaluation& pressure)
 {
     // Assume an ideal gas
     return IdealGas::density(Evaluation(molarMass()), temperature, pressure);
 }
Esempio n. 15
0
 static Evaluation gasDensity(const Evaluation& temperature, const Evaluation& pressure)
 {
     // Assume an ideal gas
     return molarMass()*IdealGas::molarDensity(temperature, pressure);
 }