Skip to content

Commit 1b9dbe1

Browse files
author
nijso beishuizen
committed
nearest-neighbor distance for wallfunction
1 parent 9020ece commit 1b9dbe1

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

SU2_CFD/src/solvers/CIncNSSolver.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -684,12 +684,9 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe
684684

685685
const su2double VelTangMod = GeometryToolbox::Norm(int(MAXNDIM), VelTang);
686686

687-
/*--- Compute normal distance of the interior point from the wall ---*/
687+
/*--- Compute nearest-neighbor distance of the interior point from the wall ---*/
688688

689-
su2double WallDist[MAXNDIM] = {0.0};
690-
GeometryToolbox::Distance(nDim, Coord, Coord_Normal, WallDist);
691-
692-
su2double WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist);
689+
su2double WallDistMod = geometry->vertex[iMarker][iVertex]->GetNearestNeighborDistance();
693690

694691
su2double Density_Wall = nodes->GetDensity(iPoint);
695692

SU2_CFD/src/solvers/CNSSolver.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -863,12 +863,9 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container,
863863

864864
const su2double VelTangMod = GeometryToolbox::Norm(int(MAXNDIM), VelTang);
865865

866-
/*--- Compute normal distance of the interior point from the wall ---*/
866+
/*--- Compute nearest-neighbor distance of the interior point from the wall ---*/
867867

868-
su2double WallDist[MAXNDIM] = {0.0};
869-
GeometryToolbox::Distance(nDim, Coord, Coord_Normal, WallDist);
870-
871-
const su2double WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist);
868+
const su2double WallDistMod = geometry->vertex[iMarker][iVertex]->GetNearestNeighborDistance();
872869

873870
su2double T_Wall = nodes->GetTemperature(iPoint);
874871
const su2double Conductivity_Wall = nodes->GetThermalConductivity(iPoint);

0 commit comments

Comments
 (0)