118 double deta_dalpha1 = 0;
119 double deta_dai1 = 0;
120 double deta_dalpha2 = 0;
121 double deta_dai2 = 0;
126 const double alpha_max_cbrt = std::cbrt(
alpha_max);
128 const double alpha_clipped_cbrt = std::cbrt(alpha_clipped);
129 const double alphag1_5_over3 = std::pow(in.
alpha(in.
n_g1), 5. / 3.);
130 const double alphag2_1_over3 = std::cbrt(in.
alpha(in.
n_g2));
131 const double alphag2_4_over3 = std::pow(in.
alpha(in.
n_g2), 4. / 3.);
132 const double ai1_cbrt = std::cbrt(in.
a_i(in.
n_g1));
133 const double ai2_cbrt = std::cbrt(in.
a_i(in.
n_g2));
134 const double eps_1_over3 = std::cbrt(in.
epsilon(in.
n_l));
135 const double alphafonction_3_over2 = std::sqrt(1. - in.
alpha(in.
n_g1)) *
140 const double D_crit =
144 const double khi_d =
b / 3. *
145 ((3. / 2. * D_etoile) * std::pow(
b * 3. / 2. * D_etoile,
p) *
146 std::exp(-
b * 3. / 2. * D_etoile)) /
147 (gamma_regularized_lower(
p + 1., 0.) -
148 gamma_regularized_lower(
p + 1.,
b * 3. / 2. * D_etoile));
149 const double C_D1 = std::max(
152 ((1. + 17.67 * std::pow(1. - in.
alpha(in.
n_g1), 9. / 7.)) /
153 (18.67 * alphafonction_3_over2)) *
154 ((1. + 17.67 * std::pow(1. - in.
alpha(in.
n_g1), 9. / 7.)) /
155 (18.67 * alphafonction_3_over2)),
163 std::sqrt(1. / 2. * D_crit *
g * std::abs(in.
rho(in.
n_l) - in.
rho(in.
n_g2)) /
165 const double We2 = 2. * in.
rho(in.
n_l) *
171 const double lambda_RC1 =
177 const double formfunc_alpha =
179 ? (1. - std::exp(-
C_RC1 * (alpha_max_cbrt * alpha_clipped_cbrt) /
180 (alpha_max_cbrt - alpha_clipped_cbrt)))
182 const double dformfunc_alpha_dalpha =
184 ? (1. / alpha_max_cbrt / 3. *
185 (1. - std::exp(-
C_RC0 * (alpha_max_cbrt * alpha_clipped_cbrt) /
186 (alpha_max_cbrt - alpha_clipped_cbrt))) /
187 (alpha_clipped_cbrt * alpha_clipped_cbrt) / (alpha_max_cbrt - alpha_clipped_cbrt) /
188 (alpha_max_cbrt - alpha_clipped_cbrt) +
189 std::exp(-
C_RC0 * (alpha_max_cbrt * alpha_clipped_cbrt) /
190 (alpha_max_cbrt - alpha_clipped_cbrt)) /
191 (alpha_max_cbrt - alpha_clipped_cbrt) * (
C_RC0 / alpha_clipped_cbrt / 3.) /
192 (alpha_max_cbrt - alpha_clipped_cbrt) *
195 1. / (alpha_max_cbrt - alpha_clipped_cbrt)))
197 const double Dc_etoile_ratio = D_crit / std::max(in.
d_bulles(in.
n_g2), D_crit);
198 const double Dc_etoile_16_over3 = std::pow(Dc_etoile_ratio, 16. / 3.);
199 const double Dc_etoile_6 = std::pow(Dc_etoile_ratio, 6.);
203 ? 3.15 *
C_RC1 * lambda_RC1 * formfunc_alpha / (alpha_max_cbrt * alpha_max_cbrt) *
204 (1. - 2. / 3. * D_etoile) * eps_1_over3 * alpha_clipped * alpha_clipped *
205 (ai1_cbrt * ai1_cbrt)
210 ? 3.15 *
C_RC1 * lambda_RC1 * formfunc_alpha /
211 (alpha_max_cbrt * alpha_max_cbrt) * (1. - 2. / 3. * D_etoile) *
212 eps_1_over3 * 2. * alpha_clipped * (ai1_cbrt * ai1_cbrt) +
213 3.15 *
C_RC1 * lambda_RC1 * dformfunc_alpha_dalpha /
214 (alpha_max_cbrt * alpha_max_cbrt) * (1. - 2. / 3. * D_etoile) *
215 eps_1_over3 * alpha_clipped * alpha_clipped * (ai1_cbrt * ai1_cbrt)
219 ? 3.15 *
C_RC1 * lambda_RC1 * formfunc_alpha /
220 (alpha_max_cbrt * alpha_max_cbrt) * (1. - 2. / 3. * D_etoile) *
221 eps_1_over3 * alpha_clipped * alpha_clipped * 2. / 3. /
227 ? 1.44 *
C_RC122 * lambda_RC1 * formfunc_alpha * eps_1_over3 * alphag1_5_over3 *
228 alphag2_4_over3 * (ai2_cbrt * ai2_cbrt)
234 ? 1.44 *
C_RC122 * lambda_RC1 * formfunc_alpha * eps_1_over3 * 5. / 3. *
235 (alpha_clipped_cbrt * alpha_clipped_cbrt) *
236 (alpha_clipped * alpha_clipped_cbrt * alpha_clipped_cbrt * alpha_clipped_cbrt) *
237 (ai2_cbrt * ai2_cbrt) +
238 1.44 *
C_RC122 * lambda_RC1 * dformfunc_alpha_dalpha * eps_1_over3 *
240 (alpha_clipped_cbrt * alpha_clipped_cbrt * alpha_clipped_cbrt *
241 alpha_clipped_cbrt) *
242 (ai2_cbrt * ai2_cbrt)
246 ? 1.44 *
C_RC122 * lambda_RC1 * formfunc_alpha * eps_1_over3 *
247 alphag1_5_over3 * 4. / 3. * std::cbrt(in.
alpha(in.
n_g2)) *
248 (ai2_cbrt * ai2_cbrt)
252 ? 1.44 *
C_RC122 * lambda_RC1 * formfunc_alpha * eps_1_over3 * alphag1_5_over3 *
253 alphag2_4_over3 * 2. / 3. / std::min(ai2_cbrt,
fac_sec_)
267 ? 3.85 *
C_WE1 * std::cbrt(C_D1) * Ur1 * in.
a_i(in.
n_g1)
279 std::sqrt(1. - std::min(
We_cr1 / We2, 1.)) *
280 std::max(0.15 * Dc_etoile_16_over3 - 0.117 * Dc_etoile_6, 0.) * eps_1_over3 *
281 in.
alpha(in.
n_l) * alphag2_1_over3 * (ai2_cbrt * ai2_cbrt)
289 ? -11.65 *
C_TI21 * std::exp(-
We_cr2 / We2) * std::sqrt(1. - std::min(
We_cr1 / We2, 1.)) *
290 std::max(0.15 * Dc_etoile_16_over3 - 0.117 * Dc_etoile_6, 0.) * eps_1_over3 *
292 (std::min(alphag2_1_over3 * alphag2_1_over3,
fac_sec_)) * (ai2_cbrt * ai2_cbrt)
297 ? -11.65 *
C_TI21 * std::exp(-
We_cr2 / We2) * std::sqrt(1. - std::min(
We_cr1 / We2, 1.)) *
298 std::max(0.15 * Dc_etoile_16_over3 - 0.117 * Dc_etoile_6, 0.) * eps_1_over3 *
299 in.
alpha(in.
n_l) * alphag2_1_over3 * 2. / 3. / (std::min(ai2_cbrt,
fac_sec_))
350 out.
inter2g1 = khi_d * D_etoile * D_etoile;
354 khi_d * D_etoile2 * D_etoile2 *
368 out.
inter3g1 = khi_d * D_etoile * D_etoile * D_etoile;
372 khi_d * D_etoile2 * D_etoile2 * D_etoile2 *
378 out.
da_inter3g2 = khi_d * D_etoile2 * D_etoile2 * D_etoile2 *
410 double dak_etaCo = 0.;
411 double dal_etaCo = 0.;
412 double dTk_etaCo = 0. ;
413 double dTl_etaCo = 0.;
414 double dp_etaCo = 0.;
417 double dak_etaPc = 0.;
418 double dal_etaPc = 0.;
419 double dTk_etaPc = 0. ;
420 double dTl_etaPc = 0.;
421 double dp_etaPc = 0.;
426 double dTk_GWn = 0. ;
443 Nuc = 4./M_PI*std::sqrt(Reb)*std::sqrt(Prl);
448 etaCo = -fac_Co1* (6. * in.
alpha(in.
n_g1) / dsm1 ) *(1.-in.
alpha(in.
n_l)) / dsm1 * Nuc * Ja1 ;
449 dak_etaCo = -fac_Co1* (6. / dsm1 ) *(1.-in.
alpha(in.
n_l)) / dsm1 * Nuc * Ja1 ;
450 dal_etaCo = fac_Co1* (6. * in.
alpha(in.
n_g1) / dsm1 ) / dsm1 * Nuc * Ja1 ;
452 dTl_etaCo = -fac_Co1* (6. * in.
alpha(in.
n_g1) / dsm1 ) *(1.-in.
alpha(in.
n_l)) / dsm1 * Nuc * dTl_Ja1 ;
453 dp_etaCo = -fac_Co1* (6. * in.
alpha(in.
n_g1) / dsm1 ) *(1.-in.
alpha(in.
n_l)) / dsm1 * Nuc * dp_Ja1 ;
457 const double fac_Pc1 = (1.-
pc);
458 etaPc = -fac_Pc1 * (6. * in.
alpha(in.
n_g1) / dsm1 ) / dsm1 * (1.-in.
alpha(in.
n_l)) * Nuc * Ja1 ;
459 dak_etaPc = -fac_Pc1 * (6. / dsm1 ) / dsm1 * (1.-in.
alpha(in.
n_l)) * Nuc * Ja1 ;
460 dal_etaPc =-fac_Pc1 * (6. * in.
alpha(in.
n_g1) / dsm1 ) / dsm1 * Nuc * Ja1 ;
462 dTl_etaPc = -fac_Pc1 * (6. * in.
alpha(in.
n_g1) / dsm1 ) / dsm1 * (1.-in.
alpha(in.
n_l)) * Nuc * dTl_Ja1 ;
463 dp_etaPc = -fac_Pc1 * (6. * in.
alpha(in.
n_g1) / dsm1 ) / dsm1 * (1.-in.
alpha(in.
n_l)) * Nuc * dp_Ja1 ;
472 out.
G1 = in.
rho(in.
n_g1) * (etaCo + etaPc ) + GWn;
476 out.
dT_G1(in.
n_l) = in.
rho(in.
n_g1) * (dTl_etaPc + dTl_etaCo ) + dTl_GWn ;
482 out.
da_G1(in.
n_l) = in.
rho(in.
n_g1) * (dal_etaPc + dal_etaCo ) + dal_GWn ;
486 out.
dp_G1 = in.
rho(in.
n_g1) * (dp_etaPc + dp_etaCo ) + dp_GWn ;
492 Nuc = 0.185 * std::pow(Reb , 0.7) * std::sqrt(Prl) ;
497 etaPc = - (6. * in.
alpha(in.
n_g2) / dsm2 ) /dsm2 * Nuc * Ja2 * (1.-in.
alpha(in.
n_l)) ;
498 dak_etaPc = - (6. / dsm2 ) / dsm2 * Nuc * Ja2 * (1.-in.
alpha(in.
n_l)) ;
499 dal_etaPc = (6. * in.
alpha(in.
n_g2) / dsm2 ) / dsm2 * Nuc * Ja2 ;
501 dTl_etaPc = - (6. * in.
alpha(in.
n_g2) / dsm2 ) / dsm2 * Nuc * (1.-in.
alpha(in.
n_l)) * dTl_Ja2 ;
502 dp_etaPc = - (6. * in.
alpha(in.
n_g2) / dsm2 ) /dsm2 * Nuc * (1.-in.
alpha(in.
n_l)) * dp_Ja2 ;
511 out.
G2 = in.
rho(in.
n_g2) * ( etaPc ) + GWn;