From a3b2a8caf9d928072d19f5495d99dfb9501c7654 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 6 Dec 2024 21:53:36 +0100 Subject: [PATCH 01/25] quick fix for normal point in sharp corner --- Common/src/geometry/CPhysicalGeometry.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Common/src/geometry/CPhysicalGeometry.cpp b/Common/src/geometry/CPhysicalGeometry.cpp index 6e34e715be5..4969cb65a8e 100644 --- a/Common/src/geometry/CPhysicalGeometry.cpp +++ b/Common/src/geometry/CPhysicalGeometry.cpp @@ -8104,8 +8104,10 @@ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { Normal = vertex[iMarker][iVertex]->GetNormal(); /*--- Compute closest normal neighbor, note that the normal are oriented inwards ---*/ + /*--- If the neighbor node is on a wall, we set it as a neighbor if there is no previous + neighbor. We also always overwrite a neighbor if an interior point is available. ---*/ Point_Normal = 0; - cos_max = -1.0; + cos_max = -2.0; for (iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); iNeigh++) { jPoint = nodes->GetPoint(iPoint, iNeigh); scalar_prod = 0.0; @@ -8123,8 +8125,14 @@ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { /*--- Get maximum cosine ---*/ if (cos_alpha >= cos_max) { - Point_Normal = jPoint; - cos_max = cos_alpha; + /*--- If point is on the wall, only add it if Point_Normal was not set before. ---*/ + if ( (!nodes->GetViscousBoundary(iPoint)) || + (nodes->GetViscousBoundary(iPoint)) && (cos_max < -1.0) + ) + Point_Normal = jPoint; + /*--- Only set angle if it is not on a wall. */ + if (!nodes->GetViscousBoundary(iPoint)) + cos_max = cos_alpha; } } vertex[iMarker][iVertex]->SetNormal_Neighbor(Point_Normal); From 9863c1dffde1fbdc6767269f7e1b5fcf2a3c70fa Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 6 Dec 2024 21:55:35 +0100 Subject: [PATCH 02/25] quick fix for normal point in sharp corner --- Common/src/geometry/CPhysicalGeometry.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Common/src/geometry/CPhysicalGeometry.cpp b/Common/src/geometry/CPhysicalGeometry.cpp index 4969cb65a8e..2a37e7f84b7 100644 --- a/Common/src/geometry/CPhysicalGeometry.cpp +++ b/Common/src/geometry/CPhysicalGeometry.cpp @@ -8104,8 +8104,9 @@ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { Normal = vertex[iMarker][iVertex]->GetNormal(); /*--- Compute closest normal neighbor, note that the normal are oriented inwards ---*/ - /*--- If the neighbor node is on a wall, we set it as a neighbor if there is no previous - neighbor. We also always overwrite a neighbor if an interior point is available. ---*/ + /*--- If the node is on a wall, we set it as a neighbor only if no neighbor points + have been found yet. We also always overwrite a neighbor if an interior point + is available. ---*/ Point_Normal = 0; cos_max = -2.0; for (iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); iNeigh++) { From 8c71e6dd40754536e0581ef2c96d78c004170093 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 6 Dec 2024 22:23:29 +0100 Subject: [PATCH 03/25] clang-format --- Common/src/geometry/CPhysicalGeometry.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Common/src/geometry/CPhysicalGeometry.cpp b/Common/src/geometry/CPhysicalGeometry.cpp index 2a37e7f84b7..ca82a46f918 100644 --- a/Common/src/geometry/CPhysicalGeometry.cpp +++ b/Common/src/geometry/CPhysicalGeometry.cpp @@ -7009,9 +7009,9 @@ void CPhysicalGeometry::FindUniqueNode_PeriodicBound(const CConfig* config) { * ---*/ } break; // Actually no more than one streamwise periodic marker pair is allowed - } // receiver conditional - } // periodic conditional - } // marker loop + } // receiver conditional + } // periodic conditional + } // marker loop /*--- Copy the Coordinates and norm into send buffer. ---*/ for (unsigned short iDim = 0; iDim < nDim; iDim++) Buffer_Send_RefNode[iDim] = nodes->GetCoord(iPointMin, iDim); @@ -8127,13 +8127,10 @@ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { /*--- Get maximum cosine ---*/ if (cos_alpha >= cos_max) { /*--- If point is on the wall, only add it if Point_Normal was not set before. ---*/ - if ( (!nodes->GetViscousBoundary(iPoint)) || - (nodes->GetViscousBoundary(iPoint)) && (cos_max < -1.0) - ) + if ((!nodes->GetViscousBoundary(iPoint)) || ((nodes->GetViscousBoundary(iPoint)) && (cos_max < -1.0))) Point_Normal = jPoint; /*--- Only set angle if it is not on a wall. */ - if (!nodes->GetViscousBoundary(iPoint)) - cos_max = cos_alpha; + if (!nodes->GetViscousBoundary(iPoint)) cos_max = cos_alpha; } } vertex[iMarker][iVertex]->SetNormal_Neighbor(Point_Normal); From e0dd4c75fc985d470c73dde591e779a5a41764dc Mon Sep 17 00:00:00 2001 From: bigfooted Date: Sat, 7 Dec 2024 09:39:37 +0100 Subject: [PATCH 04/25] check why clang-format error --- Common/src/geometry/CPhysicalGeometry.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/src/geometry/CPhysicalGeometry.cpp b/Common/src/geometry/CPhysicalGeometry.cpp index ca82a46f918..42f35ac0b63 100644 --- a/Common/src/geometry/CPhysicalGeometry.cpp +++ b/Common/src/geometry/CPhysicalGeometry.cpp @@ -8127,8 +8127,8 @@ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { /*--- Get maximum cosine ---*/ if (cos_alpha >= cos_max) { /*--- If point is on the wall, only add it if Point_Normal was not set before. ---*/ - if ((!nodes->GetViscousBoundary(iPoint)) || ((nodes->GetViscousBoundary(iPoint)) && (cos_max < -1.0))) - Point_Normal = jPoint; + /*if ((!nodes->GetViscousBoundary(iPoint)) || ((nodes->GetViscousBoundary(iPoint)) && (cos_max < -1.0)))*/ + Point_Normal = jPoint; /*--- Only set angle if it is not on a wall. */ if (!nodes->GetViscousBoundary(iPoint)) cos_max = cos_alpha; } From a4946c31a56f43e0e00b7e287f7af455bbcac8c0 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Sat, 7 Dec 2024 09:48:02 +0100 Subject: [PATCH 05/25] check why clang-format error --- Common/src/geometry/CPhysicalGeometry.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/Common/src/geometry/CPhysicalGeometry.cpp b/Common/src/geometry/CPhysicalGeometry.cpp index 42f35ac0b63..6e34e715be5 100644 --- a/Common/src/geometry/CPhysicalGeometry.cpp +++ b/Common/src/geometry/CPhysicalGeometry.cpp @@ -7009,9 +7009,9 @@ void CPhysicalGeometry::FindUniqueNode_PeriodicBound(const CConfig* config) { * ---*/ } break; // Actually no more than one streamwise periodic marker pair is allowed - } // receiver conditional - } // periodic conditional - } // marker loop + } // receiver conditional + } // periodic conditional + } // marker loop /*--- Copy the Coordinates and norm into send buffer. ---*/ for (unsigned short iDim = 0; iDim < nDim; iDim++) Buffer_Send_RefNode[iDim] = nodes->GetCoord(iPointMin, iDim); @@ -8104,11 +8104,8 @@ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { Normal = vertex[iMarker][iVertex]->GetNormal(); /*--- Compute closest normal neighbor, note that the normal are oriented inwards ---*/ - /*--- If the node is on a wall, we set it as a neighbor only if no neighbor points - have been found yet. We also always overwrite a neighbor if an interior point - is available. ---*/ Point_Normal = 0; - cos_max = -2.0; + cos_max = -1.0; for (iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); iNeigh++) { jPoint = nodes->GetPoint(iPoint, iNeigh); scalar_prod = 0.0; @@ -8126,11 +8123,8 @@ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { /*--- Get maximum cosine ---*/ if (cos_alpha >= cos_max) { - /*--- If point is on the wall, only add it if Point_Normal was not set before. ---*/ - /*if ((!nodes->GetViscousBoundary(iPoint)) || ((nodes->GetViscousBoundary(iPoint)) && (cos_max < -1.0)))*/ Point_Normal = jPoint; - /*--- Only set angle if it is not on a wall. */ - if (!nodes->GetViscousBoundary(iPoint)) cos_max = cos_alpha; + cos_max = cos_alpha; } } vertex[iMarker][iVertex]->SetNormal_Neighbor(Point_Normal); From 40119afc22cde249038c2e4bdb53a1f0cc02f71a Mon Sep 17 00:00:00 2001 From: bigfooted Date: Sat, 7 Dec 2024 12:21:55 +0100 Subject: [PATCH 06/25] clang-format error --- Common/src/geometry/CPhysicalGeometry.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Common/src/geometry/CPhysicalGeometry.cpp b/Common/src/geometry/CPhysicalGeometry.cpp index 6e34e715be5..4b3b76c0a81 100644 --- a/Common/src/geometry/CPhysicalGeometry.cpp +++ b/Common/src/geometry/CPhysicalGeometry.cpp @@ -7009,9 +7009,9 @@ void CPhysicalGeometry::FindUniqueNode_PeriodicBound(const CConfig* config) { * ---*/ } break; // Actually no more than one streamwise periodic marker pair is allowed - } // receiver conditional - } // periodic conditional - } // marker loop + } // receiver conditional + } // periodic conditional + } // marker loop /*--- Copy the Coordinates and norm into send buffer. ---*/ for (unsigned short iDim = 0; iDim < nDim; iDim++) Buffer_Send_RefNode[iDim] = nodes->GetCoord(iPointMin, iDim); @@ -8105,7 +8105,7 @@ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { /*--- Compute closest normal neighbor, note that the normal are oriented inwards ---*/ Point_Normal = 0; - cos_max = -1.0; + cos_max = -2.0; for (iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); iNeigh++) { jPoint = nodes->GetPoint(iPoint, iNeigh); scalar_prod = 0.0; @@ -8123,8 +8123,9 @@ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { /*--- Get maximum cosine ---*/ if (cos_alpha >= cos_max) { - Point_Normal = jPoint; - cos_max = cos_alpha; + if ((!nodes->GetViscousBoundary(iPoint)) || ((nodes->GetViscousBoundary(iPoint)) && (cos_max < -1.0))) + Point_Normal = jPoint; + if (!nodes->GetViscousBoundary(iPoint)) cos_max = cos_alpha; } } vertex[iMarker][iVertex]->SetNormal_Neighbor(Point_Normal); From 18054d66314cd226e3825b3ec4f9f7e198823636 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Sat, 7 Dec 2024 12:26:47 +0100 Subject: [PATCH 07/25] clang-format fix --- Common/src/geometry/CPhysicalGeometry.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Common/src/geometry/CPhysicalGeometry.cpp b/Common/src/geometry/CPhysicalGeometry.cpp index 4b3b76c0a81..2099e3a6313 100644 --- a/Common/src/geometry/CPhysicalGeometry.cpp +++ b/Common/src/geometry/CPhysicalGeometry.cpp @@ -7009,9 +7009,9 @@ void CPhysicalGeometry::FindUniqueNode_PeriodicBound(const CConfig* config) { * ---*/ } break; // Actually no more than one streamwise periodic marker pair is allowed - } // receiver conditional - } // periodic conditional - } // marker loop + } // receiver conditional + } // periodic conditional + } // marker loop /*--- Copy the Coordinates and norm into send buffer. ---*/ for (unsigned short iDim = 0; iDim < nDim; iDim++) Buffer_Send_RefNode[iDim] = nodes->GetCoord(iPointMin, iDim); From 35785022e8beec8069c296ffeee2d07584a4744b Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 13 Dec 2024 13:47:33 +0100 Subject: [PATCH 08/25] use wall distance --- Common/src/geometry/CPhysicalGeometry.cpp | 77 +++++++++++++++++------ 1 file changed, 57 insertions(+), 20 deletions(-) diff --git a/Common/src/geometry/CPhysicalGeometry.cpp b/Common/src/geometry/CPhysicalGeometry.cpp index 2099e3a6313..fa2ee064d6c 100644 --- a/Common/src/geometry/CPhysicalGeometry.cpp +++ b/Common/src/geometry/CPhysicalGeometry.cpp @@ -8089,11 +8089,16 @@ void CPhysicalGeometry::ComputeMeshQualityStatistics(const CConfig* config) { } } +/*--- Note that we do not find the real normal neighbor here, since it usually does not exist. + Instead, we determine the interior node that is closest to the wall node. If there is no + interior node, we have to take the closest wall node. ---*/ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { - su2double cos_max, scalar_prod, norm_vect, norm_Normal, cos_alpha, diff_coord, *Normal; + su2double dist_min; unsigned long Point_Normal, jPoint; - unsigned short iNeigh, iMarker, iDim; - unsigned long iPoint, iVertex; + unsigned short iNeigh, iMarker, jNeigh; + unsigned long iPoint, kPoint, iVertex; + // did we find an interiornode? + bool interiorNode; for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { if (config->GetMarker_All_KindBC(iMarker) != SEND_RECEIVE && @@ -8101,33 +8106,65 @@ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { config->GetMarker_All_KindBC(iMarker) != NEARFIELD_BOUNDARY) { for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { iPoint = vertex[iMarker][iVertex]->GetNode(); - Normal = vertex[iMarker][iVertex]->GetNormal(); + const su2double* Coord_i = nodes->GetCoord(iPoint); /*--- Compute closest normal neighbor, note that the normal are oriented inwards ---*/ Point_Normal = 0; - cos_max = -2.0; + // we use distance + dist_min = 1.0e10; + interiorNode = false; for (iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); iNeigh++) { jPoint = nodes->GetPoint(iPoint, iNeigh); - scalar_prod = 0.0; - norm_vect = 0.0; - norm_Normal = 0.0; - for (iDim = 0; iDim < nDim; iDim++) { - diff_coord = nodes->GetCoord(jPoint, iDim) - nodes->GetCoord(iPoint, iDim); - scalar_prod += diff_coord * Normal[iDim]; - norm_vect += diff_coord * diff_coord; - norm_Normal += Normal[iDim] * Normal[iDim]; + const su2double* Coord_j = nodes->GetCoord(jPoint); + + su2double distance = 0.0; + vector edgeVector(nDim); + for (unsigned short iDim = 0; iDim < nDim; iDim++) { + edgeVector[iDim] = Coord_j[iDim] - Coord_i[iDim]; + // squared distance + distance += edgeVector[iDim] * edgeVector[iDim]; } - norm_vect = sqrt(norm_vect); - norm_Normal = sqrt(norm_Normal); - cos_alpha = scalar_prod / (norm_vect * norm_Normal); - /*--- Get maximum cosine ---*/ - if (cos_alpha >= cos_max) { - if ((!nodes->GetViscousBoundary(iPoint)) || ((nodes->GetViscousBoundary(iPoint)) && (cos_max < -1.0))) + // Take the interior node that is closest to the wall node. + if ((nodes->GetViscousBoundary(jPoint) == false) && (distance < dist_min) ) { Point_Normal = jPoint; - if (!nodes->GetViscousBoundary(iPoint)) cos_max = cos_alpha; + dist_min = distance; + interiorNode = true; } + } + + // if we did not find a normal neighbor, then loop over the cells that are connected to the point + if (interiorNode == false) { + // find neighbor nodes to i. + for (iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); iNeigh++) { + jPoint = nodes->GetPoint(iPoint, iNeigh); + // now loop over the nodes of the neighbors + for (jNeigh = 0; jNeigh < nodes->GetnPoint(jPoint); jNeigh++) { + kPoint = nodes->GetPoint(jPoint, jNeigh); + + if (kPoint == iPoint) continue; + + const su2double* Coord_k = nodes->GetCoord(kPoint); + // now find the distance from ipoint to kpoint + su2double distance = 0.0; + vector edgeVector(nDim); + for (unsigned short iDim = 0; iDim < nDim; iDim++) { + edgeVector[iDim] = Coord_k[iDim] - Coord_i[iDim]; + // squared distance + distance += edgeVector[iDim] * edgeVector[iDim]; + } + + // Take the interior node that is closest to the wall node. + if ((nodes->GetViscousBoundary(kPoint) == false) && (distance < dist_min) ) { + Point_Normal = kPoint; + dist_min = distance; + interiorNode = true; + } + } + } + } + vertex[iMarker][iVertex]->SetNormal_Neighbor(Point_Normal); } } From 5a89f908f20ff925a2c9f396ee68be21970033d7 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 13 Dec 2024 13:55:46 +0100 Subject: [PATCH 09/25] clang --- Common/src/geometry/CPhysicalGeometry.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Common/src/geometry/CPhysicalGeometry.cpp b/Common/src/geometry/CPhysicalGeometry.cpp index fa2ee064d6c..9ce660300af 100644 --- a/Common/src/geometry/CPhysicalGeometry.cpp +++ b/Common/src/geometry/CPhysicalGeometry.cpp @@ -8126,12 +8126,11 @@ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { } // Take the interior node that is closest to the wall node. - if ((nodes->GetViscousBoundary(jPoint) == false) && (distance < dist_min) ) { - Point_Normal = jPoint; - dist_min = distance; - interiorNode = true; + if ((nodes->GetViscousBoundary(jPoint) == false) && (distance < dist_min)) { + Point_Normal = jPoint; + dist_min = distance; + interiorNode = true; } - } // if we did not find a normal neighbor, then loop over the cells that are connected to the point @@ -8156,7 +8155,7 @@ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { } // Take the interior node that is closest to the wall node. - if ((nodes->GetViscousBoundary(kPoint) == false) && (distance < dist_min) ) { + if ((nodes->GetViscousBoundary(kPoint) == false) && (distance < dist_min)) { Point_Normal = kPoint; dist_min = distance; interiorNode = true; From 087a12c11be96a18828708b057ca624515e35c3f Mon Sep 17 00:00:00 2001 From: bigfooted Date: Sun, 15 Dec 2024 10:52:19 +0100 Subject: [PATCH 10/25] introduce nearest_neighbor --- Common/include/geometry/CGeometry.hpp | 6 ++ .../include/geometry/CMultiGridGeometry.hpp | 8 +- Common/include/geometry/CPhysicalGeometry.hpp | 8 +- Common/include/geometry/dual_grid/CVertex.hpp | 15 +++- Common/src/geometry/CMultiGridGeometry.cpp | 79 ++++++++++++++++++ Common/src/geometry/CPhysicalGeometry.cpp | 80 +++++++++++++++++++ SU2_CFD/src/drivers/CDriver.cpp | 13 ++- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 9 ++- 8 files changed, 210 insertions(+), 8 deletions(-) diff --git a/Common/include/geometry/CGeometry.hpp b/Common/include/geometry/CGeometry.hpp index 738618ba2cd..007a423e408 100644 --- a/Common/include/geometry/CGeometry.hpp +++ b/Common/include/geometry/CGeometry.hpp @@ -1179,6 +1179,12 @@ class CGeometry { */ inline virtual void FindNormal_Neighbor(const CConfig* config) {} + /*! + * \brief A virtual member. + * \param[in] config - Definition of the particular problem. + */ + inline virtual void FindNearest_Neighbor(const CConfig* config) {} + /*! * \brief A virtual member. */ diff --git a/Common/include/geometry/CMultiGridGeometry.hpp b/Common/include/geometry/CMultiGridGeometry.hpp index c3e897f7f31..cecb65bbd75 100644 --- a/Common/include/geometry/CMultiGridGeometry.hpp +++ b/Common/include/geometry/CMultiGridGeometry.hpp @@ -123,11 +123,17 @@ class CMultiGridGeometry final : public CGeometry { void SetRestricted_GridVelocity(const CGeometry* fine_grid) override; /*! - * \brief Find and store the closest neighbor to a vertex. + * \brief Find and store the closest, most normal, neighbor to a vertex. * \param[in] config - Definition of the particular problem. */ void FindNormal_Neighbor(const CConfig* config) override; + /*! + * \brief Find and store the closest interior neighbor to a vertex. + * \param[in] config - Definition of the particular problem. + */ + void FindNearest_Neighbor(const CConfig* config) override; + /*! * \brief Mach the near field boundary condition. * \param[in] config - Definition of the particular problem. diff --git a/Common/include/geometry/CPhysicalGeometry.hpp b/Common/include/geometry/CPhysicalGeometry.hpp index 8214e4ea7f0..8681fbc772f 100644 --- a/Common/include/geometry/CPhysicalGeometry.hpp +++ b/Common/include/geometry/CPhysicalGeometry.hpp @@ -560,11 +560,17 @@ class CPhysicalGeometry final : public CGeometry { void ComputeMeshQualityStatistics(const CConfig* config) override; /*! - * \brief Find and store the closest neighbor to a vertex. + * \brief Find and store the closest, most normal, neighbor to a vertex. * \param[in] config - Definition of the particular problem. */ void FindNormal_Neighbor(const CConfig* config) override; + /*! + * \brief Find and store the closest interior neighbor to a vertex. + * \param[in] config - Definition of the particular problem. + */ + void FindNearest_Neighbor(const CConfig* config) override; + /*! * \brief Read the sensitivity from an input file. * \param[in] config - Definition of the particular problem. diff --git a/Common/include/geometry/dual_grid/CVertex.hpp b/Common/include/geometry/dual_grid/CVertex.hpp index 56c195c6e3f..4a31ee80bdb 100644 --- a/Common/include/geometry/dual_grid/CVertex.hpp +++ b/Common/include/geometry/dual_grid/CVertex.hpp @@ -45,7 +45,8 @@ class CVertex : public CDualGrid { long PeriodicPoint[5] = {-1}; /*!< \brief Store the periodic point of a boundary (iProcessor, iPoint) */ bool ActDisk_Perimeter = false; /*!< \brief Identify nodes at the perimeter of the actuator disk */ short Rotation_Type; /*!< \brief Type of rotation associated with the vertex (MPI and periodic) */ - unsigned long Normal_Neighbor; /*!< \brief Index of the closest neighbor. */ + unsigned long Normal_Neighbor; /*!< \brief Index of the closest, most normal, neighbor. */ + unsigned long Nearest_Neighbor; /*!< \brief Index of the closest interior neighbor. */ su2double Basis_Function[3] = {0.0}; /*!< \brief Basis function values for interpolation across zones. */ public: @@ -319,4 +320,16 @@ class CVertex : public CDualGrid { * \return Index of the closest neighbor. */ inline unsigned long GetNormal_Neighbor(void) const { return Normal_Neighbor; } + + /*! + * \brief Set the index of the closest interior neighbor to a point on the boundaries. + * \param[in] val_Nearest_Neighbor - Index of the closest neighbor. + */ + inline void SetNearest_Neighbor(unsigned long val_Nearest_Neighbor) { Nearest_Neighbor = val_Nearest_Neighbor; } + + /*! + * \brief Get the value of the closest neighbor. + * \return Index of the closest neighbor. + */ + inline unsigned long GetNearest_Neighbor(void) const { return Nearest_Neighbor; } }; diff --git a/Common/src/geometry/CMultiGridGeometry.cpp b/Common/src/geometry/CMultiGridGeometry.cpp index c3c600e8a12..291df133c94 100644 --- a/Common/src/geometry/CMultiGridGeometry.cpp +++ b/Common/src/geometry/CMultiGridGeometry.cpp @@ -1089,3 +1089,82 @@ void CMultiGridGeometry::FindNormal_Neighbor(const CConfig* config) { } } } +/*--- We determine the interior node that is closest to the wall node. If there is no + interior node, we have to take the closest wall node. ---*/ +void CMultiGridGeometry::FindNearest_Neighbor(const CConfig* config) { + su2double dist_min; + unsigned long Point_Normal, jPoint; + unsigned short iNeigh, iMarker, jNeigh; + unsigned long iPoint, kPoint, iVertex; + // did we find an interiornode? + bool interiorNode; + + for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { + if (config->GetMarker_All_KindBC(iMarker) != SEND_RECEIVE && + config->GetMarker_All_KindBC(iMarker) != INTERNAL_BOUNDARY && + config->GetMarker_All_KindBC(iMarker) != NEARFIELD_BOUNDARY) { + for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { + iPoint = vertex[iMarker][iVertex]->GetNode(); + const su2double* Coord_i = nodes->GetCoord(iPoint); + + /*--- Compute closest normal neighbor, note that the normal are oriented inwards ---*/ + Point_Normal = 0; + // we use distance + dist_min = 1.0e10; + interiorNode = false; + for (iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); iNeigh++) { + jPoint = nodes->GetPoint(iPoint, iNeigh); + const su2double* Coord_j = nodes->GetCoord(jPoint); + + su2double distance = 0.0; + vector edgeVector(nDim); + for (unsigned short iDim = 0; iDim < nDim; iDim++) { + edgeVector[iDim] = Coord_j[iDim] - Coord_i[iDim]; + // squared distance + distance += edgeVector[iDim] * edgeVector[iDim]; + } + + // Take the interior node that is closest to the wall node. + if ((nodes->GetViscousBoundary(jPoint) == false) && (distance < dist_min)) { + Point_Normal = jPoint; + dist_min = distance; + interiorNode = true; + } + } + + // if we did not find a normal neighbor, then loop over the cells that are connected to the point + if (interiorNode == false) { + // find neighbor nodes to i. + for (iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); iNeigh++) { + jPoint = nodes->GetPoint(iPoint, iNeigh); + // now loop over the nodes of the neighbors + for (jNeigh = 0; jNeigh < nodes->GetnPoint(jPoint); jNeigh++) { + kPoint = nodes->GetPoint(jPoint, jNeigh); + + if (kPoint == iPoint) continue; + + const su2double* Coord_k = nodes->GetCoord(kPoint); + // now find the distance from ipoint to kpoint + su2double distance = 0.0; + vector edgeVector(nDim); + for (unsigned short iDim = 0; iDim < nDim; iDim++) { + edgeVector[iDim] = Coord_k[iDim] - Coord_i[iDim]; + // squared distance + distance += edgeVector[iDim] * edgeVector[iDim]; + } + + // Take the interior node that is closest to the wall node. + if ((nodes->GetViscousBoundary(kPoint) == false) && (distance < dist_min)) { + Point_Normal = kPoint; + dist_min = distance; + interiorNode = true; + } + } + } + } + + vertex[iMarker][iVertex]->SetNearest_Neighbor(Point_Normal); + } + } + } +} diff --git a/Common/src/geometry/CPhysicalGeometry.cpp b/Common/src/geometry/CPhysicalGeometry.cpp index 9ce660300af..b18e040c6bf 100644 --- a/Common/src/geometry/CPhysicalGeometry.cpp +++ b/Common/src/geometry/CPhysicalGeometry.cpp @@ -8170,6 +8170,86 @@ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { } } +/*--- We determine the interior node that is closest to the wall node. If there is no + interior node, we have to take the closest wall node. ---*/ +void CPhysicalGeometry::FindNearest_Neighbor(const CConfig* config) { + su2double dist_min; + unsigned long Point_Normal, jPoint; + unsigned short iNeigh, iMarker, jNeigh; + unsigned long iPoint, kPoint, iVertex; + // did we find an interiornode? + bool interiorNode; + + for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { + if (config->GetMarker_All_KindBC(iMarker) != SEND_RECEIVE && + config->GetMarker_All_KindBC(iMarker) != INTERNAL_BOUNDARY && + config->GetMarker_All_KindBC(iMarker) != NEARFIELD_BOUNDARY) { + for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { + iPoint = vertex[iMarker][iVertex]->GetNode(); + const su2double* Coord_i = nodes->GetCoord(iPoint); + + /*--- Compute closest normal neighbor, note that the normal are oriented inwards ---*/ + Point_Normal = 0; + // we use distance + dist_min = 1.0e10; + interiorNode = false; + for (iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); iNeigh++) { + jPoint = nodes->GetPoint(iPoint, iNeigh); + const su2double* Coord_j = nodes->GetCoord(jPoint); + + su2double distance = 0.0; + vector edgeVector(nDim); + for (unsigned short iDim = 0; iDim < nDim; iDim++) { + edgeVector[iDim] = Coord_j[iDim] - Coord_i[iDim]; + // squared distance + distance += edgeVector[iDim] * edgeVector[iDim]; + } + + // Take the interior node that is closest to the wall node. + if ((nodes->GetViscousBoundary(jPoint) == false) && (distance < dist_min)) { + Point_Normal = jPoint; + dist_min = distance; + interiorNode = true; + } + } + + // if we did not find a normal neighbor, then loop over the cells that are connected to the point + if (interiorNode == false) { + // find neighbor nodes to i. + for (iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); iNeigh++) { + jPoint = nodes->GetPoint(iPoint, iNeigh); + // now loop over the nodes of the neighbors + for (jNeigh = 0; jNeigh < nodes->GetnPoint(jPoint); jNeigh++) { + kPoint = nodes->GetPoint(jPoint, jNeigh); + + if (kPoint == iPoint) continue; + + const su2double* Coord_k = nodes->GetCoord(kPoint); + // now find the distance from ipoint to kpoint + su2double distance = 0.0; + vector edgeVector(nDim); + for (unsigned short iDim = 0; iDim < nDim; iDim++) { + edgeVector[iDim] = Coord_k[iDim] - Coord_i[iDim]; + // squared distance + distance += edgeVector[iDim] * edgeVector[iDim]; + } + + // Take the interior node that is closest to the wall node. + if ((nodes->GetViscousBoundary(kPoint) == false) && (distance < dist_min)) { + Point_Normal = kPoint; + dist_min = distance; + interiorNode = true; + } + } + } + } + + vertex[iMarker][iVertex]->SetNearest_Neighbor(Point_Normal); + } + } + } +} + void CPhysicalGeometry::SetBoundSensitivity(CConfig* config) { unsigned short iMarker, icommas; unsigned long iVertex, iPoint, (*Point2Vertex)[2], nPointLocal = 0, nPointGlobal = 0; diff --git a/SU2_CFD/src/drivers/CDriver.cpp b/SU2_CFD/src/drivers/CDriver.cpp index 015e808b626..dd7ad5da513 100644 --- a/SU2_CFD/src/drivers/CDriver.cpp +++ b/SU2_CFD/src/drivers/CDriver.cpp @@ -777,6 +777,12 @@ void CDriver::InitializeGeometryFVM(CConfig *config, CGeometry **&geometry) { if (rank == MASTER_NODE) cout << "Searching for the closest normal neighbors to the surfaces." << endl; geometry[MESH_0]->FindNormal_Neighbor(config); + /*--- Identify closest interior neighbor, this is a replacement of the FindNormal_Neighbor implementation ---*/ + + if (rank == MASTER_NODE) cout << "Searching for the closest interior neighbors to the surfaces." << endl; + geometry[MESH_0]->FindNearest_Neighbor(config); + + /*--- Store the global to local mapping. ---*/ if (rank == MASTER_NODE) cout << "Storing a mapping from global to local point index." << endl; @@ -833,10 +839,13 @@ void CDriver::InitializeGeometryFVM(CConfig *config, CGeometry **&geometry) { geometry[iMGlevel]->SetBoundControlVolume(geometry[iMGlevel-1], config, ALLOCATE); geometry[iMGlevel]->SetCoord(geometry[iMGlevel-1]); - /*--- Find closest neighbor to a surface point ---*/ + /*--- Find closest, most normal, neighbor to a surface point ---*/ geometry[iMGlevel]->FindNormal_Neighbor(config); + /*--- Find closest interior neighbor to a surface point (eventual replacement of FindNormal_Neighbor) ---*/ + geometry[iMGlevel]->FindNearest_Neighbor(config); + /*--- Store our multigrid index. ---*/ geometry[iMGlevel]->SetMGLevel(iMGlevel); @@ -2517,7 +2526,7 @@ void CDriver::InitializeInterface(CConfig **config, CSolver***** solver, CGeomet else interface_type = NO_TRANSFER; } - + if (interface_type != NO_TRANSFER) { auto nVar = 4; interface[donor][target] = new CConjugateHeatInterface(nVar, 0); diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 02b91c8ab2c..33c27733b3e 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -260,7 +260,8 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai /*--- Check if the node belongs to the domain (i.e, not a halo node) ---*/ if (geometry->nodes->GetDomain(iPoint)) { - const auto jPoint = geometry->vertex[iMarker][iVertex]->GetNormal_Neighbor(); + const auto jPoint = geometry->vertex[iMarker][iVertex]->GetNearest_Neighbor(); + //const auto jPoint = geometry->vertex[iMarker][iVertex]->GetNormal_Neighbor(); su2double shearStress = 0.0; for(auto iDim = 0u; iDim < nDim; iDim++) { @@ -459,7 +460,8 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont } else { // smooth wall /*--- distance to closest neighbor ---*/ - const auto jPoint = geometry->vertex[val_marker][iVertex]->GetNormal_Neighbor(); + //const auto jPoint = geometry->vertex[val_marker][iVertex]->GetNormal_Neighbor(); + const auto jPoint = geometry->vertex[val_marker][iVertex]->GetNearest_Neighbor(); su2double distance2 = GeometryToolbox::SquaredDistance(nDim, geometry->nodes->GetCoord(iPoint), @@ -507,7 +509,8 @@ void CTurbSSTSolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contai for (auto iVertex = 0u; iVertex < geometry->nVertex[val_marker]; iVertex++) { const auto iPoint = geometry->vertex[val_marker][iVertex]->GetNode(); - const auto iPoint_Neighbor = geometry->vertex[val_marker][iVertex]->GetNormal_Neighbor(); + //const auto iPoint_Neighbor = geometry->vertex[val_marker][iVertex]->GetNormal_Neighbor(); + const auto iPoint_Neighbor = geometry->vertex[val_marker][iVertex]->GetNearest_Neighbor(); if (!geometry->nodes->GetDomain(iPoint_Neighbor)) continue; su2double Y_Plus = solver_container[FLOW_SOL]->GetYPlus(val_marker, iVertex); From ce27533ebf4aa737e763c42a975d66d01e7e889c Mon Sep 17 00:00:00 2001 From: bigfooted Date: Sun, 15 Dec 2024 21:43:04 +0100 Subject: [PATCH 11/25] restore original normalneighbor --- Common/src/geometry/CPhysicalGeometry.cpp | 75 ++++++----------------- 1 file changed, 19 insertions(+), 56 deletions(-) diff --git a/Common/src/geometry/CPhysicalGeometry.cpp b/Common/src/geometry/CPhysicalGeometry.cpp index b18e040c6bf..4d1e90b6dba 100644 --- a/Common/src/geometry/CPhysicalGeometry.cpp +++ b/Common/src/geometry/CPhysicalGeometry.cpp @@ -8089,16 +8089,11 @@ void CPhysicalGeometry::ComputeMeshQualityStatistics(const CConfig* config) { } } -/*--- Note that we do not find the real normal neighbor here, since it usually does not exist. - Instead, we determine the interior node that is closest to the wall node. If there is no - interior node, we have to take the closest wall node. ---*/ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { - su2double dist_min; + su2double cos_max, scalar_prod, norm_vect, norm_Normal, cos_alpha, diff_coord, *Normal; unsigned long Point_Normal, jPoint; - unsigned short iNeigh, iMarker, jNeigh; - unsigned long iPoint, kPoint, iVertex; - // did we find an interiornode? - bool interiorNode; + unsigned short iNeigh, iMarker, iDim; + unsigned long iPoint, iVertex; for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { if (config->GetMarker_All_KindBC(iMarker) != SEND_RECEIVE && @@ -8106,64 +8101,32 @@ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { config->GetMarker_All_KindBC(iMarker) != NEARFIELD_BOUNDARY) { for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { iPoint = vertex[iMarker][iVertex]->GetNode(); - const su2double* Coord_i = nodes->GetCoord(iPoint); + Normal = vertex[iMarker][iVertex]->GetNormal(); /*--- Compute closest normal neighbor, note that the normal are oriented inwards ---*/ Point_Normal = 0; - // we use distance - dist_min = 1.0e10; - interiorNode = false; + cos_max = -1.0; for (iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); iNeigh++) { jPoint = nodes->GetPoint(iPoint, iNeigh); - const su2double* Coord_j = nodes->GetCoord(jPoint); - - su2double distance = 0.0; - vector edgeVector(nDim); - for (unsigned short iDim = 0; iDim < nDim; iDim++) { - edgeVector[iDim] = Coord_j[iDim] - Coord_i[iDim]; - // squared distance - distance += edgeVector[iDim] * edgeVector[iDim]; + scalar_prod = 0.0; + norm_vect = 0.0; + norm_Normal = 0.0; + for (iDim = 0; iDim < nDim; iDim++) { + diff_coord = nodes->GetCoord(jPoint, iDim) - nodes->GetCoord(iPoint, iDim); + scalar_prod += diff_coord * Normal[iDim]; + norm_vect += diff_coord * diff_coord; + norm_Normal += Normal[iDim] * Normal[iDim]; } + norm_vect = sqrt(norm_vect); + norm_Normal = sqrt(norm_Normal); + cos_alpha = scalar_prod / (norm_vect * norm_Normal); - // Take the interior node that is closest to the wall node. - if ((nodes->GetViscousBoundary(jPoint) == false) && (distance < dist_min)) { + /*--- Get maximum cosine ---*/ + if (cos_alpha >= cos_max) { Point_Normal = jPoint; - dist_min = distance; - interiorNode = true; - } - } - - // if we did not find a normal neighbor, then loop over the cells that are connected to the point - if (interiorNode == false) { - // find neighbor nodes to i. - for (iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); iNeigh++) { - jPoint = nodes->GetPoint(iPoint, iNeigh); - // now loop over the nodes of the neighbors - for (jNeigh = 0; jNeigh < nodes->GetnPoint(jPoint); jNeigh++) { - kPoint = nodes->GetPoint(jPoint, jNeigh); - - if (kPoint == iPoint) continue; - - const su2double* Coord_k = nodes->GetCoord(kPoint); - // now find the distance from ipoint to kpoint - su2double distance = 0.0; - vector edgeVector(nDim); - for (unsigned short iDim = 0; iDim < nDim; iDim++) { - edgeVector[iDim] = Coord_k[iDim] - Coord_i[iDim]; - // squared distance - distance += edgeVector[iDim] * edgeVector[iDim]; - } - - // Take the interior node that is closest to the wall node. - if ((nodes->GetViscousBoundary(kPoint) == false) && (distance < dist_min)) { - Point_Normal = kPoint; - dist_min = distance; - interiorNode = true; + cos_max = cos_alpha; } } - } - } - vertex[iMarker][iVertex]->SetNormal_Neighbor(Point_Normal); } } From 5f8b6ba75627e72202ae98dd261994747cc2909a Mon Sep 17 00:00:00 2001 From: bigfooted Date: Sun, 15 Dec 2024 23:07:37 +0100 Subject: [PATCH 12/25] clang --- Common/src/geometry/CPhysicalGeometry.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/src/geometry/CPhysicalGeometry.cpp b/Common/src/geometry/CPhysicalGeometry.cpp index 4d1e90b6dba..91252fc9ed5 100644 --- a/Common/src/geometry/CPhysicalGeometry.cpp +++ b/Common/src/geometry/CPhysicalGeometry.cpp @@ -8125,8 +8125,8 @@ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { if (cos_alpha >= cos_max) { Point_Normal = jPoint; cos_max = cos_alpha; - } - } + } + } vertex[iMarker][iVertex]->SetNormal_Neighbor(Point_Normal); } } From f5f2de9aa83b99224193bb6e6c9aae7c94870ec8 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 7 Jan 2025 17:09:58 +0100 Subject: [PATCH 13/25] cleanup old implementation, start new --- Common/include/geometry/CGeometry.hpp | 6 -- .../include/geometry/CMultiGridGeometry.hpp | 6 -- Common/include/geometry/CPhysicalGeometry.hpp | 6 -- Common/include/geometry/dual_grid/CVertex.hpp | 11 --- Common/src/geometry/CMultiGridGeometry.cpp | 79 --------------- Common/src/geometry/CPhysicalGeometry.cpp | 80 ---------------- .../include/solvers/CFVMFlowSolverBase.hpp | 8 ++ .../include/solvers/CFVMFlowSolverBase.inl | 7 +- SU2_CFD/include/solvers/CSolver.hpp | 8 ++ SU2_CFD/include/solvers/CTurbSSTSolver.hpp | 1 + SU2_CFD/src/drivers/CDriver.cpp | 9 -- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 95 ++++++++++++++++--- 12 files changed, 105 insertions(+), 211 deletions(-) diff --git a/Common/include/geometry/CGeometry.hpp b/Common/include/geometry/CGeometry.hpp index 007a423e408..738618ba2cd 100644 --- a/Common/include/geometry/CGeometry.hpp +++ b/Common/include/geometry/CGeometry.hpp @@ -1179,12 +1179,6 @@ class CGeometry { */ inline virtual void FindNormal_Neighbor(const CConfig* config) {} - /*! - * \brief A virtual member. - * \param[in] config - Definition of the particular problem. - */ - inline virtual void FindNearest_Neighbor(const CConfig* config) {} - /*! * \brief A virtual member. */ diff --git a/Common/include/geometry/CMultiGridGeometry.hpp b/Common/include/geometry/CMultiGridGeometry.hpp index cecb65bbd75..09a3ca06d90 100644 --- a/Common/include/geometry/CMultiGridGeometry.hpp +++ b/Common/include/geometry/CMultiGridGeometry.hpp @@ -128,12 +128,6 @@ class CMultiGridGeometry final : public CGeometry { */ void FindNormal_Neighbor(const CConfig* config) override; - /*! - * \brief Find and store the closest interior neighbor to a vertex. - * \param[in] config - Definition of the particular problem. - */ - void FindNearest_Neighbor(const CConfig* config) override; - /*! * \brief Mach the near field boundary condition. * \param[in] config - Definition of the particular problem. diff --git a/Common/include/geometry/CPhysicalGeometry.hpp b/Common/include/geometry/CPhysicalGeometry.hpp index 8681fbc772f..3abbdb72ac5 100644 --- a/Common/include/geometry/CPhysicalGeometry.hpp +++ b/Common/include/geometry/CPhysicalGeometry.hpp @@ -565,12 +565,6 @@ class CPhysicalGeometry final : public CGeometry { */ void FindNormal_Neighbor(const CConfig* config) override; - /*! - * \brief Find and store the closest interior neighbor to a vertex. - * \param[in] config - Definition of the particular problem. - */ - void FindNearest_Neighbor(const CConfig* config) override; - /*! * \brief Read the sensitivity from an input file. * \param[in] config - Definition of the particular problem. diff --git a/Common/include/geometry/dual_grid/CVertex.hpp b/Common/include/geometry/dual_grid/CVertex.hpp index 4a31ee80bdb..9dd4c691386 100644 --- a/Common/include/geometry/dual_grid/CVertex.hpp +++ b/Common/include/geometry/dual_grid/CVertex.hpp @@ -321,15 +321,4 @@ class CVertex : public CDualGrid { */ inline unsigned long GetNormal_Neighbor(void) const { return Normal_Neighbor; } - /*! - * \brief Set the index of the closest interior neighbor to a point on the boundaries. - * \param[in] val_Nearest_Neighbor - Index of the closest neighbor. - */ - inline void SetNearest_Neighbor(unsigned long val_Nearest_Neighbor) { Nearest_Neighbor = val_Nearest_Neighbor; } - - /*! - * \brief Get the value of the closest neighbor. - * \return Index of the closest neighbor. - */ - inline unsigned long GetNearest_Neighbor(void) const { return Nearest_Neighbor; } }; diff --git a/Common/src/geometry/CMultiGridGeometry.cpp b/Common/src/geometry/CMultiGridGeometry.cpp index 291df133c94..c3c600e8a12 100644 --- a/Common/src/geometry/CMultiGridGeometry.cpp +++ b/Common/src/geometry/CMultiGridGeometry.cpp @@ -1089,82 +1089,3 @@ void CMultiGridGeometry::FindNormal_Neighbor(const CConfig* config) { } } } -/*--- We determine the interior node that is closest to the wall node. If there is no - interior node, we have to take the closest wall node. ---*/ -void CMultiGridGeometry::FindNearest_Neighbor(const CConfig* config) { - su2double dist_min; - unsigned long Point_Normal, jPoint; - unsigned short iNeigh, iMarker, jNeigh; - unsigned long iPoint, kPoint, iVertex; - // did we find an interiornode? - bool interiorNode; - - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - if (config->GetMarker_All_KindBC(iMarker) != SEND_RECEIVE && - config->GetMarker_All_KindBC(iMarker) != INTERNAL_BOUNDARY && - config->GetMarker_All_KindBC(iMarker) != NEARFIELD_BOUNDARY) { - for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { - iPoint = vertex[iMarker][iVertex]->GetNode(); - const su2double* Coord_i = nodes->GetCoord(iPoint); - - /*--- Compute closest normal neighbor, note that the normal are oriented inwards ---*/ - Point_Normal = 0; - // we use distance - dist_min = 1.0e10; - interiorNode = false; - for (iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); iNeigh++) { - jPoint = nodes->GetPoint(iPoint, iNeigh); - const su2double* Coord_j = nodes->GetCoord(jPoint); - - su2double distance = 0.0; - vector edgeVector(nDim); - for (unsigned short iDim = 0; iDim < nDim; iDim++) { - edgeVector[iDim] = Coord_j[iDim] - Coord_i[iDim]; - // squared distance - distance += edgeVector[iDim] * edgeVector[iDim]; - } - - // Take the interior node that is closest to the wall node. - if ((nodes->GetViscousBoundary(jPoint) == false) && (distance < dist_min)) { - Point_Normal = jPoint; - dist_min = distance; - interiorNode = true; - } - } - - // if we did not find a normal neighbor, then loop over the cells that are connected to the point - if (interiorNode == false) { - // find neighbor nodes to i. - for (iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); iNeigh++) { - jPoint = nodes->GetPoint(iPoint, iNeigh); - // now loop over the nodes of the neighbors - for (jNeigh = 0; jNeigh < nodes->GetnPoint(jPoint); jNeigh++) { - kPoint = nodes->GetPoint(jPoint, jNeigh); - - if (kPoint == iPoint) continue; - - const su2double* Coord_k = nodes->GetCoord(kPoint); - // now find the distance from ipoint to kpoint - su2double distance = 0.0; - vector edgeVector(nDim); - for (unsigned short iDim = 0; iDim < nDim; iDim++) { - edgeVector[iDim] = Coord_k[iDim] - Coord_i[iDim]; - // squared distance - distance += edgeVector[iDim] * edgeVector[iDim]; - } - - // Take the interior node that is closest to the wall node. - if ((nodes->GetViscousBoundary(kPoint) == false) && (distance < dist_min)) { - Point_Normal = kPoint; - dist_min = distance; - interiorNode = true; - } - } - } - } - - vertex[iMarker][iVertex]->SetNearest_Neighbor(Point_Normal); - } - } - } -} diff --git a/Common/src/geometry/CPhysicalGeometry.cpp b/Common/src/geometry/CPhysicalGeometry.cpp index 91252fc9ed5..6e34e715be5 100644 --- a/Common/src/geometry/CPhysicalGeometry.cpp +++ b/Common/src/geometry/CPhysicalGeometry.cpp @@ -8133,86 +8133,6 @@ void CPhysicalGeometry::FindNormal_Neighbor(const CConfig* config) { } } -/*--- We determine the interior node that is closest to the wall node. If there is no - interior node, we have to take the closest wall node. ---*/ -void CPhysicalGeometry::FindNearest_Neighbor(const CConfig* config) { - su2double dist_min; - unsigned long Point_Normal, jPoint; - unsigned short iNeigh, iMarker, jNeigh; - unsigned long iPoint, kPoint, iVertex; - // did we find an interiornode? - bool interiorNode; - - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - if (config->GetMarker_All_KindBC(iMarker) != SEND_RECEIVE && - config->GetMarker_All_KindBC(iMarker) != INTERNAL_BOUNDARY && - config->GetMarker_All_KindBC(iMarker) != NEARFIELD_BOUNDARY) { - for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { - iPoint = vertex[iMarker][iVertex]->GetNode(); - const su2double* Coord_i = nodes->GetCoord(iPoint); - - /*--- Compute closest normal neighbor, note that the normal are oriented inwards ---*/ - Point_Normal = 0; - // we use distance - dist_min = 1.0e10; - interiorNode = false; - for (iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); iNeigh++) { - jPoint = nodes->GetPoint(iPoint, iNeigh); - const su2double* Coord_j = nodes->GetCoord(jPoint); - - su2double distance = 0.0; - vector edgeVector(nDim); - for (unsigned short iDim = 0; iDim < nDim; iDim++) { - edgeVector[iDim] = Coord_j[iDim] - Coord_i[iDim]; - // squared distance - distance += edgeVector[iDim] * edgeVector[iDim]; - } - - // Take the interior node that is closest to the wall node. - if ((nodes->GetViscousBoundary(jPoint) == false) && (distance < dist_min)) { - Point_Normal = jPoint; - dist_min = distance; - interiorNode = true; - } - } - - // if we did not find a normal neighbor, then loop over the cells that are connected to the point - if (interiorNode == false) { - // find neighbor nodes to i. - for (iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); iNeigh++) { - jPoint = nodes->GetPoint(iPoint, iNeigh); - // now loop over the nodes of the neighbors - for (jNeigh = 0; jNeigh < nodes->GetnPoint(jPoint); jNeigh++) { - kPoint = nodes->GetPoint(jPoint, jNeigh); - - if (kPoint == iPoint) continue; - - const su2double* Coord_k = nodes->GetCoord(kPoint); - // now find the distance from ipoint to kpoint - su2double distance = 0.0; - vector edgeVector(nDim); - for (unsigned short iDim = 0; iDim < nDim; iDim++) { - edgeVector[iDim] = Coord_k[iDim] - Coord_i[iDim]; - // squared distance - distance += edgeVector[iDim] * edgeVector[iDim]; - } - - // Take the interior node that is closest to the wall node. - if ((nodes->GetViscousBoundary(kPoint) == false) && (distance < dist_min)) { - Point_Normal = kPoint; - dist_min = distance; - interiorNode = true; - } - } - } - } - - vertex[iMarker][iVertex]->SetNearest_Neighbor(Point_Normal); - } - } - } -} - void CPhysicalGeometry::SetBoundSensitivity(CConfig* config) { unsigned short iMarker, icommas; unsigned long iVertex, iPoint, (*Point2Vertex)[2], nPointLocal = 0, nPointGlobal = 0; diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp b/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp index 2aa31880bae..d5ed37c1848 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp @@ -2419,6 +2419,14 @@ class CFVMFlowSolverBase : public CSolver { return YPlus[val_marker][val_vertex]; } + /*! + * \brief Set the y plus. + * \param[in] val_yplus - new value of yplus + */ + inline void SetYPlus(su2double val_yplus, unsigned short val_marker, unsigned long val_vertex) final { + YPlus[val_marker][val_vertex] = val_yplus; + } + /*! * \brief Get the u_tau . * \param[in] val_marker - Surface marker where the coefficient is computed. diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index d7a634e8227..6db04c40111 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2498,10 +2498,15 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr FrictionVel = sqrt(fabs(WallShearStress[iMarker][iVertex]) / Density); if (!wallfunctions && (MGLevel == MESH_0 || geometry->nodes->GetDomain(iPoint))) { - // for CMultiGridGeometry, the normal neighbor of halo nodes in not set + // for CMultiGridGeometry, the normal neighbor of halo nodes is not set iPointNormal = geometry->vertex[iMarker][iVertex]->GetNormal_Neighbor(); Coord_Normal = geometry->nodes->GetCoord(iPointNormal); WallDistMod = GeometryToolbox::Distance(nDim, Coord, Coord_Normal); + //nijso: we can modifiy y+ as well now? + + + + YPlus[iMarker][iVertex] = WallDistMod * FrictionVel / (Viscosity / Density); } diff --git a/SU2_CFD/include/solvers/CSolver.hpp b/SU2_CFD/include/solvers/CSolver.hpp index 2ed78a78a9b..343c2fec26a 100644 --- a/SU2_CFD/include/solvers/CSolver.hpp +++ b/SU2_CFD/include/solvers/CSolver.hpp @@ -2989,6 +2989,14 @@ class CSolver { */ inline virtual su2double GetYPlus(unsigned short val_marker, unsigned long val_vertex) const { return 0; } + /*! + * \brief A virtual member. + * \param[in] val_marker - Surface marker where the coefficient is computed. + * \param[in] val_vertex - Vertex of the marker val_marker where the coefficient is evaluated. + * \return Value of the y plus. + */ + inline virtual void SetYPlus(su2double val_yplus, unsigned short val_marker, unsigned long val_vertex) {}; + /*! * \brief A virtual member. * \param[in] val_marker - Surface marker where the coefficient is computed. diff --git a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp index 78aa7720095..506797769fd 100644 --- a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp +++ b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp @@ -302,5 +302,6 @@ class CTurbSSTSolver final : public CTurbSolver { */ inline su2double GetOmega_Inf(void) const override { return Solution_Inf[1]; } + su2double GetNearest_Neighbor(CGeometry *geometry, unsigned long iPoint,unsigned short iMarker, unsigned long iVertex); }; diff --git a/SU2_CFD/src/drivers/CDriver.cpp b/SU2_CFD/src/drivers/CDriver.cpp index dd7ad5da513..04765070107 100644 --- a/SU2_CFD/src/drivers/CDriver.cpp +++ b/SU2_CFD/src/drivers/CDriver.cpp @@ -777,12 +777,6 @@ void CDriver::InitializeGeometryFVM(CConfig *config, CGeometry **&geometry) { if (rank == MASTER_NODE) cout << "Searching for the closest normal neighbors to the surfaces." << endl; geometry[MESH_0]->FindNormal_Neighbor(config); - /*--- Identify closest interior neighbor, this is a replacement of the FindNormal_Neighbor implementation ---*/ - - if (rank == MASTER_NODE) cout << "Searching for the closest interior neighbors to the surfaces." << endl; - geometry[MESH_0]->FindNearest_Neighbor(config); - - /*--- Store the global to local mapping. ---*/ if (rank == MASTER_NODE) cout << "Storing a mapping from global to local point index." << endl; @@ -843,9 +837,6 @@ void CDriver::InitializeGeometryFVM(CConfig *config, CGeometry **&geometry) { geometry[iMGlevel]->FindNormal_Neighbor(config); - /*--- Find closest interior neighbor to a surface point (eventual replacement of FindNormal_Neighbor) ---*/ - geometry[iMGlevel]->FindNearest_Neighbor(config); - /*--- Store our multigrid index. ---*/ geometry[iMGlevel]->SetMGLevel(iMGlevel); diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 33c27733b3e..a29c3f8b485 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -259,9 +259,10 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai /*--- Check if the node belongs to the domain (i.e, not a halo node) ---*/ + if (geometry->nodes->GetDomain(iPoint)) { - const auto jPoint = geometry->vertex[iMarker][iVertex]->GetNearest_Neighbor(); - //const auto jPoint = geometry->vertex[iMarker][iVertex]->GetNormal_Neighbor(); + + const auto jPoint = geometry->vertex[iMarker][iVertex]->GetNormal_Neighbor(); su2double shearStress = 0.0; for(auto iDim = 0u; iDim < nDim; iDim++) { @@ -270,7 +271,8 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai shearStress = sqrt(shearStress); const su2double FrictionVelocity = sqrt(shearStress/flowNodes->GetDensity(iPoint)); - const su2double wall_dist = geometry->nodes->GetWall_Distance(jPoint); + //const su2double wall_dist = geometry->nodes->GetWall_Distance(jPoint); + const su2double wall_dist = GetNearest_Neighbor(geometry,iPoint,iMarker,iVertex); const su2double Derivative = flowNodes->GetLaminarViscosity(jPoint) * pow(nodes->GetSolution(jPoint, 0), 0.673) / wall_dist; const su2double turbulence_index = 6.1 * Derivative / pow(FrictionVelocity, 2.346); @@ -460,12 +462,12 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont } else { // smooth wall /*--- distance to closest neighbor ---*/ - //const auto jPoint = geometry->vertex[val_marker][iVertex]->GetNormal_Neighbor(); - const auto jPoint = geometry->vertex[val_marker][iVertex]->GetNearest_Neighbor(); + const auto jPoint = geometry->vertex[val_marker][iVertex]->GetNormal_Neighbor(); + const su2double wall_dist = GetNearest_Neighbor(geometry,iPoint,val_marker, iVertex); - su2double distance2 = GeometryToolbox::SquaredDistance(nDim, - geometry->nodes->GetCoord(iPoint), - geometry->nodes->GetCoord(jPoint)); + //su2double distance2 = GeometryToolbox::SquaredDistance(nDim, + // geometry->nodes->GetCoord(iPoint), + // geometry->nodes->GetCoord(jPoint)); /*--- Set wall values ---*/ su2double density = solver_container[FLOW_SOL]->GetNodes()->GetDensity(jPoint); @@ -474,7 +476,7 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont su2double beta_1 = constants[4]; su2double solution[MAXNVAR]; solution[0] = 0.0; - solution[1] = 60.0*laminar_viscosity/(density*beta_1*distance2); + solution[1] = 60.0*laminar_viscosity/(density*beta_1*wall_dist*wall_dist); /*--- Set the solution values and zero the residual ---*/ nodes->SetSolution_Old(iPoint,solution); @@ -509,8 +511,7 @@ void CTurbSSTSolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contai for (auto iVertex = 0u; iVertex < geometry->nVertex[val_marker]; iVertex++) { const auto iPoint = geometry->vertex[val_marker][iVertex]->GetNode(); - //const auto iPoint_Neighbor = geometry->vertex[val_marker][iVertex]->GetNormal_Neighbor(); - const auto iPoint_Neighbor = geometry->vertex[val_marker][iVertex]->GetNearest_Neighbor(); + const auto iPoint_Neighbor = geometry->vertex[val_marker][iVertex]->GetNormal_Neighbor(); if (!geometry->nodes->GetDomain(iPoint_Neighbor)) continue; su2double Y_Plus = solver_container[FLOW_SOL]->GetYPlus(val_marker, iVertex); @@ -1015,8 +1016,7 @@ su2double CTurbSSTSolver::GetInletAtVertex(unsigned short iMarker, unsigned long su2double Normal[MAXNDIM] = {0.0}; geometry->vertex[iMarker][iVertex]->GetNormal(Normal); - return GeometryToolbox::Norm(nDim, Normal); -} + return GeometryToolbox::Norm(nDim, Normal);} void CTurbSSTSolver::SetUniformInlet(const CConfig* config, unsigned short iMarker) { if (config->GetMarker_All_KindBC(iMarker) == INLET_FLOW) { @@ -1027,3 +1027,72 @@ void CTurbSSTSolver::SetUniformInlet(const CConfig* config, unsigned short iMark } } + +/*--- We determine the interior node that is closest to the wall node. If there is no + interior node, we have to take the closest wall node. ---*/ +su2double CTurbSSTSolver::GetNearest_Neighbor(CGeometry *geometry, unsigned long iPoint, unsigned short iMarker, unsigned long iVertex) { + su2double dist_min; + su2double distance = 0.0; + unsigned long Point_Normal, jPoint; + unsigned short iNeigh, jNeigh; + unsigned long kPoint; + + const su2double* Coord_i = geometry->nodes->GetCoord(iPoint); + + /*--- Compute closest normal neighbor, note that the normal are oriented inwards ---*/ + Point_Normal = 0; + // we use distance + dist_min = 1.0e10; + for (iNeigh = 0; iNeigh < geometry->nodes->GetnPoint(iPoint); iNeigh++) { + jPoint = geometry->nodes->GetPoint(iPoint, iNeigh); + const su2double* Coord_j = geometry->nodes->GetCoord(jPoint); + + su2double distance = 0.0; + vector edgeVector(nDim); + for (unsigned short iDim = 0; iDim < nDim; iDim++) { + edgeVector[iDim] = Coord_j[iDim] - Coord_i[iDim]; + // squared distance + distance += edgeVector[iDim] * edgeVector[iDim]; + } + + // Take the interior node that is closest to the wall node. + if ((geometry->nodes->GetViscousBoundary(jPoint) == false) && (distance < dist_min)) { + Point_Normal = jPoint; + dist_min = distance; + } + } + + if (jPoint==0) { + su2double Area = 0.0; + su2double TwoVol = 2.0* (geometry->nodes->GetVolume(iPoint) + geometry->nodes->GetPeriodicVolume(iPoint)); + for (size_t iNeigh = 0; iNeigh < geometry->nodes->GetnPoint(iPoint); ++iNeigh) { + size_t iEdge = geometry->nodes->GetEdge(iPoint, iNeigh); + size_t jPoint = geometry->nodes->GetPoint(iPoint, iNeigh); + + /*--- Determine if edge points inwards or outwards of iPoint. + * If inwards we need to flip the area vector. ---*/ + + su2double dir = (iPoint < jPoint) ? 1.0 : -1.0; + su2double weight = dir * TwoVol; + const su2double* Normal = geometry->edges->GetNormal(iEdge); + Area = GeometryToolbox::Norm(nDim, Normal); + + + //thscale += TwoVol * geometry->edges->GetNormal(iEdge); + dist_min += TwoVol * Area; + } + } + + // old value of yplus + su2double yplus = GetYPlus(iMarker,iVertex); + unsigned long iPointNormal = geometry->vertex[iMarker][iVertex]->GetNormal_Neighbor(); + const su2double *Coord_Normal = geometry->nodes->GetCoord(iPointNormal); + const su2double *Coord = geometry->nodes->GetCoord(iPoint); + + su2double WallDistMod = GeometryToolbox::Distance(nDim, Coord, Coord_Normal); + // new value of y+ + yplus = dist_min * (yplus / WallDistMod); + SetYPlus(yplus,iMarker,iVertex); + + return (dist_min); +} From 47f383952aefdda2499f361a3665b95f901b4991 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Wed, 8 Jan 2025 00:19:05 +0100 Subject: [PATCH 14/25] small update --- Common/include/geometry/dual_grid/CVertex.hpp | 1 - SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 15 +++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Common/include/geometry/dual_grid/CVertex.hpp b/Common/include/geometry/dual_grid/CVertex.hpp index 9dd4c691386..26c1c230407 100644 --- a/Common/include/geometry/dual_grid/CVertex.hpp +++ b/Common/include/geometry/dual_grid/CVertex.hpp @@ -320,5 +320,4 @@ class CVertex : public CDualGrid { * \return Index of the closest neighbor. */ inline unsigned long GetNormal_Neighbor(void) const { return Normal_Neighbor; } - }; diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index a29c3f8b485..e099c72eb95 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -271,7 +271,7 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai shearStress = sqrt(shearStress); const su2double FrictionVelocity = sqrt(shearStress/flowNodes->GetDensity(iPoint)); - //const su2double wall_dist = geometry->nodes->GetWall_Distance(jPoint); + /*const su2double wall_dist = geometry->nodes->GetWall_Distance(jPoint);*/ const su2double wall_dist = GetNearest_Neighbor(geometry,iPoint,iMarker,iVertex); const su2double Derivative = flowNodes->GetLaminarViscosity(jPoint) * pow(nodes->GetSolution(jPoint, 0), 0.673) / wall_dist; const su2double turbulence_index = 6.1 * Derivative / pow(FrictionVelocity, 2.346); @@ -1034,8 +1034,7 @@ su2double CTurbSSTSolver::GetNearest_Neighbor(CGeometry *geometry, unsigned lon su2double dist_min; su2double distance = 0.0; unsigned long Point_Normal, jPoint; - unsigned short iNeigh, jNeigh; - unsigned long kPoint; + unsigned short jNeigh; const su2double* Coord_i = geometry->nodes->GetCoord(iPoint); @@ -1043,11 +1042,10 @@ su2double CTurbSSTSolver::GetNearest_Neighbor(CGeometry *geometry, unsigned lon Point_Normal = 0; // we use distance dist_min = 1.0e10; - for (iNeigh = 0; iNeigh < geometry->nodes->GetnPoint(iPoint); iNeigh++) { + for (size_t iNeigh = 0; iNeigh < geometry->nodes->GetnPoint(iPoint); iNeigh++) { jPoint = geometry->nodes->GetPoint(iPoint, iNeigh); const su2double* Coord_j = geometry->nodes->GetCoord(jPoint); - su2double distance = 0.0; vector edgeVector(nDim); for (unsigned short iDim = 0; iDim < nDim; iDim++) { edgeVector[iDim] = Coord_j[iDim] - Coord_i[iDim]; @@ -1067,7 +1065,6 @@ su2double CTurbSSTSolver::GetNearest_Neighbor(CGeometry *geometry, unsigned lon su2double TwoVol = 2.0* (geometry->nodes->GetVolume(iPoint) + geometry->nodes->GetPeriodicVolume(iPoint)); for (size_t iNeigh = 0; iNeigh < geometry->nodes->GetnPoint(iPoint); ++iNeigh) { size_t iEdge = geometry->nodes->GetEdge(iPoint, iNeigh); - size_t jPoint = geometry->nodes->GetPoint(iPoint, iNeigh); /*--- Determine if edge points inwards or outwards of iPoint. * If inwards we need to flip the area vector. ---*/ @@ -1077,9 +1074,7 @@ su2double CTurbSSTSolver::GetNearest_Neighbor(CGeometry *geometry, unsigned lon const su2double* Normal = geometry->edges->GetNormal(iEdge); Area = GeometryToolbox::Norm(nDim, Normal); - - //thscale += TwoVol * geometry->edges->GetNormal(iEdge); - dist_min += TwoVol * Area; + dist_min += weight * Area; } } @@ -1092,7 +1087,7 @@ su2double CTurbSSTSolver::GetNearest_Neighbor(CGeometry *geometry, unsigned lon su2double WallDistMod = GeometryToolbox::Distance(nDim, Coord, Coord_Normal); // new value of y+ yplus = dist_min * (yplus / WallDistMod); - SetYPlus(yplus,iMarker,iVertex); + SetYPlus(yplus,iMarker,iVertex); return (dist_min); } From 55d21630822b66255eaac1bf97d1ae768bdb260c Mon Sep 17 00:00:00 2001 From: bigfooted Date: Thu, 9 Jan 2025 07:57:41 +0100 Subject: [PATCH 15/25] update --- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index e099c72eb95..bb55633aa8e 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -1034,7 +1034,6 @@ su2double CTurbSSTSolver::GetNearest_Neighbor(CGeometry *geometry, unsigned lon su2double dist_min; su2double distance = 0.0; unsigned long Point_Normal, jPoint; - unsigned short jNeigh; const su2double* Coord_i = geometry->nodes->GetCoord(iPoint); @@ -1069,12 +1068,13 @@ su2double CTurbSSTSolver::GetNearest_Neighbor(CGeometry *geometry, unsigned lon /*--- Determine if edge points inwards or outwards of iPoint. * If inwards we need to flip the area vector. ---*/ - su2double dir = (iPoint < jPoint) ? 1.0 : -1.0; - su2double weight = dir * TwoVol; + //su2double dir = (iPoint < jPoint) ? 1.0 : -1.0; + //su2double weight = dir * TwoVol; const su2double* Normal = geometry->edges->GetNormal(iEdge); Area = GeometryToolbox::Norm(nDim, Normal); - dist_min += weight * Area; + //dist_min += weight * Area; + dist_min += TwoVol * Area; } } From 535c841c5c0355605b802db15c3ca60f2698666e Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 10 Jan 2025 11:00:33 +0100 Subject: [PATCH 16/25] update --- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 65 ++++++++++++++------------ 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index bb55633aa8e..f396fd8a419 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -271,8 +271,12 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai shearStress = sqrt(shearStress); const su2double FrictionVelocity = sqrt(shearStress/flowNodes->GetDensity(iPoint)); - /*const su2double wall_dist = geometry->nodes->GetWall_Distance(jPoint);*/ + const su2double wall_dist_old = geometry->nodes->GetWall_Distance(jPoint); + const su2double wall_dist = GetNearest_Neighbor(geometry,iPoint,iMarker,iVertex); + + cout << "************************* wall distance old = " << wall_dist_old << " , wall distance new = " << wall_dist << endl; + const su2double Derivative = flowNodes->GetLaminarViscosity(jPoint) * pow(nodes->GetSolution(jPoint, 0), 0.673) / wall_dist; const su2double turbulence_index = 6.1 * Derivative / pow(FrictionVelocity, 2.346); @@ -462,21 +466,24 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont } else { // smooth wall /*--- distance to closest neighbor ---*/ - const auto jPoint = geometry->vertex[val_marker][iVertex]->GetNormal_Neighbor(); - const su2double wall_dist = GetNearest_Neighbor(geometry,iPoint,val_marker, iVertex); + su2double wall_dist = GetNearest_Neighbor(geometry,iPoint,val_marker, iVertex); - //su2double distance2 = GeometryToolbox::SquaredDistance(nDim, - // geometry->nodes->GetCoord(iPoint), - // geometry->nodes->GetCoord(jPoint)); + const auto jPoint = geometry->vertex[val_marker][iVertex]->GetNormal_Neighbor(); + su2double distance2 = GeometryToolbox::SquaredDistance(nDim, + geometry->nodes->GetCoord(iPoint), + geometry->nodes->GetCoord(jPoint)); /*--- Set wall values ---*/ + if (wall_dist < 1.0e-12) {cout <<"setting walldist to " << sqrt(distance2) << endl; wall_dist = sqrt(distance2);} + su2double density = solver_container[FLOW_SOL]->GetNodes()->GetDensity(jPoint); su2double laminar_viscosity = solver_container[FLOW_SOL]->GetNodes()->GetLaminarViscosity(jPoint); su2double beta_1 = constants[4]; su2double solution[MAXNVAR]; solution[0] = 0.0; - solution[1] = 60.0*laminar_viscosity/(density*beta_1*wall_dist*wall_dist); + //solution[1] = 60.0*laminar_viscosity/(density*beta_1*wall_dist*wall_dist); + solution[1] = 60.0*laminar_viscosity/(density*beta_1*distance2); /*--- Set the solution values and zero the residual ---*/ nodes->SetSolution_Old(iPoint,solution); @@ -1040,26 +1047,24 @@ su2double CTurbSSTSolver::GetNearest_Neighbor(CGeometry *geometry, unsigned lon /*--- Compute closest normal neighbor, note that the normal are oriented inwards ---*/ Point_Normal = 0; // we use distance - dist_min = 1.0e10; + dist_min = 0.0; for (size_t iNeigh = 0; iNeigh < geometry->nodes->GetnPoint(iPoint); iNeigh++) { jPoint = geometry->nodes->GetPoint(iPoint, iNeigh); - const su2double* Coord_j = geometry->nodes->GetCoord(jPoint); - - vector edgeVector(nDim); - for (unsigned short iDim = 0; iDim < nDim; iDim++) { - edgeVector[iDim] = Coord_j[iDim] - Coord_i[iDim]; - // squared distance - distance += edgeVector[iDim] * edgeVector[iDim]; - } + su2double distance2 = GeometryToolbox::SquaredDistance(nDim, + geometry->nodes->GetCoord(iPoint), + geometry->nodes->GetCoord(jPoint)); // Take the interior node that is closest to the wall node. if ((geometry->nodes->GetViscousBoundary(jPoint) == false) && (distance < dist_min)) { Point_Normal = jPoint; - dist_min = distance; + dist_min = sqrt(distance2); } } - if (jPoint==0) { + + //if (jPoint==0) { + if (Point_Normal==0) { + cout << "no point found at i = " << iPoint << endl; su2double Area = 0.0; su2double TwoVol = 2.0* (geometry->nodes->GetVolume(iPoint) + geometry->nodes->GetPeriodicVolume(iPoint)); for (size_t iNeigh = 0; iNeigh < geometry->nodes->GetnPoint(iPoint); ++iNeigh) { @@ -1073,21 +1078,23 @@ su2double CTurbSSTSolver::GetNearest_Neighbor(CGeometry *geometry, unsigned lon const su2double* Normal = geometry->edges->GetNormal(iEdge); Area = GeometryToolbox::Norm(nDim, Normal); - //dist_min += weight * Area; - dist_min += TwoVol * Area; + dist_min += TwoVol / Area; + cout << " distmin = " << dist_min << " , vol = "<GetNodes()->GetDensity(jPoint); su2double laminar_viscosity = solver_container[FLOW_SOL]->GetNodes()->GetLaminarViscosity(jPoint); su2double beta_1 = constants[4]; su2double solution[MAXNVAR]; solution[0] = 0.0; - //solution[1] = 60.0*laminar_viscosity/(density*beta_1*wall_dist*wall_dist); - solution[1] = 60.0*laminar_viscosity/(density*beta_1*distance2); + solution[1] = 60.0*laminar_viscosity/(density*beta_1*wall_dist*wall_dist); + //solution[1] = 60.0*laminar_viscosity/(density*beta_1*distance2); /*--- Set the solution values and zero the residual ---*/ nodes->SetSolution_Old(iPoint,solution); @@ -1042,8 +1040,6 @@ su2double CTurbSSTSolver::GetNearest_Neighbor(CGeometry *geometry, unsigned lon su2double distance = 0.0; unsigned long Point_Normal, jPoint; - const su2double* Coord_i = geometry->nodes->GetCoord(iPoint); - /*--- Compute closest normal neighbor, note that the normal are oriented inwards ---*/ Point_Normal = 0; // we use distance @@ -1062,19 +1058,13 @@ su2double CTurbSSTSolver::GetNearest_Neighbor(CGeometry *geometry, unsigned lon } - //if (jPoint==0) { if (Point_Normal==0) { cout << "no point found at i = " << iPoint << endl; su2double Area = 0.0; su2double TwoVol = 2.0* (geometry->nodes->GetVolume(iPoint) + geometry->nodes->GetPeriodicVolume(iPoint)); for (size_t iNeigh = 0; iNeigh < geometry->nodes->GetnPoint(iPoint); ++iNeigh) { size_t iEdge = geometry->nodes->GetEdge(iPoint, iNeigh); - - /*--- Determine if edge points inwards or outwards of iPoint. - * If inwards we need to flip the area vector. ---*/ - - //su2double dir = (iPoint < jPoint) ? 1.0 : -1.0; - //su2double weight = dir * TwoVol; + size_t jPoint = geometry->nodes->GetPoint(iPoint, iNeigh); const su2double* Normal = geometry->edges->GetNormal(iEdge); Area = GeometryToolbox::Norm(nDim, Normal); @@ -1082,19 +1072,7 @@ su2double CTurbSSTSolver::GetNearest_Neighbor(CGeometry *geometry, unsigned lon cout << " distmin = " << dist_min << " , vol = "< Date: Wed, 15 Jan 2025 23:43:39 +0100 Subject: [PATCH 23/25] regression update --- TestCases/hybrid_regression.py | 22 ++++++------- TestCases/hybrid_regression_AD.py | 2 +- TestCases/parallel_regression.py | 50 ++++++++++++++--------------- TestCases/parallel_regression_AD.py | 2 +- TestCases/serial_regression.py | 32 +++++++++--------- TestCases/serial_regression_AD.py | 2 +- TestCases/tutorials.py | 4 +-- TestCases/vandv.py | 6 ++-- 8 files changed, 60 insertions(+), 60 deletions(-) diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index da3af4f5c9d..14c6c66b0aa 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -206,7 +206,7 @@ def main(): turb_naca0012_sst.cfg_dir = "rans/naca0012" turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" turb_naca0012_sst.test_iter = 10 - turb_naca0012_sst.test_vals = [-12.105781, -15.277738, -6.210248, 1.049757, 0.019249, -2.807857, 0] + turb_naca0012_sst.test_vals = [-8.493861, -10.747240, -4.507971, 1.047913, 0.019156, -1.585577, 0.000000] test_list.append(turb_naca0012_sst) # NACA0012 (SST_SUST, FUN3D finest grid results: CL=1.0840, CD=0.01253) @@ -214,7 +214,7 @@ def main(): turb_naca0012_sst_sust.cfg_dir = "rans/naca0012" turb_naca0012_sst_sust.cfg_file = "turb_NACA0012_sst_sust.cfg" turb_naca0012_sst_sust.test_iter = 10 - turb_naca0012_sst_sust.test_vals = [-12.082157, -14.827303, -6.061342, 1.000276, 0.019495, -1.762311] + turb_naca0012_sst_sust.test_vals = [-7.985914, -10.322645, -3.314244, 0.995006, 0.019294, -1.538068] test_list.append(turb_naca0012_sst_sust) # NACA0012 (SST, fixed values for turbulence quantities) @@ -222,7 +222,7 @@ def main(): turb_naca0012_sst_fixedvalues.cfg_dir = "rans/naca0012" turb_naca0012_sst_fixedvalues.cfg_file = "turb_NACA0012_sst_fixedvalues.cfg" turb_naca0012_sst_fixedvalues.test_iter = 10 - turb_naca0012_sst_fixedvalues.test_vals = [-5.192504, -10.035367, -1.617698, 1.022029, 0.040310, -2.381926] + turb_naca0012_sst_fixedvalues.test_vals = [-5.192503, -10.035788, -1.617649, 1.022030, 0.040310, -2.381936] test_list.append(turb_naca0012_sst_fixedvalues) # NACA0012 (SST, explicit Euler for flow and turbulence equations) @@ -250,7 +250,7 @@ def main(): axi_rans_air_nozzle_restart.cfg_dir = "axisymmetric_rans/air_nozzle" axi_rans_air_nozzle_restart.cfg_file = "air_nozzle_restart.cfg" axi_rans_air_nozzle_restart.test_iter = 10 - axi_rans_air_nozzle_restart.test_vals = [-12.070954, -7.407644, -8.698118, -4.008751, 0] + axi_rans_air_nozzle_restart.test_vals = [-6.046200, -0.482494, -2.228367, 2.466115, 0.000000] test_list.append(axi_rans_air_nozzle_restart) ################################# @@ -263,7 +263,7 @@ def main(): turb_naca0012_sst_restart_mg.cfg_file = "turb_NACA0012_sst_multigrid_restart.cfg" turb_naca0012_sst_restart_mg.test_iter = 20 turb_naca0012_sst_restart_mg.ntest_vals = 5 - turb_naca0012_sst_restart_mg.test_vals = [-7.644702, -7.433663, -1.918163, -0.000003, 0.079111] + turb_naca0012_sst_restart_mg.test_vals = [-7.644626, -7.427011, -0.631753, -0.000007, 0.079118] test_list.append(turb_naca0012_sst_restart_mg) ############################# @@ -275,7 +275,7 @@ def main(): turb_naca0012_1c.cfg_dir = "rans_uq/naca0012" turb_naca0012_1c.cfg_file = "turb_NACA0012_uq_1c.cfg" turb_naca0012_1c.test_iter = 10 - turb_naca0012_1c.test_vals = [-4.976788, 1.141064, 0.246262, -0.116795] + turb_naca0012_1c.test_vals = [-4.976788, 1.141079, 0.246365, -0.116758] turb_naca0012_1c.test_vals_aarch64 = [-4.981105, 1.138873, 0.248013, -0.117248] test_list.append(turb_naca0012_1c) @@ -302,7 +302,7 @@ def main(): turb_naca0012_p1c1.cfg_dir = "rans_uq/naca0012" turb_naca0012_p1c1.cfg_file = "turb_NACA0012_uq_p1c1.cfg" turb_naca0012_p1c1.test_iter = 10 - turb_naca0012_p1c1.test_vals = [-5.114413, 1.076465, 0.227286, -0.123574] + turb_naca0012_p1c1.test_vals = [-5.114407, 1.076496, 0.227388, -0.123537] turb_naca0012_p1c1.test_vals_aarch64 = [-5.132358, 1.075658, 0.337268, -0.082827] test_list.append(turb_naca0012_p1c1) @@ -411,7 +411,7 @@ def main(): inc_turb_naca0012_sst_sust.cfg_dir = "incomp_rans/naca0012" inc_turb_naca0012_sst_sust.cfg_file = "naca0012_SST_SUST.cfg" inc_turb_naca0012_sst_sust.test_iter = 20 - inc_turb_naca0012_sst_sust.test_vals = [-7.270637, 0.018416, 0.000004, 0.307678] + inc_turb_naca0012_sst_sust.test_vals = [-7.317191, 0.018255, 0.000004, 0.307677] test_list.append(inc_turb_naca0012_sst_sust) # Weakly coupled heat equation @@ -452,7 +452,7 @@ def main(): square_cylinder.cfg_dir = "unsteady/square_cylinder" square_cylinder.cfg_file = "turb_square.cfg" square_cylinder.test_iter = 3 - square_cylinder.test_vals = [-2.560839, -1.173497, 0.061188, 1.399403, 2.220575, 1.399351, 2.218781, 0] + square_cylinder.test_vals = [-2.560839, -1.173496, 0.061335, 1.399403, 2.220575, 1.399351, 2.218781, 0.000000] square_cylinder.test_vals_aarch64 = [-2.557902, -1.173574, 0.058050, 1.399794, 2.220402, 1.399748, 2.218604, 0] square_cylinder.unsteady = True test_list.append(square_cylinder) @@ -556,7 +556,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-10.467026, -2.871699, -19.214627, -13.508254, -11.582396, -6.306163, 73273, 73273, 0.019884, 82.491] + Jones_tc_restart.test_vals = [-3.501035, -0.855391, -11.767172, -6.117423, -9.432832, -3.573397, 73273.000000, 73273.000000, 0.019884, 82.491000] test_list.append(Jones_tc_restart) # 2D axial stage @@ -657,7 +657,7 @@ def main(): bars_SST_2D.cfg_dir = "sliding_interface/bars_SST_2D" bars_SST_2D.cfg_file = "bars.cfg" bars_SST_2D.test_iter = 13 - bars_SST_2D.test_vals = [13.000000, -0.773513, -1.700012] + bars_SST_2D.test_vals = [13.000000, -0.726398, -1.700012] bars_SST_2D.multizone = True test_list.append(bars_SST_2D) diff --git a/TestCases/hybrid_regression_AD.py b/TestCases/hybrid_regression_AD.py index 3cc8adf1a68..1abcbcc9e87 100644 --- a/TestCases/hybrid_regression_AD.py +++ b/TestCases/hybrid_regression_AD.py @@ -86,7 +86,7 @@ def main(): discadj_rans_naca0012_sst.cfg_dir = "disc_adj_rans/naca0012" discadj_rans_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" discadj_rans_naca0012_sst.test_iter = 10 - discadj_rans_naca0012_sst.test_vals = [-2.234104, -0.198500, 2.763900, -0.039720] + discadj_rans_naca0012_sst.test_vals = [-2.234037, -0.198500, 2.769200, -0.039720] test_list.append(discadj_rans_naca0012_sst) ####################################### diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 530328b52a6..d9c38c9f095 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -365,7 +365,7 @@ def main(): rae2822_sst.cfg_dir = "rans/rae2822" rae2822_sst.cfg_file = "turb_SST_RAE2822.cfg" rae2822_sst.test_iter = 20 - rae2822_sst.test_vals = [-0.510369, 4.870643, 0.816647, 0.061833, 0.000000] + rae2822_sst.test_vals = [-0.510369, 4.870657, 0.816646, 0.061832, 0.000000] test_list.append(rae2822_sst) # RAE2822 SST_SUST @@ -373,7 +373,7 @@ def main(): rae2822_sst_sust.cfg_dir = "rans/rae2822" rae2822_sst_sust.cfg_file = "turb_SST_SUST_RAE2822.cfg" rae2822_sst_sust.test_iter = 20 - rae2822_sst_sust.test_vals = [-2.537339, 4.870643, 0.816647, 0.061833] + rae2822_sst_sust.test_vals = [-2.537371, 4.870656, 0.816646, 0.061832] test_list.append(rae2822_sst_sust) # Flat plate @@ -397,7 +397,7 @@ def main(): turb_flatplate_CC_Wilcox.cfg_dir = "rans/flatplate" turb_flatplate_CC_Wilcox.cfg_file = "turb_SST_flatplate_compressibility_Wilcox.cfg" turb_flatplate_CC_Wilcox.test_iter = 20 - turb_flatplate_CC_Wilcox.test_vals = [-1.280875, 1.974212, 1.440458, 5.038402, -4.051125, 8.521136] + turb_flatplate_CC_Wilcox.test_vals = [-1.280875, 1.974212, 1.440454, 5.038401, -4.047412, 11.905193] test_list.append(turb_flatplate_CC_Wilcox) # Flat plate SST compressibility correction Sarkar @@ -405,7 +405,7 @@ def main(): turb_flatplate_CC_Sarkar.cfg_dir = "rans/flatplate" turb_flatplate_CC_Sarkar.cfg_file = "turb_SST_flatplate_compressibility_Sarkar.cfg" turb_flatplate_CC_Sarkar.test_iter = 20 - turb_flatplate_CC_Sarkar.test_vals = [-1.280875, 1.974212, 1.440458, 5.038402, -4.051128, 8.521136] + turb_flatplate_CC_Sarkar.test_vals = [-1.280875, 1.974212, 1.440454, 5.038401, -4.047415, 11.905193] test_list.append(turb_flatplate_CC_Sarkar) # ONERA M6 Wing @@ -450,7 +450,7 @@ def main(): turb_naca0012_sst.cfg_dir = "rans/naca0012" turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" turb_naca0012_sst.test_iter = 10 - turb_naca0012_sst.test_vals = [-12.107692, -15.277743, -6.210238, 1.049757, 0.019249, -2.357984, 0] + turb_naca0012_sst.test_vals = [-8.515763, -10.746560, -4.508015, 1.047852, 0.019161, -1.928310, 0.000000] turb_naca0012_sst.test_vals_aarch64 = [-12.107692, -15.277743, -6.210238, 1.049757, 0.019249, -2.357984, 0] turb_naca0012_sst.timeout = 3200 test_list.append(turb_naca0012_sst) @@ -460,7 +460,7 @@ def main(): turb_naca0012_sst_sust.cfg_dir = "rans/naca0012" turb_naca0012_sst_sust.cfg_file = "turb_NACA0012_sst_sust.cfg" turb_naca0012_sst_sust.test_iter = 10 - turb_naca0012_sst_sust.test_vals = [-12.087234, -14.827336, -6.062338, 1.000276, 0.019495, -1.779654] + turb_naca0012_sst_sust.test_vals = [-8.014970, -10.320396, -3.314234, 0.994867, 0.019306, -1.983851] turb_naca0012_sst_sust.test_vals_aarch64 = [-12.087234, -14.827336, -6.062338, 1.000276, 0.019495, -1.779654] turb_naca0012_sst_sust.timeout = 3200 test_list.append(turb_naca0012_sst_sust) @@ -470,7 +470,7 @@ def main(): turb_naca0012_sst_2003_Vm.cfg_dir = "rans/naca0012" turb_naca0012_sst_2003_Vm.cfg_file = "turb_NACA0012_sst_2003-Vm.cfg" turb_naca0012_sst_2003_Vm.test_iter = 10 - turb_naca0012_sst_2003_Vm.test_vals = [-7.662107, -10.010518, -3.354064, 1.048299, 0.019832, -2.071125] + turb_naca0012_sst_2003_Vm.test_vals = [-7.632098, -10.013971, -3.340316, 1.046165, 0.019728, -2.059096] turb_naca0012_sst_2003_Vm.timeout = 3200 test_list.append(turb_naca0012_sst_2003_Vm) @@ -479,7 +479,7 @@ def main(): turb_naca0012_sst_1994_KLm.cfg_dir = "rans/naca0012" turb_naca0012_sst_1994_KLm.cfg_file = "turb_NACA0012_sst_1994-KLm.cfg" turb_naca0012_sst_1994_KLm.test_iter = 10 - turb_naca0012_sst_1994_KLm.test_vals = [-8.560764, -10.801276, -3.996309, 1.049043, 0.019285, -1.809924] + turb_naca0012_sst_1994_KLm.test_vals = [-8.334601, -10.630535, -3.933399, 1.047158, 0.019197, -1.876800] turb_naca0012_sst_1994_KLm.timeout = 3200 test_list.append(turb_naca0012_sst_1994_KLm) @@ -489,7 +489,7 @@ def main(): turb_naca0012_sst_fixedvalues.cfg_dir = "rans/naca0012" turb_naca0012_sst_fixedvalues.cfg_file = "turb_NACA0012_sst_fixedvalues.cfg" turb_naca0012_sst_fixedvalues.test_iter = 10 - turb_naca0012_sst_fixedvalues.test_vals = [-5.216625, -10.018477, -1.615201, 1.021842, 0.040325, -3.728658] + turb_naca0012_sst_fixedvalues.test_vals = [-5.216624, -10.018910, -1.615147, 1.021843, 0.040325, -3.728934] turb_naca0012_sst_fixedvalues.timeout = 3200 test_list.append(turb_naca0012_sst_fixedvalues) @@ -530,7 +530,7 @@ def main(): axi_rans_air_nozzle_restart.cfg_dir = "axisymmetric_rans/air_nozzle" axi_rans_air_nozzle_restart.cfg_file = "air_nozzle_restart.cfg" axi_rans_air_nozzle_restart.test_iter = 10 - axi_rans_air_nozzle_restart.test_vals = [-12.071395, -7.467871, -8.649076, -3.995810, 0] + axi_rans_air_nozzle_restart.test_vals = [-6.038034, -0.474087, -2.205683, 2.476084, 0.000000] axi_rans_air_nozzle_restart.tol = 0.0001 test_list.append(axi_rans_air_nozzle_restart) @@ -544,7 +544,7 @@ def main(): turb_naca0012_sst_restart_mg.cfg_file = "turb_NACA0012_sst_multigrid_restart.cfg" turb_naca0012_sst_restart_mg.test_iter = 20 turb_naca0012_sst_restart_mg.ntest_vals = 5 - turb_naca0012_sst_restart_mg.test_vals = [-7.612353, -7.432347, -1.918249, -0.000013, 0.079110] + turb_naca0012_sst_restart_mg.test_vals = [-7.612218, -7.425695, -0.631759, -0.000022, 0.079116] turb_naca0012_sst_restart_mg.timeout = 3200 turb_naca0012_sst_restart_mg.tol = 0.000001 test_list.append(turb_naca0012_sst_restart_mg) @@ -646,7 +646,7 @@ def main(): inc_turb_naca0012_sst_sust.cfg_dir = "incomp_rans/naca0012" inc_turb_naca0012_sst_sust.cfg_file = "naca0012_SST_SUST.cfg" inc_turb_naca0012_sst_sust.test_iter = 20 - inc_turb_naca0012_sst_sust.test_vals = [-7.270578, 0.018403, -0.000001, 0.307688] + inc_turb_naca0012_sst_sust.test_vals = [-7.316933, 0.018242, -0.000001, 0.307687] test_list.append(inc_turb_naca0012_sst_sust) #################### @@ -881,7 +881,7 @@ def main(): turb_naca0012_1c.cfg_dir = "rans_uq/naca0012" turb_naca0012_1c.cfg_file = "turb_NACA0012_uq_1c.cfg" turb_naca0012_1c.test_iter = 10 - turb_naca0012_1c.test_vals = [-4.980989, 1.139850, 0.469677, -0.081426] + turb_naca0012_1c.test_vals = [-4.980989, 1.139860, 0.469698, -0.081433] test_list.append(turb_naca0012_1c) # NACA0012 2c @@ -889,7 +889,7 @@ def main(): turb_naca0012_2c.cfg_dir = "rans_uq/naca0012" turb_naca0012_2c.cfg_file = "turb_NACA0012_uq_2c.cfg" turb_naca0012_2c.test_iter = 10 - turb_naca0012_2c.test_vals = [-5.484979, 0.968118, 0.320621, -0.114603] + turb_naca0012_2c.test_vals = [-5.484979, 0.968141, 0.320681, -0.114600] test_list.append(turb_naca0012_2c) # NACA0012 3c @@ -897,7 +897,7 @@ def main(): turb_naca0012_3c.cfg_dir = "rans_uq/naca0012" turb_naca0012_3c.cfg_file = "turb_NACA0012_uq_3c.cfg" turb_naca0012_3c.test_iter = 10 - turb_naca0012_3c.test_vals = [-5.584315, 0.931258, 0.277047, -0.118255] + turb_naca0012_3c.test_vals = [-5.584315, 0.931289, 0.277094, -0.118251] test_list.append(turb_naca0012_3c) # NACA0012 p1c1 @@ -905,7 +905,7 @@ def main(): turb_naca0012_p1c1.cfg_dir = "rans_uq/naca0012" turb_naca0012_p1c1.cfg_file = "turb_NACA0012_uq_p1c1.cfg" turb_naca0012_p1c1.test_iter = 10 - turb_naca0012_p1c1.test_vals = [-5.122398, 1.074022, 0.415368, -0.096185] + turb_naca0012_p1c1.test_vals = [-5.122388, 1.074056, 0.415434, -0.096182] test_list.append(turb_naca0012_p1c1) # NACA0012 p1c2 @@ -913,7 +913,7 @@ def main(): turb_naca0012_p1c2.cfg_dir = "rans_uq/naca0012" turb_naca0012_p1c2.cfg_file = "turb_NACA0012_uq_p1c2.cfg" turb_naca0012_p1c2.test_iter = 10 - turb_naca0012_p1c2.test_vals = [-5.549595, 0.945508, 0.287359, -0.117019] + turb_naca0012_p1c2.test_vals = [-5.549596, 0.945538, 0.287381, -0.117021] test_list.append(turb_naca0012_p1c2) ###################################### @@ -974,7 +974,7 @@ def main(): square_cylinder.cfg_dir = "unsteady/square_cylinder" square_cylinder.cfg_file = "turb_square.cfg" square_cylinder.test_iter = 3 - square_cylinder.test_vals = [-1.173495, 0.061186, 1.399404, 2.220578, 1.399352, 2.218783, 0] + square_cylinder.test_vals = [-1.173495, 0.061334, 1.399404, 2.220578, 1.399352, 2.218783, 0.000000] square_cylinder.unsteady = True test_list.append(square_cylinder) @@ -1048,7 +1048,7 @@ def main(): coolprop_fluidModel.cfg_dir = "nicf/coolprop" coolprop_fluidModel.cfg_file = "fluidModel.cfg" coolprop_fluidModel.test_iter = 5 - coolprop_fluidModel.test_vals = [-4.424953, -1.582877, 3.442422, 0.000000, 0.000000] + coolprop_fluidModel.test_vals = [-4.424953, -1.582877, 3.720586, 0.000000, 0.000000] coolprop_fluidModel.enabled_on_cpu_arch = ["x86_64"] test_list.append(coolprop_fluidModel) @@ -1057,7 +1057,7 @@ def main(): coolprop_transportModel.cfg_dir = "nicf/coolprop" coolprop_transportModel.cfg_file = "transportModel.cfg" coolprop_transportModel.test_iter = 5 - coolprop_transportModel.test_vals = [-4.428098, -1.314332, 4.630872, 0.000000, 0.000000] + coolprop_transportModel.test_vals = [-4.428098, -1.314332, 4.666153, 0.000000, 0.000000] coolprop_transportModel.enabled_on_cpu_arch = ["x86_64"] test_list.append(coolprop_transportModel) @@ -1086,7 +1086,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-10.467612, -2.871708, -19.345651, -13.625871, -11.582397, -6.306168, 73273, 73273, 0.019884, 82.491] + Jones_tc_restart.test_vals = [-3.501027, -0.855390, -11.767169, -6.117420, -9.432832, -3.573397, 73273.000000, 73273.000000, 0.019884, 82.491000] test_list.append(Jones_tc_restart) # 2D axial stage @@ -1185,7 +1185,7 @@ def main(): bars_SST_2D.cfg_dir = "sliding_interface/bars_SST_2D" bars_SST_2D.cfg_file = "bars.cfg" bars_SST_2D.test_iter = 13 - bars_SST_2D.test_vals = [13.000000, -0.773513, -1.700012] + bars_SST_2D.test_vals = [13.000000, -0.726399, -1.700012] bars_SST_2D.multizone = True test_list.append(bars_SST_2D) @@ -1337,7 +1337,7 @@ def main(): sp_pinArray_cht_2d_dp_hf.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_2d" sp_pinArray_cht_2d_dp_hf.cfg_file = "configMaster.cfg" sp_pinArray_cht_2d_dp_hf.test_iter = 100 - sp_pinArray_cht_2d_dp_hf.test_vals = [0.088580, -0.764276, -1.086940, -0.747450, 208.023676, 344.680000, -0.000000, -0.747450, 0.747450] + sp_pinArray_cht_2d_dp_hf.test_vals = [0.088590, -0.764262, -1.086946, -0.747448, 208.023676, 344.680000, -0.000000, -0.747450, 0.747450] sp_pinArray_cht_2d_dp_hf.multizone = True test_list.append(sp_pinArray_cht_2d_dp_hf) @@ -1346,7 +1346,7 @@ def main(): sp_pinArray_3d_cht_mf_hf_tp.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_3d" sp_pinArray_3d_cht_mf_hf_tp.cfg_file = "configMaster.cfg" sp_pinArray_3d_cht_mf_hf_tp.test_iter = 30 - sp_pinArray_3d_cht_mf_hf_tp.test_vals = [-1.627413, -3.083567, -4.577909, -0.009725, 104.632413, 418.370000, 0.000000] + sp_pinArray_3d_cht_mf_hf_tp.test_vals = [-1.612910, -2.837554, -3.507895, -0.009728, 104.631202, 418.360000, 0.000000] sp_pinArray_3d_cht_mf_hf_tp.test_vals_aarch64 = [-1.622914, -3.081114, -4.576282, -0.009725, 104.632412, 418.370000, 0.000000] sp_pinArray_3d_cht_mf_hf_tp.multizone = True test_list.append(sp_pinArray_3d_cht_mf_hf_tp) @@ -1370,7 +1370,7 @@ def main(): pywrapper_turb_naca0012_sst.cfg_dir = "rans/naca0012" pywrapper_turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" pywrapper_turb_naca0012_sst.test_iter = 10 - pywrapper_turb_naca0012_sst.test_vals = [-12.107692, -15.277743, -6.210238, 1.049757, 0.019249, -2.357984, 0] + pywrapper_turb_naca0012_sst.test_vals = [-8.515763, -10.746560, -4.508015, 1.047852, 0.019161, -1.928310, 0.000000] pywrapper_turb_naca0012_sst.test_vals_aarch64 = [-12.107692, -15.277743, -6.210238, 1.049757, 0.019249, -2.357984, 0] pywrapper_turb_naca0012_sst.command = TestCase.Command("mpirun -np 2", "SU2_CFD.py", "--parallel -f") pywrapper_turb_naca0012_sst.timeout = 3200 diff --git a/TestCases/parallel_regression_AD.py b/TestCases/parallel_regression_AD.py index f54849610f4..5366959a50a 100644 --- a/TestCases/parallel_regression_AD.py +++ b/TestCases/parallel_regression_AD.py @@ -91,7 +91,7 @@ def main(): discadj_rans_naca0012_sst.cfg_dir = "disc_adj_rans/naca0012" discadj_rans_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" discadj_rans_naca0012_sst.test_iter = 10 - discadj_rans_naca0012_sst.test_vals = [-2.274779, -0.278440, -2.255500, -0.003160] + discadj_rans_naca0012_sst.test_vals = [-2.274814, -0.278441, -2.250500, -0.003160] discadj_rans_naca0012_sst.test_vals_aarch64 = [-2.274779, -0.278440, -2.255500, -0.003160] test_list.append(discadj_rans_naca0012_sst) diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index b4b9cd473a9..9581ea7a3f1 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -234,7 +234,7 @@ def main(): rae2822_sst_sust.cfg_dir = "rans/rae2822" rae2822_sst_sust.cfg_file = "turb_SST_SUST_RAE2822.cfg" rae2822_sst_sust.test_iter = 20 - rae2822_sst_sust.test_vals = [-2.536121, 4.873617, 0.816197, 0.060504] + rae2822_sst_sust.test_vals = [-2.536147, 4.873615, 0.816197, 0.060504] test_list.append(rae2822_sst_sust) # Flat plate @@ -294,7 +294,7 @@ def main(): turb_naca0012_sst_2003m.cfg_dir = "rans/naca0012" turb_naca0012_sst_2003m.cfg_file = "turb_NACA0012_sst_2003m.cfg" turb_naca0012_sst_2003m.test_iter = 10 - turb_naca0012_sst_2003m.test_vals = [-7.688139, -10.046053, -3.410061, 1.048970, 0.019798, -2.208236, 0] + turb_naca0012_sst_2003m.test_vals = [-7.660511, -10.053600, -3.394775, 1.046880, 0.019689, -2.170311, 0.000000] turb_naca0012_sst_2003m.timeout = 3200 test_list.append(turb_naca0012_sst_2003m) @@ -303,7 +303,7 @@ def main(): turb_naca0012_sst_sust_restart.cfg_dir = "rans/naca0012" turb_naca0012_sst_sust_restart.cfg_file = "turb_NACA0012_sst_sust.cfg" turb_naca0012_sst_sust_restart.test_iter = 10 - turb_naca0012_sst_sust_restart.test_vals = [-12.084326, -14.827365, -6.062398, 1.000276, 0.019495, -2.201517] + turb_naca0012_sst_sust_restart.test_vals = [-7.998513, -10.320508, -3.314994, 0.994965, 0.019301, -1.821039] turb_naca0012_sst_sust_restart.test_vals_aarch64 = [-12.084326, -14.827365, -6.062398, 1.000276, 0.019495, -2.201517] turb_naca0012_sst_sust_restart.timeout = 3200 test_list.append(turb_naca0012_sst_sust_restart) @@ -313,7 +313,7 @@ def main(): turb_naca0012_sst_fixedvalues.cfg_dir = "rans/naca0012" turb_naca0012_sst_fixedvalues.cfg_file = "turb_NACA0012_sst_fixedvalues.cfg" turb_naca0012_sst_fixedvalues.test_iter = 10 - turb_naca0012_sst_fixedvalues.test_vals = [-5.206694, -10.016428, -1.616043, 1.021479, 0.040333, -3.478142] + turb_naca0012_sst_fixedvalues.test_vals = [-5.206693, -10.016853, -1.615987, 1.021480, 0.040333, -3.478131] turb_naca0012_sst_fixedvalues.timeout = 3200 test_list.append(turb_naca0012_sst_fixedvalues) @@ -335,7 +335,7 @@ def main(): axi_rans_air_nozzle_restart.cfg_dir = "axisymmetric_rans/air_nozzle" axi_rans_air_nozzle_restart.cfg_file = "air_nozzle_restart.cfg" axi_rans_air_nozzle_restart.test_iter = 10 - axi_rans_air_nozzle_restart.test_vals = [-12.071702, -7.474599, -8.646498, -3.988633, 0] + axi_rans_air_nozzle_restart.test_vals = [-6.046478, -0.483139, -2.216327, 2.472194, 0.000000] axi_rans_air_nozzle_restart.test_vals_aarch64 = [-12.071702, -7.474599, -8.646498, -3.988633, 0] axi_rans_air_nozzle_restart.tol = 0.0001 test_list.append(axi_rans_air_nozzle_restart) @@ -350,7 +350,7 @@ def main(): turb_naca0012_sst_restart_mg.cfg_file = "turb_NACA0012_sst_multigrid_restart.cfg" turb_naca0012_sst_restart_mg.test_iter = 50 turb_naca0012_sst_restart_mg.ntest_vals = 5 - turb_naca0012_sst_restart_mg.test_vals = [-7.639702, -7.441853, -1.895004, 0.000001, 0.079178] + turb_naca0012_sst_restart_mg.test_vals = [-7.639663, -7.464724, -1.665498, -0.000022, 0.079196] turb_naca0012_sst_restart_mg.timeout = 3200 turb_naca0012_sst_restart_mg.tol = 0.000001 test_list.append(turb_naca0012_sst_restart_mg) @@ -449,7 +449,7 @@ def main(): inc_turb_naca0012_sst_sust.cfg_dir = "incomp_rans/naca0012" inc_turb_naca0012_sst_sust.cfg_file = "naca0012_SST_SUST.cfg" inc_turb_naca0012_sst_sust.test_iter = 20 - inc_turb_naca0012_sst_sust.test_vals = [-7.270375, 0.018431, 0.000021, 0.307673] + inc_turb_naca0012_sst_sust.test_vals = [-7.316735, 0.018271, 0.000021, 0.307672] test_list.append(inc_turb_naca0012_sst_sust) # FLAT PLATE, WALL FUNCTIONS, INCOMPRESSIBLE SST @@ -677,7 +677,7 @@ def main(): turb_naca0012_1c.cfg_dir = "rans_uq/naca0012" turb_naca0012_1c.cfg_file = "turb_NACA0012_uq_1c.cfg" turb_naca0012_1c.test_iter = 10 - turb_naca0012_1c.test_vals = [-4.992120, 1.134926, 0.356004, -0.089085] + turb_naca0012_1c.test_vals = [-4.992120, 1.134942, 0.356070, -0.089068] test_list.append(turb_naca0012_1c) # NACA0012 2c @@ -685,7 +685,7 @@ def main(): turb_naca0012_2c.cfg_dir = "rans_uq/naca0012" turb_naca0012_2c.cfg_file = "turb_NACA0012_uq_2c.cfg" turb_naca0012_2c.test_iter = 10 - turb_naca0012_2c.test_vals = [-5.485136, 0.968075, 0.273236, -0.110320] + turb_naca0012_2c.test_vals = [-5.485136, 0.968105, 0.273199, -0.110329] test_list.append(turb_naca0012_2c) # NACA0012 3c @@ -693,7 +693,7 @@ def main(): turb_naca0012_3c.cfg_dir = "rans_uq/naca0012" turb_naca0012_3c.cfg_file = "turb_NACA0012_uq_3c.cfg" turb_naca0012_3c.test_iter = 10 - turb_naca0012_3c.test_vals = [-5.584305, 0.931248, 0.250749, -0.113574] + turb_naca0012_3c.test_vals = [-5.584305, 0.931283, 0.250707, -0.113586] test_list.append(turb_naca0012_3c) # NACA0012 p1c1 @@ -701,7 +701,7 @@ def main(): turb_naca0012_p1c1.cfg_dir = "rans_uq/naca0012" turb_naca0012_p1c1.cfg_file = "turb_NACA0012_uq_p1c1.cfg" turb_naca0012_p1c1.test_iter = 10 - turb_naca0012_p1c1.test_vals = [-5.120263, 1.074826, 0.294764, -0.109420] + turb_naca0012_p1c1.test_vals = [-5.120250, 1.074873, 0.294822, -0.109404] test_list.append(turb_naca0012_p1c1) # NACA0012 p1c2 @@ -709,7 +709,7 @@ def main(): turb_naca0012_p1c2.cfg_dir = "rans_uq/naca0012" turb_naca0012_p1c2.cfg_file = "turb_NACA0012_uq_p1c2.cfg" turb_naca0012_p1c2.test_iter = 10 - turb_naca0012_p1c2.test_vals = [-5.549132, 0.945637, 0.252403, -0.117491] + turb_naca0012_p1c2.test_vals = [-5.549132, 0.945671, 0.252360, -0.117501] test_list.append(turb_naca0012_p1c2) ###################################### @@ -769,7 +769,7 @@ def main(): square_cylinder.cfg_dir = "unsteady/square_cylinder" square_cylinder.cfg_file = "turb_square.cfg" square_cylinder.test_iter = 3 - square_cylinder.test_vals = [-2.560840, -1.173495, 0.061186, 1.399403, 2.220585, 1.399351, 2.218790, 0] + square_cylinder.test_vals = [-2.560840, -1.173495, 0.061334, 1.399403, 2.220585, 1.399351, 2.218790, 0.000000] square_cylinder.unsteady = True test_list.append(square_cylinder) @@ -864,7 +864,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-10.466644, -2.871703, -19.193464, -13.487820, -11.582397, -6.306167, 73273, 73273, 0.019884, 82.491] + Jones_tc_restart.test_vals = [-3.501033, -0.855390, -11.767195, -6.117445, -9.432838, -3.573401, 73273.000000, 73273.000000, 0.019884, 82.491000] test_list.append(Jones_tc_restart) # 2D axial stage @@ -972,7 +972,7 @@ def main(): bars_SST_2D.cfg_dir = "sliding_interface/bars_SST_2D" bars_SST_2D.cfg_file = "bars.cfg" bars_SST_2D.test_iter = 13 - bars_SST_2D.test_vals = [13.000000, -0.773513, -1.700012] + bars_SST_2D.test_vals = [13.000000, -0.726398, -1.700012] bars_SST_2D.multizone = True test_list.append(bars_SST_2D) @@ -1520,7 +1520,7 @@ def main(): pywrapper_turb_naca0012_sst.cfg_dir = "rans/naca0012" pywrapper_turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" pywrapper_turb_naca0012_sst.test_iter = 10 - pywrapper_turb_naca0012_sst.test_vals = [-12.107132, -15.277740, -6.210248, 1.049757, 0.019249, -3.173936, 0] + pywrapper_turb_naca0012_sst.test_vals = [-8.507630, -10.746643, -4.514387, 1.047906, 0.019158, -1.724758, 0.000000] pywrapper_turb_naca0012_sst.test_vals_aarch64 = [-12.107132, -15.277740, -6.210248, 1.049757, 0.019249, -3.173936, 0] pywrapper_turb_naca0012_sst.command = TestCase.Command(exec = "SU2_CFD.py", param = "-f") pywrapper_turb_naca0012_sst.timeout = 3200 diff --git a/TestCases/serial_regression_AD.py b/TestCases/serial_regression_AD.py index 620a3b20e8f..80ae12dc993 100644 --- a/TestCases/serial_regression_AD.py +++ b/TestCases/serial_regression_AD.py @@ -86,7 +86,7 @@ def main(): discadj_rans_naca0012_sst.cfg_dir = "disc_adj_rans/naca0012" discadj_rans_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" discadj_rans_naca0012_sst.test_iter = 10 - discadj_rans_naca0012_sst.test_vals = [-2.127041, -0.204660, 0.335320, -0.022055] + discadj_rans_naca0012_sst.test_vals = [-2.127004, -0.204660, 0.340440, -0.022055] test_list.append(discadj_rans_naca0012_sst) ####################################### diff --git a/TestCases/tutorials.py b/TestCases/tutorials.py index 1ac1281061e..c827aef8c31 100644 --- a/TestCases/tutorials.py +++ b/TestCases/tutorials.py @@ -208,7 +208,7 @@ def main(): tutorial_trans_flatplate_T3A.cfg_dir = "../Tutorials/compressible_flow/Transitional_Flat_Plate/Langtry_and_Menter/T3A" tutorial_trans_flatplate_T3A.cfg_file = "transitional_LM_model_ConfigFile.cfg" tutorial_trans_flatplate_T3A.test_iter = 20 - tutorial_trans_flatplate_T3A.test_vals = [-5.837399, -2.092246, -3.983493, -0.302381, -1.920868, 1.667180, -3.496278, 0.391608] + tutorial_trans_flatplate_T3A.test_vals = [-5.841281, -2.094610, -3.948081, -0.305564, -1.588781, 8.304710, -3.507210, 0.395186] tutorial_trans_flatplate_T3A.test_vals_aarch64 = [-5.837368, -2.092246, -3.984172, -0.302357, -1.928108, 1.667157, -3.496279, 0.391610] tutorial_trans_flatplate_T3A.no_restart = True test_list.append(tutorial_trans_flatplate_T3A) @@ -218,7 +218,7 @@ def main(): tutorial_trans_flatplate_T3Am.cfg_dir = "../Tutorials/compressible_flow/Transitional_Flat_Plate/Langtry_and_Menter/T3A-" tutorial_trans_flatplate_T3Am.cfg_file = "transitional_LM_model_ConfigFile.cfg" tutorial_trans_flatplate_T3Am.test_iter = 20 - tutorial_trans_flatplate_T3Am.test_vals = [-6.063700, -1.945073, -3.946836, -0.549147, -3.863792, 2.664440, -2.517610, 1.112977] + tutorial_trans_flatplate_T3Am.test_vals = [-6.206420, -2.029271, -4.028226, -0.685276, -3.893698, 6.726680, -2.520959, 0.948647] tutorial_trans_flatplate_T3Am.test_vals_aarch64 = [-6.063726, -1.945088, -3.946923, -0.549166, -3.863794, 2.664439, -2.517601, 1.112978] tutorial_trans_flatplate_T3Am.no_restart = True test_list.append(tutorial_trans_flatplate_T3Am) diff --git a/TestCases/vandv.py b/TestCases/vandv.py index f9da6969994..ba3fb0dde68 100644 --- a/TestCases/vandv.py +++ b/TestCases/vandv.py @@ -63,7 +63,7 @@ def main(): bump_sst1994m.cfg_dir = "vandv/rans/bump_in_channel" bump_sst1994m.cfg_file = "turb_bump_sst.cfg" bump_sst1994m.test_iter = 5 - bump_sst1994m.test_vals = [-13.000658, -10.449108, -10.585058, -7.531737, -10.468414, -5.695067, 0.004904] + bump_sst1994m.test_vals = [-5.472393, -2.651543, -2.741047, 0.023512, -1.997863, 15.897007, 0.004899] bump_sst1994m.test_vals_aarch64 = [-13.000658, -10.449108, -10.585058, -7.531737, -10.468414, -5.695067, 0.004904] test_list.append(bump_sst1994m) @@ -82,7 +82,7 @@ def main(): swbli_sst.cfg_dir = "vandv/rans/swbli" swbli_sst.cfg_file = "config_sst.cfg" swbli_sst.test_iter = 5 - swbli_sst.test_vals = [-11.505404, -10.756847, -11.931456, -10.349754, -11.606988, -4.851901, 0.002280, -1.521436, -3.777949, 1.340100] + swbli_sst.test_vals = [-11.500317, -10.752421, -11.508502, -10.331672, -10.300258, 1.562476, 0.002280, -1.324977, -6.297644, 1.000000] test_list.append(swbli_sst) ########################## @@ -94,7 +94,7 @@ def main(): sandiajet_sst.cfg_dir = "vandv/species_transport/sandia_jet" sandiajet_sst.cfg_file = "validation.cfg" sandiajet_sst.test_iter = 5 - sandiajet_sst.test_vals = [-17.169907, -13.518707, -15.442566, -12.021165, -9.660040, -15.289842, 5.000000, -2.746249, 5.000000, -4.836800, 5.000000, -3.966350, 0.000259, 0.000000, 0.000000, 0.000259, 4047.400000, 3946.800000, 49.161000, 51.433000] + sandiajet_sst.test_vals = [-8.502793, -6.169258, -6.699764, -5.115200, 1.068905, -8.492912, 5.000000, -1.727355, 5.000000, -5.233912, 5.000000, -1.959627, 0.000259, 0.000000, 0.000000, 0.000259, 4047.400000, 3946.800000, 49.161000, 51.433000] sandiajet_sst.test_vals_aarch64 = [-17.069026, -13.156800, -15.290567, -11.689831, -9.349978, -14.907311, 5.000000, -2.738947, 5.000000, -4.813747, 5.000000, -3.981740, 0.000259, 0.000000, 0.000000, 0.000259, 4047.400000, 3946.800000, 49.161000, 51.433000] test_list.append(sandiajet_sst) From d7b8ee7e7861bfd7916d811449c5ecf7ee2468af Mon Sep 17 00:00:00 2001 From: bigfooted Date: Thu, 16 Jan 2025 07:55:13 +0100 Subject: [PATCH 24/25] regression update --- TestCases/serial_regression.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 9581ea7a3f1..30fcd2eef82 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -284,7 +284,7 @@ def main(): turb_naca0012_sst.cfg_dir = "rans/naca0012" turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" turb_naca0012_sst.test_iter = 10 - turb_naca0012_sst.test_vals = [-12.107132, -15.277740, -6.210248, 1.049757, 0.019249, -3.173936, 0] + turb_naca0012_sst.test_vals = [-8.507630, -10.746643, -4.514387, 1.047906, 0.019158, -1.724758, 0.000000] turb_naca0012_sst.test_vals_aarch64 = [-12.107132, -15.277740, -6.210248, 1.049757, 0.019249, -3.173936, 0] turb_naca0012_sst.timeout = 3200 test_list.append(turb_naca0012_sst) @@ -1534,7 +1534,7 @@ def main(): pywrapper_square_cylinder.cfg_dir = "unsteady/square_cylinder" pywrapper_square_cylinder.cfg_file = "turb_square.cfg" pywrapper_square_cylinder.test_iter = 3 - pywrapper_square_cylinder.test_vals = [-2.560840, -1.173495, 0.061186, 1.399403, 2.220585, 1.399351, 2.218790, 0] + pywrapper_square_cylinder.test_vals = [-2.560840, -1.173495, 0.061334, 1.399403, 2.220585, 1.399351, 2.218790, 0.000000] pywrapper_square_cylinder.command = TestCase.Command(exec = "SU2_CFD.py", param = "-f") pywrapper_square_cylinder.timeout = 1600 pywrapper_square_cylinder.tol = 0.00001 From 444008ae13867ec1776f75c5262a03e9d8487149 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Thu, 16 Jan 2025 23:18:08 +0100 Subject: [PATCH 25/25] regression update --- .../streamwise_periodic/chtPinArray_2d/of_grad_findiff.csv.ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/of_grad_findiff.csv.ref b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/of_grad_findiff.csv.ref index 2634fca1ff5..861b1bbfada 100644 --- a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/of_grad_findiff.csv.ref +++ b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/of_grad_findiff.csv.ref @@ -1,2 +1,2 @@ "VARIABLE" , "AVG_DENSITY[0]", "AVG_ENTHALPY[0]", "AVG_NORMALVEL[0]", "DRAG[0]" , "EFFICIENCY[0]" , "FORCE_X[0]" , "FORCE_Y[0]" , "FORCE_Z[0]" , "LIFT[0]" , "MOMENT_X[0]" , "MOMENT_Y[0]" , "MOMENT_Z[0]" , "SIDEFORCE[0]" , "SURFACE_MACH[0]", "SURFACE_MASSFLOW[0]", "SURFACE_MOM_DISTORTION[0]", "SURFACE_PRESSURE_DROP[0]", "SURFACE_SECONDARY[0]", "SURFACE_SECOND_OVER_UNIFORM[0]", "SURFACE_STATIC_PRESSURE[0]", "SURFACE_STATIC_TEMPERATURE[0]", "SURFACE_TOTAL_PRESSURE[0]", "SURFACE_TOTAL_TEMPERATURE[0]", "SURFACE_UNIFORMITY[0]", "AVG_TEMPERATURE[1]", "MAXIMUM_HEATFLUX[1]", "TOTAL_HEATFLUX[1]", "FINDIFF_STEP" -0 , 0.0 , -300000.0026077032, -3.3306691000000184e-08, 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , -0.01999999887924986, 0.0 , -0.9000000009140585 , 0.0 , 0.9379999998948563 , 1.649999997743734 , 419.99999780273356 , -69.99999868639861 , 358.9999998609983 , -69.99999868639861 , -0.6000000052353016 , -380.0000001774606, 0.0 , -430.00000005122274, 1e-08 +0 , 0.0 , -2300000.0044703484, 6.661338199999911e-08, 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , -2.389999999297121, 6.660999999418455e-08, -18.70800000053352 , 0.0 , 18.32399999929235 , 34.89000000023168 , 14349.999997875784 , -660.0000006073969 , -921.000000175809 , -649.9999926745659 , -34.59999999844143 , -719.9999970453064, 0.0 , -499.99999873762135, 1e-08