TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Dispersion_bulles_turbulente_Burns.cpp
1/****************************************************************************
2* Copyright (c) 2021, 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#include <Dispersion_bulles_turbulente_Burns.h>
17#include <Pb_Multiphase.h>
18#include <QDM_Multiphase.h>
19#include <TRUSTTrav.h>
20#include <Frottement_interfacial_base.h>
21#include <Sources_helpers_Multiphase.h>
22#include <math.h>
23
24Implemente_instanciable(Dispersion_bulles_turbulente_Burns, "Dispersion_bulles_turbulente_Burns", Dispersion_bulles_base);
25
27{
28 return os;
29}
30
32{
33 Param param(que_suis_je());
34 param.ajouter("minimum", &minimum_);
35 param.ajouter("a_res", &a_res_);
36 param.ajouter("g_", &g_);
37 param.ajouter("coefBIA_", &coefBIA_);
38 param.ajouter("Prt", &Prt_);
39 param.lire_avec_accolades_depuis(is);
40
42
43 const Pb_Multiphase& pbm = ref_cast(Pb_Multiphase, pb_.valeur());
44 if (pbm.has_correlation("frottement_interfacial"))
45 correlation_drag_ = pbm.get_correlation("frottement_interfacial");
46 else
47 Correlation_base::typer_lire_correlation(correlation_drag_, pbm, "frottement_interfacial", is);
48
49 return is;
50}
51
53{
54 if ((a_res_ == -1)
55 && (ref_cast(QDM_Multiphase, pb_->equation(0)).alpha_res()<0.99) ) // Not in homogeneous calculation
56 a_res_ = std::min(1., std::max(1.e-4, ref_cast(QDM_Multiphase, pb_->equation(0)).alpha_res()*100.));
57 else if (a_res_ == -1)
58 a_res_ = 1.e-6;
59}
60
62{
63 const Frottement_interfacial_base& corr = ref_cast(Frottement_interfacial_base, correlation_drag_.valeur());
64 int N = out.Ctd.dimension(0);
65
66 DoubleTrav coeff_drag(N, N, 2);
67 corr.coefficient(in.alpha, in.p, in.T, in.rho, in.mu, in.sigma, in.dh, in.nv, in.d_bulles, coeff_drag);
68
69 out.Ctd = 0;
70
71 for (int k = 0; k < N; k++)
72 if (k != n_l)
73 {
74 double nuBIA = 0.;
75
76 if ((bool)coefBIA_)
77 {
78 // Computation of nuBIA = (k_WIT + k_WIF)/omega_WIT
79 const double u_r = in.nv(k, n_l); // relative velocity
80 const double Reb = in.rho[n_l]*in.d_bulles[k]*u_r/in.mu[n_l]; // bubble Reynolds number
81 const int ind_trav = sigma_pair_index(k, n_l, N);
82 const double Eo = eotvos_number(g_, in.rho[n_l], in.rho[k], in.d_bulles[k], in.sigma[ind_trav]);
83 const double Cd = (u_r != 0) ? std::max(std::min(16./Reb*(1. + 0.15*std::pow(Reb, 0.687)), 48./Reb), 8.*Eo/(3.*(Eo + 4.))) : 0.; // if u_r=0, no drag, so no WIT, so dissipation=0
84 const double omega_WIT = 2.0*in.mu[n_l]*Cd*Reb/(C_lambda_*C_lambda_*in.d_bulles[k]*in.d_bulles[k]); // specific dissipation of WIT (defined as epsilon_WIT/kWIT)
85 //double k_WIF = 1./2. * in.alpha[k] * (u_r*u_r * 0.5 + 3./2.*0.25*gamma_*gamma_*gamma_); // energie cinetique turbulente de la composante WIF
86 nuBIA = coefBIA_ * (omega_WIT == 0.0 ? 0.0 : in.k_WIT/omega_WIT); // eddy viscosity equivalent for bubble induced agitation (BIA)
87 }
88
89 // Computation of turbulent dispersion coefficients
90 out.Ctd(k, n_l) = std::max(minimum_,
91 (in.alpha[k] > a_res_) ? (nuBIA + in.nut[n_l])/Prt_*coeff_drag(k, n_l, 0)/in.alpha[k] : (nuBIA + in.nut[n_l])/Prt_*coeff_drag(k, n_l, 0)*in.alpha[k]/(a_res_*a_res_));
92 out.Ctd(n_l, k) = std::max(minimum_,
93 (in.alpha[n_l] > a_res_) ? (nuBIA + in.nut[n_l])/Prt_*coeff_drag(n_l, k, 0)/in.alpha[n_l]: (nuBIA + in.nut[n_l])/Prt_*coeff_drag(n_l, k, 0)*in.alpha[n_l]/(a_res_*a_res_));
94 }
95}
static void typer_lire_correlation(OWN_PTR(Correlation_base)&, const Probleme_base &, const Nom &, Entree &)
classe Dispersion_bulles_base utilitaire pour les operateurs de dispersion turbulente ou la force
int find_liquid_phase() const
Finds the continuous liquid phase index in a multiphase problem.
class Dispersion_bulles_turbulente_Burns from Burns et al. (2004)Bubble turbulent dispersion coeffici...
void coefficient(const input_t &input, output_t &output) const override
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
classe Frottement_interfacial_base utilitaire pour les operateurs de frottement interfacial prenant l...
virtual void coefficient(const DoubleTab &alpha, const DoubleTab &p, const DoubleTab &T, const DoubleTab &rho, const DoubleTab &mu, const DoubleTab &sigma, double Dh, const DoubleTab &ndv, const DoubleTab &d_bulles, DoubleTab &coeff) const =0
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
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
int has_correlation(std::string nom_correlation) const
const Correlation_base & get_correlation(std::string nom_correlation) const
classe QDM_Multiphase Cette classe porte les termes de l'equation de la dynamique
Classe de base des flux de sortie.
Definition Sortie.h:52
_SIZE_ dimension(int d) const
Definition TRUSTTab.tpp:133