18#include <Hibiki_Ishii_nucleation_site_density.h>
23static constexpr double N_bar = 4.72e5;
24static constexpr double mu_angle = 0.722 * 180 / M_PI;
25static constexpr double mu2 = mu_angle * mu_angle;
26static constexpr double lambda_prime = 2.5e-6;
27static constexpr double R_gas_universal = 8.314462618;
30static void compute_intermediates(
double rho_v,
double rho_l,
double T_ref,
double p,
31 double L_vap,
double T_sat,
double sigma,
32 double theta,
double molar_mass,
33 double& f_rho_plus,
double& inv_Rc,
double& theta_factor)
35 const double R = R_gas_universal / molar_mass;
37 const double rho_p = std::log((rho_l - rho_v) / rho_v);
38 f_rho_plus = -0.01064 + 0.48246 * rho_p - 0.22712 * rho_p * rho_p + 0.05468 * rho_p * rho_p * rho_p;
40 inv_Rc = p * (-1 + std::exp(L_vap * std::max(T_ref - T_sat, 0.) / (R * T_ref * T_sat))) / (2. * sigma * (1 + rho_v / rho_l));
42 theta_factor = 1 - std::exp(-theta * theta / (8. * mu2));
45double Hibiki_Ishii_site_density(
double rho_v,
double rho_l,
double T_ref,
double p,
46 double L_vap,
double T_sat,
double sigma,
47 double theta,
double molar_mass)
49 double f_rho_plus, inv_Rc, theta_factor;
50 compute_intermediates(rho_v, rho_l, T_ref, p, L_vap, T_sat, sigma, theta, molar_mass,
51 f_rho_plus, inv_Rc, theta_factor);
53 return N_bar * theta_factor * (-1. + std::exp(f_rho_plus * lambda_prime * inv_Rc));
56double dT_ref_Hibiki_Ishii_site_density(
double rho_v,
double rho_l,
double T_ref,
double p,
57 double L_vap,
double T_sat,
double sigma,
58 double theta,
double molar_mass)
60 double f_rho_plus, inv_Rc, theta_factor;
61 compute_intermediates(rho_v, rho_l, T_ref, p, L_vap, T_sat, sigma, theta, molar_mass,
62 f_rho_plus, inv_Rc, theta_factor);
64 double dT_ref_inv_Rc = 0.;
65 if (T_ref - T_sat > 0.)
67 const double R = R_gas_universal / molar_mass;
68 dT_ref_inv_Rc = p * L_vap / (R * T_ref * T_ref) * std::exp(L_vap * (T_ref - T_sat) / (R * T_ref * T_sat)) / (2. * sigma * (1 + rho_v / rho_l));
71 return N_bar * theta_factor * f_rho_plus * lambda_prime * dT_ref_inv_Rc * std::exp(f_rho_plus * lambda_prime * inv_Rc);