@@ -619,15 +619,9 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe
619619 unsigned long notConvergedCounter = 0 ; /* --- Counts the number of wall cells that are not converged ---*/
620620 unsigned long smallYPlusCounter = 0 ; /* --- Counts the number of wall cells where y+ < 5 ---*/
621621
622- const su2double Gas_Constant = config->GetGas_ConstantND ();
623- const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant;
624622 const auto max_iter = config->GetwallModel_MaxIter ();
625623 const su2double relax = config->GetwallModel_RelFac ();
626624
627- /* --- Compute the recovery factor use Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) ---*/
628-
629- const su2double Recovery = pow (config->GetPrandtl_Lam (), (1.0 /3.0 ));
630-
631625 /* --- Typical constants from boundary layer theory ---*/
632626
633627 const su2double kappa = config->GetwallModel_Kappa ();
@@ -698,34 +692,7 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe
698692
699693 su2double WallDistMod = GeometryToolbox::Norm (int (MAXNDIM), WallDist);
700694
701- /* --- Compute the wall temperature using the Crocco-Buseman equation.
702- * In incompressible flows, we can assume that there is no velocity-related
703- * temperature change Prandtl: T+ = Pr*y+ ---*/
704- su2double T_Wall = nodes->GetTemperature (iPoint);
705- const su2double Conductivity_Wall = nodes->GetThermalConductivity (iPoint);
706-
707- /* --- If a wall temperature was given, we compute the local heat flux using k*dT/dn ---*/
708-
709- su2double q_w = 0.0 ;
710-
711- if (config->GetMarker_All_KindBC (iMarker) == ISOTHERMAL) {
712- const su2double T_n = nodes->GetTemperature (Point_Normal);
713- q_w = Conductivity_Wall * (T_Wall - T_n) / (WallDistMod);
714- }
715- else if (config->GetMarker_All_KindBC (iMarker) == HEAT_FLUX) {
716- q_w = config->GetWall_HeatFlux (Marker_Tag) / config->GetHeat_Flux_Ref ();
717- }
718- else if (config->GetMarker_All_KindBC (iMarker) == HEAT_TRANSFER) {
719- const su2double Transfer_Coefficient = config->GetWall_HeatTransfer_Coefficient (Marker_Tag) *
720- config->GetTemperature_Ref ()/config->GetHeat_Flux_Ref ();
721- const su2double Tinfinity = config->GetWall_HeatTransfer_Temperature (Marker_Tag) / config->GetTemperature_Ref ();
722- q_w = Transfer_Coefficient * (Tinfinity - T_Wall);
723- }
724-
725- /* --- Incompressible formulation ---*/
726-
727695 su2double Density_Wall = nodes->GetDensity (iPoint);
728- const su2double Lam_Visc_Normal = nodes->GetLaminarViscosity (Point_Normal);
729696
730697 /* --- Compute the shear stress at the wall in the regular fashion
731698 * by using the stress tensor on the surface ---*/
@@ -766,41 +733,33 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe
766733
767734 /* --- Friction velocity and u+ ---*/
768735
769- const su2double U_Plus = VelTangMod/U_Tau;
770-
771- /* --- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) page 1110 ---*/
772-
773- const su2double Gam = Recovery*U_Tau*U_Tau/(2.0 *Cp*T_Wall);
774- const su2double Beta = q_w*Lam_Visc_Wall/(Density_Wall*T_Wall*Conductivity_Wall*U_Tau);
775- const su2double Q = sqrt (Beta*Beta + 4.0 *Gam);
776- const su2double Phi = asin (-1.0 *Beta/Q);
736+ const su2double U_Plus = VelTangMod / U_Tau;
777737
778- /* --- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/
738+ /* --- Y+ defined by White & Christoph ---*/
739+
740+ const su2double kUp = kappa * U_Plus;
779741
780- const su2double Y_Plus_White = exp ((kappa/sqrt (Gam))*(asin ((2.0 *Gam*U_Plus - Beta)/Q) - Phi))*exp (-1.0 *kappa*B);
742+ // incompressible adiabatic result
743+ const su2double Y_Plus_White = exp (kUp ) * exp (-kappa * B);
781744
782745 /* --- Spalding's universal form for the BL velocity with the
783746 * outer velocity form of White & Christoph above. ---*/
784- const su2double kUp = kappa*U_Plus;
785- Y_Plus = U_Plus + Y_Plus_White - (exp (-1.0 *kappa*B)* (1.0 + kUp + 0.5 *kUp *kUp + kUp *kUp *kUp /6.0 ));
747+ Y_Plus = U_Plus + Y_Plus_White + (exp (-kappa * B)* (1.0 - kUp - 0.5 * kUp * kUp - kUp * kUp * kUp / 6.0 ));
786748
787- const su2double dypw_dyp = 2.0 *Y_Plus_White*(kappa*sqrt (Gam)/Q)*sqrt (1.0 - pow (2.0 *Gam*U_Plus - Beta,2.0 )/(Q*Q));
749+ /* --- incompressible formulation ---*/
750+ Eddy_Visc_Wall = Lam_Visc_Wall * kappa*exp (-kappa*B) * (exp (kUp ) -1.0 - kUp - kUp * kUp / 2.0 );
788751
789- Eddy_Visc_Wall = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp (-1.0 *kappa*B)*
790- (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0 )
791- - Lam_Visc_Normal/Lam_Visc_Wall);
792752 Eddy_Visc_Wall = max (1.0e-6 , Eddy_Visc_Wall);
793753
794754 /* --- Define function for Newton method to zero --- */
795755
796756 diff = (Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall) - Y_Plus;
797757
798- /* --- Gradient of function defined above --- */
758+ /* --- Gradient of function defined above wrt U_Tau --- */
799759
800- const su2double grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) +
801- kappa /(U_Tau * sqrt (Gam)) * asin (U_Plus * sqrt (Gam)) * Y_Plus_White -
802- exp (-1.0 * B * kappa) * (0.5 * pow (VelTangMod * kappa / U_Tau, 3 ) +
803- pow (VelTangMod * kappa / U_Tau, 2 ) + VelTangMod * kappa / U_Tau) / U_Tau;
760+ const su2double dyp_dup = 1.0 + exp (-kappa * B) * (kappa * exp (kUp ) - kappa - kUp - 0.5 * kUp * kUp );
761+ const su2double dup_dutau = - U_Plus / U_Tau;
762+ const su2double grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall - dyp_dup * dup_dutau;
804763
805764 /* --- Newton Step --- */
806765
0 commit comments