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)))); }
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] }
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; }
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; }
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] }
static Evaluation gasViscosity(Evaluation temperature, const Evaluation& /*pressure*/, bool /*regularize*/=true) { typedef MathToolbox<Evaluation> Toolbox; temperature = Toolbox::min(temperature, 500.0); // regularization temperature = Toolbox::max(temperature, 250.0); // reduced temperature const Evaluation& Tr = temperature/criticalTemperature(); Scalar Fp0 = 1.0; Scalar xi = 0.00474; const Evaluation& eta_xi = Fp0*(0.807*Toolbox::pow(Tr,0.618) - 0.357*Toolbox::exp(-0.449*Tr) + 0.34*Toolbox::exp(-4.058*Tr) + 0.018); return eta_xi/xi/1e7; // [Pa s] }
/*! * \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; }