19 Real xv = qfrac.
w[i], xg = 1. - xv;
20 Real t = qfrac.
w[IDN] /
t3_[i];
23 #pragma omp simd reduction(+ : xg)
24 for (
int n = 0; n < NCLOUD; ++n) xg += -qfrac.
c[n];
28 Real xs =
svp_func1_[i][n](qfrac, i,
j) / qfrac.w[IPR];
32 rates[0] += xs - xv / (xg + xv);
47 if (cv_hat > 0.) alpha = (lv - 1.) / cv_hat;
49 Real s1 = xs / (1. - xs);
50 Real rate = (s1 * xg - xv) / (1. + alpha * xg * lv * s1 / (1. - xs));
66 if (rates[0] < 0. && std::abs(rates[0]) > xv) {
67 Real
r = xv / std::abs(rates[0]);
68 for (
auto& rate : rates) rate *=
r;
RealArrayX TryEquilibriumTP_VaporCloud(AirParcel const &qfrac, int ivapor, Real cv_hat=0., bool misty=false) const
Calculate the equilibrium mole transfer by cloud reaction vapor -> cloud.
std::array< Real, Size > beta_
Dimensionless latent heat.
std::vector< IndexSet > cloud_index_set_
cloud index set
SVPFunc1Container svp_func1_
saturation vapor pressure function: Vapor -> Cloud
std::array< Real, 1+NVAPOR > t3_
triple point temperature [K]
std::array< Real, Size > delta_
Dimensionless differences in specific heat capacity.
double min(double x1, double x2, double x3)
std::vector< Real > RealArrayX