From 3b5493d9b014e940513406ff80f8316e91d87cf2 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 25 Feb 2025 20:17:51 +0100 Subject: [PATCH] revert nearestneighbor --- SU2_CFD/src/solvers/CIncNSSolver.cpp | 3 +-- SU2_CFD/src/solvers/CNSSolver.cpp | 3 +-- SU2_CFD/src/solvers/CTurbSASolver.cpp | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 365febfad04..8cd20dfeb83 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -686,8 +686,7 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe /*--- Compute nearest-neighbor distance of the interior point from the wall ---*/ - su2double WallDistMod = geometry->vertex[iMarker][iVertex]->GetNearestNeighborDistance(); - + su2double WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); su2double Density_Wall = nodes->GetDensity(iPoint); /*--- Compute the shear stress at the wall in the regular fashion diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 30412de453e..6c2f4d4bb12 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -865,8 +865,7 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, /*--- Compute nearest-neighbor distance of the interior point from the wall ---*/ - const su2double WallDistMod = geometry->vertex[iMarker][iVertex]->GetNearestNeighborDistance(); - + const su2double WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); su2double T_Wall = nodes->GetTemperature(iPoint); const su2double Conductivity_Wall = nodes->GetThermalConductivity(iPoint); diff --git a/SU2_CFD/src/solvers/CTurbSASolver.cpp b/SU2_CFD/src/solvers/CTurbSASolver.cpp index d29b668edd8..b66eedd4d99 100644 --- a/SU2_CFD/src/solvers/CTurbSASolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSASolver.cpp @@ -275,7 +275,7 @@ void CTurbSASolver::Postprocessing(CGeometry *geometry, CSolver **solver_contain FrictionVelocity = sqrt(flowNodes->GetLaminarViscosity(iPoint)*VorticityMag); } - const su2double wall_dist = geometry->vertex[iMarker][iVertex]->GetNearestNeighborDistance(); + const su2double wall_dist = geometry->nodes->GetWall_Distance(jPoint); const su2double Derivative = nodes->GetSolution(jPoint, 0) / wall_dist; const su2double turbulence_index = Derivative / (FrictionVelocity * 0.41);