518 const Domaine_EF& domaine_EF = le_dom_EF.valeur();
521 const Domaine& dom = domaine_EF.
domaine();
523 DoubleTab& variable_imposee_mod =
modele_lu_.variable_imposee_->valeurs();
526 DoubleTab& solid_points = interp.solid_points_->valeurs();
527 DoubleTab& fluid_elems = interp.fluid_elems_->valeurs();
528 DoubleTab& fluid_points = interp.fluid_points_->valeurs();
531 DoubleTab& variable_inconnue = champ_variable_inconnue.
valeurs();
532 int nb_comp = variable_inconnue.
dimension(1);
534 DoubleTab xf(1, dim_esp);
535 DoubleTab vf(1, nb_comp);
538 for (
int i = 0; i < nb_som; i++)
540 if (fluid_elems(i) >= 0.0)
544 for(
int j = 0; j < dim_esp; j++)
546 double xj = dom.
coord(i,j);
547 double xjf = fluid_points(i,j);
549 double xjs = solid_points(i,j);
550 d1 += (xj-xjs)*(xj-xjs);
551 d2 += (xjf-xj)*(xjf-xj);
555 double inv_d = 1.0 / (d1 + d2);
556 cells[0] = int(fluid_elems(i));
558 for (
int j = 0; j < nb_comp; j++)
560 double vjs = variable_imposee_mod(i,j);
561 variable_imposee_calculee(i,j) = variable_imposee_mod(i,j) + (vf(0, j)-vjs)*inv_d*d1;
564 else if (fluid_elems(i) > -1.5 && fluid_elems(i) < -0.5)
567 for(
int j = 0; j < dim_esp; j++)
569 double x = dom.
coord(i,j);
570 double xp = solid_points(i,j);
571 d2 += (x - xp)*(x - xp);
574 for(
int j = 0; j <nb_comp ; j++) variable_imposee_calculee(i,j) = variable_imposee_mod(i,j);
580 ArrOfDouble mean_grad(nb_comp);
582 int taille = voisins.
size();
584 for (
int k = 0; k < taille; k++)
586 int num_som = voisins[k];
588 for (
int j = 0; j < dim_esp; j++)
590 double xjf = dom.
coord(num_som,j);
591 double xpf = solid_points(num_som,j);
592 d1 += (xjf - xpf)*(xjf - xpf);
597 for (
int j = 0; j < nb_comp; j++)
599 double vpf = variable_imposee_mod(num_som,j);
600 double vjf = variable_inconnue(num_som,j);
601 mean_grad[j] += (vjf - vpf)/d1;
606 for (
int j = 0; j < nb_comp; j++)
608 mean_grad[j] /= nb_contrib;
609 variable_imposee_calculee(i,j) += mean_grad[j]*d2;
616 for(
int j = 0; j < nb_comp; j++)
618 variable_imposee_calculee(i,j) = variable_imposee_mod(i,j);
634 const Domaine_EF& domaine_EF = le_dom_EF.valeur();
637 const Domaine& dom = domaine_EF.
domaine();
639 DoubleTab& vitesse_imposee_mod =
modele_lu_.variable_imposee_->valeurs();
643 DoubleTab& fluid_points = interp.fluid_points_->valeurs();
644 DoubleTab& solid_points = interp.solid_points_->valeurs();
645 DoubleTab& fluid_elems = interp.fluid_elems_->valeurs();
646 double A_pwl = interp.
get_A_pwl(form_WJSP);
648 double y_c_p_pwl = 0;
649 double C_pwl_WJSP = 0;
650 double D_pwl_WJSP = 0;
651 double p_pwl_WJSP = 0;
652 double y_c1_p_pwl_WJSP = 0;
653 double y_c2_p_pwl_WJSP = 0;
666 int impr_yplus = interp.
get_impr() ;
668 DoubleTab& val_vitesse_inconnue = champ_vitesse_inconnue.
valeurs();
669 if (nb_comp != val_vitesse_inconnue.
dimension(1))
671 Cerr<<
"Source_PDF_EF::calculer_vitesse_imposee_power_law_tbl: variable must be a vector of dimension "<<
Objet_U::dimension<<
" ! "<<finl;
676 DoubleTab xf(1, nb_comp);
677 DoubleTab vf(1, nb_comp);
681 if (
equation().nombre_d_operateurs()<1)
691 double d1_min = 1.0e+10;
693 double d1_mean = 0.0;
694 double yplus_min = 1.0e+10;
695 double yplus_max = 0.0;
696 double yplus_mean = 0.0;
697 double u_tau_min = 1.0e+10;
698 double u_tau_max = 0.0;
699 double u_tau_mean = 0.0;
700 double yplus_ref_min = 1.0e+10;
701 double yplus_ref_max = 0.0;
702 double yplus_ref_mean = 0.0;
703 double u_tau_ref_min = 1.0e+10;
704 double u_tau_ref_max = 0.0;
705 double u_tau_ref_mean = 0.0;
706 double h_yplus_min = 1.0e+10;
707 double h_yplus_max = 0.0;
708 double h_yplus_mean = 0.0;
713 DoubleTab tab_h(1, nb_som);
714 DoubleTab abs_h(1, N+1);
715 DoubleTab compteur_h(1, N);
722 for (
int i = 0; i < nb_som; i++)
724 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = vitesse_imposee_mod(i,j);
726 if (fluid_elems(i) >= 0.0)
730 DoubleTab normale(1, nb_comp);
731 double norme_de_la_normale= 0.0;
732 for(
int j = 0; j < nb_comp; j++)
734 double xj = dom.
coord(i,j);
735 double xjf = fluid_points(i,j);
737 double xjs = solid_points(i,j);
738 d1 += (xj-xjs)*(xj-xjs);
739 d2 += (xjf-xj)*(xjf-xj);
740 normale(0,j) = xjf - xjs;
741 norme_de_la_normale += normale(0,j)*normale(0,j);
748 if (d1 < eps) itisok = 0;
749 norme_de_la_normale = sqrt(norme_de_la_normale);
750 if ( norme_de_la_normale > eps )
751 for(
int j = 0; j < nb_comp; j++) normale(0,j) /= norme_de_la_normale;
754 for(
int j = 0; j < nb_comp; j++) normale(0,j) = 0.;
766 cells(0) = int(fluid_elems(i));
769 for(
int j = 0; j < nb_comp; j++) Vn +=vf(0, j) * normale(0,j);
770 DoubleTab v_ref_t(1, nb_comp);
772 for(
int j = 0; j < nb_comp; j++) v_ref_t(0, j) =vf(0, j) - Vn*normale(0,j);
774 double norme_v_ref_t = 0.;
775 for(
int j = 0; j < nb_comp; j++) norme_v_ref_t += v_ref_t(0, j)*v_ref_t(0,j) ;
776 norme_v_ref_t = sqrt ( norme_v_ref_t );
777 if (norme_v_ref_t < 1.0e-6) norme_v_ref_t = 1.e-6;
784 double u_tau_ref = pow ( norme_v_ref_t , (1/(1+B_pwl)) ) * pow ( A_pwl, (-1/(1+B_pwl)) ) * pow ( y_ref , (-B_pwl/(1+B_pwl)) ) * pow ( nu,(B_pwl/(1+B_pwl)) ) ;
788 double y_ref_p = y_ref * u_tau_ref / nu;
793 if ( y_ref_p > y_c_p_pwl)
797 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = v_ref_t(0,j) * pow ( d1 / y_ref , B_pwl ) ;
801 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = v_ref_t(0,j) *(1. - B_pwl*(1-d1/y_ref)) ;
811 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = v_ref_t(0,j) * ( d1 / y_ref ) ;
815 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = v_ref_t(0,j) * (1. - pow(u_tau_ref, 2.)*(y_ref-d1)/(nu *norme_v_ref_t));
818 u_tau_ref = pow ( (nu * norme_v_ref_t / y_ref) , 0.5 ) ;
819 y_ref_p = y_ref * u_tau_ref / nu;
820 if ( y_ref_p > y_c_p_pwl )
828 double norme_v_imp_c = 0;
829 for(
int j=0 ; j < nb_comp; j++) norme_v_imp_c += vitesse_imposee_calculee(i ,j) * vitesse_imposee_calculee(i ,j);
830 norme_v_imp_c = sqrt( norme_v_imp_c );
832 double u_tau = pow ( norme_v_imp_c , (1/(1+B_pwl)) ) * pow ( A_pwl, (-1/(1+B_pwl)) ) * pow ( d1 , (-B_pwl/(1+B_pwl)) ) * pow ( nu,(B_pwl/(1+B_pwl)) ) ;
833 y_plus = u_tau * d1 / nu;
835 if (y_plus >y_c_p_pwl)
843 u_tau = pow ( (nu * norme_v_imp_c/ d1) , 0.5 ) ;
844 y_plus = u_tau * d1 / nu;
845 if ( y_plus > y_c_p_pwl )
848 Cerr<<
"INCOHERENCE: u_tau ="<<u_tau<<
" y+ = "<<y_plus<<
" y+ref = "<<y_ref_p<<finl;
856 if ( (test_ * test_ref < 0) || (itisok == 0) )
858 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = vitesse_imposee_mod(i,j);
871 if (d1 > d1_max) d1_max = d1;
872 if (d1 < d1_min) d1_min = d1;
874 if (y_plus > yplus_max) yplus_max = y_plus;
875 if (y_plus < yplus_min) yplus_min = y_plus;
876 yplus_mean += y_plus;
877 if (u_tau > u_tau_max) u_tau_max = u_tau;
878 if (u_tau < u_tau_min) u_tau_min = u_tau;
880 if (y_ref_p > yplus_ref_max) yplus_ref_max = y_ref_p;
881 if (y_ref_p < yplus_ref_min) yplus_ref_min = y_ref_p;
882 yplus_ref_mean += y_ref_p;
883 if (u_tau_ref > u_tau_ref_max) u_tau_ref_max = u_tau_ref;
884 if (u_tau_ref < u_tau_ref_min) u_tau_ref_min = u_tau_ref;
885 u_tau_ref_mean += u_tau_ref;
887 if (y_plus > h_yplus_max) h_yplus_max = y_plus;
888 if (y_plus < h_yplus_min) h_yplus_min = y_plus;
889 h_yplus_mean += y_plus;
890 tab_h(0,yplus_count) = y_plus;
897 if ( y_ref_p > y_c2_p_pwl_WJSP)
899 y_plus = u_tau_ref * d1/nu;
900 if (y_plus > y_c2_p_pwl_WJSP)
904 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = v_ref_t(0,j) * pow ( d1 / y_ref , B_pwl ) ;
908 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = v_ref_t(0,j) * (1. - B_pwl*(1-d1/y_ref)) ;
911 else if (y_plus < y_c2_p_pwl_WJSP and y_plus > y_c1_p_pwl_WJSP)
915 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = (C_pwl_WJSP*pow(y_plus,2*p_pwl_WJSP-1) *u_tau_ref + D_pwl_WJSP*pow(y_plus,p_pwl_WJSP-1) *u_tau_ref)* v_ref_t(0,j)/norme_v_ref_t;
919 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = 0 ;
926 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = y_plus * u_tau_ref * v_ref_t(0,j)/norme_v_ref_t;
930 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = v_ref_t(0,j) * (1. - B_pwl*(1-d1/y_ref)) ;
937 u_tau_ref = (nu/y_ref) * pow(-(D_pwl_WJSP/(2*C_pwl_WJSP)) * (1 + pow(1 + 4 * C_pwl_WJSP/pow(D_pwl_WJSP,2) * norme_v_ref_t * y_ref /nu ,1/2)),1/p_pwl_WJSP) ;
938 y_ref_p = y_ref * u_tau_ref / nu;
939 if (y_ref_p < y_c2_p_pwl_WJSP and y_ref_p > y_c1_p_pwl_WJSP)
941 y_plus = u_tau_ref * d1/nu;
942 if (y_plus < y_c2_p_pwl_WJSP and y_plus > y_c1_p_pwl_WJSP)
946 double phi = -pow(1 + 4 * C_pwl_WJSP/pow(D_pwl_WJSP,2) * norme_v_ref_t * y_ref /nu,1/2) - 1;
947 double u_norm = pow(D_pwl_WJSP,2) * nu / (4 * C_pwl_WJSP * y_ref) * (pow ( d1 / y_ref , 2*p_pwl_WJSP - 1 ) * pow(phi,2) + 2 * pow ( d1 / y_ref , p_pwl_WJSP - 1 ) * phi);
948 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = u_norm * v_ref_t(0,j)/norme_v_ref_t;
952 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = 0 ;
959 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = y_plus * u_tau_ref * v_ref_t(0,j)/norme_v_ref_t ;
963 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = 0 ;
972 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = v_ref_t(0,j) * ( d1 / y_ref ) ;
976 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = v_ref_t(0,j) * (1. - pow(u_tau_ref, 2.)*(y_ref-d1)/(nu *norme_v_ref_t));
978 u_tau_ref = pow ( (nu * norme_v_ref_t / y_ref) , 0.5 ) ;
979 y_ref_p = y_ref * u_tau_ref / nu;
980 if ( y_ref_p > y_c1_p_pwl_WJSP)
984 Cerr <<
"Incoherence" << finl;
995 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = vitesse_imposee_mod(i,j);
1007 if (d1 > d1_max) d1_max = d1;
1008 if (d1 < d1_min) d1_min = d1;
1010 if (y_plus > yplus_max) yplus_max = y_plus;
1011 if (y_plus < yplus_min) yplus_min = y_plus;
1012 yplus_mean += y_plus;
1013 if (u_tau_ref > u_tau_max) u_tau_max = u_tau_ref;
1014 if (u_tau_ref < u_tau_min) u_tau_min = u_tau_ref;
1015 u_tau_mean += u_tau_ref;
1016 if (y_ref_p > yplus_ref_max) yplus_ref_max = y_ref_p;
1017 if (y_ref_p < yplus_ref_min) yplus_ref_min = y_ref_p;
1018 yplus_ref_mean += y_ref_p;
1019 if (u_tau_ref > u_tau_ref_max) u_tau_ref_max = u_tau_ref;
1020 if (u_tau_ref < u_tau_ref_min) u_tau_ref_min = u_tau_ref;
1021 u_tau_ref_mean += u_tau_ref;
1023 if (y_plus > h_yplus_max) h_yplus_max = y_plus;
1024 if (y_plus < h_yplus_min) h_yplus_min = y_plus;
1025 h_yplus_mean += y_plus;
1026 tab_h(0,yplus_count) = y_plus;
1035 if (impr_yplus && (yplus_count >= 1) )
1037 d1_mean /= yplus_count;
1038 yplus_mean /= yplus_count;
1039 yplus_ref_mean /= yplus_count;
1040 u_tau_mean /= yplus_count;
1041 u_tau_ref_mean /= yplus_count;
1042 Cerr<<
"min mean max y = "<<d1_min<<
" "<<d1_mean<<
" "<<d1_max<<finl;
1043 Cerr<<
"min mean max y+ = "<<yplus_min<<
" "<<yplus_mean<<
" "<<yplus_max<<finl;
1044 Cerr<<
"min mean u_tau = "<<u_tau_min<<
" "<<u_tau_mean<<
" "<<u_tau_max<<finl;
1045 Cerr<<
"min mean max y+_ref = "<<yplus_ref_min<<
" "<<yplus_ref_mean<<
" "<<yplus_ref_max<<finl;
1046 Cerr<<
"min mean u_tau_ref = "<<u_tau_ref_min<<
" "<<u_tau_ref_mean<<
" "<<u_tau_ref_max<<finl;
1048 h_yplus_mean /= yplus_count;
1049 double range = ( h_yplus_max - h_yplus_min)/N;
1050 for (
int k = 0; k < N+1; k++) abs_h(0,k) = (h_yplus_min + k*range);
1051 for (
int i=0; i < yplus_count; i++)
1053 for (
int j = 0; j < N; j++)
1055 if ( abs_h(0,j) < tab_h(0,i) && tab_h(0,i) <= abs_h(0,j+1) ) compteur_h(0,j) +=1;
1058 Cerr<<
"histogramme y+ compteur =";
1059 for (
int j = 0; j < N; j++) Cerr<<
" "<<compteur_h(0,j)<<
" ";
1061 Cerr<<
"histogramme y+ abscisse =";
1062 for (
int j = 0; j < N+1; j++) Cerr<<
" "<<abs_h(0,j)<<
" ";
1064 Cerr<<
"histogramme y+ : min = "<<h_yplus_min<<
" - mean = "<<h_yplus_mean<<
" - max = "<<h_yplus_max<<finl;
1066 Cerr<<
"Moyenne sur "<<yplus_count<<
" points"<<finl;
1073 const Domaine_EF& domaine_EF = le_dom_EF.valeur();
1076 const Domaine& dom = domaine_EF.
domaine();
1077 DoubleTab& vitesse_imposee_mod =
modele_lu_.variable_imposee_->valeurs();
1080 DoubleTab& is_dirichlet = interp.is_dirichlet_->valeurs();
1081 DoubleTab& solid_points = interp.solid_points_->valeurs();
1082 DoubleTab& solid_elems = interp.solid_elems_->valeurs();
1086 int impr_yplus = interp.
get_impr() ;
1088 if (nb_comp != vitesse_inconnue.
dimension(1))
1090 Cerr<<
"Source_PDF_EF::calculer_vitesse_imposee_power_law_tbl_u_star: variable must be a vector of dimension "<<
Objet_U::dimension<<
" ! "<<finl;
1097 if (
equation().nombre_d_operateurs()<1)
1107 double d1_min = 1.0e+10;
1108 double d1_max = 0.0;
1109 double d1_mean = 0.0;
1110 double yplus_min = 1.0e+10;
1111 double yplus_max = 0.0;
1112 double yplus_mean = 0.0;
1113 double u_tau_min = 1.0e+10;
1114 double u_tau_max = 0.0;
1115 double u_tau_mean = 0.0;
1116 double yplus_ref_min = 1.0e+10;
1117 double yplus_ref_max = 0.0;
1118 double yplus_ref_mean = 0.0;
1119 double u_tau_ref_min = 1.0e+10;
1120 double u_tau_ref_max = 0.0;
1121 double u_tau_ref_mean = 0.0;
1122 double h_yplus_min = 1.0e+10;
1123 double h_yplus_max = 0.0;
1124 double h_yplus_mean = 0.0;
1126 int yplus_ref_count=0 ;
1129 DoubleTab tab_h(1, nb_som);
1130 DoubleTab abs_h(1, N+1);
1131 DoubleTab compteur_h(1, N);
1140 for (
int i = 0; i < nb_som; i++)
1143 if (is_dirichlet(i) > 0.0)
1147 DoubleTab normaleP(1, nb_comp);
1148 double norme_de_la_normaleP= 0.0;
1150 for(
int j = 0; j < nb_comp; j++)
1152 vitesse_imposee_calculee(i,j) = vitesse_imposee_mod(i,j);
1154 double xp = solid_points(i,j);
1155 normaleP(0,j) = x - xp;
1156 norme_de_la_normaleP += normaleP(0,j)*normaleP(0,j);
1158 norme_de_la_normaleP = sqrt(norme_de_la_normaleP);
1159 d1P = norme_de_la_normaleP;
1161 for(
int j = 0; j < nb_comp; j++) normaleP(0,j) /= norme_de_la_normaleP;
1164 cells(0) = int(solid_elems(i));
1178 DoubleTab mean_u_tau_neighbour(1, nb_comp);
1179 mean_u_tau_neighbour = 0.0;
1180 double mean_y_plus_neighbour = 0.;
1181 int taille = voisins.
size();
1183 double pond_tot = 0.;
1184 double ponderation_k;
1185 for (
int k = 0; k < taille; k++)
1188 int num_som = voisins[k];
1191 DoubleTab a(1, nb_comp);
1192 DoubleTab b(1, nb_comp);
1193 double norme_a = 0.0;
1194 double norme_b = 0.0;
1196 for (
int j = 0; j < nb_comp; j++)
1198 double xf = dom.
coord(num_som,j);
1199 double xpf = solid_points(num_som,j);
1200 d1 += (xf - xpf)*(xf - xpf);
1202 b(0,j) = (xf - x)*normaleP(0,j);
1203 norme_a += a(0,j)*a(0,j);
1204 norme_b += b(0,j)*b(0,j);
1207 if ( d1 < eps ) itisok = 0;
1209 if ( (norme_a - norme_b) > eps )
1210 ponderation_k = 1/(sqrt(norme_a - norme_b));
1212 ponderation_k = 1./eps;
1220 for(
int j = 0; j < nb_comp; j++) Vn += vitesse_inconnue(num_som,j) * normaleP(0,j);
1221 DoubleTab vtf_k(1, nb_comp);
1222 for(
int j = 0; j < nb_comp; j++) vtf_k(0, j) = vitesse_inconnue(num_som, j) - Vn * normaleP(0,j);
1223 double norme_vtf_k = 0.;
1224 for(
int j = 0; j < nb_comp; j++) norme_vtf_k += vtf_k(0, j)*vtf_k(0,j);
1225 norme_vtf_k = sqrt(norme_vtf_k);
1226 u_tau_ref = pow ( norme_vtf_k , (1/(1+B_pwl)) ) * pow ( A_pwl, (-1/(1+B_pwl)) ) * pow ( d1 , (-B_pwl/(1+B_pwl)) ) * pow ( nu,(B_pwl/(1+B_pwl)) ) ;
1227 y_plus_ref = d1 * u_tau_ref / nu;
1228 if (y_plus_ref < y_c_p_pwl )
1230 u_tau_ref = pow ( (nu * norme_vtf_k / d1) , 0.5 ) ;
1231 y_plus_ref = d1 * u_tau_ref / nu;
1232 if ( y_plus_ref > y_c_p_pwl )
1240 if (norme_vtf_k < eps) itisok = 0;
1243 for(
int j = 0; j < nb_comp; j++) mean_u_tau_neighbour(0,j) += (u_tau_ref * vtf_k(0, j) / norme_vtf_k) * ponderation_k;
1244 mean_y_plus_neighbour += y_plus_ref * ponderation_k;
1245 pond_tot += ponderation_k;
1249 if (impr_yplus && itisok)
1251 if (y_plus_ref > yplus_ref_max) yplus_ref_max = y_plus_ref;
1252 if (y_plus_ref < yplus_ref_min) yplus_ref_min = y_plus_ref;
1253 yplus_ref_mean += y_plus_ref;
1254 if (u_tau_ref > u_tau_ref_max) u_tau_ref_max = u_tau_ref;
1255 if (u_tau_ref < u_tau_ref_min) u_tau_ref_min = u_tau_ref;
1256 u_tau_ref_mean += u_tau_ref;
1257 yplus_ref_count += 1;
1265 mean_u_tau_neighbour /= pond_tot;
1266 mean_y_plus_neighbour /= pond_tot;
1268 for(
int j = 0; j < nb_comp; j++) u_tau += mean_u_tau_neighbour(0,j) * mean_u_tau_neighbour(0,j);
1269 u_tau = sqrt(u_tau);
1270 y_plus = u_tau * d1P / nu;
1271 if (u_tau > eps) mean_u_tau_neighbour /= u_tau;
1272 else mean_u_tau_neighbour = 0. ;
1273 if (y_plus > y_c_p_pwl )
1275 if (mean_y_plus_neighbour > y_c_p_pwl )
1277 double vit_coeff = A_pwl * pow (d1P, B_pwl) / pow (nu, B_pwl);
1278 for (
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = pow (u_tau, (1+B_pwl)) * vit_coeff * mean_u_tau_neighbour(0,j);
1284 if (mean_y_plus_neighbour < y_c_p_pwl )
1286 for (
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = (d1P * u_tau * u_tau / nu) * mean_u_tau_neighbour(0,j);
1308 if (impr_yplus && itisok_P)
1310 if (d1P > d1_max) d1_max = d1P;
1311 if (d1P < d1_min) d1_min = d1P;
1313 if (y_plus > yplus_max) yplus_max = y_plus;
1314 if (y_plus < yplus_min) yplus_min = y_plus;
1315 yplus_mean += y_plus;
1316 if (u_tau > u_tau_max) u_tau_max = u_tau;
1317 if (u_tau < u_tau_min) u_tau_min = u_tau;
1318 u_tau_mean += u_tau;
1320 if (y_plus > h_yplus_max) h_yplus_max = y_plus;
1321 if (y_plus < h_yplus_min) h_yplus_min = y_plus;
1322 h_yplus_mean += y_plus;
1323 tab_h(0,yplus_count) = y_plus;
1329 for(
int j = 0; j < nb_comp; j++) vitesse_imposee_calculee(i,j) = vitesse_imposee_mod(i,j);
1334 if (impr_yplus && (yplus_count >= 1) && (yplus_ref_count >= 1) )
1336 d1_mean /= yplus_count;
1337 yplus_mean /= yplus_count;
1338 yplus_ref_mean /= yplus_ref_count;
1339 u_tau_mean /= yplus_count;
1340 u_tau_ref_mean /= yplus_ref_count;
1341 Cerr<<
"min mean max y = "<<d1_min<<
" "<<d1_mean<<
" "<<d1_max<<finl;
1342 Cerr<<
"min mean max y+ = "<<yplus_min<<
" "<<yplus_mean<<
" "<<yplus_max<<finl;
1343 Cerr<<
"min mean u_tau = "<<u_tau_min<<
" "<<u_tau_mean<<
" "<<u_tau_max<<finl;
1344 Cerr<<
"min mean max y+_ref = "<<yplus_ref_min<<
" "<<yplus_ref_mean<<
" "<<yplus_ref_max<<finl;
1345 Cerr<<
"min mean u_tau_ref = "<<u_tau_ref_min<<
" "<<u_tau_ref_mean<<
" "<<u_tau_ref_max<<finl;
1347 h_yplus_mean /= yplus_count;
1348 double range = ( h_yplus_max - h_yplus_min)/N;
1349 for (
int k = 0; k < N+1; k++) abs_h(0,k) = (h_yplus_min + k*range);
1350 for (
int i=0; i < yplus_count; i++)
1352 for (
int j = 0; j < N; j++)
1354 if ( abs_h(0,j) < tab_h(0,i) && tab_h(0,i) <= abs_h(0,j+1) ) compteur_h(0,j) +=1;
1357 Cerr<<
"histogramme y+ compteur =";
1358 for (
int j = 0; j < N; j++) Cerr<<
" "<<compteur_h(0,j)<<
" ";
1360 Cerr<<
"histogramme y+ abscisse =";
1361 for (
int j = 0; j < N+1; j++) Cerr<<
" "<<abs_h(0,j)<<
" ";
1363 Cerr<<
"histogramme y+ : min = "<<h_yplus_min<<
" - mean = "<<h_yplus_mean<<
" - max = "<<h_yplus_max<<finl;
1365 Cerr<<
"Moyenne sur "<<yplus_count<<
" points forces et "<<yplus_ref_count<<
" points references"<<finl;