45 const int cnu = nu_visc.
dimension(0) == 1;
49 const DoubleTab& n_f = domaine.face_normales();
50 const DoubleVect& fs = domaine.face_surfaces();
51 const IntTab& f_e = domaine.face_voisins();
53 const int nf_tot = domaine.nb_faces_tot();
61 domaine.domaine().creer_tableau_elements(pvit_elem);
67 for (
int f = 0 ; f < nf_tot ; f ++)
70 const int c = (f_e(f, 0) >= 0) ? 0 : 1;
71 if (f_e(f, (c == 0) ? 1 : 0) >= 0)
72 Process::exit(
"Error in the definition of the boundary conditions for wall laws");
73 const int e = f_e(f, c);
76 DoubleTrav u_parallel(D);
79 for (
int d = 0; d < D; d++)
80 u_orth -= pvit_elem(e, N*d + n)*n_f(f,d)/fs(f);
81 for (
int d = 0 ; d < D; d++)
82 u_parallel(d) = pvit_elem(e, N*d + n) - u_orth*(-n_f(f,d))/fs(f) ;
86 for (
int d = 0; d < D; d++)
87 u_orth -= vit(nf_tot + e * D + d, n)*n_f(f, d)/fs(f);
88 for (
int d = 0; d < D; d++)
89 u_parallel(d) = vit(nf_tot + e * D + d, n) - u_orth*(-n_f(f, d))/fs(f) ;
93 for (
int d = 0; d < D; d++)
94 residu += u_parallel(d)*n_f(f, d)/fs(f);
96 Process::exit(
"Loi_paroi_adaptative : Error in the calculation of the parallel velocity for wall laws");
98 const double norm_u_parallel = std::sqrt(domaine.dot(&u_parallel(0), &u_parallel(0)));
100 const double y_loc = (c == 0) ? domaine.dist_face_elem0(f, e) : domaine.dist_face_elem1(f, e) ;
102 calc_y_plus_loc(norm_u_parallel, nu_visc(!cnu * e, n), y_loc, y_p(f, n)));
103 u_t(f, n) = y_p(f, n)*nu_visc(!cnu * e, n)/y_loc;
119 const double reichardt = std::log(1 + 0.4*y_p)/
von_karman_
120 + 7.8*(1 - std::exp(-y_p/11) - y_p/11*std::exp(-y_p/3));
122 const double blending = std::tanh( y_p/27*y_p/27*y_p/27*y_p/27);
124 const double d_reichardt = 0.4/(1 + 0.4*y_p)*1/
von_karman_ + 7.8/11*std::exp(-y_p/11)
125 - 7.8/11*std::exp(-y_p/3) + 7.8*y_p/33*std::exp(-y_p/3) ;
127 const double d_blending = 4.0/27*(y_p/27*y_p/27*y_p/27)*(1 - blending*blending);
129 return (1 - blending)*d_reichardt - reichardt*d_blending + blending*d_log_law + d_blending*log_law ;