93 const DoubleTab& tab_visco = ch_visco_cin.
valeurs();
100 visco0 = std::max(tab_visco(0,0),DMINFLOAT);
108 Cerr <<
"In Paroi_std_scal_hyd_VEF::calculer_scal : visco = " << tab_visco.
local_min_vect() <<
" <= 0 ? " << finl;
113 const RefObjU& modele_turbulence_hydr = eqn_hydr.
get_modele(TURBULENCE);
116 const DoubleVect& tab_u_star = loi.
tab_u_star();
121 int alpha_uniforme = (sub_type(
Champ_Uniforme,champ_alpha) ? 1 : 0);
122 const DoubleTab& tab_alpha = champ_alpha.
valeurs();
129 double d_alpha = tab_alpha(0,0);
131 for (
int nc=0; nc<tab_alpha.
line_size(); nc++)
133 if (d_alpha!=tab_alpha(0,nc))
135 Cerr <<
"Error!" << finl;
136 Cerr <<
"Law of the wall are not implemented yet for constituants with different diffusion coefficients." << finl;
144 const int nb_comp = tab_alpha.
line_size();
145 CDoubleTabView alpha = tab_alpha.
view_ro();
146 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), size, KOKKOS_LAMBDA(
const int elem)
148 double d_alpha = alpha(elem,0);
149 for (
int nc=0; nc<nb_comp; nc++)
150 if (d_alpha!=alpha(elem,nc))
151 Process::Kokkos_exit(
"Error, Law of the wall are not implemented yet for constituants with different diffusion coefficients.");
153 end_gpu_timer(__KERNEL_NAME__);
158 for (
int n_bord=0; n_bord<domaine_VEF.
nb_front_Cl(); n_bord++)
163 const Cond_lim& la_cl = le_dom_Cl_dis_->les_conditions_limites(n_bord);
166 || (sub_type(
Symetrie,la_cl.valeur()))
169 if (
axi)
Process::exit(
"Error: the axisymmetric VEF case is not yet implemented in the scalar wall-function.");
174 DoubleTab& tab_alpha_t = diffusivite_turb.
valeurs();
176 CIntTabView face_voisins = domaine_VEF.
face_voisins().view_ro();
177 CDoubleArrView volumes_maille =
static_cast<const ArrOfDouble&
>(domaine_VEF.
volumes()).view_ro();
178 CDoubleArrView surfaces_face =
static_cast<const ArrOfDouble&
>(domaine_VEF.
face_surfaces()).view_ro();
179 CDoubleArrView u_star =
static_cast<const ArrOfDouble&
>(tab_u_star).view_ro();
180 CDoubleTabView alpha = tab_alpha.
view_ro();
181 CDoubleTabView visco = tab_visco.
view_ro();
182 CIntArrView le_bord_num_face = le_bord.
num_face().view_ro();
183 CDoubleArrView alpha_t =
static_cast<const ArrOfDouble&
>(tab_alpha_t).view_ro();
184 DoubleArrView dist_equiv =
static_cast<ArrOfDouble&
>(tab_dist_equiv).view_rw();
185 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), size, KOKKOS_LAMBDA(
const int ind_face)
187 const int num_face = le_bord_num_face(ind_face);
189 int elem = face_voisins(num_face,0);
191 elem = face_voisins(num_face,1);
195 const double dist = delta>0 ? delta : volumes_maille(elem)/surfaces_face(num_face);
198 const double u_star_val = u_star(num_face);
199 const double d_alpha = alpha_uniforme ? alpha(0,0) : alpha(elem,0);
200 if (u_star_val == 0 || d_alpha==0)
201 dist_equiv(ind_face) = dist;
205 const double d_visco = l_unif ? visco0 : visco(elem,0);
206 const double Pr = d_visco/d_alpha;
207 const double y_plus = dist*u_star_val/d_visco;
208 dist_equiv(ind_face) = (d_alpha + alpha_t(elem)) *
T_plus(y_plus,Pr,Prdt_sur_kappa) / u_star_val;
211 end_gpu_timer(__KERNEL_NAME__);
virtual const DoubleVect & face_surfaces() const
double volumes(int i) const
int face_voisins(int num_face, int i) const
renvoie l'element voisin de numface dans la direction i.