49 const DoubleTab& yp = corr_loi_paroi.
get_tab(
"y_plus");
50 const DoubleTab& u_tau = corr_loi_paroi.
get_tab(
"u_tau");
57 const int cnu = nu_visc.
dimension(0) == 1;
58 const int cmu = mu_visc.
dimension(0) == 1;
61 const DoubleTab *mu_poly = domaine.que_suis_je().debute_par(
"Domaine_PolyMAC")
66 const DoubleTab *mu_vdf = domaine.que_suis_je().debute_par(
"Domaine_VDF")
69 .get_diffusivite_turbulente()
71 assert((mu_poly) || (mu_vdf));
73 const int nf = la_frontiere_dis->frontiere().nb_faces();
74 const int f1 = la_frontiere_dis->frontiere().num_premiere_face();
75 const IntTab& f_e = domaine.face_voisins();
79 for (
int f = 0; f < nf; f++)
81 const int f_domaine = f + f1;
82 const int e_domaine = (f_e(f_domaine,0)>=0) ? f_e(f_domaine,0) : f_e(f_domaine,1) ;
83 const double y_loc = f_e(f_domaine,0)>=0 ? domaine.dist_face_elem0(f_domaine,e_domaine) : domaine.dist_face_elem1(f_domaine,e_domaine) ;
84 const double mu_tot_loc = (mu_poly) ? (*mu_poly)(e_domaine,n) : (mu_vdf) ? (*mu_vdf)(e_domaine,n) + mu_visc(!cmu * e_domaine,n) : -1;
86 const double tmp = yp(f_domaine, 0)/50.;
87 const double fac = 1.0/y_loc * (1 - std::tanh(tmp*tmp*tmp));
88 h_(f, 0) = 2.*mu_tot_loc * fac;
90 T_(f, 0) =
calc_k(y_loc/2., u_tau(f_domaine, 0), nu_visc(!cnu * e_domaine, 0));
93 h_.echange_espace_virtuel();
94 h_grad_.echange_espace_virtuel();
95 T_.echange_espace_virtuel();
100 const double visc)
const
102 const double y_p = y * u_tau / visc;
103 const double f1 = (y_p - 1)*(y_p - 1)*(y_p - 1)/30;
104 const double tmp = std::abs(4.6 - std::log(y_p));
105 const double f2 = 1.0/std::sqrt(
beta_k_) - 0.08*tmp*tmp*tmp;
106 const double b1 = std::tanh(std::pow(y_p/4., 10));
107 const double b2 = std::tanh(std::pow(y_p/2500., 1.4));
108 const double f3 = 1.0/std::sqrt(
beta_k_)*0.25;
110 return u_tau*u_tau*(std::max((1.0 - b1)*f1 + b1*f2, 0.0)*(1.0 - b2) + b2*f3);