TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Coalescence_bulles_2groupes_Smith.cpp
1/****************************************************************************
2* Copyright (c) 2022, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15/////////////////////////////////////////////////////////////////////////////
16
17/// T.R. Smith, J.P. Schlegel, T. Hibiki, M. Ishii, Mechanistic modeling of interfacial area transport in large diameter pipes,
18/// International Journal of Multiphase Flow, Volume 47, 2012, https://doi.org/10.1016/j.ijmultiphaseflow.2012.06.009
19
20/////////////////////////////////////////////////////////////////////////////
21
22
23#include <Coalescence_bulles_2groupes_Smith.h>
24#include <Pb_Multiphase.h>
25
26
27Implemente_instanciable(Coalescence_bulles_2groupes_Smith, "Coalescence_bulles_2groupes_Smith", Coalescence_bulles_2groupes_base);
28// XD Coalescence_bulles_2groupes source_base Coalescence_bulles_2groupes NO_BRACE Source term of interfacial area
29// XD attr bloc bloc_lecture bloc REQ hydraulic diameter should be specified within this bloc
30// XD attr smith chaine smith REQ Smith correlation
31
33{
34 return os;
35}
36
38{
39
40 return is;
41}
42
43void Coalescence_bulles_2groupes_Smith::coefficient_RC(const DoubleTab& alpha, const DoubleTab& alpha_p, const DoubleTab& p, const DoubleTab& T,
44 const DoubleTab& rho, const DoubleTab& nu, const DoubleTab& sigma, const double Dh,
45 const DoubleTab& ndv, const DoubleTab& d_bulles,
46 const DoubleTab& eps, const DoubleTab& k_turb, const int n_l, const int n_g1, const int n_g2,
47 DoubleTab& coeff) const
48{
49
50 const double lambda_RC1 = std::exp(-C_RC0 * std::sqrt(d_bulles(n_g1) * rho(n_l) / sigma(n_g1, n_l)) * std::cbrt(d_bulles(n_g1) * eps(n_l)));
51 const double D_crit = 4. * std::sqrt(sigma(n_g2, n_l) / g / (rho(n_l) - rho(n_g2)));
52 const double d2_eff = std::max(d_bulles(n_g2), D_crit);
53 const double lambda_RC2 = std::exp(-C_RC0 * std::sqrt(d2_eff * rho(n_l) / sigma(n_g2, n_l)) * std::cbrt(d2_eff * eps(n_l)));
54 const double alpha_max_cbrt = std::cbrt(alpha_max);
55 const double alpha_clipped_cbrt = std::cbrt(std::min(alpha(n_g1), alpha_coal_max_));
56 const double alpha_p_clipped_cbrt = std::cbrt(std::min(alpha_p(n_g1), alpha_coal_max_));
57 const double ratio_Dc_D2 = D_crit / d2_eff;
58
59 const double formfunc_alpha = (alpha(n_g1) > 1. / fac_sec_) ? (1. - std::exp(-C_RC0 * (alpha_max_cbrt * alpha_clipped_cbrt) / std::max(alpha_max_cbrt - alpha_clipped_cbrt, 1. / fac_sec_))) : 0.;
60 const double formfunc_alpha_p = (alpha(n_g1) > 1. / fac_sec_) ? (1. - std::exp(-C_RC0 * (alpha_max_cbrt * alpha_p_clipped_cbrt) / std::max(alpha_max_cbrt - alpha_p_clipped_cbrt, 1. / fac_sec_))) : 0.;
61 const double dformfunc_alpha_dalpha = (alpha(n_g1) > 1. / fac_sec_) ? (1. / alpha_max_cbrt / 3. * (1. - std::exp(-C_RC0 * (alpha_max_cbrt * alpha_clipped_cbrt) / (alpha_max_cbrt - alpha_clipped_cbrt))) / (alpha_clipped_cbrt * alpha_clipped_cbrt) / (alpha_max_cbrt - alpha_clipped_cbrt) / (alpha_max_cbrt - alpha_clipped_cbrt) + std::exp(-C_RC0 * (alpha_max_cbrt * alpha_clipped_cbrt) / (alpha_max_cbrt - alpha_clipped_cbrt)) / (alpha_max_cbrt - alpha_clipped_cbrt) * (C_RC0 / alpha_clipped_cbrt / 3.) / (alpha_max_cbrt - alpha_clipped_cbrt) * (1. / std::min(alpha(n_g1) * alpha(n_g1), alpha_coal_max_) + 1. / (alpha_max_cbrt - alpha_clipped_cbrt))) : 0.;
62 const double formfunc_alpha2 = std::max(1. - std::exp(-C_RC0 * (alpha(n_g2) * alpha(n_g2))), 0.) * std::max(1. - 0.37 * std::pow(ratio_Dc_D2, 3.), 0.);
63
64 // RC (1) coefficient for secmem
65 coeff(n_g1, n_l) = (alpha(n_g1) > 1. / fac_sec_) ? -0.17 * C_RC1 * lambda_RC1 * formfunc_alpha / (alpha_max_cbrt / (alpha_max_cbrt - alpha_clipped_cbrt)) : 0.;
66
67 // dRC (1) coefficient for mat
68 if (alpha(n_g1) < alpha_coal_max_)
69 {
70 coeff(n_l, n_g1) = (alpha(n_g1) > 1. / fac_sec_) ? -0.17 * C_RC1 * lambda_RC1 * dformfunc_alpha_dalpha : 0.;
71 coeff(n_l, n_l) = (alpha(n_g1) > 1. / fac_sec_) ? -1.14 * C_RC122 * (lambda_RC2 * C_RC0 * (alpha_max_cbrt * alpha_max_cbrt) / 3. / (alpha_clipped_cbrt * alpha_clipped_cbrt) / ((alpha_max_cbrt - alpha_clipped_cbrt) * (alpha_max_cbrt - alpha_clipped_cbrt)) * std::exp(-C_RC0 * (alpha_max_cbrt * alpha_clipped_cbrt) / (alpha_max_cbrt - alpha_clipped_cbrt))) : 0.;
72 }
73 else
74 {
75 coeff(n_l, n_g1) = 0.;
76 coeff(n_l, n_l) = 0.;
77 }
78
79 // RC (2) coefficient for secmem
80 coeff(n_g2, n_l) = (alpha(n_g2) > 1. / fac_sec_) ? -95.7 * C_RC2 * lambda_RC2 * formfunc_alpha2 / Dh / Dh : 0.;
81
82 // dRC (2) coefficient for mat
83 coeff(n_l, n_g2) = (alpha(n_g2) > 1. / fac_sec_) ? -95.7 * C_RC2 * lambda_RC2 * std::max(1. - 0.37 * std::pow(ratio_Dc_D2, 4.), 0.) / Dh / Dh * C_RC0 * std::exp(-C_RC0 * (alpha(n_g2) * alpha(n_g2))) / 2. / std::sqrt(std::min(alpha(n_g2), 0.81)) : 0.;
84
85 // RC (112) coefficient for 1st group for secmem
86 coeff(n_g1, n_g1) = (alpha(n_g1) > 1. / fac_sec_) ? 4.1 * C_RC1 * lambda_RC1 / (alpha_max_cbrt * alpha_max_cbrt) * formfunc_alpha_p * std::max(1. - 2. / 3. * D_crit / d_bulles(n_g1), 0.) : 0.;
87
88 // RC (122) coefficient for 1st group for secmem
89 coeff(n_g1, n_g2) = (alpha(n_g1) > 1. / fac_sec_) ? -1.14 * C_RC122 * formfunc_alpha * lambda_RC2 : 0.;
90
91 // RC (122) coefficient for 2nd group for secmem
92 coeff(n_g2, n_g1) = (alpha(n_g1) > 1. / fac_sec_) ? 1.80 * C_RC122 * lambda_RC2 * formfunc_alpha_p : 0.;
93
94}
95
96void Coalescence_bulles_2groupes_Smith::coefficient_WE(const DoubleTab& alpha, const DoubleTab& p, const DoubleTab& T,
97 const DoubleTab& rho, const DoubleTab& nu, const DoubleTab& sigma, const double Dh,
98 const DoubleTab& ndv, const DoubleTab& d_bulles,
99 const DoubleTab& eps, const DoubleTab& k_turb, const int n_l, const int n_g1, const int n_g2,
100 DoubleTab& coeff) const
101{
102
103 const double alpha_l1 = 1. - alpha(n_g1);
104 const double alphafonction_3_over2 = std::pow(alpha_l1, 3. / 2.);
105 const double alphafonction_9_over7 = std::pow(alpha_l1, 9. / 7.);
106 const double alphafonction_5_over2 = std::pow(alpha_l1, 5. / 2.);
107 const double C_D1 = 2. / 3. * d_bulles(n_g1) * std::sqrt(g * std::abs(rho(n_l) - rho(n_g1)) / sigma(n_g1, n_l)) * ((1. + 17.67 * alphafonction_9_over7) / (18.67 * alphafonction_3_over2)) * ((1. + 17.67 * alphafonction_9_over7) / (18.67 * alphafonction_3_over2));
108 const double Ur1 = std::min(ndv(n_l, n_g1), std::sqrt(4. / 3. * d_bulles(n_g1) / C_D1 * g * std::abs(rho(n_l) - rho(n_g1)) / rho(n_l) * (alpha(n_l))));
109 const double D_crit = 4. * std::sqrt(sigma(n_g2, n_l) / g / (rho(n_l) - rho(n_g2)));
110 const double d2_eff = std::max(d_bulles(n_g2), D_crit);
111 const double C_D2 = 8. / 3. * (1. - alpha(n_g2)) * (1. - alpha(n_g2));
112 const double Ur2 = std::min(ndv(n_l, n_g2), std::sqrt(4. / 3. * d2_eff / C_D2 * g * std::abs(rho(n_l) - rho(n_g2)) / rho(n_l) * (alpha(n_l))));
113 const double ratio_Dc_D2 = D_crit / d2_eff;
114 const double formfunc_alpha = std::max(1. - std::exp(-0.7 * alpha(n_g2)), 0.) * std::max(1. - 0.1 * ratio_Dc_D2 * ratio_Dc_D2, 0.);
115 const double Uw12 = std::max(0.94 * Ur2 * std::cbrt(C_D2) + Ur1 - Ur2, 0.);
116
117 // WE (1) coefficient for secmem
118 coeff(n_g1, n_l) = (alpha(n_g1) > 1. / fac_sec_) ? -0.17 * C_WE1 * std::cbrt(C_D1) * Ur1 : 0.;
119
120 // dWE (1) coefficient for mat
121 coeff(n_l, n_g1) = (alpha(n_g1) > 1. / fac_sec_) ? -0.17 * C_WE1 * (Ur1 * 0.097282 * (3. * (17.67 * alphafonction_9_over7 + 1.) / 2. / alphafonction_5_over2 - 22.7186 * std::pow(alpha_l1, 17. / 14.)) / std::cbrt((17.67 * alphafonction_9_over7 + 1.) / alphafonction_3_over2)) : 0.;
122
123 // WE (2) coefficient for secmem
124 coeff(n_g2, n_l) = (alpha(n_g2) > 1. / fac_sec_) ? -1.02 * C_WE2 * (0.94 * Ur2 * std::cbrt(C_D2)) * formfunc_alpha : 0.;
125 coeff(n_l, n_g2) = (alpha(n_g2) > 1. / fac_sec_) ? -1.02 * C_WE2 * (0.94 * Ur2 * std::cbrt(C_D2)) * formfunc_alpha : 0.;
126
127 // WE (112) coefficient for 1st group for secmem
128 coeff(n_g1, n_g1) = (alpha(n_g1) > 1. / fac_sec_) ? 2.57 * C_WE112 * C_D1 * Ur1 * std::max(1. - 2. / 3. * D_crit / d_bulles(n_g1), 0.) : 0.;
129
130 // WE (122) coefficient for 1st group for secmem
131 coeff(n_g1, n_g2) = (alpha(n_g1) > 1. / fac_sec_) ? -0.33 * C_WE112 * Uw12 : 0.;
132
133 // WE (122) coefficient for 2nd group for secmem
134 coeff(n_g2, n_g1) = (alpha(n_g1) > 1. / fac_sec_) ? 0.922 * C_WE112 * Uw12 : 0.;
135}
136
Two-group bubble coalescence source terms using the Smith model.
void coefficient_WE(const DoubleTab &alpha, const DoubleTab &p, const DoubleTab &T, const DoubleTab &rho, const DoubleTab &nu, const DoubleTab &sigma, double Dh, const DoubleTab &ndv, const DoubleTab &d_bulles, const DoubleTab &eps, const DoubleTab &k_turb, const int n_l, const int n_g1, const int n_g2, DoubleTab &coeff) const override
void coefficient_RC(const DoubleTab &alpha, const DoubleTab &alpha_p, const DoubleTab &p, const DoubleTab &T, const DoubleTab &rho, const DoubleTab &nu, const DoubleTab &sigma, const double Dh, const DoubleTab &ndv, const DoubleTab &d_bulles, const DoubleTab &eps, const DoubleTab &k_turb, const int n_l, const int n_g1, const int n_g2, DoubleTab &coeff) const override
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
Classe de base des flux de sortie.
Definition Sortie.h:52