15#include <boost/algorithm/string.hpp>
37 const static double Pr_lookup[17] = {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0,
38 1.2, 1.4, 1.6, 1.8, 2.0, 2.5, 3.0, 4.0, 5.0};
39 const static double DP_Rt_lookup[17] = {1.01, 1.01, 1.01, 1.01, 1.01, 1.01,
40 1.01, 1.02, 1.02, 1.02, 1.02, 1.03, 1.03, 1.04, 1.05, 1.06, 1.07};
41 const static double A_ij_lookup[17] = {0.038042, 0.067433, 0.098317,
42 0.137610, 0.175081, 0.216376, 0.314051, 0.385736, 0.514553, 0.599184,
43 0.557725, 0.593007, 0.696001, 0.790770, 0.502100, 0.837452, 0.890390};
44 const static double B_ij_lookup[17] = {1.52267, 2.16794, 2.42910, 2.77605,
45 2.98256, 3.11384, 3.50264, 3.07773, 3.54744, 3.61216, 3.41882, 3.18415,
46 3.37660, 3.27984, 3.39031, 3.23513, 3.13001};
47 const static double C_ij_lookup[17] = {0., 0., 0., 0., 0., 0., 0., 0.141211,
48 0.278407, 0.372683, 0.504894, 0.678469, 0.665702, 0., 0.602907, 0., 0.};
49 const static double E_ij_lookup[17] = {1., 1., 1., 1., 1., 1., 1., 13.45454,
50 14., 10.00900, 8.57519, 10.37483, 11.21674, 1., 6.19043, 1., 1.};
59 for (
int j = 1; j < 17; j++) {
60 if (Pr_lookup[j] > Pr) {
61 frac = (Pr - Pr_lookup[j-1]) / (Pr_lookup[j] - Pr_lookup[j-1]);
78 double DP_Rt = DP_Rt_lookup[Pr_lower];
79 double A = A_ij_lookup[Pr_lower];
80 double B = B_ij_lookup[Pr_lower];
81 double C = C_ij_lookup[Pr_lower];
82 double E = E_ij_lookup[Pr_lower];
84 double DP_R_lower = DP_Rt*(1.0 - A*pow(Tr,-B))*(1.0 - C*pow(Tr,-E));
86 DP_Rt = DP_Rt_lookup[Pr_upper];
87 A = A_ij_lookup[Pr_upper];
88 B = B_ij_lookup[Pr_upper];
89 C = C_ij_lookup[Pr_upper];
90 E = E_ij_lookup[Pr_upper];
92 double DP_R_upper = DP_Rt*(1.0 - A*pow(Tr,-B))*(1.0 - C*pow(Tr,-E));
95 return DP_R_lower*(1.0 - frac) + DP_R_upper*frac;
105 std::unordered_map<string, AnyMap*> dbSpecies;
112 if (critPropsDb.
empty()) {
114 dbSpecies = critPropsDb[
"species"].asMap(
"name");
118 auto ucName = boost::algorithm::to_upper_copy(
m_thermo->
species(k)->name);
119 if (dbSpecies.count(ucName)) {
120 auto& spec = *dbSpecies.at(ucName);
121 auto& critProps = spec[
"critical-parameters"].as<
AnyMap>();
122 if (critProps.hasKey(
"acentric-factor")) {
123 m_w_ac[k] = critProps.convert(
"acentric-factor",
"1");
138 vector<double> molefracs(nSpecies);
141 vector<double> mf_temp(nSpecies, 0.0);
143 for (
size_t i = 0; i < nSpecies; ++i) {
149 "HighPressureGasTransport::initializeCriticalProperties",
150 "Species '{}' must have critical properties defined or non-zero "
151 "cubic parameters. Check the species definition or the thermo "
189 for (
size_t i = 0; i <
m_nsp; i++) {
190 for (
size_t j = 0; j <
m_nsp; j++) {
197 double sum_x_ij = x_i + x_j;
198 x_i = x_i/(sum_x_ij);
199 x_j = x_j/(sum_x_ij);
230 throw CanteraError(
"HighPressureGasTransport::getBinaryDiffCoeffs",
235 for (
size_t i = 0; i <
m_nsp; i++) {
236 for (
size_t j = 0; j <
m_nsp; j++) {
260 for (
size_t i = 0; i <
m_nsp; i++) {
262 for (
size_t j = 0; j <
m_nsp; j++) {
291 for (
size_t i = 0; i <
m_nsp; i++) {
293 for (
size_t j = 0; j <
m_nsp; j++) {
324 for (
size_t i=0; i<
m_nsp; i++) {
327 for (
size_t j=0; j<
m_nsp; j++) {
336 d[i] = 1.0 / (sum1 + sum2);
353 vector<double> molefracs(
m_nsp);
355 vector<double> cp_0_R(
m_nsp);
360 const double f_int = 1.32;
364 vector<double> Lambda_1_i(
m_nsp);
365 vector<double> f_i(
m_nsp);
366 vector<double> h_i(
m_nsp);
367 vector<double> V_k(
m_nsp);
369 m_thermo -> getPartialMolarVolumes(&V_k[0]);
370 for (
size_t i = 0; i <
m_nsp; i++) {
384 double Vr = V_k[i] /
Vcrit_i(i);
395 double Lambda_1_m = 0.0;
396 for (
size_t i = 0; i <
m_nsp; i++) {
397 for (
size_t j = 0; j <
m_nsp; j++) {
402 double Lambda_1_ij = 2*Lambda_1_i[i]*Lambda_1_i[j] /
403 (Lambda_1_i[i] + Lambda_1_i[j] +
Tiny);
405 Lambda_1_m += molefracs[i]*molefracs[j]*Lambda_1_ij;
411 double f_ij = sqrt(f_i[i]*f_i[j]);
414 double h_ij = 0.125*pow(pow(h_i[i],1.0/3.0) + pow(h_i[j],1.0/3.0), 3.0);
420 f_m += molefracs[i]*molefracs[j]*f_ij*h_ij;
423 h_m += molefracs[i]*molefracs[j]*h_ij;
426 mw_m += molefracs[i]*molefracs[j]*sqrt(mw_ij_inv*f_ij)*pow(h_ij,-4.0/3.0);
436 mw_m = pow(mw_m,-2.0)*f_m*pow(h_m,-8.0/3.0);
440 const double kg_m3_to_g_cm3 = 1e-3;
448 double F_m = sqrt(f_m*
m_ref_MW/mw_m)*pow(h_m,-2.0/3.0);
451 double Lambda_2_m = F_m*Lambda_2_ref;
453 return Lambda_1_m + Lambda_2_m;
457 double Tc,
double Vc,
double Zc,
double acentric_factor,
double mw)
464 double f_fac = (Tc /
m_ref_Tc)*theta_i;
465 double h_fac = (Vc /
m_ref_Vc)*phi_i;
466 double T_0 =
m_temp/f_fac;
473 double F = sqrt(f_fac*(mw/
m_ref_MW))*pow(h_fac,-2.0/3.0);
479 double acentric_factor)
481 double T_p = std::min(std::max(Tr,0.5), 2.0);
482 double V_p = std::min(std::max(Vr,0.5), 2.0);
485 + (0.316636 - 0.465684/T_p)*(V_p - 0.5));
490 double acentric_factor)
492 double T_p = std::min(std::max(Tr,0.5), 2.0);
493 double V_p = std::min(std::max(Vr,0.5), 2.0);
496 - 0.932813*(V_p - 0.754639)*log(T_p)))*(
m_ref_Zc/Zc);
503 double const correlation_viscosity_conversion = 1e-7;
510 const vector<double> c = {2.907741307e6, -3.312874033e6, 1.608101838e6,
511 -4.331904871e5, 7.062481330e4, -7.116620750e3,
512 4.325174400e2, -1.445911210e1, 2.037119479e-1};
515 for (
size_t i = 0; i < 9; i++) {
516 mu_0 += c[i]*pow(T0,(i+1.0-4.0)/3.0);
518 return correlation_viscosity_conversion*mu_0;
528 const double correlation_factor = 1e-3;
540 const vector<double> b = {-2.52762920e-1, 3.34328590e-1, 1.12, 1.680e2};
541 double Lambda_ref_1 = (b[0] + b[1]*pow(b[2] - log(T0/b[3]), 2))*rho0;
544 const vector<double> a = {-7.197708227, 8.5678222640e1, 1.2471834689e1,
545 -9.8462522975e2, 3.5946850007e-1, 6.9798412538e1,
547 double delta_lambda_ref = exp(a[0] + a[1]/T0)
548 * (exp((a[2] + a[3]*pow(T0,-1.5))*pow(rho0,0.1)
549 + (rho0/
m_ref_rhoc - 1)*sqrt(rho0)*(a[4] + a[5]/T0
550 + a[6]*pow(T0,-2))) - 1.0);
552 return Lambda_ref_star + (Lambda_ref_1 + delta_lambda_ref)*correlation_factor;
567 double xi = pow(numerator / denominator, 1.0/6.0);
570 return nondimensional_viscosity / xi;
576 double Pc_mix_n = 0.0;
577 double Pc_mix_d = 0.0;
590 double MW_H =
m_mw[0];
591 double MW_L =
m_mw[0];
596 vector<double> molefracs(nsp);
599 double x_H = molefracs[0];
600 for (
size_t i = 0; i <
m_nsp; i++) {
604 double Tr = tKelvin/Tc;
607 Tc_mix += Tc*molefracs[i];
609 Pc_mix_n += molefracs[i]*Zc;
612 Pc_mix_d += molefracs[i]*
Vcrit_i(i);
616 if (
m_mw[i] > MW_H) {
619 }
else if (
m_mw[i] < MW_L) {
629 double pascals_to_bar = 1e-5;
631 double dipole_ii =
m_dipole(i,i)*SI_to_Debye;
632 double mu_ri = 52.46*dipole_ii*dipole_ii*(
Pcrit_i(i)*pascals_to_bar)/(Tc*Tc);
641 if (spnames[i] ==
"He") {
643 }
else if (spnames[i] ==
"H2") {
645 }
else if (spnames[i] ==
"D2") {
648 FQ_mix_o += molefracs[i];
652 double Tr_mix = tKelvin/Tc_mix;
653 double Pc_mix =
GasConstant*Tc_mix*Pc_mix_n/Pc_mix_d;
658 double ratio = MW_H/MW_L;
660 if (ratio > 9 && x_H > 0.05 && x_H < 0.7) {
661 A = 1 - 0.01*pow(ratio,0.87);
676 double Tr,
double FP,
double FQ)
678 double first_term = 0.807*pow(Tr,0.618) - 0.357*exp(-0.449*Tr);
679 double second_term = 0.340*exp(-4.058*Tr) + 0.018;
680 return (first_term + second_term)*FP*FQ;
684 double Tr,
double Pr,
double FP_low,
double FQ_low,
double P_vap,
double P_crit)
691 if (Pr < P_vap/P_crit) {
692 double alpha = 3.262 + 14.98*pow(Pr, 5.508);
693 double beta = 1.390 + 5.746*Pr;
694 Z_2 = 0.600 + 0.760*pow(Pr,alpha) + (0.6990*pow(Pr,beta) - 0.60) * (1-Tr);
697 "HighPressureGasTransport::highPressureNondimensionalViscosity",
698 "State is outside the limits of the Lucas model, Pr ({}) >= "
699 "P_vap / P_crit ({}) when Tr ({}) <= 1.0", Pr, P_vap / P_crit, Tr);
701 }
else if (Tr > 1.0 && Tr < 40.0) {
702 if (Pr > 0.0 && Pr <= 100.0) {
705 double a_1 = 1.245e-3;
707 double gamma = -0.3286;
708 double a = a_1*exp(a_2*pow(Tr,gamma))/Tr;
712 double b = a*(b_1*Tr - b_2);
716 double delta = -37.7332;
717 double c = c_1*exp(c_2*pow(Tr, delta))/Tr;
721 double epsilon = -7.6351;
722 double d = d_1*exp(d_2*pow(Tr, epsilon))/Tr;
727 double f_2 = -0.1853;
728 double zeta = 0.4489;
729 double f = f_1*exp(f_2*pow(Tr, zeta));
731 Z_2 = Z_1*(1 + (a*pow(Pr,e)) / (b*pow(Pr,f) + pow(1+c*pow(Pr,d),-1)));
734 "HighPressureGasTransport::highPressureNondimensionalViscosity",
735 "The value of Pr ({}) is outside the limits of the Lucas model, "
736 "valid values of Pr are: 0.0 < Pr <= 100", Pr);
740 "HighPressureGasTransport::highPressureNondimensionalViscosity",
741 "The value of Tr is outside the limits of the Lucas model, "
742 "valid values of Tr are: 1.0 < Tr < 40", Tr);
745 double Y = Z_2 / Z_1;
746 double FP = (1 + (FP_low - 1)*pow(Y,-3.0)) / FP_low;
747 double FQ = (1 + (FQ_low - 1)*(1.0/Y - 0.007*pow(log(Y),4.0))) / FQ_low;
750 return Z_2 * FP * FQ;
756 return 1.22*pow(Q,0.15)*(1 + 0.00385*pow(pow(Tr - 12.0, 2.0), 1.0/MW)
765 }
else if (mu_r < 0.075) {
766 return 1 + 30.55*pow(std::max(0.292 - Z_crit,0.0), 1.72);
768 return 1 + 30.55*pow(std::max(0.292 - Z_crit, 0.0), 1.72)
769 *fabs(0.96 + 0.1*(Tr - 0.7));
793 for (
size_t i = 0; i <
m_nsp; i++) {
795 double m3_per_kmol_to_cm3_per_mol = 1e3;
796 double Vc =
Vcrit_i(i) * m3_per_kmol_to_cm3_per_mol;
824 double kg_per_m3_to_mol_per_cm3 = (1.0 /
m_MW_mix)*1e-3;
837 return thermal_conductivity;
841 double T,
double T_star,
double MW,
double rho,
double Cv,
double Vc,
842 double Tc,
double sigma,
double acentric_factor,
double mu_r,
850 double M_prime = MW / 1000.0;
854 static const vector<double> a = {2.44166, -5.0924e-1, 6.6107, 1.4543e1, 7.9274e-1,
856 static const vector<double> b = {7.4824e-1, -1.5094, 5.6207, -8.9139, 8.2019e-1,
858 static const vector<double> c = {-9.1858e-1, -4.9991e1, 6.4760e1, -5.6379,
859 -6.9369e-1, 9.5893, -5.4217e1};
860 static const vector<double> d = {1.2172e2, 6.9983e1, 2.7039e1, 7.4344e1, 6.3173,
865 double B_1 = a[0] + b[0]*acentric_factor + c[0]*pow(mu_r, 4.0) + d[0]*kappa;
866 double B_2 = a[1] + b[1]*acentric_factor + c[1]*pow(mu_r, 4.0) + d[1]*kappa;
867 double B_3 = a[2] + b[2]*acentric_factor + c[2]*pow(mu_r, 4.0) + d[2]*kappa;
868 double B_4 = a[3] + b[3]*acentric_factor + c[3]*pow(mu_r, 4.0) + d[3]*kappa;
869 double B_5 = a[4] + b[4]*acentric_factor + c[4]*pow(mu_r, 4.0) + d[4]*kappa;
870 double B_6 = a[5] + b[5]*acentric_factor + c[5]*pow(mu_r, 4.0) + d[5]*kappa;
871 double B_7 = a[6] + b[6]*acentric_factor + c[6]*pow(mu_r, 4.0) + d[6]*kappa;
873 double y = rho*Vc/6.0;
875 double G_1 = (1.0 - 0.5*y)/(pow(1.0-y, 3.0));
878 double G_2 = (B_1*((1.0-exp(-B_4*y)) / y) + B_2*G_1*exp(B_5*y) + B_3*G_1)
879 / (B_1*B_4 + B_2 + B_3);
881 double q = 3.586e-3*sqrt(Tc/M_prime) / pow(Vc, 2.0/3.0);
886 double beta = 0.7862 - 0.7109*acentric_factor
887 + 1.3168*acentric_factor*acentric_factor;
888 double Z = 2.0 + 10.5*Tr*Tr;
889 double psi = 1.0 + alpha*((0.215 + 0.28288*alpha - 1.061*beta + 0.26665*Z)
890 / (0.6366 + beta*Z + 1.061*alpha*beta));
893 double lambda = (31.2*
viscosity*psi/M_prime)*(1.0/G_2 + B_6*y)
894 + q*B_7*y*y*sqrt(Tr)*G_2;
912 double kg_per_m3_to_mol_per_cm3 = (1.0 /
m_MW_mix)*1e-3;
921 double micropoise_to_pascals_second = 1e-7;
922 return viscosity*micropoise_to_pascals_second;
947 vector<double> molefracs(
m_nsp);
949 for (
size_t i = 0; i <
m_nsp; i++) {
950 for (
size_t j = 0; j <
m_nsp; j++){
953 m_sigma_mix += molefracs[i]*molefracs[j]*pow(sigma_ij,3.0);
969 m_MW_mix += molefracs[i]*molefracs[j]*epsilon_over_k_ij*pow(sigma_ij,2.0)
983 double dipole_ii =
m_dipole(i,i)*SI_to_Debye;
984 double dipole_jj =
m_dipole(j,j)*SI_to_Debye;
987 m_mu_mix += molefracs[i]*molefracs[j]*pow(dipole_ii*dipole_jj,2.0)
1036 return A / pow(T_star, B) + C / exp(D*T_star) + E / exp(F*T_star);
1040 double MW,
double acentric_factor,
double mu_r,
double sigma,
double kappa)
1045 double Fc = 1 - 0.2756*acentric_factor + 0.059035*pow(mu_r, 4.0) + kappa;
1050 double viscosity = Fc*(26.69*sqrt(MW*T)/(sigma*sigma*omega));
1052 double micropoise_to_pascals_second = 1e-7;
1053 return micropoise_to_pascals_second*
viscosity;
1057 double rho,
double Vc,
double Tc,
double acentric_factor,
double mu_r,
1062 static const vector<double> a = {6.324, 1.210e-3, 5.283, 6.623, 19.745, -1.900,
1063 24.275, 0.7972, -0.2382, 0.06863};
1064 static const vector<double> b = {50.412, -1.154e-3, 254.209, 38.096, 7.630,
1065 -12.537, 3.450, 1.117, 0.06770, 0.3479};
1066 static const vector<double> c = {-51.680, -6.257e-3, -168.48, -8.464, -14.354,
1067 4.958, -11.291, 0.01235, -0.8163, 0.5926};
1068 static const vector<double> d ={1189.0, 0.03728, 3898.0, 31.42, 31.53, -18.15,
1069 69.35, -4.117, 4.025, -0.727};
1073 double E_1 = a[0] + b[0]*acentric_factor + c[0]*pow(mu_r, 4.0) + d[0]*kappa;
1074 double E_2 = a[1] + b[1]*acentric_factor + c[1]*pow(mu_r, 4.0) + d[1]*kappa;
1075 double E_3 = a[2] + b[2]*acentric_factor + c[2]*pow(mu_r, 4.0) + d[2]*kappa;
1076 double E_4 = a[3] + b[3]*acentric_factor + c[3]*pow(mu_r, 4.0) + d[3]*kappa;
1077 double E_5 = a[4] + b[4]*acentric_factor + c[4]*pow(mu_r, 4.0) + d[4]*kappa;
1078 double E_6 = a[5] + b[5]*acentric_factor + c[5]*pow(mu_r, 4.0) + d[5]*kappa;
1079 double E_7 = a[6] + b[6]*acentric_factor + c[6]*pow(mu_r, 4.0) + d[6]*kappa;
1080 double E_8 = a[7] + b[7]*acentric_factor + c[7]*pow(mu_r, 4.0) + d[7]*kappa;
1081 double E_9 = a[8] + b[8]*acentric_factor + c[8]*pow(mu_r, 4.0) + d[8]*kappa;
1082 double E_10 = a[9] + b[9]*acentric_factor + c[9]*pow(mu_r, 4.0) + d[9]*kappa;
1084 double y = rho*Vc/6.0;
1086 double G_1 = (1.0 - 0.5*y)/(pow(1.0-y, 3.0));
1089 double G_2 = (E_1*((1.0-exp(-E_4*y)) / y) + E_2*G_1*exp(E_5*y) + E_3*G_1)
1090 / (E_1*E_4 + E_2 + E_3);
1093 double eta_2 = E_7*y*y*G_2*exp(E_8 + E_9/T_star + E_10/(T_star*T_star));
1098 double Fc = 1 -0.2756*acentric_factor + 0.059035*pow(mu_r, 4.0) + kappa;
1103 double eta_1 = (sqrt(T_star)/omega) * (Fc*(1.0/G_2 + E_6*y)) + eta_2;
1105 double eta = eta_1 * 36.344 * sqrt(MW*Tc) / pow(Vc, 2.0/3.0);
Interface for class HighPressureGasTransport.
ThermoPhase object for the ideal gas equation of state - workhorse for Cantera (see Thermodynamic Pro...
Declaration for class Cantera::Species.
Header file defining class TransportFactory (see TransportFactory)
A map of string keys to values whose type can vary at runtime.
bool empty() const
Return boolean indicating whether AnyMap is empty.
static AnyMap fromYamlFile(const string &name, const string &parent_name="")
Create an AnyMap from a YAML file.
Base class for exceptions thrown by Cantera classes.
double m_kappa_mix
Mixture association factor [unitless].
vector< double > m_MW_i
Molecular weight [kg/kmol].
void initializePureFluidProperties()
Computes and stores pure-fluid specific properties each species.
double thermalConductivity() override
Calculates the high-pressure mixture thermal conductivity using the Chung method.
double m_MW_mix
Effective mixture molecular weight [kg/kmol].
double m_mu_r_mix
Mixture reduced dipole moment [unitless].
double m_Tc_mix
Mixture critical temperature [K].
double m_epsilon_over_k_mix
Mixture characteristic temperature [K].
vector< double > m_epsilon_over_k_i
Characteristic temperature [K].
vector< double > m_acentric_factor_i
Acentric factor [unitless].
double highPressureThermalConductivity(double T, double T_star, double MW, double rho, double Cv, double Vc, double Tc, double sigma, double acentric_factor, double mu_r, double kappa)
Computes the high-pressure thermal conductivity [W/m/K] using the Chung method.
void init(ThermoPhase *thermo, int mode=0) override
Initialize a transport manager.
double lowPressureViscosity(double T, double T_star, double MW, double acentric_factor, double mu_r, double sigma, double kappa)
Returns the low-pressure mixture viscosity [Pa·s] using the Chung method.
double m_Vc_mix
Mixture critical volume [m³/kmol].
vector< double > m_sigma_i
Effective molecular diameter [Angstroms].
double m_mu_mix
Mixture dipole moment [Debye].
double viscosity() override
Returns the high-pressure mixture viscosity [Pa·s] using the Chung method.
double m_sigma_mix
Effective mixture molecular diameter [Angstroms].
double m_acentric_factor_mix
Mixture acentric factor [unitless].
vector< double > m_kappa_i
Association factor [unitless].
double highPressureViscosity(double T_star, double MW, double rho, double Vc, double Tc, double acentric_factor, double mu_r, double kappa)
Returns the high-pressure mixture viscosity [micropoise] using the Chung method.
void computeMixtureParameters()
Computes the composition-dependent values of the parameters needed for the Chung viscosity model.
void resize(size_t n, size_t m, double v=0.0) override
Resize the matrix.
virtual void getTransportData()
Read the transport database.
vector< double > m_mw
Local copy of the species molecular weights.
vector< double > m_molefracs
Vector of species mole fractions.
double m_temp
Current value of the temperature [K] at which the properties in this object are calculated.
virtual void updateDiff_T()
Update the binary diffusion coefficients.
bool m_bindiff_ok
Update boolean for the binary diffusivities at unit pressure.
DenseMatrix m_bdiff
Matrix of binary diffusion coefficients at the reference pressure and the current temperature Size is...
DenseMatrix m_dipole
The effective dipole moment [Coulomb·m] for (i,j) collisions.
vector< double > m_w_ac
Pitzer acentric factor [dimensionless].
void getBinaryDiffCoeffs(const size_t ld, double *const d) override
Computes the matrix of binary diffusion coefficients [m²/s] using the Takahashi correction factor.
vector< double > m_Pcrit
Critical pressure [Pa] of each species.
DenseMatrix m_P_corr_ij
Matrix of Takahashi binary diffusion coefficient corrections.
virtual void updateCorrectionFactors()
Updates the matrix of species-pair Takahashi correction factors for use in computing the binary diffu...
double Pcrit_i(size_t i)
Returns the stored value of the critical pressure for species 'i'.
void getMixDiffCoeffs(double *const d) override
Returns the mixture-averaged diffusion coefficients [m²/s].
double Vcrit_i(size_t i)
Returns the stored value of the critical volume for species 'i'.
void getMixDiffCoeffsMole(double *const d) override
Returns the mixture-averaged diffusion coefficients [m²/s].
vector< double > m_Zcrit
Critical compressibility [unitless] of each species.
double Tcrit_i(size_t i)
Returns the stored value of the critical temperature for species 'i'.
double Zcrit_i(size_t i)
Returns the stored value of the critical compressibility for species 'i'.
vector< double > m_Vcrit
Critical volume [m³/kmol] of each species.
void getTransportData() override
Obtain required parameters from the 'critical-parameters' species input section, and checks the criti...
vector< double > m_Tcrit
Critical temperature [K] of each species.
void getMixDiffCoeffsMass(double *const d) override
Returns the mixture-averaged diffusion coefficients [m²/s].
void initializeCriticalProperties()
Computes and stores the estimate of the critical properties for each species.
double polarityCorrectionFactor(double mu_r, double Tr, double Z_c)
Returns the polarity correction term for a species based on reduced temperature, reduced dipole momen...
const double m_ref_Vc
Critical volume [m^3/kmol].
double elyHanleyDilutePureSpeciesViscosity(double V, double Tc, double Vc, double Zc, double acentric_factor, double mw)
Get the viscosity [Pa·s] of a pure species using the method of Ely and Hanley.
double m_Pr_mix
Reduced pressure.
double elyHanleyDiluteReferenceViscosity(double T0)
Returns the viscosity [Pa·s] for the reference fluid (methane) for low pressures.
double thermalConductivity() override
Returns the mixture high-pressure thermal conductivity [W/m/K] using a method of corresponding states...
double m_MW_mix
Molecular weight.
double highPressureNondimensionalViscosity(double Tr, double Pr, double FP_low, double FQ_low, double P_vap, double P_crit)
Returns the non-dimensional high-pressure mixture viscosity in using the Lucas method.
double quantumCorrectionFactor(double Q, double Tr, double MW)
Calculates quantum correction term of the Lucas method for a species based on the reduced temperature...
const double m_ref_MW
Molecular weight [kg/kmol].
double m_Tc_mix
Critical temperature.
double lowPressureNondimensionalViscosity(double Tr, double FP, double FQ)
Returns the non-dimensional low-pressure mixture viscosity in using the Lucas method.
double m_Tr_mix
Reduced temperature.
double m_P_vap_mix
Vapor pressure.
double elyHanleyReferenceThermalConductivity(double rho0, double T0)
Returns the thermal conductivity [W/m/K] of the reference fluid of methane.
double m_FP_mix_o
Polarity correction factor.
void init(ThermoPhase *thermo, int mode=0) override
Initialize a transport manager.
const double m_ref_Zc
Critical compressibility [unitless].
double viscosity() override
Returns the mixture high-pressure viscosity [Pa·s] using the Lucas method.
void computeMixtureParameters()
Computes the composition-dependent values of parameters that are needed for the Lucas viscosity model...
double m_FQ_mix_o
Quantum correction factor.
const double m_ref_Tc
Critical temperature [K].
double phiShapeFactor(double Tr, double Vr, double Zc, double acentric_factor)
Returns the phi shape factor of Leach and Leland for a pure species.
const double m_ref_acentric_factor
Acentric factor [unitless].
double m_Pc_mix
Critical pressure.
double thetaShapeFactor(double Tr, double Vr, double acentric_factor)
Returns the theta shape factor of Leach and Leland for a pure species.
const double m_ref_rhoc
Critical density [g/cm^3].
void update_T() override
Update the internal parameters whenever the temperature has changed.
void init(ThermoPhase *thermo, int mode=0) override
Initialize a transport manager.
void update_C() override
Update the internal parameters whenever the concentrations have changed.
virtual void setMoleFractions(const double *const x)
Set the mole fractions to the specified values.
size_t nSpecies() const
Returns the number of species in the phase.
double temperature() const
Temperature (K).
double meanMolecularWeight() const
The mean molecular weight. Units: (kg/kmol)
void getMoleFractions(double *const x) const
Get the species mole fraction vector.
virtual double density() const
Density (kg/m^3).
const vector< string > & speciesNames() const
Return a const reference to the vector of species names.
shared_ptr< Species > species(const string &name) const
Return the Species object for the named species.
virtual double pressure() const
Return the thermodynamic pressure (Pa).
Base class for a phase with thermodynamic properties.
virtual double critTemperature() const
Critical temperature (K).
virtual void getCp_R_ref(double *cprt) const
Returns the vector of nondimensional constant pressure heat capacities of the reference state at the ...
virtual double critPressure() const
Critical pressure (Pa).
virtual double critVolume() const
Critical volume (m3/kmol).
virtual double cv_mole() const
Molar heat capacity at constant volume. Units: J/kmol/K.
virtual double satPressure(double t)
Return the saturation pressure given the temperature.
virtual double critCompressibility() const
Critical compressibility (unitless).
ThermoPhase * m_thermo
pointer to the object representing the phase
size_t m_nsp
Number of species in the phase.
ThermoPhase & thermo()
Phase object.
int sign(T x)
Sign of a number.
const double Avogadro
Avogadro's Number [number/kmol].
const double lightSpeed
Speed of Light in a vacuum [m/s].
const double GasConstant
Universal Gas Constant [J/kmol/K].
Namespace for the Cantera kernel.
const double Tiny
Small number to compare differences of mole fractions against.
double takahashiCorrectionFactor(double Pr, double Tr)
Returns interpolated value of (DP)_R obtained from the data in Table 2 of the Takahashi 1975 paper,...
double neufeldCollisionIntegral(double T_star)
Returns the value of the Neufeld collision integral for a given dimensionless temperature.
Contains declarations for string manipulation functions within Cantera.
Various templated functions that carry out common vector and polynomial operations (see Templated Arr...