@@ -4974,6 +4974,13 @@ void CPhysicalGeometry::ComputeNSpan(CConfig* config, unsigned short val_iZone,
49744974 max = 0 ;
49754975 SU2_MPI::Allreduce (&MyMin, &min, 1 , MPI_DOUBLE, MPI_MIN, SU2_MPI::GetComm ());
49764976 SU2_MPI::Allreduce (&MyMax, &max, 1 , MPI_DOUBLE, MPI_MAX, SU2_MPI::GetComm ());
4977+ if (nSpan < 2 ) {
4978+ string marker_name = (marker_flag == INFLOW) ? " INFLOW" : " OUTFLOW" ;
4979+ SU2_MPI::Error (" Failed to compute spanwise sections for " + marker_name +
4980+ " . Found " + to_string (nSpan) + " nodes along the periodic boundary edge from hub to shroud. " +
4981+ " At least 2 nodes are required. Check your mesh for correct hub-to-shroud edge definition." ,
4982+ CURRENT_FUNCTION);
4983+ }
49774984
49784985 /* --- compute height value for each spanwise section---*/
49794986 delta = (max - min) / (nSpanWiseSections[marker_flag - 1 ] - 1 );
@@ -4988,9 +4995,9 @@ void CPhysicalGeometry::ComputeNSpan(CConfig* config, unsigned short val_iZone,
49884995 SPRINTF (buf, " nSpan inflow %u, nSpan outflow %u" , nSpanWiseSections[INFLOW - 1 ],
49894996 nSpanWiseSections[OUTFLOW - 1 ]);
49904997 SU2_MPI::Error (
4991- string (" At the moment only turbomachinery with the same amount of span-wise section can be simulated \n " ) +
4992- buf ,
4993- CURRENT_FUNCTION);
4998+ string (" Turbomachinery simulation requires equal spanwise sections at INFLOW and OUTFLOW. " ) + buf +
4999+ " \n This is likely a mesh issue. Ensure that the periodic boundaries from hub to shroud are consistently defined in the mesh. " ,
5000+ CURRENT_FUNCTION);
49945001 } else {
49955002 config->SetnSpanWiseSections (nSpanWiseSections[OUTFLOW - 1 ]);
49965003 }
0 commit comments