@@ -233,7 +233,7 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai
233233
234234 const su2double VorticityMag = max (GeometryToolbox::Norm (3 , flowNodes->GetVorticity (iPoint)), 1e-12 );
235235 const su2double StrainMag = max (flowNodes->GetStrainMag (iPoint), 1e-12 );
236- nodes->SetBlendingFunc (iPoint, mu, dist, rho, config->GetKind_Trans_Model ());
236+ nodes->SetBlendingFunc (iPoint, mu, dist, rho, VorticityMag, config->GetKind_Trans_Model ());
237237
238238 const su2double F2 = nodes->GetF2blending (iPoint);
239239
@@ -425,12 +425,12 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont
425425
426426 /* --- Check if the node belongs to the domain (i.e, not a halo node) ---*/
427427 if (geometry->nodes ->GetDomain (iPoint)) {
428+ const auto options = config->GetROUGHSSTParsedOptions ();
428429
429430 /* --- distance to closest neighbor ---*/
430431 su2double wall_dist = geometry->vertex [val_marker][iVertex]->GetNearestNeighborDistance ();
431432
432433 if (rough_wall) {
433-
434434 /* --- Set wall values ---*/
435435 su2double density = solver_container[FLOW_SOL]->GetNodes ()->GetDensity (iPoint);
436436 su2double laminar_viscosity = solver_container[FLOW_SOL]->GetNodes ()->GetLaminarViscosity (iPoint);
@@ -445,11 +445,10 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont
445445
446446 su2double S_R= 0.0 ;
447447 su2double solution[2 ] = {};
448-
449448 /* --- Modify the omega and k to account for a rough wall. ---*/
450449
451450 /* --- Reference 1 original Wilcox (1998) ---*/
452- if (roughsstParsedOptions .wilcox1998 ) {
451+ if (options .wilcox1998 ) {
453452 if (kPlus <= 25 )
454453 S_R = (50 /(kPlus +EPS))*(50 /(kPlus +EPS));
455454 else
@@ -458,7 +457,7 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont
458457 solution[0 ] = 0.0 ;
459458 solution[1 ] = FrictionVel*FrictionVel*S_R/(laminar_viscosity/density);
460459 }
461- else if (roughsstParsedOptions .wilcox2006 ) {
460+ else if (options .wilcox2006 ) {
462461 /* --- Reference 2 from D.C. Wilcox Turbulence Modeling for CFD (2006) ---*/
463462 if (kPlus <= 5 )
464463 S_R = pow (200 /(kPlus +EPS),2 );
@@ -469,8 +468,7 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont
469468 solution[1 ] = FrictionVel*FrictionVel*S_R/(laminar_viscosity/density);
470469 }
471470 /* --- Knopp eddy viscosity limiter ---*/
472- else if (roughsstParsedOptions.limiter_knopp ) {
473-
471+ else if (options.limiter_knopp ) {
474472 su2double d0 = 0.03 *Roughness_Height*min (1.0 , pow ((kPlus + EPS )/30.0 , 2.0 /3.0 ))*min (1.0 , pow ((kPlus + EPS)/45.0 , 0.25 ))*min (1.0 , pow ((kPlus + EPS) /60 , 0.25 ));
475473 solution[0 ] = (FrictionVel*FrictionVel / sqrt (constants[6 ]))*min (1.0 , kPlus / 90.0 );
476474
@@ -479,8 +477,7 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont
479477 solution[1 ] = min ( FrictionVel/(sqrt (constants[6 ])*d0*kappa), 60.0 *laminar_viscosity/(density*beta_1*pow (wall_dist,2 )));
480478 }
481479 /* --- Aupoix eddy viscosity limiter ---*/
482- else if (roughsstParsedOptions.limiter_aupoix ) {
483-
480+ else if (options.limiter_aupoix ) {
484481 su2double k0Plus = ( 1.0 /sqrt ( constants[6 ])) * tanh ((log10 ((kPlus +EPS ) / 30.0 ) + 1.0 - 1.0 *tanh ( (kPlus + EPS) / 125.0 ))*tanh ((kPlus + EPS) / 125.0 ));
485482 su2double kwallPlus = max (0.0 , k0Plus);
486483 su2double kwall = kwallPlus*FrictionVel*FrictionVel;
@@ -489,16 +486,13 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont
489486
490487 solution[0 ] = kwall;
491488 solution[1 ] = omegawallPlus*FrictionVel*FrictionVel*density/laminar_viscosity;
492-
493489 }
494-
495490 /* --- Set the solution values and zero the residual ---*/
496491 nodes->SetSolution_Old (iPoint,solution);
497492 nodes->SetSolution (iPoint,solution);
498493 LinSysRes.SetBlock_Zero (iPoint);
499494
500495 } else { // smooth wall
501-
502496 /* --- Set wall values ---*/
503497 su2double density = solver_container[FLOW_SOL]->GetNodes ()->GetDensity (iPoint);
504498 su2double laminar_viscosity = solver_container[FLOW_SOL]->GetNodes ()->GetLaminarViscosity (iPoint);
0 commit comments