From e5e5d19cbab4f1dd46b4b9cbec0f3a781d088eb2 Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Sun, 21 Feb 2021 09:18:11 +0100 Subject: [PATCH 01/88] fixed wall functions for SA and SST --- .../include/solvers/CFVMFlowSolverBase.hpp | 47 ++- .../include/solvers/CFVMFlowSolverBase.inl | 71 +++- SU2_CFD/include/solvers/CIncNSSolver.hpp | 11 + SU2_CFD/include/solvers/CNSSolver.hpp | 12 +- SU2_CFD/include/solvers/CSolver.hpp | 39 +++ SU2_CFD/include/solvers/CTurbSSTSolver.hpp | 15 + SU2_CFD/src/output/CFlowIncOutput.cpp | 4 +- SU2_CFD/src/solvers/CIncNSSolver.cpp | 329 +++++++++++++++++- SU2_CFD/src/solvers/CNSSolver.cpp | 6 +- SU2_CFD/src/solvers/CTurbSASolver.cpp | 132 ++----- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 82 +++++ 11 files changed, 619 insertions(+), 129 deletions(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp b/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp index 131ade3eda6..ec3955acc81 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp @@ -158,6 +158,9 @@ class CFVMFlowSolverBase : public CSolver { su2double** CPressureTarget = nullptr; /*!< \brief Target Pressure coefficient for each boundary and vertex. */ su2double** YPlus = nullptr; /*!< \brief Yplus for each boundary and vertex. */ + su2double** UTau = nullptr; /*!< \brief UTau for each boundary and vertex. */ + su2double** EddyViscWall = nullptr; /*!< \brief Wall Eddy Viscosity for each boundary and vertex. */ + bool space_centered; /*!< \brief True if space centered scheeme used. */ bool euler_implicit; /*!< \brief True if euler implicit scheme used. */ bool least_squares; /*!< \brief True if computing gradients by least squares. */ @@ -2424,16 +2427,7 @@ class CFVMFlowSolverBase : public CSolver { return HeatConjugateVar[val_marker][val_vertex][pos_var]; } - /*! - * \brief Get the skin friction coefficient. - * \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 skin friction coefficient. - */ - inline su2double GetCSkinFriction(unsigned short val_marker, unsigned long val_vertex, - unsigned short val_dim) const final { - return CSkinFriction[val_marker][val_dim][val_vertex]; - } + /*! * \brief Get the wall shear stress. @@ -2446,7 +2440,7 @@ class CFVMFlowSolverBase : public CSolver { } /*! - * \brief Get the skin friction coefficient. + * \brief Get the heat flux. * \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 heat transfer coefficient. @@ -2475,6 +2469,16 @@ class CFVMFlowSolverBase : public CSolver { HeatFluxTarget[val_marker][val_vertex] = val_heat; } +/*! + * \brief Get the skin friction coefficient. + * \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 skin friction coefficient. + */ + inline su2double GetCSkinFriction(unsigned short val_marker, unsigned long val_vertex, + unsigned short val_dim) const final { + return CSkinFriction[val_marker][val_vertex][val_dim]; + } /*! * \brief Get the y plus. * \param[in] val_marker - Surface marker where the coefficient is computed. @@ -2484,4 +2488,25 @@ class CFVMFlowSolverBase : public CSolver { inline su2double GetYPlus(unsigned short val_marker, unsigned long val_vertex) const final { return YPlus[val_marker][val_vertex]; } + + + /*! + * \brief Get the u_tau . + * \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 u_tau. + */ + inline su2double GetUTau(unsigned short val_marker, unsigned long val_vertex) const final { + return UTau[val_marker][val_vertex]; + } + + /*! + * \brief Get the eddy viscosity at the wall (wall functions). + * \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 eddy viscosity. + */ + inline su2double GetEddyViscWall(unsigned short val_marker, unsigned long val_vertex) const final { + return EddyViscWall[val_marker][val_vertex]; + } }; diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index f17b2bb2177..59996c14ef8 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -131,6 +131,7 @@ void CFVMFlowSolverBase::Allocate(const CConfig& config) { } }; + /*--- Store the value of the characteristic primitive variables at the boundaries ---*/ Alloc3D(nMarker, nVertex, nPrimVar, CharacPrimVar); @@ -198,15 +199,24 @@ void CFVMFlowSolverBase::Allocate(const CConfig& config) { Alloc2D(nMarker, nVertex, YPlus); + /*--- U Tau in all the markers ---*/ + + Alloc2D(nMarker, nVertex, UTau); + + /*--- wall eddy viscosity in all the markers ---*/ + + Alloc2D(nMarker, nVertex, EddyViscWall); + /*--- Skin friction in all the markers ---*/ - CSkinFriction = new su2double**[nMarker]; - for (iMarker = 0; iMarker < nMarker; iMarker++) { - CSkinFriction[iMarker] = new su2double*[nDim]; - for (iDim = 0; iDim < nDim; iDim++) { - CSkinFriction[iMarker][iDim] = new su2double[nVertex[iMarker]](); - } - } + Alloc3D(nMarker,nVertex,nDim,CSkinFriction); + //CSkinFriction = new su2double**[nMarker]; + //for (iMarker = 0; iMarker < nMarker; iMarker++) { + // CSkinFriction[iMarker] = new su2double*[nVertex[iMarker]]; + // for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { + // CSkinFriction[iMarker][iVertex] = new su2double[nDim]() + // } + //} /*--- Wall Shear Stress in all the markers ---*/ @@ -467,10 +477,25 @@ CFVMFlowSolverBase::~CFVMFlowSolverBase() { delete[] YPlus; } + + if (UTau != nullptr) { + for (iMarker = 0; iMarker < nMarker; iMarker++) { + delete[] UTau[iMarker]; + } + delete[] UTau; + } + + if (EddyViscWall != nullptr) { + for (iMarker = 0; iMarker < nMarker; iMarker++) { + delete[] EddyViscWall[iMarker]; + } + delete[] EddyViscWall; + } + if (CSkinFriction != nullptr) { for (iMarker = 0; iMarker < nMarker; iMarker++) { - for (iDim = 0; iDim < nDim; iDim++) { - delete[] CSkinFriction[iMarker][iDim]; + for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { + delete[] CSkinFriction[iMarker][iVertex]; } delete[] CSkinFriction[iMarker]; } @@ -581,6 +606,12 @@ void CFVMFlowSolverBase::Viscous_Residual_impl(unsigned long iEdge, CGeome numerics->SetTurbKineticEnergy(turbNodes->GetSolution(iPoint,0), turbNodes->GetSolution(jPoint,0)); + /*--- Wall shear stress values (wall functions) ---*/ + + numerics->SetTauWall(nodes->GetTauWall(iPoint), + nodes->GetTauWall(jPoint)); + + /*--- Compute and update residual ---*/ auto residual = numerics->ComputeResidual(config); @@ -2506,7 +2537,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr unsigned short iMarker, iMarker_Monitoring, iDim, jDim; unsigned short T_INDEX = 0, TVE_INDEX = 0, VEL_INDEX = 0; su2double Viscosity = 0.0, WallDist[3] = {0.0}, Area, TauNormal, RefVel2 = 0.0, dTn, dTven, - RefDensity = 0.0, GradTemperature, Density = 0.0, WallDistMod, FrictionVel, + RefDensity = Density_Inf, GradTemperature, Density = 0.0, WallDistMod, FrictionVel, UnitNormal[3] = {0.0}, TauElem[3] = {0.0}, TauTangent[3] = {0.0}, Tau[3][3] = {{0.0}}, Cp, thermal_conductivity, MaxNorm = 8.0, Grad_Vel[3][3] = {{0.0}}, Grad_Temp[3] = {0.0}, AxiFactor; const su2double *Coord = nullptr, *Coord_Normal = nullptr, *Normal = nullptr; @@ -2526,6 +2557,10 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr bool axisymmetric = config->GetAxisymmetric(); bool roughwall = (config->GetnRoughWall() > 0); bool nemo = config->GetNEMOProblem(); + bool wallfunctions=false; + + for (iDim = 0; iDim < nDim; iDim++) RefVel2 += Velocity_Inf[iDim] * Velocity_Inf[iDim]; + /*--- Get the locations of the primitive variables for NEMO ---*/ if (nemo) { @@ -2554,6 +2589,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr for (iMarker = 0; iMarker < nMarker; iMarker++) { + Marker_Tag = config->GetMarker_All_TagBound(iMarker); if (!config->GetViscous_Wall(iMarker)) continue; /*--- Obtain the origin for the moment computation for a particular marker ---*/ @@ -2562,7 +2598,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr if (Monitoring == YES) { for (iMarker_Monitoring = 0; iMarker_Monitoring < config->GetnMarker_Monitoring(); iMarker_Monitoring++) { Monitoring_Tag = config->GetMarker_Monitoring_TagBound(iMarker_Monitoring); - Marker_Tag = config->GetMarker_All_TagBound(iMarker); + //Marker_Tag = config->GetMarker_All_TagBound(iMarker); if (Marker_Tag == Monitoring_Tag) Origin = config->GetRefOriginMoment(iMarker_Monitoring); } } @@ -2577,6 +2613,10 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr su2double ForceViscous[MAXNDIM] = {0.0}, MomentViscous[MAXNDIM] = {0.0}; su2double MomentX_Force[MAXNDIM] = {0.0}, MomentY_Force[MAXNDIM] = {0.0}, MomentZ_Force[MAXNDIM] = {0.0}; + /* --- check if wall functions are used --- */ + + wallfunctions = (config->GetWallFunction_Treatment(Marker_Tag) != NO_WALL_FUNCTION); + /*--- Loop over the vertices to compute the forces ---*/ for (iVertex = 0; iVertex < geometry->nVertex[iMarker]; iVertex++) { @@ -2639,7 +2679,9 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr WallShearStress[iMarker][iVertex] = 0.0; for (iDim = 0; iDim < nDim; iDim++) { TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; - CSkinFriction[iMarker][iDim][iVertex] = TauTangent[iDim] / (0.5 * RefDensity * RefVel2); + /* --- in case of wall functions, we have computed the skin friction in the turbulence solver --- */ + if (!wallfunctions) + CSkinFriction[iMarker][iVertex][iDim] = TauTangent[iDim] / (0.5 * RefDensity * RefVel2); WallShearStress[iMarker][iVertex] += TauTangent[iDim] * TauTangent[iDim]; } WallShearStress[iMarker][iVertex] = sqrt(WallShearStress[iMarker][iVertex]); @@ -2652,7 +2694,10 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr /*--- Compute y+ and non-dimensional velocity ---*/ FrictionVel = sqrt(fabs(WallShearStress[iMarker][iVertex]) / Density); - YPlus[iMarker][iVertex] = WallDistMod * FrictionVel / (Viscosity / Density); + + /* --- in case of wall functions, we have computed YPlus in the turbulence class --- */ + if (!wallfunctions) + YPlus[iMarker][iVertex] = WallDistMod * FrictionVel / (Viscosity / Density); /*--- Compute total and maximum heat flux on the wall ---*/ diff --git a/SU2_CFD/include/solvers/CIncNSSolver.hpp b/SU2_CFD/include/solvers/CIncNSSolver.hpp index 0b6b0b78cff..8496980032f 100644 --- a/SU2_CFD/include/solvers/CIncNSSolver.hpp +++ b/SU2_CFD/include/solvers/CIncNSSolver.hpp @@ -141,4 +141,15 @@ class CIncNSSolver final : public CIncEulerSolver { CConfig *config, unsigned short val_marker) override; + + /*! + * \brief Computes the wall shear stress (Tau_Wall) on the surface using a wall function. + * \param[in] geometry - Geometrical definition of the problem. + * \param[in] solver_container - Container vector with all the solutions. + * \param[in] config - Definition of the particular problem. + */ + void SetTauWall_WF(CGeometry *geometry, + CSolver** solver_container, + CConfig* config) override; + }; diff --git a/SU2_CFD/include/solvers/CNSSolver.hpp b/SU2_CFD/include/solvers/CNSSolver.hpp index 0b1a75e2d0b..5f26ffce1eb 100644 --- a/SU2_CFD/include/solvers/CNSSolver.hpp +++ b/SU2_CFD/include/solvers/CNSSolver.hpp @@ -113,7 +113,7 @@ class CNSSolver final : public CEulerSolver { * \param[in] solver_container - Container vector with all the solutions. * \param[in] config - Definition of the particular problem. */ - void SetTauWall_WF(CGeometry *geometry, CSolver** solver_container, const CConfig* config); + //void SetTauWall_WF(CGeometry *geometry, CSolver** solver_container, const CConfig* config); public: /*! @@ -233,4 +233,14 @@ class CNSSolver final : public CEulerSolver { return Buffet_Sensor[val_marker][val_vertex]; } + /*! + * \brief Computes the wall shear stress (Tau_Wall) on the surface using a wall function. + * \param[in] geometry - Geometrical definition of the problem. + * \param[in] solver_container - Container vector with all the solutions. + * \param[in] config - Definition of the particular problem. + */ + void SetTauWall_WF(CGeometry *geometry, + CSolver** solver_container, + CConfig* config) override; + }; diff --git a/SU2_CFD/include/solvers/CSolver.hpp b/SU2_CFD/include/solvers/CSolver.hpp index 062711cb47b..f5eb08a2230 100644 --- a/SU2_CFD/include/solvers/CSolver.hpp +++ b/SU2_CFD/include/solvers/CSolver.hpp @@ -3150,6 +3150,22 @@ 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 u tau. + */ + inline virtual su2double GetUTau(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 eddy viscosity. + */ + inline virtual su2double GetEddyViscWall(unsigned short val_marker, unsigned long val_vertex) const { return 0; } + /*! * \brief A virtual member. * \return Value of the StrainMag_Max @@ -3929,6 +3945,29 @@ class CSolver { */ inline virtual unsigned long GetnDOFsGlobal(void) const { return 0; } + /*! + * \brief A virtual member. + * \param[in] geometry - Geometrical definition of the problem. + * \param[in] solver_container - Container vector with all the solutions. + * \param[in] config - Definition of the particular problem. + */ + inline virtual void SetTauWall_WF(CGeometry *geometry, + CSolver** solver_container, + CConfig* config) { } + + /*! + * \brief A virtual member. + * \param[in] geometry - Geometrical definition of the problem. + * \param[in] solver_container - Container vector with all the solutions. + * \param[in] config - Definition of the particular problem. + */ + inline virtual void SetNuTilde_WF(CGeometry *geometry, + CSolver **solver_container, + CNumerics *conv_numerics, + CNumerics *visc_numerics, + CConfig *config, + unsigned short val_marker) { } + /*! * \brief A virtual member. * \param[in] geometry - Geometrical definition of the problem. diff --git a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp index 807a3b10613..5ff948ac808 100644 --- a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp +++ b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp @@ -295,4 +295,19 @@ class CTurbSSTSolver final : public CTurbSolver { */ inline su2double GetOmega_Inf(void) const override { return omega_Inf; } + /*! + * \brief Compute nu tilde from the wall functions. + * \param[in] geometry - Geometrical definition of the problem. + * \param[in] solver_container - Container vector with all the solutions. + * \param[in] conv_numerics - Description of the numerical method. + * \param[in] visc_numerics - Description of the numerical method. + * \param[in] config - Definition of the particular problem. + * \param[in] val_marker - Surface marker where the boundary condition is applied. + */ + void SetNuTilde_WF(CGeometry *geometry, + CSolver **solver_container, + CNumerics *conv_numerics, + CNumerics *visc_numerics, + CConfig *config, + unsigned short val_marker) override; }; diff --git a/SU2_CFD/src/output/CFlowIncOutput.cpp b/SU2_CFD/src/output/CFlowIncOutput.cpp index 74f6358fc4d..6833aac9778 100644 --- a/SU2_CFD/src/output/CFlowIncOutput.cpp +++ b/SU2_CFD/src/output/CFlowIncOutput.cpp @@ -651,7 +651,10 @@ void CFlowIncOutput::LoadVolumeData(CConfig *config, CGeometry *geometry, CSolve void CFlowIncOutput::LoadSurfaceData(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned long iPoint, unsigned short iMarker, unsigned long iVertex){ if ((config->GetKind_Solver() == INC_NAVIER_STOKES) || (config->GetKind_Solver() == INC_RANS)) { + + SetVolumeOutputValue("SKIN_FRICTION-X", iPoint, solver[FLOW_SOL]->GetCSkinFriction(iMarker, iVertex, 0)); + SetVolumeOutputValue("SKIN_FRICTION-Y", iPoint, solver[FLOW_SOL]->GetCSkinFriction(iMarker, iVertex, 1)); if (nDim == 3) SetVolumeOutputValue("SKIN_FRICTION-Z", iPoint, solver[FLOW_SOL]->GetCSkinFriction(iMarker, iVertex, 2)); @@ -660,7 +663,6 @@ void CFlowIncOutput::LoadSurfaceData(CConfig *config, CGeometry *geometry, CSolv SetVolumeOutputValue("HEAT_FLUX", iPoint, solver[HEAT_SOL]->GetHeatFlux(iMarker, iVertex)); else { SetVolumeOutputValue("HEAT_FLUX", iPoint, solver[FLOW_SOL]->GetHeatFlux(iMarker, iVertex)); - } SetVolumeOutputValue("Y_PLUS", iPoint, solver[FLOW_SOL]->GetYPlus(iMarker, iVertex)); } diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index ac182499e67..159bbd4e7d0 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -62,6 +62,7 @@ void CIncNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container const bool center = (config->GetKind_ConvNumScheme_Flow() == SPACE_CENTERED); const bool limiter = (config->GetKind_SlopeLimit_Flow() != NO_LIMITER) && (InnerIter <= config->GetLimiterIter()); const bool van_albada = (config->GetKind_SlopeLimit_Flow() == VAN_ALBADA_EDGE); + const bool wall_functions = config->GetWall_Functions(); /*--- Common preprocessing steps (implemented by CEulerSolver) ---*/ @@ -97,6 +98,16 @@ void CIncNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container ComputeVorticityAndStrainMag<1>(*config, iMesh); + + /*--- Compute the TauWall from the wall functions ---*/ + + if (wall_functions) { + /*SU2_OMP_MASTER*/ + SetTauWall_WF(geometry, solver_container, config); +// nijso: we have to set this as well?? +// seteddyviscfirstpoint + /*SU2_OMP_BARRIER*/ + } } void CIncNSSolver::Viscous_Residual(unsigned long iEdge, CGeometry *geometry, CSolver **solver_container, @@ -169,8 +180,9 @@ void CIncNSSolver::BC_Wall_Generic(const CGeometry *geometry, const CConfig *con /*--- Get wall function treatment from config. ---*/ const auto Wall_Function = config->GetWallFunction_Treatment(Marker_Tag); - if (Wall_Function != NO_WALL_FUNCTION) - SU2_MPI::Error("Wall function treament not implemented yet", CURRENT_FUNCTION); + // nijso: we do not have a special treatment yet for heated walls + //if (Wall_Function != NO_WALL_FUNCTION) + // SU2_MPI::Error("Wall function treament not implemented yet", CURRENT_FUNCTION); /*--- Loop over all of the vertices on this boundary marker ---*/ @@ -366,3 +378,316 @@ void CIncNSSolver::BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **sol nodes->SetEnergy_ResTruncError_Zero(iPoint); } } + + + +void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, CConfig *config) { + + /*--- The wall function implemented herein is based on Nichols and Nelson AIAAJ v32 n6 2004. + At this moment, the wall function is only available for adiabatic flows. + ---*/ + su2double RefDensity,RefVel2; + if ((config->GetRef_Inc_NonDim() == DIMENSIONAL) || (config->GetRef_Inc_NonDim() == INITIAL_VALUES)) { + RefDensity = Density_Inf; + RefVel2 = 0.0; + for (auto iDim = 0u; iDim < nDim; iDim++) + RefVel2 += Velocity_Inf[iDim] * Velocity_Inf[iDim]; + } else if (config->GetRef_Inc_NonDim() == REFERENCE_VALUES) { + RefDensity = config->GetInc_Density_Ref(); + RefVel2 = config->GetInc_Velocity_Ref() * config->GetInc_Velocity_Ref(); + } + + bool debug = true; + unsigned long counter; + + su2double UnitNormal[3]; + su2double **grad_primvar, tau[3][3]; + + su2double Vel[3], VelTang[3], VelTangMod, WallDist[3], WallDistMod; + su2double T_Normal, P_Normal; + su2double Density_Wall, T_Wall, P_Wall, Lam_Visc_Wall, Tau_Wall = 0.0; + su2double diff, Delta, grad_diff; + su2double U_Tau, U_Plus, Gam, Beta, Phi, Q, Y_Plus_White, Y_Plus; + su2double TauElem[3], TauNormal, TauTangent[3], WallShearStress; + su2double Gas_Constant = config->GetGas_ConstantND(); + su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; + su2double Eddy_Visc; + su2double Vector[MAXNDIM] = {0.0}; + unsigned short max_iter = 100; + su2double tol = 1e-12; + + /*--- Get the freestream velocity magnitude for non-dim. purposes ---*/ + + su2double *VelInf = config->GetVelocity_FreeStreamND(); + su2double VelInfMod = 0.0; + for (auto iDim = 0u; iDim < nDim; iDim++) + VelInfMod += VelInf[iDim]; + VelInfMod = sqrt(VelInfMod); + + /*--- Compute the recovery factor ---*/ + // Double-check: laminar or turbulent Pr for this? + su2double Recovery = pow(config->GetPrandtl_Lam(), (1.0/3.0)); + + /*--- Typical constants from boundary layer theory ---*/ + + const su2double kappa = 0.41; + const su2double B = 5.5; + const su2double cv1_3 = 7.1*7.1*7.1; + + bool converged = true; + + for (auto iMarker = 0u; iMarker < config->GetnMarker_All(); iMarker++) { + + if ((config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) || + (config->GetMarker_All_KindBC(iMarker) == ISOTHERMAL) ) { + + /*--- Identify the boundary by string name ---*/ + + string Marker_Tag = config->GetMarker_All_TagBound(iMarker); + + /*--- Jump to another BC if it is not wall function ---*/ + + if (config->GetWallFunction_Treatment(Marker_Tag) != STANDARD_WALL_FUNCTION) + continue; + + /*--- Get the specified wall heat flux from config ---*/ + + su2double q_w = config->GetWall_HeatFlux(Marker_Tag); + + /*--- Loop over all of the vertices on this boundary marker ---*/ + + for (auto iVertex = 0u; iVertex < geometry->nVertex[iMarker]; iVertex++) { + const auto iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); + const auto Point_Normal = geometry->vertex[iMarker][iVertex]->GetNormal_Neighbor(); + + /*--- Check if the node belongs to the domain (i.e, not a halo node) + and the neighbor is not part of the physical boundary ---*/ + + //if (geometry->node[iPoint]->GetDomain()) { + + /*--- Get coordinates of the current vertex and nearest normal point ---*/ + + su2double *Coord = geometry->nodes->GetCoord(iPoint); + su2double *Coord_Normal = geometry->nodes->GetCoord(Point_Normal); + + /*--- Compute dual-grid area and boundary normal ---*/ + + su2double *Normal = geometry->vertex[iMarker][iVertex]->GetNormal(); + + geometry->vertex[iMarker][iVertex]->GetNormal(Vector); + su2double Area = GeometryToolbox::Norm(nDim, Normal); + + //su2double Area = 0.0; + //for (auto iDim = 0u; iDim < nDim; iDim++) + // Area += Normal[iDim]*Normal[iDim]; + //Area = sqrt (Area); + + for (auto iDim = 0u; iDim < nDim; iDim++) + UnitNormal[iDim] = -Normal[iDim]/Area; + + /*--- Get the velocity, pressure, and temperature at the nearest + (normal) interior point. ---*/ + + for (auto iDim = 0u; iDim < nDim; iDim++) + Vel[iDim] = nodes->GetVelocity(Point_Normal,iDim); + P_Normal = nodes->GetPressure(Point_Normal); + T_Normal = nodes->GetTemperature(Point_Normal); + + /*--- Compute the wall-parallel velocity at first point off the wall ---*/ + + su2double VelNormal = 0.0; + for (auto iDim = 0u; iDim < nDim; iDim++) + VelNormal += Vel[iDim] * UnitNormal[iDim]; + + for (auto iDim = 0u; iDim < nDim; iDim++) + VelTang[iDim] = Vel[iDim] - VelNormal*UnitNormal[iDim]; + + VelTangMod = 0.0; + for (auto iDim = 0u; iDim < nDim; iDim++) + VelTangMod += VelTang[iDim]*VelTang[iDim]; + VelTangMod = sqrt(VelTangMod); + + /*--- Compute normal distance of the interior point from the wall ---*/ + + for (auto iDim = 0u; iDim < nDim; iDim++) + WallDist[iDim] = (Coord[iDim] - Coord_Normal[iDim]); + + WallDistMod = 0.0; + for (auto iDim = 0u; iDim < nDim; iDim++) + WallDistMod += WallDist[iDim]*WallDist[iDim]; + WallDistMod = sqrt(WallDistMod); + + /*--- Compute mach number ---*/ + + // M_Normal = VelTangMod / sqrt(Gamma * Gas_Constant * T_Normal); + + /*--- Compute the wall temperature using the Crocco-Buseman equation ---*/ + + //T_Normal = T_Wall * (1.0 + 0.5*Gamma_Minus_One*Recovery*u_normal*u_normal); + // this means that T_Wall = T_Normal/(1.0+0.5*Gamma_Minus_One*Recovery*u_normal*u_normal) + //T_Wall = T_Normal/(1.0+0.5*Gamma_Minus_One*Recovery*VelTangMod*VelTangMod); + // in incompressible flows, we can assume that there is no velocity-related temperature change + // Prandtl: T+ = Pr*y+ + T_Wall = nodes->GetTemperature(iPoint); + + /*--- Extrapolate the pressure from the interior & compute the + wall density using the equation of state ---*/ + + // we assume no additional influence on the normal point + P_Wall = nodes->GetPressure(iPoint); + Density_Wall = nodes->GetDensity(iPoint); + Lam_Visc_Wall = nodes->GetLaminarViscosity(iPoint); + su2double Conductivity_Wall = nodes->GetThermalConductivity(iPoint); + su2double Density_Normal = nodes->GetDensity(Point_Normal); + su2double Lam_Visc_Normal = nodes->GetLaminarViscosity(Point_Normal); + + /*--- Compute the shear stress at the wall in the regular fashion + by using the stress tensor on the surface ---*/ + + grad_primvar = nodes->GetGradient_Primitive(iPoint); + + su2double div_vel = 0.0; + for (auto iDim = 0u; iDim < nDim; iDim++) + div_vel += grad_primvar[iDim+1][iDim]; + + for (auto iDim = 0u; iDim < nDim; iDim++) { + for (auto jDim = 0u ; jDim < nDim; jDim++) { + Delta = 0.0; if (iDim == jDim) Delta = 1.0; + tau[iDim][jDim] = Lam_Visc_Wall*( grad_primvar[jDim+1][iDim] + + grad_primvar[iDim+1][jDim]) - + TWO3*Lam_Visc_Wall*div_vel*Delta; + } + TauElem[iDim] = 0.0; + for (auto jDim = 0u; jDim < nDim; jDim++) + TauElem[iDim] += tau[iDim][jDim]*UnitNormal[jDim]; + } + + /*--- Compute wall shear stress as the magnitude of the wall-tangential + component of the shear stress tensor---*/ + + TauNormal = 0.0; + for (auto iDim = 0u; iDim < nDim; iDim++) + TauNormal += TauElem[iDim] * UnitNormal[iDim]; + + for (auto iDim = 0u; iDim < nDim; iDim++) + TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; + + WallShearStress = 0.0; + for (auto iDim = 0u; iDim < nDim; iDim++) + WallShearStress += TauTangent[iDim]*TauTangent[iDim]; + + // computed value + WallShearStress = sqrt(WallShearStress); + + /*--- Calculate the quantities from boundary layer theory and + iteratively solve for a new wall shear stress. Use the current wall + shear stress as a starting guess for the wall function. ---*/ + + counter = 0; diff = 1.0; + U_Tau = sqrt(WallShearStress/Density_Wall); + Y_Plus = 0.0; // to avoid warning + + su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; + + /*--- Automatic switch off when y+ < 5 according to Nichols & Nelson (2004) ---*/ + + if (Y_Plus_Start < 5.0) { + //nodes->SetTauWall_Flag(iPoint,false); + continue; + } + + while (fabs(diff) > tol) { + + /*--- Friction velocity and u+ ---*/ + + U_Plus = VelTangMod/U_Tau; + + /*--- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) page 1110 ---*/ + + Gam = Recovery*U_Tau*U_Tau/(2.0*Cp*T_Wall); + Beta = q_w*Lam_Visc_Wall/(Density_Wall*T_Wall*Conductivity_Wall*U_Tau); // TODO: nonzero heatflux needs validation case + Q = sqrt(Beta*Beta + 4.0*Gam); + Phi = asin(-1.0*Beta/Q); + + /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ + + Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); + + /*--- Spalding's universal form for the BL velocity with the + outer velocity form of White & Christoph above. ---*/ + + Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* + (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0 + + kappa*kappa*kappa*U_Plus*U_Plus*U_Plus/6.0)); + + su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); + Eddy_Visc = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp(-1.0*kappa*B)* + (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0) + - Lam_Visc_Normal/Lam_Visc_Wall); + Eddy_Visc = max(1.0e-6, Eddy_Visc); + + /* --- Define function for Newton method to zero --- */ + + diff = (Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall) - Y_Plus; + + /* --- Gradient of function defined above --- */ + grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + + kappa /(U_Tau * sqrt(Gam)) * asin(U_Plus * sqrt(Gam)) * Y_Plus_White - + exp(-1.0 * B * kappa) * (0.5 * pow(VelTangMod * kappa / U_Tau, 3) + + pow(VelTangMod * kappa / U_Tau, 2) + VelTangMod * kappa / U_Tau) / U_Tau; + + /* --- Newton Step --- */ + + U_Tau = U_Tau - 0.5*(diff / grad_diff); + + counter++; + if (counter == max_iter) { + if (debug){ + cout << "WARNING: Y_Plus evaluation has not converged in CIncNSSolver.cpp" << endl; + cout << rank << " " << iPoint; + for (auto iDim = 0u; iDim < nDim; iDim++) + cout << " " << Coord[iDim]; + cout << endl; + } + //converged = false; + //nodes->SetTauWall_Flag(iPoint,false); + break; + } + + } + /* --- If not converged jump to the next point. --- */ + + //if (!converged) continue; + + /*--- Calculate an updated value for the wall shear stress + using the y+ value, the definition of y+, and the definition of + the friction velocity. ---*/ + + YPlus[iMarker][iVertex] = Y_Plus; + EddyViscWall[iMarker][iVertex] = Eddy_Visc; + UTau[iMarker][iVertex] = U_Tau; + + // wall model value + Tau_Wall = (1.0/Density_Wall)*pow(Y_Plus*Lam_Visc_Wall/WallDistMod,2.0); + + + for (auto iDim = 0u; iDim < nDim; iDim++) + CSkinFriction[iMarker][iVertex][iDim] = (Tau_Wall/WallShearStress)*TauTangent[iDim] / (0.5 * RefDensity * RefVel2); + + + + + nodes->SetTauWall(iPoint,Tau_Wall); + // for compressible flow: + //nodes->SetTemperature(iPoint,T_Wall); + //nodes->SetSolution(iPoint, 0, Density_Wall); + //nodes->SetPrimitive(iPoint, nDim + 1, P_Wall); + // for incompressible flow: + // ...? + + //} + } + } + } + +} diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 45877d85888..c4f90af8fbc 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -246,8 +246,8 @@ void CNSSolver::Buffet_Monitoring(const CGeometry *geometry, const CConfig *conf SkinFrictionMag = 0.0; SkinFrictionDot = 0.0; for(iDim = 0; iDim < nDim; iDim++){ - SkinFrictionMag += pow(CSkinFriction[iMarker][iDim][iVertex], 2); - SkinFrictionDot += CSkinFriction[iMarker][iDim][iVertex]*Vel_FS[iDim]; + SkinFrictionMag += pow(CSkinFriction[iMarker][iVertex][iDim], 2); + SkinFrictionDot += CSkinFriction[iMarker][iVertex][iDim]*Vel_FS[iDim]; } SkinFrictionMag = sqrt(SkinFrictionMag); @@ -781,7 +781,7 @@ void CNSSolver::BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **solver BC_Isothermal_Wall_Generic(geometry, solver_container, conv_numerics, nullptr, config, val_marker, true); } -void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config) { +void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, CConfig *config) { const su2double Gas_Constant = config->GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; diff --git a/SU2_CFD/src/solvers/CTurbSASolver.cpp b/SU2_CFD/src/solvers/CTurbSASolver.cpp index 0c3ea4147e3..25a6c9a8223 100644 --- a/SU2_CFD/src/solvers/CTurbSASolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSASolver.cpp @@ -618,8 +618,13 @@ void CTurbSASolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container, CN conv_numerics->SetPrimitive(V_domain, V_inlet); /*--- Set the turbulent variable states (prescribed for an inflow) ---*/ + + //Solution_i[0] = nodes->GetSolution(iPoint,0); + /*--- Load the inlet turbulence variable (uniform by default). ---*/ + //Solution_j[0] = Inlet_TurbVars[val_marker][iVertex][0]; + conv_numerics->SetTurbVar(nodes->GetSolution(iPoint), Inlet_TurbVars[val_marker][iVertex]); /*--- Set various other quantities in the conv_numerics class ---*/ @@ -1597,20 +1602,15 @@ void CTurbSASolver::BC_NearField_Boundary(CGeometry *geometry, CSolver **solver_ void CTurbSASolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, const CConfig *config, unsigned short val_marker) { - const su2double Gas_Constant = config->GetGas_ConstantND(); - const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; - constexpr unsigned short max_iter = 100; - const su2double tol = 1e-10; - /*--- Compute the recovery factor ---*/ - // su2double-check: laminar or turbulent Pr for this? - const su2double Recovery = pow(config->GetPrandtl_Lam(),(1.0/3.0)); + /* --- tolerance has LARGE impact on convergence, do not increase this value! --- */ + const su2double tol = 1e-12; /*--- Typical constants from boundary layer theory ---*/ - const su2double kappa = 0.4; - const su2double B = 5.5; + //const su2double kappa = 0.4; + //const su2double B = 5.5; const su2double cv1_3 = 7.1*7.1*7.1; CVariable* flow_nodes = solver_container[FLOW_SOL]->GetNodes(); @@ -1619,110 +1619,42 @@ void CTurbSASolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_containe for (auto iVertex = 0u; iVertex < geometry->nVertex[val_marker]; iVertex++) { - const auto Point_Normal = geometry->vertex[val_marker][iVertex]->GetNormal_Neighbor(); - - if (!geometry->nodes->GetDomain(Point_Normal)) continue; - const auto iPoint = geometry->vertex[val_marker][iVertex]->GetNode(); + const auto iPoint_Neighbor = geometry->vertex[val_marker][iVertex]->GetNormal_Neighbor(); - /*--- Compute dual-grid area and boundary normal ---*/ - - const auto Normal = geometry->vertex[val_marker][iVertex]->GetNormal(); - - su2double Area = GeometryToolbox::Norm(nDim, Normal); - - su2double UnitNormal[MAXNDIM] = {0.0}; - for (auto iDim = 0u; iDim < nDim; iDim++) - UnitNormal[iDim] = -Normal[iDim]/Area; - - /*--- Get the velocity, pressure, and temperature at the nearest - (normal) interior point. ---*/ - - su2double Vel[MAXNDIM] = {0.0}; - for (auto iDim = 0u; iDim < nDim; iDim++) - Vel[iDim] = flow_nodes->GetVelocity(Point_Normal,iDim); - su2double P_Normal = flow_nodes->GetPressure(Point_Normal); - su2double T_Normal = flow_nodes->GetTemperature(Point_Normal); - - /*--- Compute the wall-parallel velocity at first point off the wall ---*/ - - su2double VelNormal = GeometryToolbox::DotProduct(int(MAXNDIM), Vel, UnitNormal); - - su2double VelTang[MAXNDIM] = {0.0}; - for (auto iDim = 0u; iDim < nDim; iDim++) - VelTang[iDim] = Vel[iDim] - VelNormal*UnitNormal[iDim]; - - su2double VelTangMod = GeometryToolbox::Norm(int(MAXNDIM), VelTang); - - /*--- Compute the wall temperature using the Crocco-Buseman equation ---*/ - - //T_Wall = T_Normal * (1.0 + 0.5*Gamma_Minus_One*Recovery*M_Normal*M_Normal); - su2double T_Wall = T_Normal + Recovery*pow(VelTangMod,2.0)/(2.0*Cp); - - /*--- Extrapolate the pressure from the interior & compute the - wall density using the equation of state ---*/ - - su2double P_Wall = P_Normal; - su2double Density_Wall = P_Wall/(Gas_Constant*T_Wall); - - /*--- Get wall shear stress computed by flow solver ---*/ - - su2double Lam_Visc_Wall = flow_nodes->GetLaminarViscosity(iPoint); - su2double Tau_Wall = flow_nodes->GetTauWall(iPoint); - - /*--- Friction velocity and u+ ---*/ - - su2double U_Tau = sqrt(Tau_Wall/Density_Wall); - su2double U_Plus = VelTangMod/U_Tau; - - /*--- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) ---*/ - - su2double Gam = Recovery*U_Tau*U_Tau/(2.0*Cp*T_Wall); - su2double Beta = 0.0; // For adiabatic flows only - su2double Q = sqrt(Beta*Beta + 4.0*Gam); - su2double Phi = asin(-1.0*Beta/Q); - - /*--- Y+ defined by White & Christoph (compressibility and heat transfer) - negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ - - su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); - - /*--- Now compute the Eddy viscosity at the first point off of the wall ---*/ - - su2double Lam_Visc_Normal = flow_nodes->GetLaminarViscosity(Point_Normal); - su2double Density_Normal = flow_nodes->GetDensity(Point_Normal); + su2double Lam_Visc_Normal = flow_nodes->GetLaminarViscosity(iPoint_Neighbor); + su2double Density_Normal = flow_nodes->GetDensity(iPoint_Neighbor); su2double Kin_Visc_Normal = Lam_Visc_Normal/Density_Normal; - su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); - su2double Eddy_Visc = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp(-1.0*kappa*B)* - (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0) - - Lam_Visc_Normal/Lam_Visc_Wall); - - /*--- Eddy viscosity should be always a positive number ---*/ - - Eddy_Visc = max(0.0, Eddy_Visc); + su2double Eddy_Visc = solver_container[FLOW_SOL]->GetEddyViscWall(val_marker, iVertex); /*--- Solve for the new value of nu_tilde given the eddy viscosity and using a Newton method ---*/ + // start with positive value of nu_til_old + su2double nu_til = 0.0; su2double nu_til_old = nodes->GetSolution(iPoint,0); unsigned short counter = 0; su2double diff = 1.0; while (diff > tol) { + // note the error in Nichols and Nelson + su2double func = nu_til_old*nu_til_old*nu_til_old*nu_til_old - (Eddy_Visc/Density_Normal)*(nu_til_old*nu_til_old*nu_til_old + Kin_Visc_Normal*Kin_Visc_Normal*Kin_Visc_Normal*cv1_3); + su2double func_prim = 4.0 * nu_til_old*nu_til_old*nu_til_old - 3.0*(Eddy_Visc/Density_Normal)*(nu_til_old*nu_til_old); - su2double const_term = (Eddy_Visc/Density_Normal) * pow(Kin_Visc_Normal,3)*cv1_3; - - su2double nu_til_2 = pow(nu_til_old,2); - su2double nu_til_3 = nu_til_old * nu_til_2; - - su2double func = nu_til_old * (nu_til_3 - (Eddy_Visc/Density_Normal)*nu_til_2) + const_term; - su2double func_prime = 4.0*nu_til_3 - 3.0*(Eddy_Visc/Density_Normal)*nu_til_2; - su2double nu_til = nu_til_old - func/func_prime; + // damped Newton method + nu_til = nu_til_old - 0.5*(func/func_prim); diff = fabs(nu_til-nu_til_old); nu_til_old = nu_til; + // sometimes we get negative values when the solution has not converged yet, we just reset the nu_tilde in that case. + if (nu_til_old max_iter) { cout << "WARNING: Nu_tilde evaluation has not converged." << endl; @@ -1730,12 +1662,16 @@ void CTurbSASolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_containe } } - nodes->SetSolution_Old(Point_Normal, 0, nu_til_old); - LinSysRes.SetBlock_Zero(Point_Normal); + su2double Sol[nVar]; + for (auto iVar = 0u; iVar < nVar; iVar++) + Sol[iVar] = nu_til; + + nodes->SetSolution_Old(iPoint_Neighbor,Sol); + LinSysRes.SetBlock_Zero(iPoint_Neighbor); /*--- includes 1 in the diagonal ---*/ - Jacobian.DeleteValsRowi(Point_Normal); + Jacobian.DeleteValsRowi(iPoint_Neighbor); } diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 0a560888d9f..a44b64672a6 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -403,6 +403,17 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont const auto iPoint = geometry->vertex[val_marker][iVertex]->GetNode(); + + /*--- Evaluate nu tilde at the closest point to the surface using the wall functions. ---*/ + + if (config->GetWall_Functions()) { + /*SU2_OMP_MASTER*/ + SetNuTilde_WF(geometry, solver_container, conv_numerics, visc_numerics, config, val_marker); + /*SU2_OMP_BARRIER*/ + return; + } + + /*--- Check if the node belongs to the domain (i.e, not a halo node) ---*/ if (geometry->nodes->GetDomain(iPoint)) { @@ -473,6 +484,77 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont } } + +void CTurbSSTSolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, + CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) { + + const unsigned short max_iter = 100; + + /* --- tolerance has LARGE impact on convergence, do not increase this value! --- */ + const su2double tol = 1e-12; + + /*--- Typical constants from boundary layer theory ---*/ + + const su2double kappa = 0.4; + //const su2double B = 5.5; + const su2double cv1_3 = 7.1*7.1*7.1; + + + /*--- Loop over all of the vertices on this boundary marker ---*/ + + 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(); + + su2double Lam_Visc_Normal = solver_container[FLOW_SOL]->GetNodes()->GetLaminarViscosity(iPoint_Neighbor); + su2double Density_Normal = solver_container[FLOW_SOL]->GetNodes()->GetDensity(iPoint_Neighbor); + su2double Kin_Visc_Normal = Lam_Visc_Normal/Density_Normal; + + su2double Eddy_Visc = solver_container[FLOW_SOL]->GetEddyViscWall(val_marker, iVertex); + + /*--- Solve for the new value of nu_tilde given the eddy viscosity and using a Newton method ---*/ + + // sst model + su2double solution[2]; + + su2double omega1,omega0,y_plus,y,k_new,omega_new; + su2double k = nodes->GetSolution(iPoint_Neighbor,0); + su2double omega = nodes->GetSolution(iPoint_Neighbor,1); + + su2double Lam_Visc_Wall = solver_container[FLOW_SOL]->GetNodes()->GetLaminarViscosity(iPoint); + su2double Density_Wall = solver_container[FLOW_SOL]->GetNodes()->GetDensity(iPoint); + + su2double Y_Plus = solver_container[FLOW_SOL]->GetYPlus(val_marker, iVertex); + su2double U_Tau = solver_container[FLOW_SOL]->GetUTau(val_marker, iVertex); + + + y = Y_Plus*Lam_Visc_Wall/(Density_Wall*U_Tau); + + omega1 = 6.0*Lam_Visc_Wall/(0.075*Density_Wall*y*y); // eq. 19 + omega0 = U_Tau/(sqrt(0.09)*kappa*y); // eq. 20 + omega_new = sqrt(omega0*omega0 + omega1*omega1); // eq. 21 Nichols & Nelson + k_new = omega_new * Eddy_Visc/Density_Wall; // eq. 22 Nichols & Nelson + // (is this the correct density? paper says rho and not rho_w) + + // put some relaxation factor on the k-omega values + k += 0.5*(k_new - k); + omega += 0.5*(omega_new - omega); + + su2double Sol[nVar]; + //for (iVar = 0; iVar < nVar; iVar++) + Sol[0] = k; + Sol[1] = omega; + + nodes->SetSolution_Old(iPoint_Neighbor,Sol); + LinSysRes.SetBlock_Zero(iPoint_Neighbor); + + /*--- includes 1 in the diagonal ---*/ + Jacobian.DeleteValsRowi(iPoint_Neighbor*nVar); + Jacobian.DeleteValsRowi(iPoint_Neighbor*nVar+1); + + } +} + void CTurbSSTSolver::BC_Isothermal_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) { From 6be56706740bbf162a8941bc3ad530ab6328a7bb Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Mon, 22 Feb 2021 21:28:30 +0100 Subject: [PATCH 02/88] cleaning up wall model implementation --- SU2_CFD/include/solvers/CNSSolver.hpp | 14 ++------------ SU2_CFD/src/numerics/flow/flow_sources.cpp | 19 +++++++++++++++++++ SU2_CFD/src/output/CFlowIncOutput.cpp | 4 ---- SU2_CFD/src/solvers/CIncNSSolver.cpp | 10 +++++----- SU2_CFD/src/solvers/CNSSolver.cpp | 2 +- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 6 +++--- 6 files changed, 30 insertions(+), 25 deletions(-) diff --git a/SU2_CFD/include/solvers/CNSSolver.hpp b/SU2_CFD/include/solvers/CNSSolver.hpp index 5f26ffce1eb..ecb71c40c95 100644 --- a/SU2_CFD/include/solvers/CNSSolver.hpp +++ b/SU2_CFD/include/solvers/CNSSolver.hpp @@ -113,7 +113,7 @@ class CNSSolver final : public CEulerSolver { * \param[in] solver_container - Container vector with all the solutions. * \param[in] config - Definition of the particular problem. */ - //void SetTauWall_WF(CGeometry *geometry, CSolver** solver_container, const CConfig* config); + void SetTauWall_WF(CGeometry *geometry, CSolver** solver_container, const CConfig* config); public: /*! @@ -233,14 +233,4 @@ class CNSSolver final : public CEulerSolver { return Buffet_Sensor[val_marker][val_vertex]; } - /*! - * \brief Computes the wall shear stress (Tau_Wall) on the surface using a wall function. - * \param[in] geometry - Geometrical definition of the problem. - * \param[in] solver_container - Container vector with all the solutions. - * \param[in] config - Definition of the particular problem. - */ - void SetTauWall_WF(CGeometry *geometry, - CSolver** solver_container, - CConfig* config) override; - -}; + diff --git a/SU2_CFD/src/numerics/flow/flow_sources.cpp b/SU2_CFD/src/numerics/flow/flow_sources.cpp index 2309c2f9045..6a96324792e 100644 --- a/SU2_CFD/src/numerics/flow/flow_sources.cpp +++ b/SU2_CFD/src/numerics/flow/flow_sources.cpp @@ -624,14 +624,26 @@ CNumerics::ResidualType<> CSourceWindGust::ComputeResidual(const CConfig* config u_gust = WindGust_i[0]; v_gust = WindGust_i[1]; +// w_gust = WindGust_i[2]; if (GustDir == X_DIR) { du_gust_dx = WindGustDer_i[0]; du_gust_dy = WindGustDer_i[1]; + //du_gust_dz = WindGustDer_i[2]; du_gust_dt = WindGustDer_i[2]; + dv_gust_dx = 0.0; dv_gust_dy = 0.0; + //dv_gust_dz = 0.0; dv_gust_dt = 0.0; + + //dw_gust_dx = 0.0; + //dw_gust_dy = 0.0; + //dw_gust_dz = 0.0; + //dw_gust_dt = WindGustDer_i[2]; + + + } else { du_gust_dx = 0.0; du_gust_dy = 0.0; @@ -645,18 +657,25 @@ CNumerics::ResidualType<> CSourceWindGust::ComputeResidual(const CConfig* config /*--- Primitive variables at point i ---*/ u = V_i[1]; v = V_i[2]; + // w = V_i[3] + p = V_i[nDim+1]; rho = V_i[nDim+2]; /*--- Source terms ---*/ smx = rho*(du_gust_dt + (u+u_gust)*du_gust_dx + (v+v_gust)*du_gust_dy); smy = rho*(dv_gust_dt + (u+u_gust)*dv_gust_dx + (v+v_gust)*dv_gust_dy); + /* + smz = rho*(dw_gust_dt + (u+u_gust)*dw_gust_dx + (v+v_gust)*dw_gust_dy) + (w+w_gust)*dw_gust_dz; + */ se = u*smx + v*smy + p*(du_gust_dx + dv_gust_dy); + //se = u*smx + v*smy + w*smz + p*(du_gust_dx + dv_gust_dy + dw_gust_dz); if (nDim == 2) { residual[0] = 0.0; residual[1] = smx*Volume; residual[2] = smy*Volume; + //residual[3] = smz*Volume; residual[3] = se*Volume; } else { SU2_MPI::Error("You should only be in the gust source term in two dimensions", CURRENT_FUNCTION); diff --git a/SU2_CFD/src/output/CFlowIncOutput.cpp b/SU2_CFD/src/output/CFlowIncOutput.cpp index 6833aac9778..46211a0992c 100644 --- a/SU2_CFD/src/output/CFlowIncOutput.cpp +++ b/SU2_CFD/src/output/CFlowIncOutput.cpp @@ -651,14 +651,10 @@ void CFlowIncOutput::LoadVolumeData(CConfig *config, CGeometry *geometry, CSolve void CFlowIncOutput::LoadSurfaceData(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned long iPoint, unsigned short iMarker, unsigned long iVertex){ if ((config->GetKind_Solver() == INC_NAVIER_STOKES) || (config->GetKind_Solver() == INC_RANS)) { - - SetVolumeOutputValue("SKIN_FRICTION-X", iPoint, solver[FLOW_SOL]->GetCSkinFriction(iMarker, iVertex, 0)); - SetVolumeOutputValue("SKIN_FRICTION-Y", iPoint, solver[FLOW_SOL]->GetCSkinFriction(iMarker, iVertex, 1)); if (nDim == 3) SetVolumeOutputValue("SKIN_FRICTION-Z", iPoint, solver[FLOW_SOL]->GetCSkinFriction(iMarker, iVertex, 2)); - if (weakly_coupled_heat) SetVolumeOutputValue("HEAT_FLUX", iPoint, solver[HEAT_SOL]->GetHeatFlux(iMarker, iVertex)); else { diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 159bbd4e7d0..78ec27f9971 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -62,7 +62,7 @@ void CIncNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container const bool center = (config->GetKind_ConvNumScheme_Flow() == SPACE_CENTERED); const bool limiter = (config->GetKind_SlopeLimit_Flow() != NO_LIMITER) && (InnerIter <= config->GetLimiterIter()); const bool van_albada = (config->GetKind_SlopeLimit_Flow() == VAN_ALBADA_EDGE); - const bool wall_functions = config->GetWall_Functions(); + const bool wall_functions = config->GetWall_Functions(); /*--- Common preprocessing steps (implemented by CEulerSolver) ---*/ @@ -102,11 +102,11 @@ void CIncNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container /*--- Compute the TauWall from the wall functions ---*/ if (wall_functions) { - /*SU2_OMP_MASTER*/ + SU2_OMP_MASTER SetTauWall_WF(geometry, solver_container, config); -// nijso: we have to set this as well?? -// seteddyviscfirstpoint - /*SU2_OMP_BARRIER*/ + // nijso: we have to set this as well?? + // seteddyviscfirstpoint + SU2_OMP_BARRIER } } diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index c4f90af8fbc..d1e4eb9199d 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -781,7 +781,7 @@ void CNSSolver::BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **solver BC_Isothermal_Wall_Generic(geometry, solver_container, conv_numerics, nullptr, config, val_marker, true); } -void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, CConfig *config) { +void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config) { const su2double Gas_Constant = config->GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index a44b64672a6..6ef7b6f1afd 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -407,9 +407,9 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont /*--- Evaluate nu tilde at the closest point to the surface using the wall functions. ---*/ if (config->GetWall_Functions()) { - /*SU2_OMP_MASTER*/ + SU2_OMP_MASTER SetNuTilde_WF(geometry, solver_container, conv_numerics, visc_numerics, config, val_marker); - /*SU2_OMP_BARRIER*/ + SU2_OMP_BARRIER return; } @@ -497,7 +497,7 @@ void CTurbSSTSolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_contain const su2double kappa = 0.4; //const su2double B = 5.5; - const su2double cv1_3 = 7.1*7.1*7.1; + //const su2double cv1_3 = 7.1*7.1*7.1; /*--- Loop over all of the vertices on this boundary marker ---*/ From a62a0b8e839058420e6275dea1ca3bee021cac9e Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Mon, 22 Feb 2021 21:46:57 +0100 Subject: [PATCH 03/88] cleaning up wall model implementation --- .../include/solvers/CFVMFlowSolverBase.hpp | 22 +++++++++---------- .../include/solvers/CFVMFlowSolverBase.inl | 9 +------- SU2_CFD/include/solvers/CNSSolver.hpp | 3 +-- SU2_CFD/src/numerics/flow/flow_sources.cpp | 18 +++++++++------ 4 files changed, 23 insertions(+), 29 deletions(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp b/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp index ec3955acc81..cee422fb1a7 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp @@ -2427,7 +2427,16 @@ class CFVMFlowSolverBase : public CSolver { return HeatConjugateVar[val_marker][val_vertex][pos_var]; } - + /*! + * \brief Get the skin friction coefficient. + * \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 skin friction coefficient. + */ + inline su2double GetCSkinFriction(unsigned short val_marker, unsigned long val_vertex, + unsigned short val_dim) const final { + return CSkinFriction[val_marker][val_vertex][val_dim]; + } /*! * \brief Get the wall shear stress. @@ -2469,16 +2478,6 @@ class CFVMFlowSolverBase : public CSolver { HeatFluxTarget[val_marker][val_vertex] = val_heat; } -/*! - * \brief Get the skin friction coefficient. - * \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 skin friction coefficient. - */ - inline su2double GetCSkinFriction(unsigned short val_marker, unsigned long val_vertex, - unsigned short val_dim) const final { - return CSkinFriction[val_marker][val_vertex][val_dim]; - } /*! * \brief Get the y plus. * \param[in] val_marker - Surface marker where the coefficient is computed. @@ -2489,7 +2488,6 @@ class CFVMFlowSolverBase : public CSolver { return YPlus[val_marker][val_vertex]; } - /*! * \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 59996c14ef8..2a32959ae24 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -210,14 +210,7 @@ void CFVMFlowSolverBase::Allocate(const CConfig& config) { /*--- Skin friction in all the markers ---*/ Alloc3D(nMarker,nVertex,nDim,CSkinFriction); - //CSkinFriction = new su2double**[nMarker]; - //for (iMarker = 0; iMarker < nMarker; iMarker++) { - // CSkinFriction[iMarker] = new su2double*[nVertex[iMarker]]; - // for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { - // CSkinFriction[iMarker][iVertex] = new su2double[nDim]() - // } - //} - + /*--- Wall Shear Stress in all the markers ---*/ Alloc2D(nMarker, nVertex, WallShearStress); diff --git a/SU2_CFD/include/solvers/CNSSolver.hpp b/SU2_CFD/include/solvers/CNSSolver.hpp index ecb71c40c95..fa2607884a0 100644 --- a/SU2_CFD/include/solvers/CNSSolver.hpp +++ b/SU2_CFD/include/solvers/CNSSolver.hpp @@ -232,5 +232,4 @@ class CNSSolver final : public CEulerSolver { inline su2double GetBuffetSensor(unsigned short val_marker, unsigned long val_vertex) const override { return Buffet_Sensor[val_marker][val_vertex]; } - - +}; \ No newline at end of file diff --git a/SU2_CFD/src/numerics/flow/flow_sources.cpp b/SU2_CFD/src/numerics/flow/flow_sources.cpp index 6a96324792e..2b811f415cc 100644 --- a/SU2_CFD/src/numerics/flow/flow_sources.cpp +++ b/SU2_CFD/src/numerics/flow/flow_sources.cpp @@ -640,18 +640,23 @@ CNumerics::ResidualType<> CSourceWindGust::ComputeResidual(const CConfig* config //dw_gust_dx = 0.0; //dw_gust_dy = 0.0; //dw_gust_dz = 0.0; - //dw_gust_dt = WindGustDer_i[2]; - - - + //dw_gust_dt = 0.0; } else { du_gust_dx = 0.0; du_gust_dy = 0.0; + //du_gust_dz = 0.0; du_gust_dt = 0.0; dv_gust_dx = WindGustDer_i[0]; dv_gust_dy = WindGustDer_i[1]; + //dv_gust_dz = WindGustDer_i[2] dv_gust_dt = WindGustDer_i[2]; + //dw_gust_dx = 0.0; + //dw_gust_dy = 0.0; + //dw_gust_dz = 0.0; + //dw_gust_dt = 0.0; + // + } /*--- Primitive variables at point i ---*/ @@ -665,9 +670,8 @@ CNumerics::ResidualType<> CSourceWindGust::ComputeResidual(const CConfig* config /*--- Source terms ---*/ smx = rho*(du_gust_dt + (u+u_gust)*du_gust_dx + (v+v_gust)*du_gust_dy); smy = rho*(dv_gust_dt + (u+u_gust)*dv_gust_dx + (v+v_gust)*dv_gust_dy); - /* - smz = rho*(dw_gust_dt + (u+u_gust)*dw_gust_dx + (v+v_gust)*dw_gust_dy) + (w+w_gust)*dw_gust_dz; - */ + //smz = rho*(dw_gust_dt + (u+u_gust)*dw_gust_dx + (v+v_gust)*dw_gust_dy) + (w+w_gust)*dw_gust_dz; + se = u*smx + v*smy + p*(du_gust_dx + dv_gust_dy); //se = u*smx + v*smy + w*smz + p*(du_gust_dx + dv_gust_dy + dw_gust_dz); From ecc7d3fdba6d5e5ae3c4cf33a994e27eed908567 Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Mon, 22 Feb 2021 22:22:51 +0100 Subject: [PATCH 04/88] cleaning up wall model implementation --- SU2_CFD/src/solvers/CIncNSSolver.cpp | 56 +++++++++++----------------- 1 file changed, 22 insertions(+), 34 deletions(-) diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 78ec27f9971..29ab606930d 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -402,13 +402,14 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container su2double UnitNormal[3]; su2double **grad_primvar, tau[3][3]; + su2double TauElem[MAXNDIM] = {0.0}; - su2double Vel[3], VelTang[3], VelTangMod, WallDist[3], WallDistMod; + su2double VelTangMod, WallDistMod; su2double T_Normal, P_Normal; su2double Density_Wall, T_Wall, P_Wall, Lam_Visc_Wall, Tau_Wall = 0.0; su2double diff, Delta, grad_diff; su2double U_Tau, U_Plus, Gam, Beta, Phi, Q, Y_Plus_White, Y_Plus; - su2double TauElem[3], TauNormal, TauTangent[3], WallShearStress; + su2double TauNormal, WallShearStress; su2double Gas_Constant = config->GetGas_ConstantND(); su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; su2double Eddy_Visc; @@ -463,7 +464,6 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container /*--- Check if the node belongs to the domain (i.e, not a halo node) and the neighbor is not part of the physical boundary ---*/ - //if (geometry->node[iPoint]->GetDomain()) { /*--- Get coordinates of the current vertex and nearest normal point ---*/ @@ -472,43 +472,43 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container /*--- Compute dual-grid area and boundary normal ---*/ - su2double *Normal = geometry->vertex[iMarker][iVertex]->GetNormal(); + // getnormal and not normal_neighbor + const auto Normal = geometry->vertex[iMarker][iVertex]->GetNormal(); geometry->vertex[iMarker][iVertex]->GetNormal(Vector); su2double Area = GeometryToolbox::Norm(nDim, Normal); - //su2double Area = 0.0; - //for (auto iDim = 0u; iDim < nDim; iDim++) - // Area += Normal[iDim]*Normal[iDim]; - //Area = sqrt (Area); + su2double UnitNormal[MAXNDIM] = {0.0}; for (auto iDim = 0u; iDim < nDim; iDim++) UnitNormal[iDim] = -Normal[iDim]/Area; /*--- Get the velocity, pressure, and temperature at the nearest (normal) interior point. ---*/ - + su2double Vel[MAXNDIM] = {0.0}; for (auto iDim = 0u; iDim < nDim; iDim++) Vel[iDim] = nodes->GetVelocity(Point_Normal,iDim); + P_Normal = nodes->GetPressure(Point_Normal); T_Normal = nodes->GetTemperature(Point_Normal); /*--- Compute the wall-parallel velocity at first point off the wall ---*/ - su2double VelNormal = 0.0; - for (auto iDim = 0u; iDim < nDim; iDim++) - VelNormal += Vel[iDim] * UnitNormal[iDim]; + //su2double VelNormal = 0.0; + //for (auto iDim = 0u; iDim < nDim; iDim++) + // VelNormal += Vel[iDim] * UnitNormal[iDim]; + + su2double VelNormal = GeometryToolbox::DotProduct(int(MAXNDIM), Vel, UnitNormal); + su2double VelTang[MAXNDIM] = {0.0}; for (auto iDim = 0u; iDim < nDim; iDim++) VelTang[iDim] = Vel[iDim] - VelNormal*UnitNormal[iDim]; - VelTangMod = 0.0; - for (auto iDim = 0u; iDim < nDim; iDim++) - VelTangMod += VelTang[iDim]*VelTang[iDim]; - VelTangMod = sqrt(VelTangMod); + su2double VelTangMod = GeometryToolbox::Norm(int(MAXNDIM), VelTang); /*--- Compute normal distance of the interior point from the wall ---*/ + su2double WallDist[MAXNDIM] = {0.0}; for (auto iDim = 0u; iDim < nDim; iDim++) WallDist[iDim] = (Coord[iDim] - Coord_Normal[iDim]); @@ -557,7 +557,6 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container + grad_primvar[iDim+1][jDim]) - TWO3*Lam_Visc_Wall*div_vel*Delta; } - TauElem[iDim] = 0.0; for (auto jDim = 0u; jDim < nDim; jDim++) TauElem[iDim] += tau[iDim][jDim]*UnitNormal[jDim]; } @@ -569,6 +568,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container for (auto iDim = 0u; iDim < nDim; iDim++) TauNormal += TauElem[iDim] * UnitNormal[iDim]; + su2double TauTangent[MAXNDIM] = {0.0}; for (auto iDim = 0u; iDim < nDim; iDim++) TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; @@ -576,7 +576,6 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container for (auto iDim = 0u; iDim < nDim; iDim++) WallShearStress += TauTangent[iDim]*TauTangent[iDim]; - // computed value WallShearStress = sqrt(WallShearStress); /*--- Calculate the quantities from boundary layer theory and @@ -592,7 +591,6 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container /*--- Automatic switch off when y+ < 5 according to Nichols & Nelson (2004) ---*/ if (Y_Plus_Start < 5.0) { - //nodes->SetTauWall_Flag(iPoint,false); continue; } @@ -631,6 +629,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container diff = (Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall) - Y_Plus; /* --- Gradient of function defined above --- */ + grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + kappa /(U_Tau * sqrt(Gam)) * asin(U_Plus * sqrt(Gam)) * Y_Plus_White - exp(-1.0 * B * kappa) * (0.5 * pow(VelTangMod * kappa / U_Tau, 3) + @@ -641,23 +640,14 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container U_Tau = U_Tau - 0.5*(diff / grad_diff); counter++; + + /* --- if we do not converge, then something serious is going on and we stop --- */ + if (counter == max_iter) { - if (debug){ - cout << "WARNING: Y_Plus evaluation has not converged in CIncNSSolver.cpp" << endl; - cout << rank << " " << iPoint; - for (auto iDim = 0u; iDim < nDim; iDim++) - cout << " " << Coord[iDim]; - cout << endl; - } - //converged = false; - //nodes->SetTauWall_Flag(iPoint,false); - break; + SU2_MPI::Error("Y+ did not converge within the max number of iterations!",CURRENT_FUNCTION); } } - /* --- If not converged jump to the next point. --- */ - - //if (!converged) continue; /*--- Calculate an updated value for the wall shear stress using the y+ value, the definition of y+, and the definition of @@ -674,8 +664,6 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container for (auto iDim = 0u; iDim < nDim; iDim++) CSkinFriction[iMarker][iVertex][iDim] = (Tau_Wall/WallShearStress)*TauTangent[iDim] / (0.5 * RefDensity * RefVel2); - - nodes->SetTauWall(iPoint,Tau_Wall); // for compressible flow: From 37059417adb7eb402fcdc73ef9bdee5a66dd62e7 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 24 Feb 2021 13:36:07 +0100 Subject: [PATCH 05/88] Update SU2_CFD/include/solvers/CFVMFlowSolverBase.inl Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> --- SU2_CFD/include/solvers/CFVMFlowSolverBase.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index be471d40566..8489383cc67 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2561,7 +2561,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr bool nemo = config->GetNEMOProblem(); bool wallfunctions=false; - for (iDim = 0; iDim < nDim; iDim++) RefVel2 += Velocity_Inf[iDim] * Velocity_Inf[iDim]; +RefVel2 = GeometryToolbox::SquaredNorm(nDim, Velocity_Inf); /*--- Get the locations of the primitive variables for NEMO ---*/ From 25fd773e4dff0867a1c6af6d809839d5ac1ef265 Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Wed, 24 Feb 2021 14:28:20 +0100 Subject: [PATCH 06/88] merge develop back in --- .../include/solvers/CFVMFlowSolverBase.hpp | 11 ++-- .../include/solvers/CFVMFlowSolverBase.inl | 51 ++++++++++--------- SU2_CFD/src/solvers/CIncNSSolver.cpp | 9 ++-- 3 files changed, 41 insertions(+), 30 deletions(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp b/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp index cee422fb1a7..ee782561d12 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp @@ -156,10 +156,15 @@ class CFVMFlowSolverBase : public CSolver { su2double*** HeatConjugateVar = nullptr; /*!< \brief CHT variables for each boundary and vertex. */ su2double** CPressure = nullptr; /*!< \brief Pressure coefficient for each boundary and vertex. */ su2double** CPressureTarget = nullptr; /*!< \brief Target Pressure coefficient for each boundary and vertex. */ - su2double** YPlus = nullptr; /*!< \brief Yplus for each boundary and vertex. */ - su2double** UTau = nullptr; /*!< \brief UTau for each boundary and vertex. */ - su2double** EddyViscWall = nullptr; /*!< \brief Wall Eddy Viscosity for each boundary and vertex. */ + //su2double** YPlus = nullptr; /*!< \brief Yplus for each boundary and vertex. */ + //su2double** UTau = nullptr; /*!< \brief UTau for each boundary and vertex. */ + //su2double** EddyViscWall = nullptr; /*!< \brief Wall Eddy Viscosity for each boundary and vertex. */ +vector > YPlus; +vector > UTau; +vector > EddyViscWall; + + bool space_centered; /*!< \brief True if space centered scheeme used. */ bool euler_implicit; /*!< \brief True if euler implicit scheme used. */ diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index 2a32959ae24..752c3c39399 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -84,7 +84,7 @@ void CFVMFlowSolverBase::AeroCoeffsArray::setZero(int i) { template void CFVMFlowSolverBase::Allocate(const CConfig& config) { - unsigned short iDim, iVar, iMarker; + unsigned short iVar, iMarker; unsigned long iPoint, iVertex; /*--- Define some auxiliar vector related with the residual ---*/ @@ -197,15 +197,18 @@ void CFVMFlowSolverBase::Allocate(const CConfig& config) { /*--- Y plus in all the markers ---*/ - Alloc2D(nMarker, nVertex, YPlus); + //Alloc2D(nMarker, nVertex, YPlus); + YPlus.resize(nMarker, vector(nVertex)); /*--- U Tau in all the markers ---*/ - Alloc2D(nMarker, nVertex, UTau); + //Alloc2D(nMarker, nVertex, UTau); + UTau.resize(nMarker,vector(nVertex)); /*--- wall eddy viscosity in all the markers ---*/ - Alloc2D(nMarker, nVertex, EddyViscWall); + //Alloc2D(nMarker, nVertex, EddyViscWall); + EddyViscWall.resize(nMarker,vector(nVertex)); /*--- Skin friction in all the markers ---*/ @@ -379,7 +382,7 @@ void CFVMFlowSolverBase::HybridParallelInitialization(const CConfig& confi template CFVMFlowSolverBase::~CFVMFlowSolverBase() { - unsigned short iMarker, iVar, iDim; + unsigned short iMarker, iVar; unsigned long iVertex; delete[] CNearFieldOF_Inv; @@ -463,27 +466,27 @@ CFVMFlowSolverBase::~CFVMFlowSolverBase() { delete[] HeatFluxTarget; } - if (YPlus != nullptr) { - for (iMarker = 0; iMarker < nMarker; iMarker++) { - delete[] YPlus[iMarker]; - } - delete[] YPlus; - } + //if (YPlus != nullptr) { + // for (iMarker = 0; iMarker < nMarker; iMarker++) { + // delete[] YPlus[iMarker]; + // } + // delete[] YPlus; + //} - if (UTau != nullptr) { - for (iMarker = 0; iMarker < nMarker; iMarker++) { - delete[] UTau[iMarker]; - } - delete[] UTau; - } + //if (UTau != nullptr) { + // for (iMarker = 0; iMarker < nMarker; iMarker++) { + // delete[] UTau[iMarker]; + // } + // delete[] UTau; + // } - if (EddyViscWall != nullptr) { - for (iMarker = 0; iMarker < nMarker; iMarker++) { - delete[] EddyViscWall[iMarker]; - } - delete[] EddyViscWall; - } +// if (EddyViscWall != nullptr) { +// for (iMarker = 0; iMarker < nMarker; iMarker++) { +// delete[] EddyViscWall[iMarker]; +// } +// delete[] EddyViscWall; +// } if (CSkinFriction != nullptr) { for (iMarker = 0; iMarker < nMarker; iMarker++) { @@ -2692,6 +2695,8 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr if (!wallfunctions) YPlus[iMarker][iVertex] = WallDistMod * FrictionVel / (Viscosity / Density); + + /*--- Compute total and maximum heat flux on the wall ---*/ /// TODO: Move these ifs to specialized functions. diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 29ab606930d..51bfbb54bed 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -420,10 +420,11 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container /*--- Get the freestream velocity magnitude for non-dim. purposes ---*/ su2double *VelInf = config->GetVelocity_FreeStreamND(); - su2double VelInfMod = 0.0; - for (auto iDim = 0u; iDim < nDim; iDim++) - VelInfMod += VelInf[iDim]; - VelInfMod = sqrt(VelInfMod); + + //su2double VelInfMod = 0.0; + //for (auto iDim = 0u; iDim < nDim; iDim++) + // VelInfMod += VelInf[iDim]; + //VelInfMod = sqrt(VelInfMod); /*--- Compute the recovery factor ---*/ // Double-check: laminar or turbulent Pr for this? From dbde0f7fd1cca8f15c9a13b1404f3ffa10a4eac4 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 3 Mar 2021 07:42:38 +0100 Subject: [PATCH 07/88] Update SU2_CFD/include/solvers/CFVMFlowSolverBase.inl Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/include/solvers/CFVMFlowSolverBase.inl | 1 - 1 file changed, 1 deletion(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index 7c4f233cb98..23c0bed6234 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -131,7 +131,6 @@ void CFVMFlowSolverBase::Allocate(const CConfig& config) { for (unsigned long i = 0; i < M; ++i) X[i].resize(N[i],P) = su2double(0.0); }; - /*--- Store the value of the characteristic primitive variables at the boundaries ---*/ Alloc3D(nMarker, nVertex, nPrimVar, CharacPrimVar); From 8e4c4b80825e26c8dc68fc10ce5e464d30b448e6 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 3 Mar 2021 07:43:08 +0100 Subject: [PATCH 08/88] Update SU2_CFD/include/solvers/CFVMFlowSolverBase.inl Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/include/solvers/CFVMFlowSolverBase.inl | 1 - 1 file changed, 1 deletion(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index 23c0bed6234..fed98eea856 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2487,7 +2487,6 @@ RefVel2 = GeometryToolbox::SquaredNorm(nDim, Velocity_Inf); if (Monitoring == YES) { for (iMarker_Monitoring = 0; iMarker_Monitoring < config->GetnMarker_Monitoring(); iMarker_Monitoring++) { Monitoring_Tag = config->GetMarker_Monitoring_TagBound(iMarker_Monitoring); - //Marker_Tag = config->GetMarker_All_TagBound(iMarker); if (Marker_Tag == Monitoring_Tag) Origin = config->GetRefOriginMoment(iMarker_Monitoring); } } From f7972ae3da7ad3b1b316a3082c06a103491118b7 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 3 Mar 2021 14:13:43 +0100 Subject: [PATCH 09/88] Update SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp spaces Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp b/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp index 91d973aed29..d360ee79f3e 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp @@ -160,9 +160,6 @@ class CFVMFlowSolverBase : public CSolver { vector > UTau; /*!< \brief UTau for each boundary and vertex. */ vector > EddyViscWall; /*!< \brief Eddy viscosuty at the wall for each boundary and vertex. */ - - - bool space_centered; /*!< \brief True if space centered scheme used. */ bool euler_implicit; /*!< \brief True if euler implicit scheme used. */ bool least_squares; /*!< \brief True if computing gradients by least squares. */ From b15e5f96152c8334c40383b8818ae48e69b02381 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 3 Mar 2021 14:13:56 +0100 Subject: [PATCH 10/88] Update SU2_CFD/include/solvers/CFVMFlowSolverBase.inl spaces Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/include/solvers/CFVMFlowSolverBase.inl | 1 - 1 file changed, 1 deletion(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index fed98eea856..ff6791fc128 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -206,7 +206,6 @@ void CFVMFlowSolverBase::Allocate(const CConfig& config) { /*--- Skin friction in all the markers ---*/ Alloc3D(nMarker, nVertex, nDim, CSkinFriction); - /*--- Wall Shear Stress in all the markers ---*/ Alloc2D(nMarker, nVertex, WallShearStress); From f3551d8f7fe486f0d88f10da92509bd977d862b8 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 3 Mar 2021 14:14:18 +0100 Subject: [PATCH 11/88] Update SU2_CFD/include/solvers/CFVMFlowSolverBase.inl refvel Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/include/solvers/CFVMFlowSolverBase.inl | 3 --- 1 file changed, 3 deletions(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index ff6791fc128..d755a73b3fe 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2446,9 +2446,6 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr bool nemo = config->GetNEMOProblem(); bool wallfunctions=false; -RefVel2 = GeometryToolbox::SquaredNorm(nDim, Velocity_Inf); - - /*--- Get the locations of the primitive variables for NEMO ---*/ if (nemo) { unsigned short nSpecies = config->GetnSpecies(); From 51da480fee3b5824404cdfa2ed91655b6759569a Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 3 Mar 2021 14:14:46 +0100 Subject: [PATCH 12/88] Update SU2_CFD/include/solvers/CFVMFlowSolverBase.inl const bool Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/include/solvers/CFVMFlowSolverBase.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index d755a73b3fe..c4242178809 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2499,7 +2499,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr /* --- check if wall functions are used --- */ - wallfunctions = (config->GetWallFunction_Treatment(Marker_Tag) != NO_WALL_FUNCTION); + const bool wallfunctions = (config->GetWallFunction_Treatment(Marker_Tag) != NO_WALL_FUNCTION); /*--- Loop over the vertices to compute the forces ---*/ From f3f71395b424f6a82e112acaeb72b7101b3c8b8b Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 3 Mar 2021 14:15:15 +0100 Subject: [PATCH 13/88] Update SU2_CFD/include/solvers/CFVMFlowSolverBase.inl spaces Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/include/solvers/CFVMFlowSolverBase.inl | 2 -- 1 file changed, 2 deletions(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index c4242178809..586eca688aa 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2583,8 +2583,6 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr if (!wallfunctions) YPlus[iMarker][iVertex] = WallDistMod * FrictionVel / (Viscosity / Density); - - /*--- Compute total and maximum heat flux on the wall ---*/ /// TODO: Move these ifs to specialized functions. From de8f6cddfbf6dba601d02cbd0b8474e46fbbe369 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 3 Mar 2021 14:15:48 +0100 Subject: [PATCH 14/88] Update SU2_CFD/src/solvers/CTurbSSTSolver.cpp spaces Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 5d1775abe43..26440866286 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -379,14 +379,9 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont /*--- Evaluate nu tilde at the closest point to the surface using the wall functions. ---*/ if (config->GetWall_Functions()) { - - SU2_OMP_FOR_STAT(OMP_MIN_SIZE) - for (auto iVertex = 0u; iVertex < geometry->nVertex[val_marker]; iVertex++) { - - SU2_OMP_MASTER - SetNuTilde_WF(geometry, solver_container, conv_numerics, visc_numerics, config, val_marker); - SU2_OMP_BARRIER - } + SU2_OMP_MASTER + SetNuTilde_WF(geometry, solver_container, conv_numerics, visc_numerics, config, val_marker); + SU2_OMP_BARRIER return; } From ae7687e8d84e865c28144e6af0bec56901fc4a0d Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 3 Mar 2021 14:31:01 +0100 Subject: [PATCH 15/88] Update SU2_CFD/include/solvers/CIncNSSolver.hpp spaces Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/include/solvers/CIncNSSolver.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/SU2_CFD/include/solvers/CIncNSSolver.hpp b/SU2_CFD/include/solvers/CIncNSSolver.hpp index 69e9af70519..beef935f439 100644 --- a/SU2_CFD/include/solvers/CIncNSSolver.hpp +++ b/SU2_CFD/include/solvers/CIncNSSolver.hpp @@ -184,6 +184,4 @@ class CIncNSSolver final : public CIncEulerSolver { CConfig *config, unsigned short val_marker) override; - - }; From 7b61985edf6f2fcbe1d90a8a0ae0778f2b9822b3 Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Wed, 17 Mar 2021 20:29:31 +0100 Subject: [PATCH 16/88] small update --- SU2_CFD/src/solvers/CTurbSASolver.cpp | 2 +- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SU2_CFD/src/solvers/CTurbSASolver.cpp b/SU2_CFD/src/solvers/CTurbSASolver.cpp index e2866c16bdb..dc77ad37c62 100644 --- a/SU2_CFD/src/solvers/CTurbSASolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSASolver.cpp @@ -1619,7 +1619,7 @@ void CTurbSASolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_containe } } - su2double Sol[nVar]; + su2double Sol[MAXNVAR]; for (auto iVar = 0u; iVar < nVar; iVar++) Sol[iVar] = nu_til; diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 859b9a11705..0017d91f942 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -514,7 +514,7 @@ void CTurbSSTSolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_contain k += 0.5*(k_new - k); omega += 0.5*(omega_new - omega); - su2double solution[nVar]; + su2double solution[MAXNVAR]; solution[0] = k; solution[1] = omega; From 658e7cb779fa89be12c33d90c4600215872a2ecf Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 17 Mar 2021 22:15:48 +0100 Subject: [PATCH 17/88] Update SU2_CFD/include/solvers/CSolver.hpp away with the comment blocks! Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/include/solvers/CSolver.hpp | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/SU2_CFD/include/solvers/CSolver.hpp b/SU2_CFD/include/solvers/CSolver.hpp index 76487ad7155..a6e082893f0 100644 --- a/SU2_CFD/include/solvers/CSolver.hpp +++ b/SU2_CFD/include/solvers/CSolver.hpp @@ -3958,29 +3958,6 @@ class CSolver { */ inline virtual unsigned long GetnDOFsGlobal(void) const { return 0; } - /*! - * \brief A virtual member. - * \param[in] geometry - Geometrical definition of the problem. - * \param[in] solver_container - Container vector with all the solutions. - * \param[in] config - Definition of the particular problem. - */ - //inline virtual void SetTauWall_WF(CGeometry *geometry, - // CSolver** solver_container, - // CConfig* config) { } - - /*! - * \brief A virtual member. - * \param[in] geometry - Geometrical definition of the problem. - * \param[in] solver_container - Container vector with all the solutions. - * \param[in] config - Definition of the particular problem. - */ - //inline virtual void SetNuTilde_WF(CGeometry *geometry, - // CSolver **solver_container, - // CNumerics *conv_numerics, - // CNumerics *visc_numerics, - // CConfig *config, - // unsigned short val_marker) { } - /*! * \brief A virtual member. * \param[in] geometry - Geometrical definition of the problem. From ae4719659ffb238ab96b9aa4c22955c76d4bb362 Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Wed, 17 Mar 2021 23:22:52 +0100 Subject: [PATCH 18/88] fix unused variables update --- .vscode/launch.json | 46 +++++++++++++++++++ Common/include/CConfig.hpp | 44 ++++++++++++------ Common/src/CConfig.cpp | 4 ++ .../include/solvers/CFVMFlowSolverBase.inl | 1 - SU2_CFD/include/solvers/CIncNSSolver.hpp | 2 +- SU2_CFD/include/solvers/CNSSolver.hpp | 2 +- SU2_CFD/include/solvers/CSolver.hpp | 23 ---------- SU2_CFD/include/solvers/CTurbSASolver.hpp | 2 - SU2_CFD/include/solvers/CTurbSSTSolver.hpp | 4 +- SU2_CFD/src/solvers/CIncNSSolver.cpp | 14 +++--- SU2_CFD/src/solvers/CNSSolver.cpp | 14 +++--- SU2_CFD/src/solvers/CTurbSASolver.cpp | 8 ++-- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 6 +-- externals/medi | 2 +- 14 files changed, 102 insertions(+), 70 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000000..7a984e0e5d5 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,46 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "diffuser", + "type": "cppdbg", + "request": "launch", + "program": "/home/nijso/Codes/SU2/bin/SU2_CFD", + "args": ["diffuser.cfg"], + "stopAtEntry": false, + "cwd": "/home/nijso/Codes/su2cases/validation/buice_eaton_diffuser/SST_coarse", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + }, + { + "name": "(gdb) Launch", + "type": "cppdbg", + "request": "launch", + "program": "enter program name, for example ${workspaceFolder}/a.out", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + ] +} \ No newline at end of file diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index d46efb24547..322c10cd880 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -816,21 +816,23 @@ class CConfig { Turb2LamViscRatio_FreeStream, /*!< \brief Ratio of turbulent to laminar viscosity. */ NuFactor_FreeStream, /*!< \brief Ratio of turbulent to laminar viscosity. */ NuFactor_Engine, /*!< \brief Ratio of turbulent to laminar viscosity at the engine. */ - SecondaryFlow_ActDisk, /*!< \brief Ratio of turbulent to laminar viscosity at the actuator disk. */ - Initial_BCThrust, /*!< \brief Ratio of turbulent to laminar viscosity at the actuator disk. */ - Pressure_FreeStream, /*!< \brief Total pressure of the fluid. */ - Pressure_Thermodynamic, /*!< \brief Thermodynamic pressure of the fluid. */ - Temperature_FreeStream, /*!< \brief Total temperature of the fluid. */ - Temperature_ve_FreeStream; /*!< \brief Total vibrational-electronic temperature of the fluid. */ - su2double Prandtl_Lam, /*!< \brief Laminar Prandtl number for the gas. */ - Prandtl_Turb, /*!< \brief Turbulent Prandtl number for the gas. */ - Length_Ref, /*!< \brief Reference length for non-dimensionalization. */ - Pressure_Ref, /*!< \brief Reference pressure for non-dimensionalization. */ - Temperature_Ref, /*!< \brief Reference temperature for non-dimensionalization.*/ - Temperature_ve_Ref, /*!< \brief Reference vibrational-electronic temperature for non-dimensionalization.*/ - Density_Ref, /*!< \brief Reference density for non-dimensionalization.*/ - Velocity_Ref, /*!< \brief Reference velocity for non-dimensionalization.*/ - Time_Ref, /*!< \brief Reference time for non-dimensionalization. */ + SecondaryFlow_ActDisk, /*!< \brief Ratio of turbulent to laminar viscosity at the actuator disk. */ + Initial_BCThrust, /*!< \brief Ratio of turbulent to laminar viscosity at the actuator disk. */ + Pressure_FreeStream, /*!< \brief Total pressure of the fluid. */ + Pressure_Thermodynamic, /*!< \brief Thermodynamic pressure of the fluid. */ + Temperature_FreeStream, /*!< \brief Total temperature of the fluid. */ + Temperature_ve_FreeStream; /*!< \brief Total vibrational-electronic temperature of the fluid. */ + su2double Prandtl_Lam, /*!< \brief Laminar Prandtl number for the gas. */ + Prandtl_Turb, /*!< \brief Turbulent Prandtl number for the gas. */ + wallModelkappa, /*!< \brief von Karman constant kappa for turbulence wall modeling */ + wallModelB, /*!< \brief constant B for turbulence wall modeling */ + Length_Ref, /*!< \brief Reference length for non-dimensionalization. */ + Pressure_Ref, /*!< \brief Reference pressure for non-dimensionalization. */ + Temperature_Ref, /*!< \brief Reference temperature for non-dimensionalization.*/ + Temperature_ve_Ref, /*!< \brief Reference vibrational-electronic temperature for non-dimensionalization.*/ + Density_Ref, /*!< \brief Reference density for non-dimensionalization.*/ + Velocity_Ref, /*!< \brief Reference velocity for non-dimensionalization.*/ + Time_Ref, /*!< \brief Reference time for non-dimensionalization. */ Viscosity_Ref, /*!< \brief Reference viscosity for non-dimensionalization. */ Conductivity_Ref, /*!< \brief Reference conductivity for non-dimensionalization. */ Energy_Ref, /*!< \brief Reference viscosity for non-dimensionalization. */ @@ -1662,6 +1664,18 @@ class CConfig { */ su2double GetPrandtl_Turb(void) const { return Prandtl_Turb; } + /*! + * \brief Get the value of the von Karman constant kappa for turbulence wall modeling. + * \return von Karman constant. + */ + su2double GetwallModelKappa(void) const { return wallModelKappa; } + + /*! + * \brief Get the value of the von Karman constant kappa for turbulence wall modeling. + * \return von Karman constant. + */ + su2double GetwallModelB(void) const { return wallModelB; } + /*! * \brief Get the value of the thermal conductivity for solids. * \return Thermal conductivity (solid). diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index c693a48338d..3192bb1d0b5 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1223,6 +1223,10 @@ void CConfig::SetConfig_Options() { addDoubleOption("PRANDTL_LAM", Prandtl_Lam, 0.72); /*!\brief PRANDTL_TURB \n DESCRIPTION: Turbulent Prandtl number (0.9 (air), only for compressible flows) \n DEFAULT 0.90 \ingroup Config*/ addDoubleOption("PRANDTL_TURB", Prandtl_Turb, 0.90); + /*!\brief WALLMODELKAPPA \n DESCRIPTION: von Karman constant used for the wall model \n DEFAULT 0.41 \ingroup Config*/ + addDoubleOption("WALLMODELKAPPA", wallModelKappa, 0.41); + /*!\brief WALLMODELB \n DESCRIPTION: constant B used for the wall model \n DEFAULT 5.0 \ingroup Config*/ + addDoubleOption("WALLMODELKAPPA", wallModelKappa, 0.41); /*!\brief BULK_MODULUS \n DESCRIPTION: Value of the Bulk Modulus \n DEFAULT 1.42E5 \ingroup Config*/ addDoubleOption("BULK_MODULUS", Bulk_Modulus, 1.42E5); /* DESCRIPTION: Epsilon^2 multipier in Beta calculation for incompressible preconditioner. */ diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index 586eca688aa..4d79d79f782 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2444,7 +2444,6 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr bool axisymmetric = config->GetAxisymmetric(); bool roughwall = (config->GetnRoughWall() > 0); bool nemo = config->GetNEMOProblem(); - bool wallfunctions=false; /*--- Get the locations of the primitive variables for NEMO ---*/ if (nemo) { diff --git a/SU2_CFD/include/solvers/CIncNSSolver.hpp b/SU2_CFD/include/solvers/CIncNSSolver.hpp index beef935f439..e1b2a5dafa1 100644 --- a/SU2_CFD/include/solvers/CIncNSSolver.hpp +++ b/SU2_CFD/include/solvers/CIncNSSolver.hpp @@ -85,7 +85,7 @@ class CIncNSSolver final : public CIncEulerSolver { CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, - CConfig *config, + const CConfig *config, unsigned short val_marker) ; /*! diff --git a/SU2_CFD/include/solvers/CNSSolver.hpp b/SU2_CFD/include/solvers/CNSSolver.hpp index b49b93b9618..f59519cb792 100644 --- a/SU2_CFD/include/solvers/CNSSolver.hpp +++ b/SU2_CFD/include/solvers/CNSSolver.hpp @@ -124,7 +124,7 @@ class CNSSolver final : public CEulerSolver { CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, - CConfig *config, + const CConfig *config, unsigned short val_marker) ; public: /*! diff --git a/SU2_CFD/include/solvers/CSolver.hpp b/SU2_CFD/include/solvers/CSolver.hpp index 76487ad7155..a6e082893f0 100644 --- a/SU2_CFD/include/solvers/CSolver.hpp +++ b/SU2_CFD/include/solvers/CSolver.hpp @@ -3958,29 +3958,6 @@ class CSolver { */ inline virtual unsigned long GetnDOFsGlobal(void) const { return 0; } - /*! - * \brief A virtual member. - * \param[in] geometry - Geometrical definition of the problem. - * \param[in] solver_container - Container vector with all the solutions. - * \param[in] config - Definition of the particular problem. - */ - //inline virtual void SetTauWall_WF(CGeometry *geometry, - // CSolver** solver_container, - // CConfig* config) { } - - /*! - * \brief A virtual member. - * \param[in] geometry - Geometrical definition of the problem. - * \param[in] solver_container - Container vector with all the solutions. - * \param[in] config - Definition of the particular problem. - */ - //inline virtual void SetNuTilde_WF(CGeometry *geometry, - // CSolver **solver_container, - // CNumerics *conv_numerics, - // CNumerics *visc_numerics, - // CConfig *config, - // unsigned short val_marker) { } - /*! * \brief A virtual member. * \param[in] geometry - Geometrical definition of the problem. diff --git a/SU2_CFD/include/solvers/CTurbSASolver.hpp b/SU2_CFD/include/solvers/CTurbSASolver.hpp index 320cc555715..0b1a2d1ab48 100644 --- a/SU2_CFD/include/solvers/CTurbSASolver.hpp +++ b/SU2_CFD/include/solvers/CTurbSASolver.hpp @@ -62,8 +62,6 @@ class CTurbSASolver final : public CTurbSolver { */ void SetNuTilde_WF(CGeometry *geometry, CSolver **solver_container, - CNumerics *conv_numerics, - CNumerics *visc_numerics, const CConfig *config, unsigned short val_marker); diff --git a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp index e55442f2fd1..2fc1f71a8d5 100644 --- a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp +++ b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp @@ -55,9 +55,7 @@ class CTurbSSTSolver final : public CTurbSolver { */ void SetNuTilde_WF(CGeometry *geometry, CSolver **solver_container, - CNumerics *conv_numerics, - CNumerics *visc_numerics, - CConfig *config, + const CConfig *config, unsigned short val_marker); diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index f947ab8e62b..734255aef55 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -607,10 +607,8 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container /*--- The wall function implemented herein is based on Nichols and Nelson AIAAJ v32 n6 2004. At this moment, the wall function is only available for adiabatic flows. ---*/ - su2double RefDensity,RefVel2; + su2double RefDensity=Density_Inf, RefVel2=0.0; if ((config->GetRef_Inc_NonDim() == DIMENSIONAL) || (config->GetRef_Inc_NonDim() == INITIAL_VALUES)) { - RefDensity = Density_Inf; - RefVel2 = 0.0; for (auto iDim = 0u; iDim < nDim; iDim++) RefVel2 += Velocity_Inf[iDim] * Velocity_Inf[iDim]; } else if (config->GetRef_Inc_NonDim() == REFERENCE_VALUES) { @@ -625,9 +623,9 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container const su2double Gas_Constant = config->GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; su2double Eddy_Visc; - constexpr unsigned short max_iter = 50; - const su2double tol = 1e-12; // 1e-10 is too large - const su2double relax = 0.5; + constexpr unsigned short max_iter = 50; /*--- maximum number of iterations for the Newton Solver---*/ + const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ + const su2double relax = 0.5; /*--- relaxation factor for the Newton solver ---*/ /*--- Compute the recovery factor ---*/ // Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) @@ -635,8 +633,8 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container /*--- Typical constants from boundary layer theory ---*/ - const su2double kappa = 0.41; // put model constants in config file - const su2double B = 5.5; + const su2double kappa = config->GetwallModelKappa(); + const su2double B = config->GetwallModelB(); for (auto iMarker = 0u; iMarker < config->GetnMarker_All(); iMarker++) { diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 91af255c02a..5e4c4dd144c 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -739,10 +739,8 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- The wall function implemented herein is based on Nichols and Nelson AIAAJ v32 n6 2004. At this moment, the wall function is only available for adiabatic flows. ---*/ - su2double RefDensity,RefVel2; + su2double RefDensity=Density_Inf,RefVel2=0.0; if ((config->GetRef_Inc_NonDim() == DIMENSIONAL) || (config->GetRef_Inc_NonDim() == INITIAL_VALUES)) { - RefDensity = Density_Inf; - RefVel2 = 0.0; for (auto iDim = 0u; iDim < nDim; iDim++) RefVel2 += Velocity_Inf[iDim] * Velocity_Inf[iDim]; } else if (config->GetRef_Inc_NonDim() == REFERENCE_VALUES) { @@ -756,9 +754,9 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; su2double Eddy_Visc,Y_Plus,U_Tau; - constexpr unsigned short max_iter = 50; - const su2double tol = 1e-12; // 1e-10 is too large - const su2double relax = 0.5; + constexpr unsigned short max_iter = 50; /*--- maximum number of iterations for the Newton Solver---*/ + const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ + const su2double relax = 0.5; /*--- relaxation factor for the Newton solver ---*/ /*--- Compute the recovery factor ---*/ // Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) @@ -766,8 +764,8 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- Typical constants from boundary layer theory ---*/ - const su2double kappa = 0.41; // put model constants in config file - const su2double B = 5.5; + const su2double kappa = config->GetwallModelKappa(); + const su2double B = config->GetwallModelB(); //bool converged = true; diff --git a/SU2_CFD/src/solvers/CTurbSASolver.cpp b/SU2_CFD/src/solvers/CTurbSASolver.cpp index 34830783aff..cde0e54d39b 100644 --- a/SU2_CFD/src/solvers/CTurbSASolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSASolver.cpp @@ -1574,9 +1574,10 @@ void CTurbSASolver::BC_NearField_Boundary(CGeometry *geometry, CSolver **solver_ // } -void CTurbSASolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, - CNumerics *visc_numerics, const CConfig *config, unsigned short val_marker) { +void CTurbSASolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_container, + const CConfig *config, unsigned short val_marker) { + const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); constexpr unsigned short max_iter = 100; /* --- tolerance has LARGE impact on convergence, do not increase this value! --- */ @@ -1584,8 +1585,7 @@ void CTurbSASolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_containe /*--- Typical constants from boundary layer theory ---*/ - //const su2double kappa = 0.4; - //const su2double B = 5.5; + const su2double cv1_3 = 7.1*7.1*7.1; CVariable* flow_nodes = solver_container[FLOW_SOL]->GetNodes(); diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 0fc233c86a2..c23001ce4d5 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -466,8 +466,8 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont } -void CTurbSSTSolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, - CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) { +void CTurbSSTSolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_container, + const CConfig *config, unsigned short val_marker) { const unsigned short max_iter = 100; @@ -476,7 +476,7 @@ void CTurbSSTSolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_contain /*--- Typical constants from boundary layer theory ---*/ - const su2double kappa = 0.4; + const su2double kappa = config->GetwallModelKappa(); //const su2double B = 5.5; //const su2double cv1_3 = 7.1*7.1*7.1; diff --git a/externals/medi b/externals/medi index 6aef76912e7..b84cef4272a 160000 --- a/externals/medi +++ b/externals/medi @@ -1 +1 @@ -Subproject commit 6aef76912e7099c4f08c9705848797ca9e8070da +Subproject commit b84cef4272ab8bad981c0d0386d855daa8fbd340 From 69e7fe12dff36139ab2ab95cb4b13ceb15d258d3 Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Wed, 17 Mar 2021 23:53:36 +0100 Subject: [PATCH 19/88] fix unused variables update --- Common/include/CConfig.hpp | 2 +- SU2_CFD/src/solvers/CNSSolver.cpp | 6 +++--- SU2_CFD/src/solvers/CTurbSASolver.cpp | 8 +++---- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 29 +++++++------------------- 4 files changed, 16 insertions(+), 29 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 322c10cd880..75cf0a4d5c7 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -824,7 +824,7 @@ class CConfig { Temperature_ve_FreeStream; /*!< \brief Total vibrational-electronic temperature of the fluid. */ su2double Prandtl_Lam, /*!< \brief Laminar Prandtl number for the gas. */ Prandtl_Turb, /*!< \brief Turbulent Prandtl number for the gas. */ - wallModelkappa, /*!< \brief von Karman constant kappa for turbulence wall modeling */ + wallModelKappa, /*!< \brief von Karman constant kappa for turbulence wall modeling */ wallModelB, /*!< \brief constant B for turbulence wall modeling */ Length_Ref, /*!< \brief Reference length for non-dimensionalization. */ Pressure_Ref, /*!< \brief Reference pressure for non-dimensionalization. */ diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 5e4c4dd144c..a602d796790 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -954,10 +954,10 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c if (counter > max_iter) { notConvergedCounter++; - //cout << "Warning: Y+ did not converge within the max number of iterations!" << endl; - //cout << "diff = " << endl; + // cout << "Warning: Y+ did not converge within the max number of iterations!" << endl; + // cout << "diff = " << endl; // do not break, use some safe values for convergence - //break; + // break; Y_Plus = 30.0; Eddy_Visc = 1.0; U_Tau = 1.0; diff --git a/SU2_CFD/src/solvers/CTurbSASolver.cpp b/SU2_CFD/src/solvers/CTurbSASolver.cpp index cde0e54d39b..5829ab93a8a 100644 --- a/SU2_CFD/src/solvers/CTurbSASolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSASolver.cpp @@ -419,7 +419,7 @@ void CTurbSASolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_conta if (config->GetWall_Functions()) { SU2_OMP_MASTER - SetNuTilde_WF(geometry, solver_container, conv_numerics, visc_numerics, config, val_marker); + SetNuTilde_WF(geometry, solver_container, config, val_marker); SU2_OMP_BARRIER return; } @@ -1582,6 +1582,7 @@ void CTurbSASolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_containe /* --- tolerance has LARGE impact on convergence, do not increase this value! --- */ const su2double tol = 1e-12; + const su2double relax = 0.5; /*--- relaxation factor for the Newton solver ---*/ /*--- Typical constants from boundary layer theory ---*/ @@ -1618,21 +1619,20 @@ void CTurbSASolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_containe su2double func_prim = 4.0 * nu_til_old*nu_til_old*nu_til_old - 3.0*(Eddy_Visc/Density_Normal)*(nu_til_old*nu_til_old); // damped Newton method - nu_til = nu_til_old - 0.5*(func/func_prim); + nu_til = nu_til_old - relax*(func/func_prim); diff = fabs(nu_til-nu_til_old); nu_til_old = nu_til; // sometimes we get negative values when the solution has not converged yet, we just reset the nu_tilde in that case. if (nu_til_old max_iter) { - cout << "WARNING: Nu_tilde evaluation has not converged." << endl; + cout << "WARNING: Nu_tilde evaluation did not converge in" <GetWall_Functions()) { SU2_OMP_MASTER - SetNuTilde_WF(geometry, solver_container, conv_numerics, visc_numerics, config, val_marker); + SetNuTilde_WF(geometry, solver_container, config, val_marker); SU2_OMP_BARRIER return; } @@ -469,17 +469,10 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont void CTurbSSTSolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config, unsigned short val_marker) { - const unsigned short max_iter = 100; - - /* --- tolerance has LARGE impact on convergence, do not increase this value! --- */ - const su2double tol = 1e-12; - - /*--- Typical constants from boundary layer theory ---*/ + /*--- von Karman constant from boundary layer theory ---*/ const su2double kappa = config->GetwallModelKappa(); - //const su2double B = 5.5; - //const su2double cv1_3 = 7.1*7.1*7.1; - + const su2double relax = 0.5; /*--- relaxation factor for k-omega values ---*/ /*--- Loop over all of the vertices on this boundary marker ---*/ @@ -487,16 +480,11 @@ void CTurbSSTSolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_contain const auto iPoint = geometry->vertex[val_marker][iVertex]->GetNode(); const auto iPoint_Neighbor = geometry->vertex[val_marker][iVertex]->GetNormal_Neighbor(); - su2double Lam_Visc_Normal = solver_container[FLOW_SOL]->GetNodes()->GetLaminarViscosity(iPoint_Neighbor); - su2double Density_Normal = solver_container[FLOW_SOL]->GetNodes()->GetDensity(iPoint_Neighbor); - su2double Kin_Visc_Normal = Lam_Visc_Normal/Density_Normal; - su2double Eddy_Visc = solver_container[FLOW_SOL]->GetEddyViscWall(val_marker, iVertex); /*--- Solve for the new value of nu_tilde given the eddy viscosity and using a Newton method ---*/ - - su2double omega1,omega0,y_plus,y,k_new,omega_new; + su2double omega1,omega0,y,k_new,omega_new; su2double k = nodes->GetSolution(iPoint_Neighbor,0); su2double omega = nodes->GetSolution(iPoint_Neighbor,1); @@ -506,18 +494,17 @@ void CTurbSSTSolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_contain su2double Y_Plus = solver_container[FLOW_SOL]->GetYPlus(val_marker, iVertex); su2double U_Tau = solver_container[FLOW_SOL]->GetUTau(val_marker, iVertex); - y = Y_Plus*Lam_Visc_Wall/(Density_Wall*U_Tau); omega1 = 6.0*Lam_Visc_Wall/(0.075*Density_Wall*y*y); // eq. 19 omega0 = U_Tau/(sqrt(0.09)*kappa*y); // eq. 20 omega_new = sqrt(omega0*omega0 + omega1*omega1); // eq. 21 Nichols & Nelson k_new = omega_new * Eddy_Visc/Density_Wall; // eq. 22 Nichols & Nelson - // (is this the correct density? paper says rho and not rho_w) + // (is this the correct density? paper says rho and not rho_w) - // put some relaxation factor on the k-omega values - k += 0.5*(k_new - k); - omega += 0.5*(omega_new - omega); + /*--- put some relaxation factor on the k-omega values ---*/ + k += relax*(k_new - k); + omega += relax*(omega_new - omega); su2double solution[MAXNVAR]; solution[0] = k; From 6d629c8820c7d1735faaba30b3e0b220b99e3228 Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Thu, 18 Mar 2021 22:36:08 +0100 Subject: [PATCH 20/88] fix wall model constant config option --- Common/src/CConfig.cpp | 2 +- Common/src/wall_model.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 3192bb1d0b5..7640982d563 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1226,7 +1226,7 @@ void CConfig::SetConfig_Options() { /*!\brief WALLMODELKAPPA \n DESCRIPTION: von Karman constant used for the wall model \n DEFAULT 0.41 \ingroup Config*/ addDoubleOption("WALLMODELKAPPA", wallModelKappa, 0.41); /*!\brief WALLMODELB \n DESCRIPTION: constant B used for the wall model \n DEFAULT 5.0 \ingroup Config*/ - addDoubleOption("WALLMODELKAPPA", wallModelKappa, 0.41); + addDoubleOption("WALLMODELB", wallModelB, 5.0); /*!\brief BULK_MODULUS \n DESCRIPTION: Value of the Bulk Modulus \n DEFAULT 1.42E5 \ingroup Config*/ addDoubleOption("BULK_MODULUS", Bulk_Modulus, 1.42E5); /* DESCRIPTION: Epsilon^2 multipier in Beta calculation for incompressible preconditioner. */ diff --git a/Common/src/wall_model.cpp b/Common/src/wall_model.cpp index c90aaa9ccc4..4f90da713e6 100644 --- a/Common/src/wall_model.cpp +++ b/Common/src/wall_model.cpp @@ -41,7 +41,7 @@ CWallModel::CWallModel(CConfig *config) { Pr_lam = config->GetPrandtl_Lam(); Pr_turb = config->GetPrandtl_Turb(); - karman = 0.41; // von Karman constant -> k = 0.41; or 0.38; + karman = config->GetwallModelKappa(); // von Karman constant -> k = 0.41; or 0.38; } void CWallModel::WallShearStressAndHeatFlux(const su2double rhoExchange, From 0c0e3e6004a14ae92c976455c5b4201c56d910f6 Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Sat, 20 Mar 2021 22:45:23 +0100 Subject: [PATCH 21/88] fixed alignment and missing break statement --- Common/src/CConfig.cpp | 2 +- SU2_CFD/src/solvers/CIncNSSolver.cpp | 265 ++++++++++++------------- SU2_CFD/src/solvers/CTurbSASolver.cpp | 14 +- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 4 +- 4 files changed, 143 insertions(+), 142 deletions(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 7640982d563..bc8d83edd6e 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1226,7 +1226,7 @@ void CConfig::SetConfig_Options() { /*!\brief WALLMODELKAPPA \n DESCRIPTION: von Karman constant used for the wall model \n DEFAULT 0.41 \ingroup Config*/ addDoubleOption("WALLMODELKAPPA", wallModelKappa, 0.41); /*!\brief WALLMODELB \n DESCRIPTION: constant B used for the wall model \n DEFAULT 5.0 \ingroup Config*/ - addDoubleOption("WALLMODELB", wallModelB, 5.0); + addDoubleOption("WALLMODELB", wallModelB, 5.5); /*!\brief BULK_MODULUS \n DESCRIPTION: Value of the Bulk Modulus \n DEFAULT 1.42E5 \ingroup Config*/ addDoubleOption("BULK_MODULUS", Bulk_Modulus, 1.42E5); /* DESCRIPTION: Epsilon^2 multipier in Beta calculation for incompressible preconditioner. */ diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 734255aef55..cd0720ff3c2 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -622,8 +622,8 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container su2double U_Tau, Y_Plus; const su2double Gas_Constant = config->GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; - su2double Eddy_Visc; - constexpr unsigned short max_iter = 50; /*--- maximum number of iterations for the Newton Solver---*/ + su2double Eddy_Visc = 1.0e-6; /*--- nonzero starting value for eddy viscosity---*/ + constexpr unsigned short max_iter =200; /*--- maximum number of iterations for the Newton Solver---*/ const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ const su2double relax = 0.5; /*--- relaxation factor for the Newton solver ---*/ @@ -671,194 +671,193 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container if (!geometry->nodes->GetDomain(iPoint)) continue; - /*--- Get coordinates of the current vertex and nearest normal point ---*/ + /*--- Get coordinates of the current vertex and nearest normal point ---*/ - const auto Coord = geometry->nodes->GetCoord(iPoint); - const auto Coord_Normal = geometry->nodes->GetCoord(Point_Normal); + const auto Coord = geometry->nodes->GetCoord(iPoint); + const auto Coord_Normal = geometry->nodes->GetCoord(Point_Normal); - /*--- Compute dual-grid area and boundary normal ---*/ + /*--- Compute dual-grid area and boundary normal ---*/ - const auto Normal = geometry->vertex[iMarker][iVertex]->GetNormal(); + const auto Normal = geometry->vertex[iMarker][iVertex]->GetNormal(); - su2double Area = GeometryToolbox::Norm(nDim, Normal); + su2double Area = GeometryToolbox::Norm(nDim, Normal); - su2double UnitNormal[MAXNDIM] = {0.0}; - for (auto iDim = 0u; iDim < nDim; iDim++) - UnitNormal[iDim] = -Normal[iDim]/Area; + su2double UnitNormal[MAXNDIM] = {0.0}; + for (auto iDim = 0u; iDim < nDim; iDim++) + UnitNormal[iDim] = -Normal[iDim]/Area; - /*--- Get the velocity, pressure, and temperature at the nearest - (normal) interior point. ---*/ + /*--- Get the velocity, pressure, and temperature at the nearest + (normal) interior point. ---*/ - su2double Vel[MAXNDIM] = {0.0}; - for (auto iDim = 0u; iDim < nDim; iDim++) - Vel[iDim] = nodes->GetVelocity(Point_Normal,iDim); + su2double Vel[MAXNDIM] = {0.0}; + for (auto iDim = 0u; iDim < nDim; iDim++) + Vel[iDim] = nodes->GetVelocity(Point_Normal,iDim); - // su2double P_Normal = nodes->GetPressure(Point_Normal); - // su2double T_Normal = nodes->GetTemperature(Point_Normal); + // su2double P_Normal = nodes->GetPressure(Point_Normal); + // su2double T_Normal = nodes->GetTemperature(Point_Normal); - /*--- Compute the wall-parallel velocity at first point off the wall ---*/ + /*--- Compute the wall-parallel velocity at first point off the wall ---*/ - su2double VelNormal = GeometryToolbox::DotProduct(int(MAXNDIM), Vel, UnitNormal); + su2double VelNormal = GeometryToolbox::DotProduct(int(MAXNDIM), Vel, UnitNormal); - su2double VelTang[MAXNDIM] = {0.0}; - for (auto iDim = 0u; iDim < nDim; iDim++) - VelTang[iDim] = Vel[iDim] - VelNormal*UnitNormal[iDim]; + su2double VelTang[MAXNDIM] = {0.0}; + for (auto iDim = 0u; iDim < nDim; iDim++) + VelTang[iDim] = Vel[iDim] - VelNormal*UnitNormal[iDim]; - su2double VelTangMod = GeometryToolbox::Norm(int(MAXNDIM), VelTang); + su2double VelTangMod = GeometryToolbox::Norm(int(MAXNDIM), VelTang); - /*--- Compute normal distance of the interior point from the wall ---*/ + /*--- Compute normal distance of the interior point from the wall ---*/ - su2double WallDist[MAXNDIM] = {0.0}; - GeometryToolbox::Distance(nDim, Coord, Coord_Normal, WallDist); + su2double WallDist[MAXNDIM] = {0.0}; + GeometryToolbox::Distance(nDim, Coord, Coord_Normal, WallDist); - su2double WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); + su2double WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); - /*--- Compute mach number ---*/ + /*--- Compute mach number ---*/ - // M_Normal = VelTangMod / sqrt(Gamma * Gas_Constant * T_Normal); + // M_Normal = VelTangMod / sqrt(Gamma * Gas_Constant * T_Normal); - /*--- Compute the wall temperature using the Crocco-Buseman equation ---*/ + /*--- Compute the wall temperature using the Crocco-Buseman equation ---*/ - //T_Normal = T_Wall * (1.0 + 0.5*Gamma_Minus_One*Recovery*u_normal*u_normal); - // this means that T_Wall = T_Normal/(1.0+0.5*Gamma_Minus_One*Recovery*u_normal*u_normal) - //T_Wall = T_Normal/(1.0+0.5*Gamma_Minus_One*Recovery*VelTangMod*VelTangMod); - // in incompressible flows, we can assume that there is no velocity-related temperature change - // Prandtl: T+ = Pr*y+ - su2double T_Wall = nodes->GetTemperature(iPoint); + //T_Normal = T_Wall * (1.0 + 0.5*Gamma_Minus_One*Recovery*u_normal*u_normal); + // this means that T_Wall = T_Normal/(1.0+0.5*Gamma_Minus_One*Recovery*u_normal*u_normal) + //T_Wall = T_Normal/(1.0+0.5*Gamma_Minus_One*Recovery*VelTangMod*VelTangMod); + // in incompressible flows, we can assume that there is no velocity-related temperature change + // Prandtl: T+ = Pr*y+ + su2double T_Wall = nodes->GetTemperature(iPoint); - /*--- Extrapolate the pressure from the interior & compute the - wall density using the equation of state ---*/ + /*--- Extrapolate the pressure from the interior & compute the + wall density using the equation of state ---*/ - /*--- incompressible formulation ---*/ - //su2double P_Wall = nodes->GetPressure(iPoint); - su2double Density_Wall = nodes->GetDensity(iPoint); - su2double Conductivity_Wall = nodes->GetThermalConductivity(iPoint); - //su2double Density_Normal = nodes->GetDensity(Point_Normal); - su2double Lam_Visc_Normal = nodes->GetLaminarViscosity(Point_Normal); + /*--- incompressible formulation ---*/ + //su2double P_Wall = nodes->GetPressure(iPoint); + su2double Density_Wall = nodes->GetDensity(iPoint); + su2double Conductivity_Wall = nodes->GetThermalConductivity(iPoint); + //su2double Density_Normal = nodes->GetDensity(Point_Normal); + su2double Lam_Visc_Normal = nodes->GetLaminarViscosity(Point_Normal); + /*--- Compute the shear stress at the wall in the regular fashion + by using the stress tensor on the surface ---*/ - /*--- Compute the shear stress at the wall in the regular fashion - by using the stress tensor on the surface ---*/ + su2double tau[MAXNDIM][MAXNDIM] = {{0.0}}, TauElem[MAXNDIM] = {0.0}; + su2double Lam_Visc_Wall = nodes->GetLaminarViscosity(iPoint); + //su2double Eddy_Visc_Wall = nodes->GetEddyViscosity(iPoint); + // do we need the total viscosity for the stress tensor? + //su2double total_viscosity = (Lam_Visc_Wall + Eddy_Visc_Wall); + CNumerics::ComputeStressTensor(nDim, tau, nodes->GetGradient_Primitive(iPoint)+1, Lam_Visc_Wall); - su2double tau[MAXNDIM][MAXNDIM] = {{0.0}}, TauElem[MAXNDIM] = {0.0}; - su2double Lam_Visc_Wall = nodes->GetLaminarViscosity(iPoint); - CNumerics::ComputeStressTensor(nDim, tau, nodes->GetGradient_Primitive(iPoint)+1, Lam_Visc_Wall); + for (auto iDim = 0u; iDim < nDim; iDim++) { + TauElem[iDim] = GeometryToolbox::DotProduct(nDim, tau[iDim], UnitNormal); + } - for (auto iDim = 0u; iDim < nDim; iDim++) { - TauElem[iDim] = GeometryToolbox::DotProduct(nDim, tau[iDim], UnitNormal); - } - - /*--- Compute wall shear stress as the magnitude of the wall-tangential - component of the shear stress tensor---*/ + /*--- Compute wall shear stress as the magnitude of the wall-tangential + component of the shear stress tensor---*/ - su2double TauNormal = GeometryToolbox::DotProduct(nDim, TauElem, UnitNormal); + su2double TauNormal = GeometryToolbox::DotProduct(nDim, TauElem, UnitNormal); - su2double TauTangent[MAXNDIM] = {0.0}; - for (auto iDim = 0u; iDim < nDim; iDim++) - TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; + su2double TauTangent[MAXNDIM] = {0.0}; + for (auto iDim = 0u; iDim < nDim; iDim++) + TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; - su2double WallShearStress = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); + su2double WallShearStress = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); - /*--- Calculate the quantities from boundary layer theory and - iteratively solve for a new wall shear stress. Use the current wall - shear stress as a starting guess for the wall function. ---*/ + /*--- Calculate the quantities from boundary layer theory and + iteratively solve for a new wall shear stress. Use the current wall + shear stress as a starting guess for the wall function. ---*/ - unsigned long counter = 0; su2double diff = 1.0; - U_Tau = sqrt(WallShearStress/Density_Wall); - Y_Plus = 0.0; // to avoid warning + unsigned long counter = 0; su2double diff = 1.0; + U_Tau = sqrt(WallShearStress/Density_Wall); + Y_Plus = 1.0; // to avoid warning + su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; - su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; + /*--- Automatic switch off when y+ < 5 according to Nichols & Nelson (2004) ---*/ - /*--- Automatic switch off when y+ < 5 according to Nichols & Nelson (2004) ---*/ - - if (Y_Plus_Start < 5.0) { - continue; - } + if (Y_Plus_Start < 5.0) { + /*--- impose a minimum y+ for stability reasons---*/ + Eddy_Visc = 1.0e-6; + U_Tau = 1.0e-6; + Y_Plus_Start = 1.0; + continue; + } - while (fabs(diff) > tol) { + while (fabs(diff) > tol) { - /*--- Friction velocity and u+ ---*/ + /*--- Friction velocity and u+ ---*/ - su2double U_Plus = VelTangMod/U_Tau; + su2double U_Plus = VelTangMod/U_Tau; - /*--- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) page 1110 ---*/ + /*--- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) page 1110 ---*/ - su2double Gam = Recovery*U_Tau*U_Tau/(2.0*Cp*T_Wall); - /*--- nijso: heated wall needs validation testcase! ---*/ - su2double Beta = q_w*Lam_Visc_Wall/(Density_Wall*T_Wall*Conductivity_Wall*U_Tau); // TODO: nonzero heatflux needs validation case - su2double Q = sqrt(Beta*Beta + 4.0*Gam); - su2double Phi = asin(-1.0*Beta/Q); + su2double Gam = Recovery*U_Tau*U_Tau/(2.0*Cp*T_Wall); + /*--- nijso: heated wall needs validation testcase! ---*/ + su2double Beta = q_w*Lam_Visc_Wall/(Density_Wall*T_Wall*Conductivity_Wall*U_Tau); // TODO: nonzero heatflux needs validation case + su2double Q = sqrt(Beta*Beta + 4.0*Gam); + su2double Phi = asin(-1.0*Beta/Q); - /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ + /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ - su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); + su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); - /*--- Spalding's universal form for the BL velocity with the - outer velocity form of White & Christoph above. ---*/ + /*--- Spalding's universal form for the BL velocity with the + outer velocity form of White & Christoph above. ---*/ - su2double kUp = kappa*U_Plus; - su2double Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); + su2double kUp = kappa*U_Plus; + Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); - su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); + su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); - Eddy_Visc = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp(-1.0*kappa*B)* - (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0) - - Lam_Visc_Normal/Lam_Visc_Wall); - Eddy_Visc = max(1.0e-6, Eddy_Visc); + Eddy_Visc = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp(-1.0*kappa*B)* + (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0) + - Lam_Visc_Normal/Lam_Visc_Wall); + Eddy_Visc = max(1.0e-6, Eddy_Visc); - /* --- Define function for Newton method to zero --- */ + /* --- Define function for Newton method to zero --- */ - diff = (Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall) - Y_Plus; + diff = (Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall) - Y_Plus; - /* --- Gradient of function defined above --- */ + /* --- Gradient of function defined above --- */ - grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + - kappa /(U_Tau * sqrt(Gam)) * asin(U_Plus * sqrt(Gam)) * Y_Plus_White - - exp(-1.0 * B * kappa) * (0.5 * pow(VelTangMod * kappa / U_Tau, 3) + - pow(VelTangMod * kappa / U_Tau, 2) + VelTangMod * kappa / U_Tau) / U_Tau; + grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + + kappa /(U_Tau * sqrt(Gam)) * asin(U_Plus * sqrt(Gam)) * Y_Plus_White - + exp(-1.0 * B * kappa) * (0.5 * pow(VelTangMod * kappa / U_Tau, 3) + + pow(VelTangMod * kappa / U_Tau, 2) + VelTangMod * kappa / U_Tau) / U_Tau; - /* --- Newton Step --- */ + /* --- Newton Step --- */ - U_Tau = U_Tau - relax*(diff / grad_diff); + U_Tau = U_Tau - relax*(diff / grad_diff); - counter++; - - - if (counter > max_iter) { - notConvergedCounter++; - //cout << "Warning: Y+ did not converge within the max number of iterations!" << endl; - //cout << "diff = " << endl; - // do not break, use some safe values for convergence - //break; - Y_Plus = 30.0; - Eddy_Visc = 1.0; - U_Tau = 1.0; - } + counter++; + if (counter > max_iter) { + notConvergedCounter++; + cout << "Warning: Y+ did not converge within the max number of iterations!" << endl; + cout << counter <<", U_tau = "<SetSolution_Old(iPoint_Neighbor,Sol); LinSysRes.SetBlock_Zero(iPoint_Neighbor); diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index bd8657e0b7e..a74d133fb89 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -482,8 +482,6 @@ void CTurbSSTSolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_contain su2double Eddy_Visc = solver_container[FLOW_SOL]->GetEddyViscWall(val_marker, iVertex); - /*--- Solve for the new value of nu_tilde given the eddy viscosity and using a Newton method ---*/ - su2double omega1,omega0,y,k_new,omega_new; su2double k = nodes->GetSolution(iPoint_Neighbor,0); su2double omega = nodes->GetSolution(iPoint_Neighbor,1); @@ -506,7 +504,7 @@ void CTurbSSTSolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_contain k += relax*(k_new - k); omega += relax*(omega_new - omega); - su2double solution[MAXNVAR]; + su2double solution[2]; solution[0] = k; solution[1] = omega; From fa88243109bf05784b62b85a5600b9cc1a15ab5d Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Thu, 25 Mar 2021 17:54:54 +0100 Subject: [PATCH 22/88] computing skinfriction when y+ < 5 --- .../include/solvers/CFVMFlowSolverBase.inl | 6 +- SU2_CFD/include/solvers/CIncNSSolver.hpp | 2 +- SU2_CFD/include/solvers/CNSSolver.hpp | 2 +- SU2_CFD/include/solvers/CTurbSASolver.hpp | 2 +- SU2_CFD/include/solvers/CTurbSSTSolver.hpp | 2 +- SU2_CFD/src/solvers/CIncNSSolver.cpp | 119 +++++++++--------- SU2_CFD/src/solvers/CNSSolver.cpp | 14 ++- SU2_CFD/src/solvers/CTurbSASolver.cpp | 100 +++++++++------ SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 41 +++--- 9 files changed, 163 insertions(+), 125 deletions(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index 4d79d79f782..ffa8d65fa0f 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2563,8 +2563,11 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr for (iDim = 0; iDim < nDim; iDim++) { TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; /* --- in case of wall functions, we have computed the skin friction in the turbulence solver --- */ - if (!wallfunctions) + /* --- Note that in the wall model, we switch off the computation when the computed y+ < 5 --- */ + /* --- We put YPlus to 1.0 so we have to compute skinfriction and the actual y+ in that case as well --- */ + if (!wallfunctions || (wallfunctions && YPlus[iMarker][iVertex] < 5.0)) CSkinFriction[iMarker](iVertex,iDim) = TauTangent[iDim] * factorFric; + WallShearStress[iMarker][iVertex] += TauTangent[iDim] * TauTangent[iDim]; } WallShearStress[iMarker][iVertex] = sqrt(WallShearStress[iMarker][iVertex]); @@ -2579,6 +2582,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr FrictionVel = sqrt(fabs(WallShearStress[iMarker][iVertex]) / Density); /* --- in case of wall functions, we have computed YPlus in the turbulence class --- */ + /* --- Note that we do not recompute y+ when y+<5 because y+ can become > 5 again --- */ if (!wallfunctions) YPlus[iMarker][iVertex] = WallDistMod * FrictionVel / (Viscosity / Density); diff --git a/SU2_CFD/include/solvers/CIncNSSolver.hpp b/SU2_CFD/include/solvers/CIncNSSolver.hpp index e1b2a5dafa1..6dae44e3b51 100644 --- a/SU2_CFD/include/solvers/CIncNSSolver.hpp +++ b/SU2_CFD/include/solvers/CIncNSSolver.hpp @@ -81,7 +81,7 @@ class CIncNSSolver final : public CIncEulerSolver { * \param[in] solver_container - Container vector with all the solutions. * \param[in] config - Definition of the particular problem. */ - void SetNuTilde_WF(CGeometry *geometry, + void SetTurbVars_WF(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, diff --git a/SU2_CFD/include/solvers/CNSSolver.hpp b/SU2_CFD/include/solvers/CNSSolver.hpp index f59519cb792..75d872cbffb 100644 --- a/SU2_CFD/include/solvers/CNSSolver.hpp +++ b/SU2_CFD/include/solvers/CNSSolver.hpp @@ -120,7 +120,7 @@ class CNSSolver final : public CEulerSolver { * \param[in] solver_container - Container vector with all the solutions. * \param[in] config - Definition of the particular problem. */ - void SetNuTilde_WF(CGeometry *geometry, + void SetTurbVars_WF(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, diff --git a/SU2_CFD/include/solvers/CTurbSASolver.hpp b/SU2_CFD/include/solvers/CTurbSASolver.hpp index 0b1a2d1ab48..75912c33bcc 100644 --- a/SU2_CFD/include/solvers/CTurbSASolver.hpp +++ b/SU2_CFD/include/solvers/CTurbSASolver.hpp @@ -60,7 +60,7 @@ class CTurbSASolver final : public CTurbSolver { * \param[in] config - Definition of the particular problem. * \param[in] val_marker - Surface marker where the boundary condition is applied. */ - void SetNuTilde_WF(CGeometry *geometry, + void SetTurbVars_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config, unsigned short val_marker); diff --git a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp index 2fc1f71a8d5..4e66c618b90 100644 --- a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp +++ b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp @@ -53,7 +53,7 @@ class CTurbSSTSolver final : public CTurbSolver { * \param[in] config - Definition of the particular problem. * \param[in] val_marker - Surface marker where the boundary condition is applied. */ - void SetNuTilde_WF(CGeometry *geometry, + void SetTurbVars_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config, unsigned short val_marker); diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index cd0720ff3c2..fa76ba2330b 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -616,13 +616,13 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container RefVel2 = config->GetInc_Velocity_Ref() * config->GetInc_Velocity_Ref(); } - unsigned long notConvergedCounter=0; - + unsigned long notConvergedCounter = 0; /*--- counts the number of wall cells that are not converged ---*/ + unsigned long smallYPlusCounter = 0; /*--- counts the number of wall cells where y+ < 5 ---*/ su2double grad_diff; su2double U_Tau, Y_Plus; const su2double Gas_Constant = config->GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; - su2double Eddy_Visc = 1.0e-6; /*--- nonzero starting value for eddy viscosity---*/ + //su2double Eddy_Visc = 1.0e-6; /*--- nonzero starting value for eddy viscosity---*/ constexpr unsigned short max_iter =200; /*--- maximum number of iterations for the Newton Solver---*/ const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ const su2double relax = 0.5; /*--- relaxation factor for the Newton solver ---*/ @@ -641,8 +641,8 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container if (!config->GetViscous_Wall(iMarker)) continue; - if ((config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) || - (config->GetMarker_All_KindBC(iMarker) == ISOTHERMAL) ) { + //if ((config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) || + // (config->GetMarker_All_KindBC(iMarker) == ISOTHERMAL) ) { /*--- Identify the boundary by string name ---*/ @@ -655,7 +655,11 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container /*--- Get the specified wall heat flux from config ---*/ // note that we can get the heat flux from the temperature gradient - su2double q_w = config->GetWall_HeatFlux(Marker_Tag); + su2double q_w = 0.0; + + if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) + q_w = config->GetWall_HeatFlux(Marker_Tag); + // heat flux from temperature: q_w = h*(T_wall - T_fluid) /*--- Loop over all of the vertices on this boundary marker ---*/ @@ -730,17 +734,15 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container wall density using the equation of state ---*/ /*--- incompressible formulation ---*/ - //su2double P_Wall = nodes->GetPressure(iPoint); su2double Density_Wall = nodes->GetDensity(iPoint); su2double Conductivity_Wall = nodes->GetThermalConductivity(iPoint); - //su2double Density_Normal = nodes->GetDensity(Point_Normal); su2double Lam_Visc_Normal = nodes->GetLaminarViscosity(Point_Normal); /*--- Compute the shear stress at the wall in the regular fashion by using the stress tensor on the surface ---*/ su2double tau[MAXNDIM][MAXNDIM] = {{0.0}}, TauElem[MAXNDIM] = {0.0}; su2double Lam_Visc_Wall = nodes->GetLaminarViscosity(iPoint); - //su2double Eddy_Visc_Wall = nodes->GetEddyViscosity(iPoint); + su2double Eddy_Visc_Wall = nodes->GetEddyViscosity(iPoint); // do we need the total viscosity for the stress tensor? //su2double total_viscosity = (Lam_Visc_Wall + Eddy_Visc_Wall); CNumerics::ComputeStressTensor(nDim, tau, nodes->GetGradient_Primitive(iPoint)+1, Lam_Visc_Wall); @@ -760,97 +762,95 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container su2double WallShearStress = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); - /*--- Calculate the quantities from boundary layer theory and iteratively solve for a new wall shear stress. Use the current wall shear stress as a starting guess for the wall function. ---*/ unsigned long counter = 0; su2double diff = 1.0; - U_Tau = sqrt(WallShearStress/Density_Wall); - Y_Plus = 1.0; // to avoid warning + U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall)); + Y_Plus = 4.99; // clipping value su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; /*--- Automatic switch off when y+ < 5 according to Nichols & Nelson (2004) ---*/ if (Y_Plus_Start < 5.0) { /*--- impose a minimum y+ for stability reasons---*/ - Eddy_Visc = 1.0e-6; - U_Tau = 1.0e-6; - Y_Plus_Start = 1.0; - continue; + smallYPlusCounter++; } + else { + while (fabs(diff) > tol) { - while (fabs(diff) > tol) { - - /*--- Friction velocity and u+ ---*/ - - su2double U_Plus = VelTangMod/U_Tau; + /*--- Friction velocity and u+ ---*/ + + su2double U_Plus = VelTangMod/U_Tau; - /*--- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) page 1110 ---*/ + /*--- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) page 1110 ---*/ - su2double Gam = Recovery*U_Tau*U_Tau/(2.0*Cp*T_Wall); - /*--- nijso: heated wall needs validation testcase! ---*/ - su2double Beta = q_w*Lam_Visc_Wall/(Density_Wall*T_Wall*Conductivity_Wall*U_Tau); // TODO: nonzero heatflux needs validation case - su2double Q = sqrt(Beta*Beta + 4.0*Gam); - su2double Phi = asin(-1.0*Beta/Q); + su2double Gam = Recovery*U_Tau*U_Tau/(2.0*Cp*T_Wall); + /*--- nijso: heated wall needs validation testcase! ---*/ + su2double Beta = q_w*Lam_Visc_Wall/(Density_Wall*T_Wall*Conductivity_Wall*U_Tau); // TODO: nonzero heatflux needs validation case + su2double Q = sqrt(Beta*Beta + 4.0*Gam); + su2double Phi = asin(-1.0*Beta/Q); - /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ + /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ - su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); + su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); - /*--- Spalding's universal form for the BL velocity with the - outer velocity form of White & Christoph above. ---*/ + /*--- Spalding's universal form for the BL velocity with the + outer velocity form of White & Christoph above. ---*/ - su2double kUp = kappa*U_Plus; - Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); + su2double kUp = kappa*U_Plus; + Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); - su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); + su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); - Eddy_Visc = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp(-1.0*kappa*B)* - (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0) - - Lam_Visc_Normal/Lam_Visc_Wall); - Eddy_Visc = max(1.0e-6, Eddy_Visc); + Eddy_Visc_Wall = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp(-1.0*kappa*B)* + (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0) + - Lam_Visc_Normal/Lam_Visc_Wall); + Eddy_Visc_Wall = max(1.0e-6, Eddy_Visc_Wall); - /* --- Define function for Newton method to zero --- */ + /* --- Define function for Newton method to zero --- */ - diff = (Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall) - Y_Plus; + diff = (Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall) - Y_Plus; - /* --- Gradient of function defined above --- */ + /* --- Gradient of function defined above --- */ - grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + - kappa /(U_Tau * sqrt(Gam)) * asin(U_Plus * sqrt(Gam)) * Y_Plus_White - - exp(-1.0 * B * kappa) * (0.5 * pow(VelTangMod * kappa / U_Tau, 3) + - pow(VelTangMod * kappa / U_Tau, 2) + VelTangMod * kappa / U_Tau) / U_Tau; + grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + + kappa /(U_Tau * sqrt(Gam)) * asin(U_Plus * sqrt(Gam)) * Y_Plus_White - + exp(-1.0 * B * kappa) * (0.5 * pow(VelTangMod * kappa / U_Tau, 3) + + pow(VelTangMod * kappa / U_Tau, 2) + VelTangMod * kappa / U_Tau) / U_Tau; - /* --- Newton Step --- */ + /* --- Newton Step --- */ + + U_Tau = U_Tau - relax*(diff / grad_diff); - U_Tau = U_Tau - relax*(diff / grad_diff); + counter++; - counter++; + if (counter > max_iter) { + notConvergedCounter++; + cout << "Warning: Y+ did not converge within the max number of iterations!" << endl; + break; + } - if (counter > max_iter) { - notConvergedCounter++; - cout << "Warning: Y+ did not converge within the max number of iterations!" << endl; - cout << counter <<", U_tau = "<0) { + // cout << "Warning: y+ < 5.0 in " << smallYPlusCounter<< " points, wall model not active in these points."<GetWall_HeatFlux(Marker_Tag); - // heat flux from temperature: q_w = h*(T_wall - T_fluid) + su2double q_w = 0.0; + if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) + q_w = config->GetWall_HeatFlux(Marker_Tag); + + // heat flux from temperature: q_w = h*(T_wall - T_fluid) /*--- Loop over all of the vertices on this boundary marker ---*/ @@ -900,6 +903,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- Automatic switch off when y+ < 5 according to Nichols & Nelson (2004) ---*/ if (Y_Plus_Start < 5.0) { + cout << "skipping stress due to wall model" << endl; continue; } diff --git a/SU2_CFD/src/solvers/CTurbSASolver.cpp b/SU2_CFD/src/solvers/CTurbSASolver.cpp index 7effe0f6258..0a2d15fcc23 100644 --- a/SU2_CFD/src/solvers/CTurbSASolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSASolver.cpp @@ -419,7 +419,7 @@ void CTurbSASolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_conta if (config->GetWall_Functions()) { SU2_OMP_MASTER - SetNuTilde_WF(geometry, solver_container, config, val_marker); + SetTurbVars_WF(geometry, solver_container, config, val_marker); SU2_OMP_BARRIER return; } @@ -1574,7 +1574,7 @@ void CTurbSASolver::BC_NearField_Boundary(CGeometry *geometry, CSolver **solver_ // } -void CTurbSASolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_container, +void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config, unsigned short val_marker) { const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); @@ -1585,7 +1585,7 @@ void CTurbSASolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_containe /* --- tolerance has LARGE impact on convergence, do not increase this value! --- */ const su2double tol = 1e-12; - const su2double relax = 0.5; /*--- relaxation factor for the Newton solver ---*/ + su2double relax = 0.5; /*--- relaxation factor for the Newton solver ---*/ /*--- Typical constants from boundary layer theory ---*/ @@ -1599,61 +1599,79 @@ void CTurbSASolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_containe 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(); - su2double Lam_Visc_Normal = flow_nodes->GetLaminarViscosity(iPoint_Neighbor); - su2double Density_Normal = flow_nodes->GetDensity(iPoint_Neighbor); - su2double Kin_Visc_Normal = Lam_Visc_Normal/Density_Normal; + /*--- Check if the node belongs to the domain (i.e, not a halo node) ---*/ - su2double Eddy_Visc = solver_container[FLOW_SOL]->GetEddyViscWall(val_marker, iVertex); + if (geometry->nodes->GetDomain(iPoint)) { - /*--- Solve for the new value of nu_tilde given the eddy viscosity and using a Newton method ---*/ + const auto iPoint_Neighbor = geometry->vertex[val_marker][iVertex]->GetNormal_Neighbor(); - // start with positive value of nu_til_old - su2double nu_til = 0.0; - su2double nu_til_old = nodes->GetSolution(iPoint,0); + su2double Y_Plus = solver_container[FLOW_SOL]->GetYPlus(val_marker, iVertex); - unsigned short counter = 0; - su2double diff = 1.0; + /*--- Do not use wall model at the ipoint when y+ < 5.0 ---*/ - while (diff > tol) { - // note the error in Nichols and Nelson - su2double func = nu_til_old*nu_til_old*nu_til_old*nu_til_old - (Eddy_Visc/Density_Normal)*(nu_til_old*nu_til_old*nu_til_old + Kin_Visc_Normal*Kin_Visc_Normal*Kin_Visc_Normal*cv1_3); - su2double func_prim = 4.0 * nu_til_old*nu_til_old*nu_til_old - 3.0*(Eddy_Visc/Density_Normal)*(nu_til_old*nu_til_old); + if (Y_Plus < 5.0) { - // damped Newton method - nu_til = nu_til_old - relax*(func/func_prim); + /* --- note that we do not do anything for y+ < 5, meaning that we have a zero flux (Neumann) boundary condition --- */ + + continue; + } - diff = fabs(nu_til-nu_til_old); - nu_til_old = nu_til; + su2double Lam_Visc_Normal = flow_nodes->GetLaminarViscosity(iPoint_Neighbor); + su2double Density_Normal = flow_nodes->GetDensity(iPoint_Neighbor); + su2double Kin_Visc_Normal = Lam_Visc_Normal/Density_Normal; - // sometimes we get negative values when the solution has not converged yet, we just reset the nu_tilde in that case. - if (nu_til_oldGetEddyViscWall(val_marker, iVertex); - counter++; - if (counter > max_iter) { - cout << "WARNING: Nu_tilde evaluation did not converge in " <GetSolution(iPoint,0); + + unsigned short counter = 0; + su2double diff = 1.0; + relax = 0.5; + while (diff > tol) { + // note the error in Nichols and Nelson + su2double func = nu_til_old*nu_til_old*nu_til_old*nu_til_old - (Eddy_Visc/Density_Normal)*(nu_til_old*nu_til_old*nu_til_old + Kin_Visc_Normal*Kin_Visc_Normal*Kin_Visc_Normal*cv1_3); + su2double func_prim = 4.0 * nu_til_old*nu_til_old*nu_til_old - 3.0*(Eddy_Visc/Density_Normal)*(nu_til_old*nu_til_old); + + // damped Newton method + nu_til = nu_til_old - relax*(func/func_prim); + + diff = fabs(nu_til-nu_til_old); + nu_til_old = nu_til; + + // sometimes we get negative values when the solution has not converged yet, we just reset the nu_tilde in that case. + if (nu_til_oldGetSolution(iPoint,0)<<" , nutilde="<GetSolution(iPoint,0)/relax; + } + + counter++; + if (counter > max_iter) { + cout << "WARNING: Nu_tilde evaluation did not converge in " <SetSolution_Old(iPoint_Neighbor,Sol); - LinSysRes.SetBlock_Zero(iPoint_Neighbor); + nodes->SetSolution_Old(iPoint_Neighbor,solution); + LinSysRes.SetBlock_Zero(iPoint_Neighbor); - /*--- includes 1 in the diagonal ---*/ + /*--- includes 1 in the diagonal ---*/ - if (implicit) Jacobian.DeleteValsRowi(iPoint_Neighbor); + if (implicit) Jacobian.DeleteValsRowi(iPoint_Neighbor); + } } - } void CTurbSASolver::SetDES_LengthScale(CSolver **solver, CGeometry *geometry, CConfig *config){ diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index a74d133fb89..8b422300f97 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -380,7 +380,7 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont if (config->GetWall_Functions()) { SU2_OMP_MASTER - SetNuTilde_WF(geometry, solver_container, config, val_marker); + SetTurbVars_WF(geometry, solver_container, config, val_marker); SU2_OMP_BARRIER return; } @@ -466,39 +466,46 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont } -void CTurbSSTSolver::SetNuTilde_WF(CGeometry *geometry, CSolver **solver_container, +void CTurbSSTSolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config, unsigned short val_marker) { /*--- von Karman constant from boundary layer theory ---*/ const su2double kappa = config->GetwallModelKappa(); const su2double relax = 0.5; /*--- relaxation factor for k-omega values ---*/ - + const su2double beta_1 = constants[4]; + su2double k,omega; + /*--- Loop over all of the vertices on this boundary marker ---*/ 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(); - su2double Eddy_Visc = solver_container[FLOW_SOL]->GetEddyViscWall(val_marker, iVertex); + su2double Y_Plus = solver_container[FLOW_SOL]->GetYPlus(val_marker, iVertex); + su2double Lam_Visc_Wall = solver_container[FLOW_SOL]->GetNodes()->GetLaminarViscosity(iPoint); - su2double omega1,omega0,y,k_new,omega_new; - su2double k = nodes->GetSolution(iPoint_Neighbor,0); - su2double omega = nodes->GetSolution(iPoint_Neighbor,1); + /*--- Do not use wall model at the ipoint when y+ < 5.0 ---*/ - su2double Lam_Visc_Wall = solver_container[FLOW_SOL]->GetNodes()->GetLaminarViscosity(iPoint); - su2double Density_Wall = solver_container[FLOW_SOL]->GetNodes()->GetDensity(iPoint); + if (Y_Plus < 5.0) { + + /* --- use zero flux (Neumann) conditions --- */ - su2double Y_Plus = solver_container[FLOW_SOL]->GetYPlus(val_marker, iVertex); - su2double U_Tau = solver_container[FLOW_SOL]->GetUTau(val_marker, iVertex); + continue; + } - y = Y_Plus*Lam_Visc_Wall/(Density_Wall*U_Tau); + su2double Eddy_Visc = solver_container[FLOW_SOL]->GetEddyViscWall(val_marker, iVertex); + k = nodes->GetSolution(iPoint_Neighbor,0); + omega = nodes->GetSolution(iPoint_Neighbor,1); + su2double Density_Wall = solver_container[FLOW_SOL]->GetNodes()->GetDensity(iPoint); + su2double U_Tau = solver_container[FLOW_SOL]->GetUTau(val_marker, iVertex); + su2double y = Y_Plus*Lam_Visc_Wall/(Density_Wall*U_Tau); - omega1 = 6.0*Lam_Visc_Wall/(0.075*Density_Wall*y*y); // eq. 19 - omega0 = U_Tau/(sqrt(0.09)*kappa*y); // eq. 20 - omega_new = sqrt(omega0*omega0 + omega1*omega1); // eq. 21 Nichols & Nelson - k_new = omega_new * Eddy_Visc/Density_Wall; // eq. 22 Nichols & Nelson - // (is this the correct density? paper says rho and not rho_w) + su2double omega1 = 6.0*Lam_Visc_Wall/(0.075*Density_Wall*y*y); // eq. 19 + su2double omega0 = U_Tau/(sqrt(0.09)*kappa*y); // eq. 20 + su2double omega_new = sqrt(omega0*omega0 + omega1*omega1); // eq. 21 Nichols & Nelson + su2double k_new = omega_new * Eddy_Visc/Density_Wall; // eq. 22 Nichols & Nelson + // (is this the correct density? paper says rho and not rho_w) /*--- put some relaxation factor on the k-omega values ---*/ k += relax*(k_new - k); From 995f5872e48c302db8a6622bac621f80a1a2bac3 Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Thu, 1 Apr 2021 14:59:06 +0200 Subject: [PATCH 23/88] fix unused beta_1 --- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 15e23e6e86c..5724c53c336 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -464,7 +464,7 @@ void CTurbSSTSolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contai const su2double kappa = config->GetwallModelKappa(); const su2double relax = 0.5; /*--- relaxation factor for k-omega values ---*/ - const su2double beta_1 = constants[4]; + //const su2double beta_1 = constants[4]; su2double k,omega; /*--- Loop over all of the vertices on this boundary marker ---*/ From 4b8297419093324ab4888ba147584a88fff8bc9f Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Wed, 19 May 2021 10:29:02 +0200 Subject: [PATCH 24/88] fix OMP command --- SU2_CFD/src/solvers/CIncNSSolver.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index aefed5e11cf..1eec8f9bc5b 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -103,6 +103,7 @@ void CIncNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container if (wall_functions) { SU2_OMP_MASTER SetTauWall_WF(geometry, solver_container, config); + END_SU2_OMP_MASTER // nijso: we have to set this as well?? // seteddyviscfirstpoint SU2_OMP_BARRIER @@ -865,6 +866,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container // ...? } + END_SU2_OMP_FOR //} } From 423a89e8f23db209b76a53d8e0de677e8fd1fe03 Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Wed, 19 May 2021 15:56:52 +0200 Subject: [PATCH 25/88] fix OMP command --- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index ab4215fe647..842b4b59f11 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -374,6 +374,8 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont if (config->GetWall_Functions()) { SU2_OMP_MASTER SetTurbVars_WF(geometry, solver_container, config, val_marker); + END_SU2_OMP_MASTER + SU2_OMP_BARRIER return; } From a6dc3878c9f42deb7c12be779c4f9a5fb4d83448 Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Wed, 19 May 2021 20:22:19 +0200 Subject: [PATCH 26/88] update to enum class --- Common/include/CConfig.hpp | 6 +- Common/include/option_structure.hpp | 34 +- Common/include/option_structure.inl | 30 +- Common/src/CConfig.cpp | 14 +- Common/src/fem/fem_geometry_structure.cpp | 8 +- .../src/fem/geometry_structure_fem_part.cpp | 8 +- .../include/solvers/CFVMFlowSolverBase.inl | 2 +- SU2_CFD/src/solvers/CIncNSSolver.cpp | 310 +++++++++--------- SU2_CFD/src/solvers/CNSSolver.cpp | 9 +- .../unsteady_CHT_FlatPlate_Conf.cfg | 2 +- config_template.cfg | 4 +- 11 files changed, 210 insertions(+), 217 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index c869c6391d6..b0456242299 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -676,7 +676,7 @@ class CConfig { unsigned short nConfig_Files; /*!< \brief Number of config files for multiphysics problems. */ string *Config_Filenames; /*!< \brief List of names for configuration files. */ - unsigned short *Kind_WallFunctions; /*!< \brief The kind of wall function to use for the corresponding markers. */ + WALL_FUNCTIONS *Kind_WallFunctions; /*!< \brief The kind of wall function to use for the corresponding markers. */ unsigned short **IntInfo_WallFunctions; /*!< \brief Additional integer information for the wall function markers. */ su2double **DoubleInfo_WallFunctions; /*!< \brief Additional double information for the wall function markers. */ unsigned short *Marker_All_Monitoring, /*!< \brief Global index for monitoring using the grid information. */ @@ -1257,7 +1257,7 @@ class CConfig { su2double** & ActDisk_PressJump, su2double** & ActDisk_TempJump, su2double** & ActDisk_Omega); void addWallFunctionOption(const string &name, unsigned short &list_size, - string* &string_field, unsigned short* &val_Kind_WF, + string* &string_field, WALL_FUNCTIONS* &val_Kind_WF, unsigned short** &val_IntInfo_WF, su2double** &val_DoubleInfo_WF); void addPythonOption(const string name); @@ -6631,7 +6631,7 @@ class CConfig { * \param[in] val_marker - String of the viscous wall marker. * \return The type of wall function treatment. */ - unsigned short GetWallFunction_Treatment(string val_marker) const; + WALL_FUNCTIONS GetWallFunction_Treatment(string val_marker) const; /*! * \brief Get the additional integer info for the wall function treatment diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp index 0a548762a37..56d83ed7b96 100644 --- a/Common/include/option_structure.hpp +++ b/Common/include/option_structure.hpp @@ -935,23 +935,23 @@ static const MapType RoeLowDiss_Map = { /*! * \brief Types of wall functions. */ -enum ENUM_WALL_FUNCTIONS { - NO_WALL_FUNCTION = 0, /*!< \brief No wall function treatment, integration to the wall. Default behavior. */ - STANDARD_WALL_FUNCTION = 1, /*!< \brief Standard wall function. */ - ADAPTIVE_WALL_FUNCTION = 2, /*!< \brief Adaptive wall function. Formulation depends on y+. */ - SCALABLE_WALL_FUNCTION = 3, /*!< \brief Scalable wall function. */ - EQUILIBRIUM_WALL_MODEL = 4, /*!< \brief Equilibrium wall model for LES. */ - NONEQUILIBRIUM_WALL_MODEL = 5, /*!< \brief Non-equilibrium wall model for LES. */ - LOGARITHMIC_WALL_MODEL = 6 /*!< \brief Logarithmic law-of-the-wall model for LES. */ -}; -static const MapType Wall_Functions_Map = { - MakePair("NO_WALL_FUNCTION", NO_WALL_FUNCTION) - MakePair("STANDARD_WALL_FUNCTION", STANDARD_WALL_FUNCTION) - MakePair("ADAPTIVE_WALL_FUNCTION", ADAPTIVE_WALL_FUNCTION) - MakePair("SCALABLE_WALL_FUNCTION", SCALABLE_WALL_FUNCTION) - MakePair("EQUILIBRIUM_WALL_MODEL", EQUILIBRIUM_WALL_MODEL) - MakePair("NONEQUILIBRIUM_WALL_MODEL", NONEQUILIBRIUM_WALL_MODEL) - MakePair("LOGARITHMIC_WALL_MODEL", LOGARITHMIC_WALL_MODEL) +enum class WALL_FUNCTIONS { + NONE , /*!< \brief No wall function treatment, integration to the wall. Default behavior. */ + STANDARD_WALL_FUNCTION , /*!< \brief Standard wall function. */ + ADAPTIVE_WALL_FUNCTION , /*!< \brief Adaptive wall function. Formulation depends on y+. */ + SCALABLE_WALL_FUNCTION , /*!< \brief Scalable wall function. */ + EQUILIBRIUM_WALL_MODEL , /*!< \brief Equilibrium wall model for LES. */ + NONEQUILIBRIUM_WALL_MODEL , /*!< \brief Non-equilibrium wall model for LES. */ + LOGARITHMIC_WALL_MODEL /*!< \brief Logarithmic law-of-the-wall model for LES. */ +}; +static const MapType Wall_Functions_Map = { + MakePair("NONE", WALL_FUNCTIONS::NONE) + MakePair("STANDARD_WALL_FUNCTION", WALL_FUNCTIONS::STANDARD_WALL_FUNCTION) + MakePair("ADAPTIVE_WALL_FUNCTION", WALL_FUNCTIONS::ADAPTIVE_WALL_FUNCTION) + MakePair("SCALABLE_WALL_FUNCTION", WALL_FUNCTIONS::SCALABLE_WALL_FUNCTION) + MakePair("EQUILIBRIUM_WALL_MODEL", WALL_FUNCTIONS::EQUILIBRIUM_WALL_MODEL) + MakePair("NONEQUILIBRIUM_WALL_MODEL", WALL_FUNCTIONS::NONEQUILIBRIUM_WALL_MODEL) + MakePair("LOGARITHMIC_WALL_MODEL", WALL_FUNCTIONS::LOGARITHMIC_WALL_MODEL) }; /*! diff --git a/Common/include/option_structure.inl b/Common/include/option_structure.inl index 94a59c664b0..2941f1bcd22 100644 --- a/Common/include/option_structure.inl +++ b/Common/include/option_structure.inl @@ -1736,13 +1736,13 @@ class COptionWallFunction : public COptionBase { string name; // identifier for the option unsigned short &nMarkers; string* &markers; - unsigned short* &walltype; + WALL_FUNCTIONS* &walltype; unsigned short** &intInfo; su2double** &doubleInfo; public: COptionWallFunction(const string name, unsigned short &nMarker_WF, - string* &Marker_WF, unsigned short* &type_WF, + string* &Marker_WF, WALL_FUNCTIONS* &type_WF, unsigned short** &intInfo_WF, su2double** &doubleInfo_WF) : nMarkers(nMarker_WF), markers(Marker_WF), walltype(type_WF), intInfo(intInfo_WF), doubleInfo(doubleInfo_WF) { @@ -1774,14 +1774,16 @@ public: If not, create an error message and return. */ ++counter; const unsigned short indWallType = counter; - unsigned short typeWF = NO_WALL_FUNCTION; + auto typeWF = WALL_FUNCTIONS::NONE; bool validWF = true; if (counter == totalSize) validWF = false; else { - map::const_iterator it; + map::const_iterator it; it = Wall_Functions_Map.find(option_value[counter]); - if(it == Wall_Functions_Map.end()) validWF = false; - else typeWF = it->second; + if(it == Wall_Functions_Map.end()) + validWF = false; + else + typeWF = it->second; } if (!validWF ) { @@ -1801,9 +1803,9 @@ public: must be specified. Hence the counter must be updated accordingly. ---*/ switch( typeWF ) { - case EQUILIBRIUM_WALL_MODEL: counter += 3; break; - case NONEQUILIBRIUM_WALL_MODEL: counter += 2; break; - case LOGARITHMIC_WALL_MODEL: counter += 3; break; + case WALL_FUNCTIONS::EQUILIBRIUM_WALL_MODEL: counter += 3; break; + case WALL_FUNCTIONS::NONEQUILIBRIUM_WALL_MODEL: counter += 2; break; + case WALL_FUNCTIONS::LOGARITHMIC_WALL_MODEL: counter += 3; break; default: break; } @@ -1824,7 +1826,7 @@ public: /* Allocate the memory to store the data for the wall function markers. */ this->nMarkers = nVals; this->markers = new string[nVals]; - this->walltype = new unsigned short[nVals]; + this->walltype = new WALL_FUNCTIONS[nVals]; this->intInfo = new unsigned short*[nVals]; this->doubleInfo = new su2double*[nVals]; @@ -1843,7 +1845,7 @@ public: /* Determine the wall function type. As their validaties have already been tested, there is no need to do so again. */ - map::const_iterator it; + map::const_iterator it; it = Wall_Functions_Map.find(option_value[counter++]); this->walltype[i] = it->second; @@ -1852,7 +1854,7 @@ public: is needed, which is extracted from option_value. ---*/ switch( this->walltype[i] ) { - case EQUILIBRIUM_WALL_MODEL: { + case WALL_FUNCTIONS::EQUILIBRIUM_WALL_MODEL: { /* LES equilibrium wall model. The exchange distance, stretching factor and number of points in the wall model must be specified. */ @@ -1877,7 +1879,7 @@ public: break; } - case NONEQUILIBRIUM_WALL_MODEL: { + case WALL_FUNCTIONS::NONEQUILIBRIUM_WALL_MODEL: { /* LES non-equilibrium model. The RANS turbulence model and the exchange distance need to be specified. */ @@ -1910,7 +1912,7 @@ public: break; } - case LOGARITHMIC_WALL_MODEL: { + case WALL_FUNCTIONS::LOGARITHMIC_WALL_MODEL: { /* LES Logarithmic law-of-the-wall model. The exchange distance, stretching factor and number of points in the wall model must be specified. */ diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index ef2d585b15a..6013ba92414 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -531,7 +531,7 @@ void CConfig::addActDiskOption(const string & name, unsigned short & nMarker_Act } void CConfig::addWallFunctionOption(const string &name, unsigned short &list_size, string* &string_field, - unsigned short* &val_Kind_WF, unsigned short** &val_IntInfo_WF, + WALL_FUNCTIONS* &val_Kind_WF, unsigned short** &val_IntInfo_WF, su2double** &val_DoubleInfo_WF) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); @@ -3262,13 +3262,13 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i Wall_Functions = false; if (nMarker_WallFunctions > 0) { for (iMarker = 0; iMarker < nMarker_WallFunctions; iMarker++) { - if (Kind_WallFunctions[iMarker] != NO_WALL_FUNCTION) + if (Kind_WallFunctions[iMarker] != WALL_FUNCTIONS::NONE) Wall_Functions = true; - if ((Kind_WallFunctions[iMarker] == ADAPTIVE_WALL_FUNCTION) || (Kind_WallFunctions[iMarker] == SCALABLE_WALL_FUNCTION) - || (Kind_WallFunctions[iMarker] == NONEQUILIBRIUM_WALL_MODEL)) + if ((Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::ADAPTIVE_WALL_FUNCTION) || (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::SCALABLE_WALL_FUNCTION) + || (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::NONEQUILIBRIUM_WALL_MODEL)) - SU2_MPI::Error(string("For RANS problems, use NO_WALL_FUNCTION, STANDARD_WALL_FUNCTION or EQUILIBRIUM_WALL_MODEL.\n"), CURRENT_FUNCTION); + SU2_MPI::Error(string("For RANS problems, use NONE, STANDARD_WALL_FUNCTION or EQUILIBRIUM_WALL_MODEL.\n"), CURRENT_FUNCTION); } } @@ -8881,9 +8881,9 @@ pair CConfig::GetWallRoughnessProperties(string val_marker return WallProp; } -unsigned short CConfig::GetWallFunction_Treatment(string val_marker) const { +WALL_FUNCTIONS CConfig::GetWallFunction_Treatment(string val_marker) const { - unsigned short WallFunction = NO_WALL_FUNCTION; + WALL_FUNCTIONS WallFunction = WALL_FUNCTIONS::NONE; for(unsigned short iMarker=0; iMarkerGetMarker_All_TagBound(iMarker); - if(config->GetWallFunction_Treatment(Marker_Tag) != NO_WALL_FUNCTION) + if(config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::NONE) wallFunctions = true; break; } @@ -6235,19 +6235,19 @@ void CMeshFEM_DG::WallFunctionPreprocessing(CConfig *config) { case ISOTHERMAL: case HEAT_FLUX: { const string Marker_Tag = config->GetMarker_All_TagBound(iMarker); - if(config->GetWallFunction_Treatment(Marker_Tag) != NO_WALL_FUNCTION) { + if(config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::NONE) { /* An LES wall model is used for this boundary marker. Determine which wall model and allocate the memory for the member variable. */ switch (config->GetWallFunction_Treatment(Marker_Tag) ) { - case EQUILIBRIUM_WALL_MODEL: { + case WALL_FUNCTIONS::EQUILIBRIUM_WALL_MODEL: { if(rank == MASTER_NODE) cout << "Marker " << Marker_Tag << " uses an Equilibrium Wall Model." << endl; boundaries[iMarker].wallModel = new CWallModel1DEQ(config, Marker_Tag); break; } - case LOGARITHMIC_WALL_MODEL: { + case WALL_FUNCTIONS::LOGARITHMIC_WALL_MODEL: { if(rank == MASTER_NODE) cout << "Marker " << Marker_Tag << " uses the Reichardt and Kader analytical laws for the Wall Model." << endl; diff --git a/Common/src/fem/geometry_structure_fem_part.cpp b/Common/src/fem/geometry_structure_fem_part.cpp index 9f0384b6873..ad4085eb773 100644 --- a/Common/src/fem/geometry_structure_fem_part.cpp +++ b/Common/src/fem/geometry_structure_fem_part.cpp @@ -3355,7 +3355,7 @@ void CPhysicalGeometry::DetermineDonorElementsWallFunctions(CConfig *config) { case ISOTHERMAL: case HEAT_FLUX: { const string Marker_Tag = config->GetMarker_All_TagBound(iMarker); - if(config->GetWallFunction_Treatment(Marker_Tag) != NO_WALL_FUNCTION) + if(config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::NONE) wallFunctions = true; break; } @@ -3500,7 +3500,7 @@ void CPhysicalGeometry::DetermineDonorElementsWallFunctions(CConfig *config) { case ISOTHERMAL: case HEAT_FLUX: { const string Marker_Tag = config->GetMarker_All_TagBound(iMarker); - if(config->GetWallFunction_Treatment(Marker_Tag) != NO_WALL_FUNCTION) { + if(config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::NONE) { /* Retrieve the floating point information for this boundary marker. The exchange location is the first element of this array. */ @@ -3952,7 +3952,7 @@ void CPhysicalGeometry::DetermineDonorElementsWallFunctions(CConfig *config) { case ISOTHERMAL: case HEAT_FLUX: { const string Marker_Tag = config->GetMarker_All_TagBound(iMarker); - if(config->GetWallFunction_Treatment(Marker_Tag) != NO_WALL_FUNCTION) { + if(config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::NONE) { for(unsigned long l=0; lRemoveMultipleDonorsWallFunctions(); @@ -4825,7 +4825,7 @@ void CPhysicalGeometry::ComputeFEMGraphWeights( case ISOTHERMAL: case HEAT_FLUX: { const string Marker_Tag = config->GetMarker_All_TagBound(iMarker); - if(config->GetWallFunction_Treatment(Marker_Tag) != NO_WALL_FUNCTION) { + if(config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::NONE) { /* Retrieve the integer information for this boundary marker. The number of points in normal direction for the wall function diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index aa5d06c3e4f..c90c06a64b8 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2490,7 +2490,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr /* --- check if wall functions are used --- */ - const bool wallfunctions = (config->GetWallFunction_Treatment(Marker_Tag) != NO_WALL_FUNCTION); + const bool wallfunctions = (config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::NONE); /*--- Loop over the vertices to compute the forces ---*/ diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 1eec8f9bc5b..b5dc7036208 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -390,7 +390,7 @@ void CIncNSSolver::BC_Wall_Generic(const CGeometry *geometry, const CConfig *con //const auto Wall_Function = config->GetWallFunction_Treatment(Marker_Tag); // nijso: we do not have a special treatment yet for heated walls // the wall function model is written for heat flux, we have to implement isothermal wall conditions - //if (Wall_Function != NO_WALL_FUNCTION) + //if (Wall_Function != WALL_FUNCTIONS::NONE) // SU2_MPI::Error("Wall function treament not implemented yet", CURRENT_FUNCTION); /*--- Loop over all of the vertices on this boundary marker ---*/ @@ -521,8 +521,7 @@ void CIncNSSolver::BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **sol /*--- Retrieve the specified wall function treatment.---*/ - const auto Wall_Function = config->GetWallFunction_Treatment(Marker_Tag); - if (Wall_Function != NO_WALL_FUNCTION) { + if (config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::NONE) { SU2_MPI::Error("Wall function treament not implemented yet", CURRENT_FUNCTION); } @@ -633,7 +632,8 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ const su2double relax = 0.5; /*--- relaxation factor for the Newton solver ---*/ - /*--- Compute the recovery factor ---*/ + /*--- Compute the recovery factor ---*/ + // Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) const su2double Recovery = pow(config->GetPrandtl_Lam(), (1.0/3.0)); @@ -642,232 +642,226 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container const su2double kappa = config->GetwallModelKappa(); const su2double B = config->GetwallModelB(); - for (auto iMarker = 0u; iMarker < config->GetnMarker_All(); iMarker++) { if (!config->GetViscous_Wall(iMarker)) continue; - //if ((config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) || - // (config->GetMarker_All_KindBC(iMarker) == ISOTHERMAL) ) { + /*--- Identify the boundary by string name ---*/ - /*--- Identify the boundary by string name ---*/ + const auto Marker_Tag = config->GetMarker_All_TagBound(iMarker); - const auto Marker_Tag = config->GetMarker_All_TagBound(iMarker); + /*--- Jump to another BC if it is not wall function ---*/ - /*--- Jump to another BC if it is not wall function ---*/ + if (config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::STANDARD_WALL_FUNCTION) continue; - if (config->GetWallFunction_Treatment(Marker_Tag) != STANDARD_WALL_FUNCTION) - continue; + /*--- Get the specified wall heat flux from config ---*/ + // note that we can get the heat flux from the temperature gradient + su2double q_w = 0.0; - /*--- Get the specified wall heat flux from config ---*/ - // note that we can get the heat flux from the temperature gradient - su2double q_w = 0.0; + if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) + q_w = config->GetWall_HeatFlux(Marker_Tag); - if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) - q_w = config->GetWall_HeatFlux(Marker_Tag); + // heat flux from temperature: q_w = h*(T_wall - T_fluid) - // heat flux from temperature: q_w = h*(T_wall - T_fluid) + /*--- Loop over all of the vertices on this boundary marker ---*/ - /*--- Loop over all of the vertices on this boundary marker ---*/ + SU2_OMP_FOR_DYN(OMP_MIN_SIZE) + for (auto iVertex = 0u; iVertex < geometry->nVertex[iMarker]; iVertex++) { - SU2_OMP_FOR_DYN(OMP_MIN_SIZE) - for (auto iVertex = 0u; iVertex < geometry->nVertex[iMarker]; iVertex++) { + const auto iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); + const auto Point_Normal = geometry->vertex[iMarker][iVertex]->GetNormal_Neighbor(); - const auto iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); - const auto Point_Normal = geometry->vertex[iMarker][iVertex]->GetNormal_Neighbor(); + /*--- Check if the node belongs to the domain (i.e, not a halo node) + and the neighbor is not part of the physical boundary ---*/ - /*--- Check if the node belongs to the domain (i.e, not a halo node) - and the neighbor is not part of the physical boundary ---*/ + if (!geometry->nodes->GetDomain(iPoint)) continue; - if (!geometry->nodes->GetDomain(iPoint)) continue; + /*--- Get coordinates of the current vertex and nearest normal point ---*/ - /*--- Get coordinates of the current vertex and nearest normal point ---*/ + const auto Coord = geometry->nodes->GetCoord(iPoint); + const auto Coord_Normal = geometry->nodes->GetCoord(Point_Normal); - const auto Coord = geometry->nodes->GetCoord(iPoint); - const auto Coord_Normal = geometry->nodes->GetCoord(Point_Normal); + /*--- Compute dual-grid area and boundary normal ---*/ - /*--- Compute dual-grid area and boundary normal ---*/ + const auto Normal = geometry->vertex[iMarker][iVertex]->GetNormal(); - const auto Normal = geometry->vertex[iMarker][iVertex]->GetNormal(); + su2double Area = GeometryToolbox::Norm(nDim, Normal); - su2double Area = GeometryToolbox::Norm(nDim, Normal); + su2double UnitNormal[MAXNDIM] = {0.0}; + for (auto iDim = 0u; iDim < nDim; iDim++) + UnitNormal[iDim] = -Normal[iDim]/Area; - su2double UnitNormal[MAXNDIM] = {0.0}; - for (auto iDim = 0u; iDim < nDim; iDim++) - UnitNormal[iDim] = -Normal[iDim]/Area; + /*--- Get the velocity, pressure, and temperature at the nearest + (normal) interior point. ---*/ - /*--- Get the velocity, pressure, and temperature at the nearest - (normal) interior point. ---*/ + su2double Vel[MAXNDIM] = {0.0}; + for (auto iDim = 0u; iDim < nDim; iDim++) + Vel[iDim] = nodes->GetVelocity(Point_Normal,iDim); - su2double Vel[MAXNDIM] = {0.0}; - for (auto iDim = 0u; iDim < nDim; iDim++) - Vel[iDim] = nodes->GetVelocity(Point_Normal,iDim); + // su2double P_Normal = nodes->GetPressure(Point_Normal); + // su2double T_Normal = nodes->GetTemperature(Point_Normal); - // su2double P_Normal = nodes->GetPressure(Point_Normal); - // su2double T_Normal = nodes->GetTemperature(Point_Normal); - - /*--- Compute the wall-parallel velocity at first point off the wall ---*/ + /*--- Compute the wall-parallel velocity at first point off the wall ---*/ - su2double VelNormal = GeometryToolbox::DotProduct(int(MAXNDIM), Vel, UnitNormal); + su2double VelNormal = GeometryToolbox::DotProduct(int(MAXNDIM), Vel, UnitNormal); - su2double VelTang[MAXNDIM] = {0.0}; - for (auto iDim = 0u; iDim < nDim; iDim++) - VelTang[iDim] = Vel[iDim] - VelNormal*UnitNormal[iDim]; + su2double VelTang[MAXNDIM] = {0.0}; + for (auto iDim = 0u; iDim < nDim; iDim++) + VelTang[iDim] = Vel[iDim] - VelNormal*UnitNormal[iDim]; - su2double VelTangMod = GeometryToolbox::Norm(int(MAXNDIM), VelTang); + su2double VelTangMod = GeometryToolbox::Norm(int(MAXNDIM), VelTang); - /*--- Compute normal distance of the interior point from the wall ---*/ + /*--- Compute normal distance of the interior point from the wall ---*/ - su2double WallDist[MAXNDIM] = {0.0}; - GeometryToolbox::Distance(nDim, Coord, Coord_Normal, WallDist); + su2double WallDist[MAXNDIM] = {0.0}; + GeometryToolbox::Distance(nDim, Coord, Coord_Normal, WallDist); - su2double WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); - - /*--- Compute mach number ---*/ + su2double WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); - // M_Normal = VelTangMod / sqrt(Gamma * Gas_Constant * T_Normal); + /*--- Compute mach number ---*/ - /*--- Compute the wall temperature using the Crocco-Buseman equation ---*/ + // M_Normal = VelTangMod / sqrt(Gamma * Gas_Constant * T_Normal); - //T_Normal = T_Wall * (1.0 + 0.5*Gamma_Minus_One*Recovery*u_normal*u_normal); - // this means that T_Wall = T_Normal/(1.0+0.5*Gamma_Minus_One*Recovery*u_normal*u_normal) - //T_Wall = T_Normal/(1.0+0.5*Gamma_Minus_One*Recovery*VelTangMod*VelTangMod); - // in incompressible flows, we can assume that there is no velocity-related temperature change - // Prandtl: T+ = Pr*y+ - su2double T_Wall = nodes->GetTemperature(iPoint); + /*--- Compute the wall temperature using the Crocco-Buseman equation ---*/ - /*--- Extrapolate the pressure from the interior & compute the - wall density using the equation of state ---*/ + //T_Normal = T_Wall * (1.0 + 0.5*Gamma_Minus_One*Recovery*u_normal*u_normal); + // this means that T_Wall = T_Normal/(1.0+0.5*Gamma_Minus_One*Recovery*u_normal*u_normal) + //T_Wall = T_Normal/(1.0+0.5*Gamma_Minus_One*Recovery*VelTangMod*VelTangMod); + // in incompressible flows, we can assume that there is no velocity-related temperature change + // Prandtl: T+ = Pr*y+ + su2double T_Wall = nodes->GetTemperature(iPoint); - /*--- incompressible formulation ---*/ - su2double Density_Wall = nodes->GetDensity(iPoint); - su2double Conductivity_Wall = nodes->GetThermalConductivity(iPoint); - su2double Lam_Visc_Normal = nodes->GetLaminarViscosity(Point_Normal); - /*--- Compute the shear stress at the wall in the regular fashion - by using the stress tensor on the surface ---*/ + /*--- Extrapolate the pressure from the interior & compute the + wall density using the equation of state ---*/ - su2double tau[MAXNDIM][MAXNDIM] = {{0.0}}, TauElem[MAXNDIM] = {0.0}; - su2double Lam_Visc_Wall = nodes->GetLaminarViscosity(iPoint); - su2double Eddy_Visc_Wall = nodes->GetEddyViscosity(iPoint); - // do we need the total viscosity for the stress tensor? - //su2double total_viscosity = (Lam_Visc_Wall + Eddy_Visc_Wall); - CNumerics::ComputeStressTensor(nDim, tau, nodes->GetGradient_Primitive(iPoint)+1, Lam_Visc_Wall); - - for (auto iDim = 0u; iDim < nDim; iDim++) { - TauElem[iDim] = GeometryToolbox::DotProduct(nDim, tau[iDim], UnitNormal); - } + /*--- incompressible formulation ---*/ + su2double Density_Wall = nodes->GetDensity(iPoint); + su2double Conductivity_Wall = nodes->GetThermalConductivity(iPoint); + su2double Lam_Visc_Normal = nodes->GetLaminarViscosity(Point_Normal); + + /*--- Compute the shear stress at the wall in the regular fashion + by using the stress tensor on the surface ---*/ + + su2double tau[MAXNDIM][MAXNDIM] = {{0.0}}, TauElem[MAXNDIM] = {0.0}; + su2double Lam_Visc_Wall = nodes->GetLaminarViscosity(iPoint); + su2double Eddy_Visc_Wall = nodes->GetEddyViscosity(iPoint); + // do we need the total viscosity for the stress tensor? + //su2double total_viscosity = (Lam_Visc_Wall + Eddy_Visc_Wall); + CNumerics::ComputeStressTensor(nDim, tau, nodes->GetGradient_Primitive(iPoint)+1, Lam_Visc_Wall); + + for (auto iDim = 0u; iDim < nDim; iDim++) { + TauElem[iDim] = GeometryToolbox::DotProduct(nDim, tau[iDim], UnitNormal); + } - /*--- Compute wall shear stress as the magnitude of the wall-tangential - component of the shear stress tensor---*/ + /*--- Compute wall shear stress as the magnitude of the wall-tangential + component of the shear stress tensor---*/ - su2double TauNormal = GeometryToolbox::DotProduct(nDim, TauElem, UnitNormal); + su2double TauNormal = GeometryToolbox::DotProduct(nDim, TauElem, UnitNormal); - su2double TauTangent[MAXNDIM] = {0.0}; - for (auto iDim = 0u; iDim < nDim; iDim++) - TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; + su2double TauTangent[MAXNDIM] = {0.0}; + for (auto iDim = 0u; iDim < nDim; iDim++) + TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; - su2double WallShearStress = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); + su2double WallShearStress = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); - /*--- Calculate the quantities from boundary layer theory and - iteratively solve for a new wall shear stress. Use the current wall - shear stress as a starting guess for the wall function. ---*/ + /*--- Calculate the quantities from boundary layer theory and + iteratively solve for a new wall shear stress. Use the current wall + shear stress as a starting guess for the wall function. ---*/ - unsigned long counter = 0; su2double diff = 1.0; - U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall)); - Y_Plus = 4.99; // clipping value - su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; + unsigned long counter = 0; su2double diff = 1.0; + U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall)); + Y_Plus = 4.99; // clipping value + su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; - /*--- Automatic switch off when y+ < 5 according to Nichols & Nelson (2004) ---*/ + /*--- Automatic switch off when y+ < 5 according to Nichols & Nelson (2004) ---*/ - if (Y_Plus_Start < 5.0) { - /*--- impose a minimum y+ for stability reasons---*/ - smallYPlusCounter++; - } - else { - while (fabs(diff) > tol) { + if (Y_Plus_Start < 5.0) { + /*--- impose a minimum y+ for stability reasons---*/ + smallYPlusCounter++; + } + else { + while (fabs(diff) > tol) { - /*--- Friction velocity and u+ ---*/ + /*--- Friction velocity and u+ ---*/ - su2double U_Plus = VelTangMod/U_Tau; + su2double U_Plus = VelTangMod/U_Tau; - /*--- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) page 1110 ---*/ + /*--- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) page 1110 ---*/ - su2double Gam = Recovery*U_Tau*U_Tau/(2.0*Cp*T_Wall); - /*--- nijso: heated wall needs validation testcase! ---*/ - su2double Beta = q_w*Lam_Visc_Wall/(Density_Wall*T_Wall*Conductivity_Wall*U_Tau); // TODO: nonzero heatflux needs validation case - su2double Q = sqrt(Beta*Beta + 4.0*Gam); - su2double Phi = asin(-1.0*Beta/Q); + su2double Gam = Recovery*U_Tau*U_Tau/(2.0*Cp*T_Wall); + /*--- nijso: heated wall needs validation testcase! ---*/ + su2double Beta = q_w*Lam_Visc_Wall/(Density_Wall*T_Wall*Conductivity_Wall*U_Tau); // TODO: nonzero heatflux needs validation case + su2double Q = sqrt(Beta*Beta + 4.0*Gam); + su2double Phi = asin(-1.0*Beta/Q); - /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ + /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ - su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); + su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); - /*--- Spalding's universal form for the BL velocity with the - outer velocity form of White & Christoph above. ---*/ + /*--- Spalding's universal form for the BL velocity with the + outer velocity form of White & Christoph above. ---*/ - su2double kUp = kappa*U_Plus; - Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); + su2double kUp = kappa*U_Plus; + Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); - su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); + su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); - Eddy_Visc_Wall = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp(-1.0*kappa*B)* - (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0) - - Lam_Visc_Normal/Lam_Visc_Wall); - Eddy_Visc_Wall = max(1.0e-6, Eddy_Visc_Wall); + Eddy_Visc_Wall = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp(-1.0*kappa*B)* + (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0) + - Lam_Visc_Normal/Lam_Visc_Wall); + Eddy_Visc_Wall = max(1.0e-6, Eddy_Visc_Wall); - /* --- Define function for Newton method to zero --- */ + /* --- Define function for Newton method to zero --- */ - diff = (Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall) - Y_Plus; + diff = (Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall) - Y_Plus; - /* --- Gradient of function defined above --- */ + /* --- Gradient of function defined above --- */ - grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + - kappa /(U_Tau * sqrt(Gam)) * asin(U_Plus * sqrt(Gam)) * Y_Plus_White - - exp(-1.0 * B * kappa) * (0.5 * pow(VelTangMod * kappa / U_Tau, 3) + - pow(VelTangMod * kappa / U_Tau, 2) + VelTangMod * kappa / U_Tau) / U_Tau; + grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + + kappa /(U_Tau * sqrt(Gam)) * asin(U_Plus * sqrt(Gam)) * Y_Plus_White - + exp(-1.0 * B * kappa) * (0.5 * pow(VelTangMod * kappa / U_Tau, 3) + + pow(VelTangMod * kappa / U_Tau, 2) + VelTangMod * kappa / U_Tau) / U_Tau; - /* --- Newton Step --- */ + /* --- Newton Step --- */ - U_Tau = U_Tau - relax*(diff / grad_diff); - - counter++; + U_Tau = U_Tau - relax*(diff / grad_diff); - if (counter > max_iter) { - notConvergedCounter++; - cout << "Warning: Y+ did not converge within the max number of iterations!" << endl; - break; - } + counter++; + if (counter > max_iter) { + notConvergedCounter++; + cout << "Warning: Y+ did not converge within the max number of iterations!" << endl; + break; } } + } - /*--- Calculate an updated value for the wall shear stress - using the y+ value, the definition of y+, and the definition of - the friction velocity. ---*/ + /*--- Calculate an updated value for the wall shear stress + using the y+ value, the definition of y+, and the definition of + the friction velocity. ---*/ - YPlus[iMarker][iVertex] = Y_Plus; - EddyViscWall[iMarker][iVertex] = Eddy_Visc_Wall; - UTau[iMarker][iVertex] = U_Tau; + YPlus[iMarker][iVertex] = Y_Plus; + EddyViscWall[iMarker][iVertex] = Eddy_Visc_Wall; + UTau[iMarker][iVertex] = U_Tau; - // wall model value - su2double Tau_Wall = (1.0/Density_Wall)*pow(Y_Plus*Lam_Visc_Wall/WallDistMod,2.0); + // wall model value + su2double Tau_Wall = (1.0/Density_Wall)*pow(Y_Plus*Lam_Visc_Wall/WallDistMod,2.0); - // nijso: skinfriction for wall functions gives opposite sign? + // nijso: skinfriction for wall functions gives opposite sign? - for (auto iDim = 0u; iDim < nDim; iDim++) - CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / (0.5 * RefDensity * RefVel2); + for (auto iDim = 0u; iDim < nDim; iDim++) + CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / (0.5 * RefDensity * RefVel2); - nodes->SetTauWall(iPoint, Tau_Wall); - // for compressible flow: - //nodes->SetTemperature(iPoint,T_Wall); - //nodes->SetSolution(iPoint, 0, Density_Wall); - //nodes->SetPrimitive(iPoint, nDim + 1, P_Wall); - // for incompressible flow: - // ...? + nodes->SetTauWall(iPoint, Tau_Wall); + // for compressible flow: + //nodes->SetTemperature(iPoint,T_Wall); + //nodes->SetSolution(iPoint, 0, Density_Wall); + //nodes->SetPrimitive(iPoint, nDim + 1, P_Wall); + // for incompressible flow: + // ...? - } - END_SU2_OMP_FOR - //} + } + END_SU2_OMP_FOR } if (notConvergedCounter>0) { diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 7a5f7c3196b..73b3440933e 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -417,7 +417,7 @@ void CNSSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_container su2double Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); // Wall_Function = config->GetWallFunction_Treatment(Marker_Tag); -// if (Wall_Function != NO_WALL_FUNCTION) { +// if (Wall_Function != WALL_FUNCTION::NONE) { // SU2_MPI::Error("Wall function treament not implemented yet", CURRENT_FUNCTION); // } @@ -578,7 +578,7 @@ void CNSSolver::BC_Isothermal_Wall_Generic(CGeometry *geometry, CSolver **solver } // Wall_Function = config->GetWallFunction_Treatment(Marker_Tag); -// if (Wall_Function != NO_WALL_FUNCTION) { +// if (Wall_Function != WALL_FUNCTION::NONE) { // SU2_MPI::Error("Wall function treament not implemented yet", CURRENT_FUNCTION); // } @@ -768,16 +768,13 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c if (!config->GetViscous_Wall(iMarker)) continue; - //if ((config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) || - // (config->GetMarker_All_KindBC(iMarker) == ISOTHERMAL) ) { - /*--- Identify the boundary by string name ---*/ const auto Marker_Tag = config->GetMarker_All_TagBound(iMarker); /*--- Jump to another BC if it is not wall function ---*/ - if (config->GetWallFunction_Treatment(Marker_Tag) != STANDARD_WALL_FUNCTION) + if (config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::STANDARD_WALL_FUNCTION) continue; /*--- Get the specified wall heat flux from config ---*/ diff --git a/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg b/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg index 98de1c9154e..61d827633ad 100644 --- a/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg +++ b/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg @@ -212,7 +212,7 @@ MARKER_MONITORING = ( plate ) % % Viscous wall markers for which wall functions must be applied. (NONE = no marker) % Format: ( marker name, wall function type, ... ) -MARKER_WALL_FUNCTIONS= ( plate, NO_WALL_FUNCTION ) +MARKER_WALL_FUNCTIONS= ( plate, NONE ) % % Marker(s) of the surface where custom thermal BC's are defined. MARKER_PYTHON_CUSTOM = (plate) diff --git a/config_template.cfg b/config_template.cfg index bc5936a3607..42c65ce49a9 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -914,10 +914,10 @@ MARKER_PLOTTING = ( airfoil ) MARKER_MONITORING = ( airfoil ) % % Viscous wall markers for which wall functions must be applied. (NONE = no marker) -% Format: ( marker name, wall function type -NO_WALL_FUNCTION, STANDARD_WALL_FUNCTION, +% Format: ( marker name, wall function type -NONE, STANDARD_WALL_FUNCTION, % ADAPTIVE_WALL_FUNCTION, SCALABLE_WALL_FUNCTION, EQUILIBRIUM_WALL_MODEL, % NONEQUILIBRIUM_WALL_MODEL-, ... ) -MARKER_WALL_FUNCTIONS= ( airfoil, NO_WALL_FUNCTION ) +MARKER_WALL_FUNCTIONS= ( airfoil, NONE ) % % Marker(s) of the surface where custom thermal BC's are defined. MARKER_PYTHON_CUSTOM = ( NONE ) From b2fb98c4d79d8d5fead89e5665b8170b02683ab6 Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Wed, 19 May 2021 20:24:20 +0200 Subject: [PATCH 27/88] medi/ninja --- externals/medi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/medi b/externals/medi index b84cef4272a..6aef76912e7 160000 --- a/externals/medi +++ b/externals/medi @@ -1 +1 @@ -Subproject commit b84cef4272ab8bad981c0d0386d855daa8fbd340 +Subproject commit 6aef76912e7099c4f08c9705848797ca9e8070da From e32750f28db72a572faa1c87e8757fc7b9db254a Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Fri, 21 May 2021 15:18:10 +0200 Subject: [PATCH 28/88] remove vscode --- .vscode/launch.json | 46 --------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 7a984e0e5d5..00000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "diffuser", - "type": "cppdbg", - "request": "launch", - "program": "/home/nijso/Codes/SU2/bin/SU2_CFD", - "args": ["diffuser.cfg"], - "stopAtEntry": false, - "cwd": "/home/nijso/Codes/su2cases/validation/buice_eaton_diffuser/SST_coarse", - "environment": [], - "externalConsole": false, - "MIMode": "gdb", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - } - ] - }, - { - "name": "(gdb) Launch", - "type": "cppdbg", - "request": "launch", - "program": "enter program name, for example ${workspaceFolder}/a.out", - "args": [], - "stopAtEntry": false, - "cwd": "${workspaceFolder}", - "environment": [], - "externalConsole": false, - "MIMode": "gdb", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - } - ] - } - ] -} \ No newline at end of file From c33db7c1c67a2ec0b038739b46d11819b69bc1e3 Mon Sep 17 00:00:00 2001 From: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> Date: Sat, 29 May 2021 14:34:03 +0100 Subject: [PATCH 29/88] Update SU2_CFD/include/solvers/CTurbSSTSolver.hpp --- SU2_CFD/include/solvers/CTurbSSTSolver.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp index 82ff8e63bce..d00ce5c6d00 100644 --- a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp +++ b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp @@ -42,7 +42,7 @@ class CTurbSSTSolver final : public CTurbSolver { -/*! + /*! * \brief Compute nu tilde from the wall functions. * \param[in] geometry - Geometrical definition of the problem. * \param[in] solver_container - Container vector with all the solutions. From dabd9ee12b50d09881e8b17ff6f21273dd2d73e0 Mon Sep 17 00:00:00 2001 From: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> Date: Sat, 29 May 2021 14:54:05 +0100 Subject: [PATCH 30/88] Apply suggestions from code review --- .../flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg | 2 +- config_template.cfg | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg b/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg index 61d827633ad..98de1c9154e 100644 --- a/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg +++ b/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg @@ -212,7 +212,7 @@ MARKER_MONITORING = ( plate ) % % Viscous wall markers for which wall functions must be applied. (NONE = no marker) % Format: ( marker name, wall function type, ... ) -MARKER_WALL_FUNCTIONS= ( plate, NONE ) +MARKER_WALL_FUNCTIONS= ( plate, NO_WALL_FUNCTION ) % % Marker(s) of the surface where custom thermal BC's are defined. MARKER_PYTHON_CUSTOM = (plate) diff --git a/config_template.cfg b/config_template.cfg index 42c65ce49a9..bc5936a3607 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -914,10 +914,10 @@ MARKER_PLOTTING = ( airfoil ) MARKER_MONITORING = ( airfoil ) % % Viscous wall markers for which wall functions must be applied. (NONE = no marker) -% Format: ( marker name, wall function type -NONE, STANDARD_WALL_FUNCTION, +% Format: ( marker name, wall function type -NO_WALL_FUNCTION, STANDARD_WALL_FUNCTION, % ADAPTIVE_WALL_FUNCTION, SCALABLE_WALL_FUNCTION, EQUILIBRIUM_WALL_MODEL, % NONEQUILIBRIUM_WALL_MODEL-, ... ) -MARKER_WALL_FUNCTIONS= ( airfoil, NONE ) +MARKER_WALL_FUNCTIONS= ( airfoil, NO_WALL_FUNCTION ) % % Marker(s) of the surface where custom thermal BC's are defined. MARKER_PYTHON_CUSTOM = ( NONE ) From a6264258d121515cb72e86b1556a8a1324804ec8 Mon Sep 17 00:00:00 2001 From: Pedro Gomes Date: Sat, 29 May 2021 15:54:21 +0100 Subject: [PATCH 31/88] small cleanup --- Common/include/option_structure.hpp | 26 ++++---- Common/include/option_structure.inl | 12 ++-- Common/src/CConfig.cpp | 4 +- Common/src/fem/fem_geometry_structure.cpp | 4 +- SU2_CFD/include/solvers/CEulerSolver.hpp | 5 ++ .../include/solvers/CFVMFlowSolverBase.hpp | 8 +++ .../include/solvers/CFVMFlowSolverBase.inl | 50 ++------------- SU2_CFD/include/solvers/CIncEulerSolver.hpp | 5 ++ SU2_CFD/include/solvers/CIncNSSolver.hpp | 15 +---- SU2_CFD/include/solvers/CNEMOEulerSolver.hpp | 5 ++ SU2_CFD/include/solvers/CNSSolver.hpp | 15 +---- SU2_CFD/src/solvers/CEulerSolver.cpp | 25 ++++++++ SU2_CFD/src/solvers/CIncEulerSolver.cpp | 25 ++++++++ SU2_CFD/src/solvers/CIncNSSolver.cpp | 43 +++++-------- SU2_CFD/src/solvers/CNEMOEulerSolver.cpp | 9 +++ SU2_CFD/src/solvers/CNSSolver.cpp | 41 +++++-------- SU2_CFD/src/solvers/CTurbSASolver.cpp | 20 +++--- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 61 +++++++++---------- 18 files changed, 179 insertions(+), 194 deletions(-) diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp index 56d83ed7b96..f5d6a61a972 100644 --- a/Common/include/option_structure.hpp +++ b/Common/include/option_structure.hpp @@ -937,21 +937,21 @@ static const MapType RoeLowDiss_Map = { */ enum class WALL_FUNCTIONS { NONE , /*!< \brief No wall function treatment, integration to the wall. Default behavior. */ - STANDARD_WALL_FUNCTION , /*!< \brief Standard wall function. */ - ADAPTIVE_WALL_FUNCTION , /*!< \brief Adaptive wall function. Formulation depends on y+. */ - SCALABLE_WALL_FUNCTION , /*!< \brief Scalable wall function. */ - EQUILIBRIUM_WALL_MODEL , /*!< \brief Equilibrium wall model for LES. */ - NONEQUILIBRIUM_WALL_MODEL , /*!< \brief Non-equilibrium wall model for LES. */ - LOGARITHMIC_WALL_MODEL /*!< \brief Logarithmic law-of-the-wall model for LES. */ + STANDARD_FUNCTION , /*!< \brief Standard wall function. */ + ADAPTIVE_FUNCTION , /*!< \brief Adaptive wall function. Formulation depends on y+. */ + SCALABLE_FUNCTION , /*!< \brief Scalable wall function. */ + EQUILIBRIUM_MODEL , /*!< \brief Equilibrium wall model for LES. */ + NONEQUILIBRIUM_MODEL , /*!< \brief Non-equilibrium wall model for LES. */ + LOGARITHMIC_MODEL /*!< \brief Logarithmic law-of-the-wall model for LES. */ }; static const MapType Wall_Functions_Map = { - MakePair("NONE", WALL_FUNCTIONS::NONE) - MakePair("STANDARD_WALL_FUNCTION", WALL_FUNCTIONS::STANDARD_WALL_FUNCTION) - MakePair("ADAPTIVE_WALL_FUNCTION", WALL_FUNCTIONS::ADAPTIVE_WALL_FUNCTION) - MakePair("SCALABLE_WALL_FUNCTION", WALL_FUNCTIONS::SCALABLE_WALL_FUNCTION) - MakePair("EQUILIBRIUM_WALL_MODEL", WALL_FUNCTIONS::EQUILIBRIUM_WALL_MODEL) - MakePair("NONEQUILIBRIUM_WALL_MODEL", WALL_FUNCTIONS::NONEQUILIBRIUM_WALL_MODEL) - MakePair("LOGARITHMIC_WALL_MODEL", WALL_FUNCTIONS::LOGARITHMIC_WALL_MODEL) + MakePair("NO_WALL_FUNCTION", WALL_FUNCTIONS::NONE) + MakePair("STANDARD_WALL_FUNCTION", WALL_FUNCTIONS::STANDARD_FUNCTION) + MakePair("ADAPTIVE_WALL_FUNCTION", WALL_FUNCTIONS::ADAPTIVE_FUNCTION) + MakePair("SCALABLE_WALL_FUNCTION", WALL_FUNCTIONS::SCALABLE_FUNCTION) + MakePair("EQUILIBRIUM_WALL_MODEL", WALL_FUNCTIONS::EQUILIBRIUM_MODEL) + MakePair("NONEQUILIBRIUM_WALL_MODEL", WALL_FUNCTIONS::NONEQUILIBRIUM_MODEL) + MakePair("LOGARITHMIC_WALL_MODEL", WALL_FUNCTIONS::LOGARITHMIC_MODEL) }; /*! diff --git a/Common/include/option_structure.inl b/Common/include/option_structure.inl index 2941f1bcd22..cbcd4671bbf 100644 --- a/Common/include/option_structure.inl +++ b/Common/include/option_structure.inl @@ -1803,9 +1803,9 @@ public: must be specified. Hence the counter must be updated accordingly. ---*/ switch( typeWF ) { - case WALL_FUNCTIONS::EQUILIBRIUM_WALL_MODEL: counter += 3; break; - case WALL_FUNCTIONS::NONEQUILIBRIUM_WALL_MODEL: counter += 2; break; - case WALL_FUNCTIONS::LOGARITHMIC_WALL_MODEL: counter += 3; break; + case WALL_FUNCTIONS::EQUILIBRIUM_MODEL: counter += 3; break; + case WALL_FUNCTIONS::NONEQUILIBRIUM_MODEL: counter += 2; break; + case WALL_FUNCTIONS::LOGARITHMIC_MODEL: counter += 3; break; default: break; } @@ -1854,7 +1854,7 @@ public: is needed, which is extracted from option_value. ---*/ switch( this->walltype[i] ) { - case WALL_FUNCTIONS::EQUILIBRIUM_WALL_MODEL: { + case WALL_FUNCTIONS::EQUILIBRIUM_MODEL: { /* LES equilibrium wall model. The exchange distance, stretching factor and number of points in the wall model must be specified. */ @@ -1879,7 +1879,7 @@ public: break; } - case WALL_FUNCTIONS::NONEQUILIBRIUM_WALL_MODEL: { + case WALL_FUNCTIONS::NONEQUILIBRIUM_MODEL: { /* LES non-equilibrium model. The RANS turbulence model and the exchange distance need to be specified. */ @@ -1912,7 +1912,7 @@ public: break; } - case WALL_FUNCTIONS::LOGARITHMIC_WALL_MODEL: { + case WALL_FUNCTIONS::LOGARITHMIC_MODEL: { /* LES Logarithmic law-of-the-wall model. The exchange distance, stretching factor and number of points in the wall model must be specified. */ diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index b3178bd7d6f..9768ed7859f 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -3265,8 +3265,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i if (Kind_WallFunctions[iMarker] != WALL_FUNCTIONS::NONE) Wall_Functions = true; - if ((Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::ADAPTIVE_WALL_FUNCTION) || (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::SCALABLE_WALL_FUNCTION) - || (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::NONEQUILIBRIUM_WALL_MODEL)) + if ((Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::ADAPTIVE_FUNCTION) || (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::SCALABLE_FUNCTION) + || (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::NONEQUILIBRIUM_MODEL)) SU2_MPI::Error(string("For RANS problems, use NONE, STANDARD_WALL_FUNCTION or EQUILIBRIUM_WALL_MODEL.\n"), CURRENT_FUNCTION); diff --git a/Common/src/fem/fem_geometry_structure.cpp b/Common/src/fem/fem_geometry_structure.cpp index 58a0eb9dd85..f7b051cab69 100644 --- a/Common/src/fem/fem_geometry_structure.cpp +++ b/Common/src/fem/fem_geometry_structure.cpp @@ -6240,14 +6240,14 @@ void CMeshFEM_DG::WallFunctionPreprocessing(CConfig *config) { /* An LES wall model is used for this boundary marker. Determine which wall model and allocate the memory for the member variable. */ switch (config->GetWallFunction_Treatment(Marker_Tag) ) { - case WALL_FUNCTIONS::EQUILIBRIUM_WALL_MODEL: { + case WALL_FUNCTIONS::EQUILIBRIUM_MODEL: { if(rank == MASTER_NODE) cout << "Marker " << Marker_Tag << " uses an Equilibrium Wall Model." << endl; boundaries[iMarker].wallModel = new CWallModel1DEQ(config, Marker_Tag); break; } - case WALL_FUNCTIONS::LOGARITHMIC_WALL_MODEL: { + case WALL_FUNCTIONS::LOGARITHMIC_MODEL: { if(rank == MASTER_NODE) cout << "Marker " << Marker_Tag << " uses the Reichardt and Kader analytical laws for the Wall Model." << endl; diff --git a/SU2_CFD/include/solvers/CEulerSolver.hpp b/SU2_CFD/include/solvers/CEulerSolver.hpp index 3a181ec54de..d4a91b3d983 100644 --- a/SU2_CFD/include/solvers/CEulerSolver.hpp +++ b/SU2_CFD/include/solvers/CEulerSolver.hpp @@ -273,6 +273,11 @@ class CEulerSolver : public CFVMFlowSolverBase void CFVMFlowSolverBase::Pressure_Forces(const CGeometry* geometry, const CConfig* config) { unsigned long iVertex, iPoint; unsigned short iDim, iMarker, Boundary, Monitoring, iMarker_Monitoring; - su2double Pressure = 0.0, factor, NFPressOF, RefVel2 = 0.0, RefTemp, RefDensity = 0.0, RefPressure, Mach2Vel, - Mach_Motion; + su2double Pressure = 0.0, NFPressOF, RefPressure; const su2double *Normal = nullptr, *Coord = nullptr; string Marker_Tag, Monitoring_Tag; su2double AxiFactor; @@ -1783,49 +1782,10 @@ void CFVMFlowSolverBase::Pressure_Forces(const CGeometry* geometr su2double Beta = config->GetAoS() * PI_NUMBER / 180.0; su2double RefArea = config->GetRefArea(); su2double RefLength = config->GetRefLength(); - su2double Gas_Constant = config->GetGas_ConstantND(); auto Origin = config->GetRefOriginMoment(0); bool axisymmetric = config->GetAxisymmetric(); - /// TODO: Move these ifs to specialized functions. - - if (FlowRegime == ENUM_REGIME::COMPRESSIBLE) { - /*--- Evaluate reference values for non-dimensionalization. - For dynamic meshes, use the motion Mach number as a reference value - for computing the force coefficients. Otherwise, use the freestream values, - which is the standard convention. ---*/ - - RefTemp = Temperature_Inf; - RefDensity = Density_Inf; - if (dynamic_grid && !config->GetFSI_Simulation()) { - Mach2Vel = sqrt(Gamma * Gas_Constant * RefTemp); - Mach_Motion = config->GetMach_Motion(); - RefVel2 = (Mach_Motion * Mach2Vel) * (Mach_Motion * Mach2Vel); - } else { - RefVel2 = 0.0; - for (iDim = 0; iDim < nDim; iDim++) RefVel2 += Velocity_Inf[iDim] * Velocity_Inf[iDim]; - } - } - - if (FlowRegime == ENUM_REGIME::INCOMPRESSIBLE) { - /*--- Evaluate reference values for non-dimensionalization. - For dimensional or non-dim based on initial values, use - the far-field state (inf). For a custom non-dim based - on user-provided reference values, use the ref values - to compute the forces. ---*/ - - if ((config->GetRef_Inc_NonDim() == DIMENSIONAL) || (config->GetRef_Inc_NonDim() == INITIAL_VALUES)) { - RefDensity = Density_Inf; - RefVel2 = 0.0; - for (iDim = 0; iDim < nDim; iDim++) RefVel2 += Velocity_Inf[iDim] * Velocity_Inf[iDim]; - } else if (config->GetRef_Inc_NonDim() == REFERENCE_VALUES) { - RefDensity = config->GetInc_Density_Ref(); - RefVel2 = config->GetInc_Velocity_Ref() * config->GetInc_Velocity_Ref(); - } - } - - AeroCoeffForceRef = 0.5 * RefDensity * RefArea * RefVel2; - factor = 1.0 / AeroCoeffForceRef; + const su2double factor = 1.0 / AeroCoeffForceRef; /*--- Reference pressure is always the far-field value. ---*/ @@ -2491,7 +2451,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr su2double MomentX_Force[MAXNDIM] = {0.0}, MomentY_Force[MAXNDIM] = {0.0}, MomentZ_Force[MAXNDIM] = {0.0}; /* --- check if wall functions are used --- */ - + const bool wallfunctions = (config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::NONE); /*--- Loop over the vertices to compute the forces ---*/ @@ -2560,7 +2520,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr /* --- in case of wall functions, we have computed the skin friction in the turbulence solver --- */ /* --- Note that in the wall model, we switch off the computation when the computed y+ < 5 --- */ /* --- We put YPlus to 1.0 so we have to compute skinfriction and the actual y+ in that case as well --- */ - if (!wallfunctions || (wallfunctions && YPlus[iMarker][iVertex] < 5.0)) + if (!wallfunctions || (wallfunctions && YPlus[iMarker][iVertex] < 5.0)) CSkinFriction[iMarker](iVertex,iDim) = TauTangent[iDim] * factorFric; WallShearStress[iMarker][iVertex] += TauTangent[iDim] * TauTangent[iDim]; @@ -2578,7 +2538,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr /* --- in case of wall functions, we have computed YPlus in the turbulence class --- */ /* --- Note that we do not recompute y+ when y+<5 because y+ can become > 5 again --- */ - if (!wallfunctions) + if (!wallfunctions) YPlus[iMarker][iVertex] = WallDistMod * FrictionVel / (Viscosity / Density); /*--- Compute total and maximum heat flux on the wall ---*/ diff --git a/SU2_CFD/include/solvers/CIncEulerSolver.hpp b/SU2_CFD/include/solvers/CIncEulerSolver.hpp index aa925f387d1..710ab4dd742 100644 --- a/SU2_CFD/include/solvers/CIncEulerSolver.hpp +++ b/SU2_CFD/include/solvers/CIncEulerSolver.hpp @@ -119,6 +119,11 @@ class CIncEulerSolver : public CFVMFlowSolverBase void Explicit_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iRKStep); + /*! + * \brief Set reference values for pressure, forces, etc. + */ + void SetReferenceValues(const CConfig& config) final; + public: /*! * \brief Constructor of the class. diff --git a/SU2_CFD/include/solvers/CIncNSSolver.hpp b/SU2_CFD/include/solvers/CIncNSSolver.hpp index dd5cbf2746b..8702dada838 100644 --- a/SU2_CFD/include/solvers/CIncNSSolver.hpp +++ b/SU2_CFD/include/solvers/CIncNSSolver.hpp @@ -73,20 +73,7 @@ class CIncNSSolver final : public CIncEulerSolver { */ void SetTauWall_WF(CGeometry *geometry, CSolver** solver_container, - const CConfig* config) ; - - /*! - * \brief computes nu-tilde. - * \param[in] geometry - Geometrical definition of the problem. - * \param[in] solver_container - Container vector with all the solutions. - * \param[in] config - Definition of the particular problem. - */ - void SetTurbVars_WF(CGeometry *geometry, - CSolver **solver_container, - CNumerics *conv_numerics, - CNumerics *visc_numerics, - const CConfig *config, - unsigned short val_marker) ; + const CConfig* config); /*! * \brief Compute necessary quantities (massflow, integrated heatflux, avg density) diff --git a/SU2_CFD/include/solvers/CNEMOEulerSolver.hpp b/SU2_CFD/include/solvers/CNEMOEulerSolver.hpp index 9f977e61165..569d25464aa 100644 --- a/SU2_CFD/include/solvers/CNEMOEulerSolver.hpp +++ b/SU2_CFD/include/solvers/CNEMOEulerSolver.hpp @@ -85,6 +85,11 @@ class CNEMOEulerSolver : public CFVMFlowSolverBaseGetRestart() || config->GetRestart_Flow()); diff --git a/SU2_CFD/src/solvers/CIncEulerSolver.cpp b/SU2_CFD/src/solvers/CIncEulerSolver.cpp index 38f0e794d11..3bfad9f5285 100644 --- a/SU2_CFD/src/solvers/CIncEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CIncEulerSolver.cpp @@ -192,6 +192,8 @@ CIncEulerSolver::CIncEulerSolver(CGeometry *geometry, CConfig *config, unsigned break; } + SetReferenceValues(*config); + /*--- Initialize the solution to the far-field state everywhere. ---*/ if (navier_stokes) { @@ -815,6 +817,29 @@ void CIncEulerSolver::SetNondimensionalization(CConfig *config, unsigned short i } +void CIncEulerSolver::SetReferenceValues(const CConfig& config) { + + /*--- Evaluate reference values for non-dimensionalization. For dimensional or non-dim + based on initial values, use the far-field state (inf). For a custom non-dim based + on user-provided reference values, use the ref values to compute the forces. ---*/ + + su2double RefDensity, RefVel2; + + if ((config.GetRef_Inc_NonDim() == DIMENSIONAL) || + (config.GetRef_Inc_NonDim() == INITIAL_VALUES)) { + RefDensity = Density_Inf; + RefVel2 = GeometryToolbox::SquaredNorm(nDim, Velocity_Inf); + } + else { + RefDensity = config.GetInc_Density_Ref(); + RefVel2 = pow(config.GetInc_Velocity_Ref(), 2); + } + + DynamicPressureRef = 0.5 * RefDensity * RefVel2; + AeroCoeffForceRef = DynamicPressureRef * config.GetRefArea(); + +} + void CIncEulerSolver::CommonPreprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output) { diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index b5dc7036208..4fe51b8a800 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -605,21 +605,11 @@ void CIncNSSolver::BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **sol END_SU2_OMP_FOR } - - - void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config) { - /*--- The wall function implemented herein is based on Nichols and Nelson AIAAJ v32 n6 2004. + /*--- + The wall function implemented herein is based on Nichols and Nelson AIAAJ v32 n6 2004. At this moment, the wall function is only available for adiabatic flows. ---*/ - su2double RefDensity=Density_Inf, RefVel2=0.0; - if ((config->GetRef_Inc_NonDim() == DIMENSIONAL) || (config->GetRef_Inc_NonDim() == INITIAL_VALUES)) { - for (auto iDim = 0u; iDim < nDim; iDim++) - RefVel2 += Velocity_Inf[iDim] * Velocity_Inf[iDim]; - } else if (config->GetRef_Inc_NonDim() == REFERENCE_VALUES) { - RefDensity = config->GetInc_Density_Ref(); - RefVel2 = config->GetInc_Velocity_Ref() * config->GetInc_Velocity_Ref(); - } unsigned long notConvergedCounter = 0; /*--- counts the number of wall cells that are not converged ---*/ unsigned long smallYPlusCounter = 0; /*--- counts the number of wall cells where y+ < 5 ---*/ @@ -631,7 +621,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container constexpr unsigned short max_iter =200; /*--- maximum number of iterations for the Newton Solver---*/ const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ const su2double relax = 0.5; /*--- relaxation factor for the Newton solver ---*/ - + /*--- Compute the recovery factor ---*/ // Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) @@ -639,7 +629,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container /*--- Typical constants from boundary layer theory ---*/ - const su2double kappa = config->GetwallModelKappa(); + const su2double kappa = config->GetwallModelKappa(); const su2double B = config->GetwallModelB(); for (auto iMarker = 0u; iMarker < config->GetnMarker_All(); iMarker++) { @@ -652,13 +642,13 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container /*--- Jump to another BC if it is not wall function ---*/ - if (config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::STANDARD_WALL_FUNCTION) continue; + if (config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::STANDARD_FUNCTION) continue; /*--- Get the specified wall heat flux from config ---*/ // note that we can get the heat flux from the temperature gradient su2double q_w = 0.0; - if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) + if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) q_w = config->GetWall_HeatFlux(Marker_Tag); // heat flux from temperature: q_w = h*(T_wall - T_fluid) @@ -702,7 +692,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container // su2double T_Normal = nodes->GetTemperature(Point_Normal); /*--- Compute the wall-parallel velocity at first point off the wall ---*/ - + su2double VelNormal = GeometryToolbox::DotProduct(int(MAXNDIM), Vel, UnitNormal); su2double VelTang[MAXNDIM] = {0.0}; @@ -715,7 +705,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container su2double WallDist[MAXNDIM] = {0.0}; GeometryToolbox::Distance(nDim, Coord, Coord_Normal, WallDist); - + su2double WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); /*--- Compute mach number ---*/ @@ -729,7 +719,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container //T_Wall = T_Normal/(1.0+0.5*Gamma_Minus_One*Recovery*VelTangMod*VelTangMod); // in incompressible flows, we can assume that there is no velocity-related temperature change // Prandtl: T+ = Pr*y+ - su2double T_Wall = nodes->GetTemperature(iPoint); + su2double T_Wall = nodes->GetTemperature(iPoint); /*--- Extrapolate the pressure from the interior & compute the wall density using the equation of state ---*/ @@ -738,7 +728,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container su2double Density_Wall = nodes->GetDensity(iPoint); su2double Conductivity_Wall = nodes->GetThermalConductivity(iPoint); su2double Lam_Visc_Normal = nodes->GetLaminarViscosity(Point_Normal); - + /*--- Compute the shear stress at the wall in the regular fashion by using the stress tensor on the surface ---*/ @@ -770,7 +760,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container unsigned long counter = 0; su2double diff = 1.0; U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall)); - Y_Plus = 4.99; // clipping value + Y_Plus = 4.99; // clipping value su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; /*--- Automatic switch off when y+ < 5 according to Nichols & Nelson (2004) ---*/ @@ -783,7 +773,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container while (fabs(diff) > tol) { /*--- Friction velocity and u+ ---*/ - + su2double U_Plus = VelTangMod/U_Tau; /*--- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) page 1110 ---*/ @@ -805,7 +795,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); - + Eddy_Visc_Wall = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp(-1.0*kappa*B)* (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0) - Lam_Visc_Normal/Lam_Visc_Wall); @@ -823,7 +813,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container pow(VelTangMod * kappa / U_Tau, 2) + VelTangMod * kappa / U_Tau) / U_Tau; /* --- Newton Step --- */ - + U_Tau = U_Tau - relax*(diff / grad_diff); counter++; @@ -850,7 +840,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container // nijso: skinfriction for wall functions gives opposite sign? for (auto iDim = 0u; iDim < nDim; iDim++) - CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / (0.5 * RefDensity * RefVel2); + CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / DynamicPressureRef; nodes->SetTauWall(iPoint, Tau_Wall); // for compressible flow: @@ -858,7 +848,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container //nodes->SetSolution(iPoint, 0, Density_Wall); //nodes->SetPrimitive(iPoint, nDim + 1, P_Wall); // for incompressible flow: - // ...? + // ...? } END_SU2_OMP_FOR @@ -872,5 +862,4 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container // cout << "Warning: y+ < 5.0 in " << smallYPlusCounter<< " points, wall model not active in these points."<GetAoA()*PI_NUMBER/180.0; @@ -1451,6 +1453,13 @@ void CNEMOEulerSolver::SetNondimensionalization(CConfig *config, unsigned short } } +void CNEMOEulerSolver::SetReferenceValues(const CConfig& config) { + + DynamicPressureRef = 0.5 * Density_Inf * GeometryToolbox::SquaredNorm(nDim, Velocity_Inf); + AeroCoeffForceRef = DynamicPressureRef * config.GetRefArea(); + +} + void CNEMOEulerSolver::BC_Sym_Plane(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) { diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 73b3440933e..0c564784b5e 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -731,17 +731,10 @@ void CNSSolver::BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **solver } void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config) { -/*--- The wall function implemented herein is based on Nichols and Nelson AIAAJ v32 n6 2004. + /*--- + The wall function implemented herein is based on Nichols and Nelson AIAAJ v32 n6 2004. At this moment, the wall function is only available for adiabatic flows. ---*/ - su2double RefDensity=Density_Inf,RefVel2=0.0; - if ((config->GetRef_Inc_NonDim() == DIMENSIONAL) || (config->GetRef_Inc_NonDim() == INITIAL_VALUES)) { - for (auto iDim = 0u; iDim < nDim; iDim++) - RefVel2 += Velocity_Inf[iDim] * Velocity_Inf[iDim]; - } else if (config->GetRef_Inc_NonDim() == REFERENCE_VALUES) { - RefDensity = config->GetInc_Density_Ref(); - RefVel2 = config->GetInc_Velocity_Ref() * config->GetInc_Velocity_Ref(); - } unsigned long int notConvergedCounter=0; su2double grad_diff; @@ -759,11 +752,9 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- Typical constants from boundary layer theory ---*/ - const su2double kappa = config->GetwallModelKappa(); + const su2double kappa = config->GetwallModelKappa(); const su2double B = config->GetwallModelB(); - //bool converged = true; - for (auto iMarker = 0u; iMarker < config->GetnMarker_All(); iMarker++) { if (!config->GetViscous_Wall(iMarker)) continue; @@ -774,13 +765,13 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- Jump to another BC if it is not wall function ---*/ - if (config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::STANDARD_WALL_FUNCTION) + if (config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::STANDARD_FUNCTION) continue; /*--- Get the specified wall heat flux from config ---*/ // note that we can get the heat flux from the temperature gradient su2double q_w = 0.0; - if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) + if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) q_w = config->GetWall_HeatFlux(Marker_Tag); // heat flux from temperature: q_w = h*(T_wall - T_fluid) @@ -924,7 +915,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c su2double Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); - + Eddy_Visc = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp(-1.0*kappa*B)* (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0) - Lam_Visc_Normal/Lam_Visc_Wall); @@ -946,14 +937,11 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c U_Tau = U_Tau - relax*(diff / grad_diff); counter++; - - + + if (counter > max_iter) { notConvergedCounter++; - // cout << "Warning: Y+ did not converge within the max number of iterations!" << endl; - // cout << "diff = " << endl; - // do not break, use some safe values for convergence - // break; + // use some safe values for convergence Y_Plus = 30.0; Eddy_Visc = 1.0; U_Tau = 1.0; @@ -964,7 +952,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- Calculate an updated value for the wall shear stress using the y+ value, the definition of y+, and the definition of the friction velocity. ---*/ - + YPlus[iMarker][iVertex] = Y_Plus; EddyViscWall[iMarker][iVertex] = Eddy_Visc; UTau[iMarker][iVertex] = U_Tau; @@ -973,20 +961,19 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c su2double Tau_Wall = (1.0/Density_Wall)*pow(Y_Plus*Lam_Visc_Wall/WallDistMod,2.0); for (auto iDim = 0u; iDim < nDim; iDim++) - CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / (0.5 * RefDensity * RefVel2); + CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / DynamicPressureRef; /*--- Store this value for the wall shear stress at the node. ---*/ nodes->SetTauWall(iPoint, Tau_Wall); } - //} + } - END_SU2_OMP_FOR + END_SU2_OMP_FOR - if (notConvergedCounter>0) { + if (notConvergedCounter>0) { cout << "Warning: computation of wall coefficients (y+) did not converge in " << notConvergedCounter<< " points"<GetKind_TimeIntScheme() == EULER_IMPLICIT); - - + + /*--- We use a very high max nr of iterations, but we only need this the first couple of iterations ---*/ constexpr unsigned short max_iter = 200; @@ -1595,7 +1595,7 @@ void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contain /*--- Typical constants from boundary layer theory ---*/ - + const su2double cv1_3 = 7.1*7.1*7.1; CVariable* flow_nodes = solver_container[FLOW_SOL]->GetNodes(); @@ -1619,7 +1619,7 @@ void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contain if (Y_Plus < 5.0) { /* --- note that we do not do anything for y+ < 5, meaning that we have a zero flux (Neumann) boundary condition --- */ - + continue; } @@ -1632,14 +1632,14 @@ void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contain /*--- Solve for the new value of nu_tilde given the eddy viscosity and using a Newton method ---*/ // start with positive value of nu_til_old - su2double nu_til = 0.0; + su2double nu_til = 0.0; su2double nu_til_old = nodes->GetSolution(iPoint,0); unsigned short counter = 0; su2double diff = 1.0; relax = 0.5; while (diff > tol) { - // note the error in Nichols and Nelson + // note the error in Nichols and Nelson su2double func = nu_til_old*nu_til_old*nu_til_old*nu_til_old - (Eddy_Visc/Density_Normal)*(nu_til_old*nu_til_old*nu_til_old + Kin_Visc_Normal*Kin_Visc_Normal*Kin_Visc_Normal*cv1_3); su2double func_prim = 4.0 * nu_til_old*nu_til_old*nu_til_old - 3.0*(Eddy_Visc/Density_Normal)*(nu_til_old*nu_til_old); @@ -1665,11 +1665,7 @@ void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contain } } - su2double solution[1]; - //for (auto iVar = 0u; iVar < nVar; iVar++) - solution[0] = nu_til; - - nodes->SetSolution_Old(iPoint_Neighbor,solution); + nodes->SetSolution_Old(iPoint_Neighbor, &nu_til); LinSysRes.SetBlock_Zero(iPoint_Neighbor); /*--- includes 1 in the diagonal ---*/ diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 842b4b59f11..2045620d786 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -367,31 +367,25 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont tie(WallType, Roughness_Height) = config->GetWallRoughnessProperties(Marker_Tag); if (WallType == WALL_TYPE::ROUGH) rough_wall = true; - - /*--- Evaluate nu tilde at the closest point to the surface using the wall functions. ---*/ if (config->GetWall_Functions()) { SU2_OMP_MASTER SetTurbVars_WF(geometry, solver_container, config, val_marker); END_SU2_OMP_MASTER - + SU2_OMP_BARRIER return; } - SU2_OMP_FOR_STAT(OMP_MIN_SIZE) for (auto iVertex = 0u; iVertex < geometry->nVertex[val_marker]; iVertex++) { - const auto iPoint = geometry->vertex[val_marker][iVertex]->GetNode(); - /*--- Check if the node belongs to the domain (i.e, not a halo node) ---*/ if (geometry->nodes->GetDomain(iPoint)) { - if (rough_wall) { /*--- Set wall values ---*/ @@ -428,7 +422,9 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont nodes->SetSolution_Old(iPoint,solution); nodes->SetSolution(iPoint,solution); LinSysRes.SetBlock_Zero(iPoint); - } else { + + } else { // smooth wall + /*--- distance to closest neighbor ---*/ const auto jPoint = geometry->vertex[val_marker][iVertex]->GetNormal_Neighbor(); @@ -441,7 +437,7 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont su2double laminar_viscosity = solver_container[FLOW_SOL]->GetNodes()->GetLaminarViscosity(jPoint); su2double beta_1 = constants[4]; - su2double solution[2]; + su2double solution[MAXNVAR]; solution[0] = 0.0; solution[1] = 60.0*laminar_viscosity/(density*beta_1*distance2); @@ -462,19 +458,21 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont } -void CTurbSSTSolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_container, - const CConfig *config, unsigned short val_marker) { +void CTurbSSTSolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_container, + const CConfig *config, unsigned short val_marker) { - /*--- von Karman constant from boundary layer theory ---*/ + const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); + /*--- von Karman constant from boundary layer theory ---*/ const su2double kappa = config->GetwallModelKappa(); - const su2double relax = 0.5; /*--- relaxation factor for k-omega values ---*/ - //const su2double beta_1 = constants[4]; - su2double k,omega; + + /*--- relaxation factor for k-omega values ---*/ + const su2double relax = 0.5; /*--- Loop over all of the vertices on this boundary marker ---*/ 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(); @@ -484,42 +482,39 @@ void CTurbSSTSolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contai /*--- Do not use wall model at the ipoint when y+ < 5.0 ---*/ if (Y_Plus < 5.0) { - - /* --- use zero flux (Neumann) conditions --- */ - - continue; + /*--- use zero flux (Neumann) conditions ---*/ + continue; } su2double Eddy_Visc = solver_container[FLOW_SOL]->GetEddyViscWall(val_marker, iVertex); - k = nodes->GetSolution(iPoint_Neighbor,0); - omega = nodes->GetSolution(iPoint_Neighbor,1); + su2double k = nodes->GetSolution(iPoint_Neighbor,0); + su2double omega = nodes->GetSolution(iPoint_Neighbor,1); su2double Density_Wall = solver_container[FLOW_SOL]->GetNodes()->GetDensity(iPoint); su2double U_Tau = solver_container[FLOW_SOL]->GetUTau(val_marker, iVertex); su2double y = Y_Plus*Lam_Visc_Wall/(Density_Wall*U_Tau); - su2double omega1 = 6.0*Lam_Visc_Wall/(0.075*Density_Wall*y*y); // eq. 19 - su2double omega0 = U_Tau/(sqrt(0.09)*kappa*y); // eq. 20 + su2double omega1 = 6.0*Lam_Visc_Wall/(0.075*Density_Wall*y*y); // eq. 19 + su2double omega0 = U_Tau/(sqrt(0.09)*kappa*y); // eq. 20 su2double omega_new = sqrt(omega0*omega0 + omega1*omega1); // eq. 21 Nichols & Nelson - su2double k_new = omega_new * Eddy_Visc/Density_Wall; // eq. 22 Nichols & Nelson + su2double k_new = omega_new * Eddy_Visc/Density_Wall; // eq. 22 Nichols & Nelson // (is this the correct density? paper says rho and not rho_w) /*--- put some relaxation factor on the k-omega values ---*/ - k += relax*(k_new - k); - omega += relax*(omega_new - omega); + k += relax*(k_new - k); + omega += relax*(omega_new - omega); - su2double solution[2]; - solution[0] = k; - solution[1] = omega; + su2double solution[MAXNVAR] = {k, omega}; nodes->SetSolution_Old(iPoint_Neighbor,solution); nodes->SetSolution(iPoint,solution); LinSysRes.SetBlock_Zero(iPoint_Neighbor); - /*--- includes 1 in the diagonal ---*/ - Jacobian.DeleteValsRowi(iPoint_Neighbor*nVar); - Jacobian.DeleteValsRowi(iPoint_Neighbor*nVar+1); - + if (implicit) { + /*--- includes 1 in the diagonal ---*/ + Jacobian.DeleteValsRowi(iPoint_Neighbor*nVar); + Jacobian.DeleteValsRowi(iPoint_Neighbor*nVar+1); + } } } From a5a5835f148b3dc082efc42e835a634b6307284e Mon Sep 17 00:00:00 2001 From: Pedro Gomes Date: Sat, 29 May 2021 23:48:29 +0100 Subject: [PATCH 32/88] a little more refactoring --- Common/include/toolboxes/geometry_toolbox.hpp | 13 +++ .../include/numerics/flow/flow_diffusion.hpp | 8 +- .../include/solvers/CFVMFlowSolverBase.inl | 9 +- SU2_CFD/include/variables/CNSVariable.hpp | 1 + SU2_CFD/src/numerics/flow/flow_diffusion.cpp | 85 +++++++++---------- SU2_CFD/src/solvers/CEulerSolver.cpp | 43 ---------- SU2_CFD/src/solvers/CIncNSSolver.cpp | 14 +-- SU2_CFD/src/solvers/CNEMONSSolver.cpp | 11 +-- SU2_CFD/src/solvers/CNSSolver.cpp | 15 +--- SU2_CFD/src/solvers/CTurbSASolver.cpp | 7 -- 10 files changed, 66 insertions(+), 140 deletions(-) diff --git a/Common/include/toolboxes/geometry_toolbox.hpp b/Common/include/toolboxes/geometry_toolbox.hpp index 458365fa3ee..8bd967f9b46 100644 --- a/Common/include/toolboxes/geometry_toolbox.hpp +++ b/Common/include/toolboxes/geometry_toolbox.hpp @@ -192,4 +192,17 @@ inline void Rotate(const Scalar R[][nDim], const Scalar* O, const Scalar* d, Sca } } +/*! \brief Tangent projection */ +template +inline void TangentProjection(Int nDim, const Mat& tensor, const Scalar* vector, Scalar* proj) { + + for (Int iDim = 0; iDim < nDim; iDim++) + proj[iDim] = DotProduct(nDim, tensor[iDim], vector); + + auto normalProj = DotProduct(nDim, proj, vector); + + for (Int iDim = 0; iDim < nDim; iDim++) + proj[iDim] -= normalProj * vector[iDim]; +} + } diff --git a/SU2_CFD/include/numerics/flow/flow_diffusion.hpp b/SU2_CFD/include/numerics/flow/flow_diffusion.hpp index 9e89955793d..70106000340 100644 --- a/SU2_CFD/include/numerics/flow/flow_diffusion.hpp +++ b/SU2_CFD/include/numerics/flow/flow_diffusion.hpp @@ -73,11 +73,11 @@ class CAvgGrad_Base : public CNumerics { * This function requires that the stress tensor already be * computed using \ref GetStressTensor * - * \param[in] val_normal - Normal vector, the norm of the vector is the area of the face. - * \param[in] val_tau_wall - The wall stress + * \param[in] UnitNormal - Unit normal vector. + * \param[in] TauWall - The wall stress. */ - void AddTauWall(const su2double *val_normal, - su2double val_tau_wall); + void AddTauWall(const su2double *UnitNormal, + su2double TauWall); /** * \brief Calculate the Jacobian of the viscous + turbulent stress tensor diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index daae0b78f8f..df923f6dc0b 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -442,11 +442,14 @@ void CFVMFlowSolverBase::Viscous_Residual_impl(unsigned long iEdge, CGeome numerics->SetTauWall(nodes->GetTauWall(iPoint), nodes->GetTauWall(jPoint)); - /*--- Compute and update residual ---*/ auto residual = numerics->ComputeResidual(config); + /*--- Reset wall shear stress to keep boundaries from using it ---*/ + + numerics->SetTauWall(-1.0, -1.0); + if (ReducerStrategy) { EdgeFluxes.SubtractBlock(iEdge, residual); if (implicit) @@ -1437,10 +1440,6 @@ void CFVMFlowSolverBase::BC_Fluid_Interface(CGeometry* geometry, visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint, 0), solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint, 0)); - /*--- Set the wall shear stress values (wall functions) to -1 (no evaluation using wall functions) ---*/ - - visc_numerics->SetTauWall(-1.0, -1.0); - /*--- Compute and update residual ---*/ auto residual = visc_numerics->ComputeResidual(config); diff --git a/SU2_CFD/include/variables/CNSVariable.hpp b/SU2_CFD/include/variables/CNSVariable.hpp index 3de4dfa849a..876605c3de3 100644 --- a/SU2_CFD/include/variables/CNSVariable.hpp +++ b/SU2_CFD/include/variables/CNSVariable.hpp @@ -170,6 +170,7 @@ class CNSVariable final : public CEulerVariable { * \return Value of the wall shear stress computed by a wall function. */ inline su2double GetTauWall(unsigned long iPoint) const override { return Tau_Wall(iPoint); } + inline const VectorType& GetTauWall() const { return Tau_Wall; } /*! * \brief Get the DES length scale diff --git a/SU2_CFD/src/numerics/flow/flow_diffusion.cpp b/SU2_CFD/src/numerics/flow/flow_diffusion.cpp index 6de0576e9b6..4c50e41423a 100644 --- a/SU2_CFD/src/numerics/flow/flow_diffusion.cpp +++ b/SU2_CFD/src/numerics/flow/flow_diffusion.cpp @@ -143,44 +143,24 @@ void CAvgGrad_Base::SetStressTensor(const su2double *val_primvar, } } -void CAvgGrad_Base::AddTauWall(const su2double *val_normal, - const su2double val_tau_wall) { +void CAvgGrad_Base::AddTauWall(const su2double *UnitNormal, + const su2double TauWall) { - unsigned short iDim, jDim; - su2double TauNormal, TauElem[3], TauTangent[3], WallShearStress, Area, UnitNormal[3]; + /*--- Compute the wall shear stress as the magnitude of the + tangential projection of the shear stress tensor. ---*/ - Area = GeometryToolbox::Norm(nDim, Normal); - - for (iDim = 0; iDim < nDim; iDim++) - UnitNormal[iDim] = val_normal[iDim]/Area; - - /*--- First, compute wall shear stress as the magnitude of the wall-tangential - component of the shear stress tensor---*/ - - for (iDim = 0; iDim < nDim; iDim++) { - TauElem[iDim] = 0.0; - for (jDim = 0; jDim < nDim; jDim++) - TauElem[iDim] += tau[iDim][jDim]*UnitNormal[jDim]; - } + su2double TauTangent[MAXNDIM]; + GeometryToolbox::TangentProjection(nDim, tau, UnitNormal, TauTangent); - TauNormal = 0.0; - for (iDim = 0; iDim < nDim; iDim++) - TauNormal += TauElem[iDim] * UnitNormal[iDim]; - - for (iDim = 0; iDim < nDim; iDim++) - TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; - - WallShearStress = 0.0; - for (iDim = 0; iDim < nDim; iDim++) - WallShearStress += TauTangent[iDim]*TauTangent[iDim]; - WallShearStress = sqrt(WallShearStress); + su2double WallShearStress = GeometryToolbox::Norm(nDim, TauTangent); + su2double Scale = TauWall / WallShearStress; /*--- Scale the stress tensor by the ratio of the wall shear stress - to the computed representation of the shear stress ---*/ + (from wall functions) to the one computed above. ---*/ - for (iDim = 0 ; iDim < nDim; iDim++) - for (jDim = 0 ; jDim < nDim; jDim++) - tau[iDim][jDim] = tau[iDim][jDim]*(val_tau_wall/WallShearStress); + for (auto iDim = 0u; iDim < nDim; iDim++) + for (auto jDim = 0u; jDim < nDim; jDim++) + tau[iDim][jDim] *= Scale; } void CAvgGrad_Base::SetTauJacobian(const su2double *val_Mean_PrimVar, @@ -401,7 +381,6 @@ CNumerics::ResidualType<> CAvgGrad_Flow::ComputeResidual(const CConfig* config) Mean_PrimVar[iVar] = 0.5*(PrimVar_i[iVar]+PrimVar_j[iVar]); } - /*--- Compute vector going from iPoint to jPoint ---*/ dist_ij_2 = 0.0; @@ -438,12 +417,10 @@ CNumerics::ResidualType<> CAvgGrad_Flow::ComputeResidual(const CConfig* config) /*--- Wall shear stress values (wall functions) ---*/ - if (TauWall_i > 0.0 && TauWall_j > 0.0) Mean_TauWall = 0.5*(TauWall_i + TauWall_j); - else if (TauWall_i > 0.0) Mean_TauWall = TauWall_i; - else if (TauWall_j > 0.0) Mean_TauWall = TauWall_j; - else Mean_TauWall = -1.0; + const int scale = max(1, (TauWall_i > 0.0)+(TauWall_j > 0.0)); + Mean_TauWall = (max(TauWall_i,0.0) + max(TauWall_j,0.0)) / scale; - /* --- If using UQ methodology, set Reynolds Stress tensor and perform perturbation--- */ + /*--- If using UQ methodology, set Reynolds Stress tensor and perform perturbation ---*/ if (using_uq){ ComputePerturbedRSM(nDim, Eig_Val_Comp, uq_permute, uq_delta_b, uq_urlx, @@ -454,9 +431,9 @@ CNumerics::ResidualType<> CAvgGrad_Flow::ComputeResidual(const CConfig* config) /*--- Get projected flux tensor (viscous residual) ---*/ SetStressTensor(Mean_PrimVar, Mean_GradPrimVar, Mean_turb_ke, - Mean_Laminar_Viscosity, Mean_Eddy_Viscosity); + Mean_Laminar_Viscosity, Mean_Eddy_Viscosity); if (config->GetQCR()) AddQCR(nDim, &Mean_GradPrimVar[1], tau); - if (Mean_TauWall > 0) AddTauWall(Normal, Mean_TauWall); + if (Mean_TauWall > 0) AddTauWall(UnitNormal, Mean_TauWall); SetHeatFluxVector(Mean_GradPrimVar, Mean_Laminar_Viscosity, Mean_Eddy_Viscosity); @@ -622,8 +599,24 @@ CNumerics::ResidualType<> CAvgGradInc_Flow::ComputeResidual(const CConfig* confi dist_ij_2, nVar); } + /*--- Wall shear stress values (wall functions) ---*/ + + const int scale = max(1, (TauWall_i > 0.0)+(TauWall_j > 0.0)); + Mean_TauWall = (max(TauWall_i,0.0) + max(TauWall_j,0.0)) / scale; + + /*--- If using UQ methodology, set Reynolds Stress tensor and perform perturbation ---*/ + + if (using_uq){ + ComputePerturbedRSM(nDim, Eig_Val_Comp, uq_permute, uq_delta_b, uq_urlx, + Mean_GradPrimVar+1, Mean_PrimVar[nDim+2], Mean_Eddy_Viscosity, + Mean_turb_ke, MeanPerturbedRSM); + } + /*--- Get projected flux tensor (viscous residual) ---*/ - SetStressTensor(Mean_PrimVar, Mean_GradPrimVar, Mean_turb_ke, Mean_Laminar_Viscosity, Mean_Eddy_Viscosity); + SetStressTensor(Mean_PrimVar, Mean_GradPrimVar, Mean_turb_ke, + Mean_Laminar_Viscosity, Mean_Eddy_Viscosity); + if (config->GetQCR()) AddQCR(nDim, &Mean_GradPrimVar[1], tau); + if (Mean_TauWall > 0) AddTauWall(UnitNormal, Mean_TauWall); GetViscousIncProjFlux(Mean_GradPrimVar, Normal, Mean_Thermal_Conductivity); @@ -935,12 +928,10 @@ CNumerics::ResidualType<> CGeneralAvgGrad_Flow::ComputeResidual(const CConfig* c /*--- Wall shear stress values (wall functions) ---*/ - if (TauWall_i > 0.0 && TauWall_j > 0.0) Mean_TauWall = 0.5*(TauWall_i + TauWall_j); - else if (TauWall_i > 0.0) Mean_TauWall = TauWall_i; - else if (TauWall_j > 0.0) Mean_TauWall = TauWall_j; - else Mean_TauWall = -1.0; + const int scale = max(1, (TauWall_i > 0.0)+(TauWall_j > 0.0)); + Mean_TauWall = (max(TauWall_i,0.0) + max(TauWall_j,0.0)) / scale; - /* --- If using UQ methodology, set Reynolds Stress tensor and perform perturbation--- */ + /*--- If using UQ methodology, set Reynolds Stress tensor and perform perturbation ---*/ if (using_uq){ ComputePerturbedRSM(nDim, Eig_Val_Comp, uq_permute, uq_delta_b, uq_urlx, @@ -953,7 +944,7 @@ CNumerics::ResidualType<> CGeneralAvgGrad_Flow::ComputeResidual(const CConfig* c SetStressTensor(Mean_PrimVar, Mean_GradPrimVar, Mean_turb_ke, Mean_Laminar_Viscosity, Mean_Eddy_Viscosity); if (config->GetQCR()) AddQCR(nDim, &Mean_GradPrimVar[1], tau); - if (Mean_TauWall > 0) AddTauWall(Normal, Mean_TauWall); + if (Mean_TauWall > 0) AddTauWall(UnitNormal, Mean_TauWall); SetHeatFluxVector(Mean_GradPrimVar, Mean_Laminar_Viscosity, Mean_Eddy_Viscosity, Mean_Thermal_Conductivity, Mean_Cp); diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index edb7cbe602c..100a310e4ff 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -4818,10 +4818,6 @@ void CEulerSolver::BC_Far_Field(CGeometry *geometry, CSolver **solver_container, visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0), solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0)); - /*--- Set the wall shear stress values (wall functions) to -1 (no evaluation using wall functions) ---*/ - - visc_numerics->SetTauWall(-1.0, -1.0); - /*--- Compute and update viscous residual ---*/ auto residual = visc_numerics->ComputeResidual(config); @@ -5310,10 +5306,6 @@ void CEulerSolver::BC_Riemann(CGeometry *geometry, CSolver **solver_container, visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0), solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0)); - /*--- Set the wall shear stress values (wall functions) to -1 (no evaluation using wall functions) ---*/ - - visc_numerics->SetTauWall(-1.0, -1.0); - /*--- Compute and update residual ---*/ auto residual = visc_numerics->ComputeResidual(config); @@ -5828,10 +5820,6 @@ void CEulerSolver::BC_TurboRiemann(CGeometry *geometry, CSolver **solver_contain visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0), solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0)); - /*--- Set the wall shear stress values (wall functions) to -1 (no evaluation using wall functions) ---*/ - - visc_numerics->SetTauWall(-1.0, -1.0); - /*--- Compute and update residual ---*/ auto residual = visc_numerics->ComputeResidual(config); @@ -6729,10 +6717,6 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0), solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0)); - /*--- Set the wall shear stress values (wall functions) to -1 (no evaluation using wall functions) ---*/ - - visc_numerics->SetTauWall(-1.0, -1.0); - /*--- Compute and update residual ---*/ auto residual = visc_numerics->ComputeResidual(config); @@ -7058,10 +7042,6 @@ void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container, // visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0), // solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0)); // -// /*--- Set the wall shear stress values (wall functions) to -1 (no evaluation using wall functions) ---*/ -// -// visc_numerics->SetTauWall(-1.0, -1.0); -// // /*--- Compute and update residual ---*/ // // auto residual = visc_numerics->ComputeResidual(config); @@ -7236,9 +7216,6 @@ void CEulerSolver::BC_Outlet(CGeometry *geometry, CSolver **solver_container, // visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0), // solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0)); // -// /*--- Set the wall shear stress values (wall functions) to -1 (no evaluation using wall functions) ---*/ -// visc_numerics->SetTauWall(-1.0, -1.0); -// // /*--- Compute and update residual ---*/ // // auto residual = visc_numerics->ComputeResidual(config); @@ -7384,10 +7361,6 @@ void CEulerSolver::BC_Supersonic_Inlet(CGeometry *geometry, CSolver **solver_con // visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0), // solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0)); // -// /*--- Set the wall shear stress values (wall functions) to -1 (no evaluation using wall functions) ---*/ -// -// visc_numerics->SetTauWall(-1.0, -1.0); -// // /*--- Compute and update residual ---*/ // // auto residual = visc_numerics->ComputeResidual(config); @@ -7510,10 +7483,6 @@ void CEulerSolver::BC_Supersonic_Outlet(CGeometry *geometry, CSolver **solver_co // visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0), // solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0)); // -// /*--- Set the wall shear stress values (wall functions) to -1 (no evaluation using wall functions) ---*/ -// -// visc_numerics->SetTauWall(-1.0, -1.0); -// // /*--- Compute and update residual ---*/ // // auto residual = visc_numerics->ComputeResidual(config); @@ -7734,10 +7703,6 @@ void CEulerSolver::BC_Engine_Inflow(CGeometry *geometry, CSolver **solver_contai // visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0), // solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0)); // -// /*--- Set the wall shear stress values (wall functions) to -1 (no evaluation using wall functions) ---*/ -// -// visc_numerics->SetTauWall(-1.0, -1.0); -// // /*--- Compute and update residual ---*/ // // auto residual = visc_numerics->ComputeResidual(config); @@ -7989,10 +7954,6 @@ void CEulerSolver::BC_Engine_Exhaust(CGeometry *geometry, CSolver **solver_conta // visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0), // solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0)); // -// /*--- Set the wall shear stress values (wall functions) to -1 (no evaluation using wall functions) ---*/ -// -// visc_numerics->SetTauWall(-1.0, -1.0); -// // /*--- Compute and update residual ---*/ // // auto residual = visc_numerics->ComputeResidual(config) @@ -8557,10 +8518,6 @@ void CEulerSolver::BC_ActDisk(CGeometry *geometry, CSolver **solver_container, C // visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0), // solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0)); // -// /*--- Set the wall shear stress values (wall functions) to -1 (no evaluation using wall functions) ---*/ -// -// visc_numerics->SetTauWall(-1.0, -1.0); -// // /*--- Compute and update residual ---*/ // // auto residual = visc_numerics->ComputeResidual(config); diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 4fe51b8a800..3c54989cc69 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -732,25 +732,15 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container /*--- Compute the shear stress at the wall in the regular fashion by using the stress tensor on the surface ---*/ - su2double tau[MAXNDIM][MAXNDIM] = {{0.0}}, TauElem[MAXNDIM] = {0.0}; + su2double tau[MAXNDIM][MAXNDIM] = {{0.0}}; su2double Lam_Visc_Wall = nodes->GetLaminarViscosity(iPoint); su2double Eddy_Visc_Wall = nodes->GetEddyViscosity(iPoint); // do we need the total viscosity for the stress tensor? //su2double total_viscosity = (Lam_Visc_Wall + Eddy_Visc_Wall); CNumerics::ComputeStressTensor(nDim, tau, nodes->GetGradient_Primitive(iPoint)+1, Lam_Visc_Wall); - for (auto iDim = 0u; iDim < nDim; iDim++) { - TauElem[iDim] = GeometryToolbox::DotProduct(nDim, tau[iDim], UnitNormal); - } - - /*--- Compute wall shear stress as the magnitude of the wall-tangential - component of the shear stress tensor---*/ - - su2double TauNormal = GeometryToolbox::DotProduct(nDim, TauElem, UnitNormal); - su2double TauTangent[MAXNDIM] = {0.0}; - for (auto iDim = 0u; iDim < nDim; iDim++) - TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; + GeometryToolbox::TangentProjection(nDim, tau, UnitNormal, TauTangent); su2double WallShearStress = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); diff --git a/SU2_CFD/src/solvers/CNEMONSSolver.cpp b/SU2_CFD/src/solvers/CNEMONSSolver.cpp index 8c51b809865..3a10d22f102 100644 --- a/SU2_CFD/src/solvers/CNEMONSSolver.cpp +++ b/SU2_CFD/src/solvers/CNEMONSSolver.cpp @@ -969,9 +969,8 @@ void CNEMONSSolver::BC_Smoluchowski_Maxwell(CGeometry *geometry, su2double dTn, dTven; su2double rhoCvtr, rhoCvve; - su2double TauElem[MAXNDIM] = {0.0}, TauTangent[MAXNDIM] = {0.0}; + su2double TauTangent[MAXNDIM] = {0.0}; su2double Tau[MAXNDIM][MAXNDIM] = {{0.0}}; - su2double TauNormal; bool ionization = config->GetIonization(); @@ -1095,14 +1094,8 @@ void CNEMONSSolver::BC_Smoluchowski_Maxwell(CGeometry *geometry, Res_Visc[iVar] = 0.0; CNumerics::ComputeStressTensor(nDim, Tau, Grad_PrimVar+VEL_INDEX, Viscosity); - for (iDim = 0; iDim < nDim; iDim++) - TauElem[iDim] = GeometryToolbox::DotProduct(nDim, Tau[iDim], UnitNormal); - - /*--- Compute wall shear stress (using the stress tensor) ---*/ - TauNormal = GeometryToolbox::DotProduct(nDim, TauElem, UnitNormal); - for (iDim = 0; iDim < nDim; iDim++) - TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; + GeometryToolbox::TangentProjection(nDim, Tau, UnitNormal, TauTangent); /*--- Store the Slip Velocity at the wall */ for (iDim = 0; iDim < nDim; iDim++) diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 0c564784b5e..f8d18636941 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -853,26 +853,15 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- Compute the shear stress at the wall in the regular fashion by using the stress tensor on the surface ---*/ - su2double tau[MAXNDIM][MAXNDIM] = {{0.0}}, TauElem[MAXNDIM] = {0.0}; + su2double tau[MAXNDIM][MAXNDIM] = {{0.0}}; su2double Lam_Visc_Wall = nodes->GetLaminarViscosity(iPoint); CNumerics::ComputeStressTensor(nDim, tau, nodes->GetGradient_Primitive(iPoint)+1, Lam_Visc_Wall); - for (auto iDim = 0u; iDim < nDim; iDim++) { - TauElem[iDim] = GeometryToolbox::DotProduct(nDim, tau[iDim], UnitNormal); - } - - /*--- Compute wall shear stress as the magnitude of the wall-tangential - component of the shear stress tensor---*/ - - su2double TauNormal = GeometryToolbox::DotProduct(nDim, TauElem, UnitNormal); - su2double TauTangent[MAXNDIM] = {0.0}; - for (auto iDim = 0u; iDim < nDim; iDim++) - TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; + GeometryToolbox::TangentProjection(nDim, tau, UnitNormal, TauTangent); su2double WallShearStress = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); - /*--- Calculate the quantities from boundary layer theory and iteratively solve for a new wall shear stress. Use the current wall shear stress as a starting guess for the wall function. ---*/ diff --git a/SU2_CFD/src/solvers/CTurbSASolver.cpp b/SU2_CFD/src/solvers/CTurbSASolver.cpp index 7453e3f2770..4daa0233d39 100644 --- a/SU2_CFD/src/solvers/CTurbSASolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSASolver.cpp @@ -414,7 +414,6 @@ void CTurbSASolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_conta if (config->GetWall_Functions()) { SU2_OMP_MASTER SetTurbVars_WF(geometry, solver_container, config, val_marker); - //SetNuTilde_WF(geometry, solver_container, conv_numerics, visc_numerics, config, val_marker); END_SU2_OMP_MASTER SU2_OMP_BARRIER return; @@ -581,14 +580,8 @@ void CTurbSASolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container, CN conv_numerics->SetPrimitive(V_domain, V_inlet); - /*--- Set the turbulent variable states (prescribed for an inflow) ---*/ - - //Solution_i[0] = nodes->GetSolution(iPoint,0); - /*--- Load the inlet turbulence variable (uniform by default). ---*/ - //Solution_j[0] = Inlet_TurbVars[val_marker][iVertex][0]; - conv_numerics->SetTurbVar(nodes->GetSolution(iPoint), Inlet_TurbVars[val_marker][iVertex]); /*--- Set various other quantities in the conv_numerics class ---*/ From fb3c0cc38ea012a1eece8c90d33cdc6ee7aa2182 Mon Sep 17 00:00:00 2001 From: Pedro Gomes Date: Sun, 30 May 2021 15:34:07 +0100 Subject: [PATCH 33/88] apply fix from #1120 (do not consider tau wall for edges along wall), vectorized implementation --- Common/include/linear_algebra/CSysMatrix.hpp | 2 -- SU2_CFD/include/numerics/CNumerics.hpp | 5 ---- .../include/numerics/NEMO/CNEMONumerics.hpp | 3 ++ .../include/numerics_simd/CNumericsSIMD.hpp | 1 - .../numerics_simd/flow/diffusion/common.hpp | 29 +++++++++++++++++++ .../flow/diffusion/viscous_fluxes.hpp | 3 ++ SU2_CFD/include/numerics_simd/util.hpp | 18 ++++++++++++ .../include/solvers/CFVMFlowSolverBase.inl | 4 --- SU2_CFD/include/variables/CVariable.hpp | 2 -- SU2_CFD/src/numerics/flow/flow_diffusion.cpp | 18 ++++++------ 10 files changed, 62 insertions(+), 23 deletions(-) diff --git a/Common/include/linear_algebra/CSysMatrix.hpp b/Common/include/linear_algebra/CSysMatrix.hpp index 75ab1a052c3..8d32302ee84 100644 --- a/Common/include/linear_algebra/CSysMatrix.hpp +++ b/Common/include/linear_algebra/CSysMatrix.hpp @@ -36,8 +36,6 @@ #include #include -using namespace std; - /*--- In forward mode the matrix is not of a built-in type. ---*/ #if defined(HAVE_MKL) && !defined(CODI_FORWARD_TYPE) #include "mkl.h" diff --git a/SU2_CFD/include/numerics/CNumerics.hpp b/SU2_CFD/include/numerics/CNumerics.hpp index 2181487e7ac..7e5fd557df6 100644 --- a/SU2_CFD/include/numerics/CNumerics.hpp +++ b/SU2_CFD/include/numerics/CNumerics.hpp @@ -34,13 +34,8 @@ #include #include "../../../Common/include/CConfig.hpp" -#include "../fluid/CNEMOGas.hpp" -#include "../../include/fluid/CMutationTCLib.hpp" -#include "../../include/fluid/CSU2TCLib.hpp" #include "../../../Common/include/linear_algebra/blas_structure.hpp" -using namespace std; - class CElement; class CFluidModel; diff --git a/SU2_CFD/include/numerics/NEMO/CNEMONumerics.hpp b/SU2_CFD/include/numerics/NEMO/CNEMONumerics.hpp index 408a13bdbd2..ff8482d425f 100644 --- a/SU2_CFD/include/numerics/NEMO/CNEMONumerics.hpp +++ b/SU2_CFD/include/numerics/NEMO/CNEMONumerics.hpp @@ -28,6 +28,9 @@ #pragma once #include "../CNumerics.hpp" +#include "../../fluid/CNEMOGas.hpp" +#include "../../fluid/CMutationTCLib.hpp" +#include "../../fluid/CSU2TCLib.hpp" /*! * \class CNEMONumerics diff --git a/SU2_CFD/include/numerics_simd/CNumericsSIMD.hpp b/SU2_CFD/include/numerics_simd/CNumericsSIMD.hpp index c76d96bd373..701ee440bca 100644 --- a/SU2_CFD/include/numerics_simd/CNumericsSIMD.hpp +++ b/SU2_CFD/include/numerics_simd/CNumericsSIMD.hpp @@ -27,7 +27,6 @@ #pragma once -#include "../../../Common/include/CConfig.hpp" #include "../../../Common/include/parallelization/vectorization.hpp" /*! diff --git a/SU2_CFD/include/numerics_simd/flow/diffusion/common.hpp b/SU2_CFD/include/numerics_simd/flow/diffusion/common.hpp index 918388f4066..fa3df0f0b2f 100644 --- a/SU2_CFD/include/numerics_simd/flow/diffusion/common.hpp +++ b/SU2_CFD/include/numerics_simd/flow/diffusion/common.hpp @@ -149,6 +149,35 @@ FORCEINLINE void addQCR(const MatrixType& grad, MatrixDbl& tau) { tau(iDim,jDim) -= c_cr1 * qcr(iDim,jDim); } +/*! + * \brief Scale the stress tensor according to the target (from a + * wall function) magnitute in the tangential direction. + */ +template +FORCEINLINE void addTauWall(Int iPoint, Int jPoint, + const Container& tauWall, + const VectorDbl& unitNormal, + MatrixDbl& tau) { + + Double tauWall_i = max(gatherVariables(iPoint, tauWall), 0.0); + Double tauWall_j = max(gatherVariables(jPoint, tauWall), 0.0); + + Double isWall_i = tauWall_i > 0.0; + Double isWall_j = tauWall_j > 0.0; + /*--- Arithmetic xor. ---*/ + Double isNormalEdge = isWall_i+isWall_j - 2*isWall_i*isWall_j; + + /*--- Tau wall is 0 for edges that are not normal to walls. ---*/ + Double tauWall_ij = (tauWall_i+tauWall_j) * isNormalEdge; + + /*--- Scale is 1 for those edges, i.e. tau is not changed. ---*/ + Double scale = tauWall_ij / norm(tangentProjection(tau,unitNormal)) + (1.0-isNormalEdge); + + for (size_t iDim = 0; iDim < nDim; ++iDim) + for (size_t jDim = 0; jDim < nDim; ++jDim) + tau(iDim,jDim) *= scale; +} + /*! * \brief Jacobian of the stress tensor (compressible flow). */ diff --git a/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp b/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp index 6c2078bccd8..bbb9897bd7f 100644 --- a/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp +++ b/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp @@ -78,6 +78,7 @@ class CCompressibleViscousFluxBase : public CNumericsSIMD { const su2double cp; const bool correct; const bool useSA_QCR; + const bool wallFun; const bool uq; const bool uq_permute; const size_t uq_eigval_comp; @@ -99,6 +100,7 @@ class CCompressibleViscousFluxBase : public CNumericsSIMD { cp(gamma * gasConst / (gamma - 1)), correct(iMesh == MESH_0), useSA_QCR(config.GetQCR()), + wallFun(config.GetWall_Functions()), uq(config.GetUsing_UQ()), uq_permute(config.GetUQ_Permute()), uq_eigval_comp(config.GetEig_Val_Comp()), @@ -157,6 +159,7 @@ class CCompressibleViscousFluxBase : public CNumericsSIMD { addPerturbedRSM(avgV, avgGrad, turb_ke, tau, uq_eigval_comp, uq_permute, uq_delta_b, uq_urlx); } + if(wallFun) addTauWall(iPoint, jPoint, solution.GetTauWall(), unitNormal, tau); Double cond = derived->thermalConductivity(avgV); VectorDbl heatFlux; diff --git a/SU2_CFD/include/numerics_simd/util.hpp b/SU2_CFD/include/numerics_simd/util.hpp index 21c99c7e529..ffd5620dd39 100644 --- a/SU2_CFD/include/numerics_simd/util.hpp +++ b/SU2_CFD/include/numerics_simd/util.hpp @@ -109,6 +109,24 @@ FORCEINLINE Double squaredNorm(const VectorDbl& vector) { return squaredNorm(vector.data()); } +/*! + * \brief Tangential projection. + */ +template +FORCEINLINE VectorDbl tangentProjection(const MatrixDbl& tensor, + const VectorDbl& unitVector) { + VectorDbl proj; + for (size_t iDim = 0; iDim < nDim; ++iDim) + proj(iDim) = dot(tensor[iDim], unitVector); + + Double normalProj = dot(proj, unitVector); + + for (size_t iDim = 0; iDim < nDim; ++iDim) + proj(iDim) -= normalProj * unitVector(iDim); + + return proj; +} + /*! * \brief Vector norm. */ diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index df923f6dc0b..e332a00df7b 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -446,10 +446,6 @@ void CFVMFlowSolverBase::Viscous_Residual_impl(unsigned long iEdge, CGeome auto residual = numerics->ComputeResidual(config); - /*--- Reset wall shear stress to keep boundaries from using it ---*/ - - numerics->SetTauWall(-1.0, -1.0); - if (ReducerStrategy) { EdgeFluxes.SubtractBlock(iEdge, residual); if (implicit) diff --git a/SU2_CFD/include/variables/CVariable.hpp b/SU2_CFD/include/variables/CVariable.hpp index 1898006dbac..70bd49d7855 100644 --- a/SU2_CFD/include/variables/CVariable.hpp +++ b/SU2_CFD/include/variables/CVariable.hpp @@ -41,8 +41,6 @@ class CFluidModel; class CNEMOGas; -using namespace std; - /*! * \class CVariable * \brief Main class for defining the variables. diff --git a/SU2_CFD/src/numerics/flow/flow_diffusion.cpp b/SU2_CFD/src/numerics/flow/flow_diffusion.cpp index 4c50e41423a..9062cf1f04d 100644 --- a/SU2_CFD/src/numerics/flow/flow_diffusion.cpp +++ b/SU2_CFD/src/numerics/flow/flow_diffusion.cpp @@ -415,10 +415,10 @@ CNumerics::ResidualType<> CAvgGrad_Flow::ComputeResidual(const CConfig* config) dist_ij_2, nDim+1); } - /*--- Wall shear stress values (wall functions) ---*/ + /*--- Wall shear stress values (wall functions) only used if present for one but not both points (xor) ---*/ - const int scale = max(1, (TauWall_i > 0.0)+(TauWall_j > 0.0)); - Mean_TauWall = (max(TauWall_i,0.0) + max(TauWall_j,0.0)) / scale; + const int scale = (TauWall_i > 0.0) ^ (TauWall_j > 0.0); + Mean_TauWall = (max(TauWall_i,0.0) + max(TauWall_j,0.0)) * scale; /*--- If using UQ methodology, set Reynolds Stress tensor and perform perturbation ---*/ @@ -599,10 +599,10 @@ CNumerics::ResidualType<> CAvgGradInc_Flow::ComputeResidual(const CConfig* confi dist_ij_2, nVar); } - /*--- Wall shear stress values (wall functions) ---*/ + /*--- Wall shear stress values (wall functions) only used if present for one but not both points (xor) ---*/ - const int scale = max(1, (TauWall_i > 0.0)+(TauWall_j > 0.0)); - Mean_TauWall = (max(TauWall_i,0.0) + max(TauWall_j,0.0)) / scale; + const int scale = (TauWall_i > 0.0) ^ (TauWall_j > 0.0); + Mean_TauWall = (max(TauWall_i,0.0) + max(TauWall_j,0.0)) * scale; /*--- If using UQ methodology, set Reynolds Stress tensor and perform perturbation ---*/ @@ -926,10 +926,10 @@ CNumerics::ResidualType<> CGeneralAvgGrad_Flow::ComputeResidual(const CConfig* c dist_ij_2, nDim+1); } - /*--- Wall shear stress values (wall functions) ---*/ + /*--- Wall shear stress values (wall functions) only used if present for one but not both points (xor) ---*/ - const int scale = max(1, (TauWall_i > 0.0)+(TauWall_j > 0.0)); - Mean_TauWall = (max(TauWall_i,0.0) + max(TauWall_j,0.0)) / scale; + const int scale = (TauWall_i > 0.0) ^ (TauWall_j > 0.0); + Mean_TauWall = (max(TauWall_i,0.0) + max(TauWall_j,0.0)) * scale; /*--- If using UQ methodology, set Reynolds Stress tensor and perform perturbation ---*/ From 417240866a13a36c2bae97acf0ff61ead816bf7a Mon Sep 17 00:00:00 2001 From: bigfootedrockmidget Date: Sun, 30 May 2021 21:18:08 +0200 Subject: [PATCH 34/88] added config options --- Common/include/CConfig.hpp | 21 +++++++ Common/include/option_structure.hpp | 2 +- Common/src/CConfig.cpp | 6 ++ .../include/solvers/CFVMFlowSolverBase.inl | 8 ++- SU2_CFD/include/solvers/CIncNSSolver.hpp | 12 ++-- SU2_CFD/src/solvers/CIncNSSolver.cpp | 20 +++--- SU2_CFD/src/solvers/CNSSolver.cpp | 63 ++++++++++--------- SU2_CFD/src/solvers/CTurbSASolver.cpp | 15 ++--- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 3 +- config_template.cfg | 4 +- 10 files changed, 91 insertions(+), 63 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index b0456242299..b44f03b8fa1 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -763,6 +763,7 @@ class CConfig { Wrt_Projected_Sensitivity, /*!< \brief Write projected sensitivities (dJ/dx) on surfaces to ASCII file. */ Plot_Section_Forces; /*!< \brief Write sectional forces for specified markers. */ unsigned short + wallModelMaxIter, /*!< \brief maximum number of iterations for the Newton method for the wall model */ Console_Output_Verb, /*!< \brief Level of verbosity for console output */ Kind_Average; /*!< \brief Particular average for the marker analyze. */ su2double Gamma, /*!< \brief Ratio of specific heats of the gas. */ @@ -826,6 +827,8 @@ class CConfig { Prandtl_Turb, /*!< \brief Turbulent Prandtl number for the gas. */ wallModelKappa, /*!< \brief von Karman constant kappa for turbulence wall modeling */ wallModelB, /*!< \brief constant B for turbulence wall modeling */ + wallModelRelFac, /*!< \brief relaxation factor for the Newton method used in the wall model */ + wallModelMinYplus, /*!< \brief minimum Y+ value, below which the wall model is not used anymore */ Length_Ref, /*!< \brief Reference length for non-dimensionalization. */ Pressure_Ref, /*!< \brief Reference pressure for non-dimensionalization. */ Temperature_Ref, /*!< \brief Reference temperature for non-dimensionalization.*/ @@ -1672,6 +1675,24 @@ class CConfig { */ su2double GetwallModelKappa(void) const { return wallModelKappa; } + /*! + * \brief Get the value of the max. number of Newton iterations for turbulence wall modeling. + * \return max number of iterations. + */ + unsigned short GetwallModelMaxIter(void) const { return wallModelMaxIter; } + + /*! + * \brief Get the value of the relaxation factor for turbulence wall modeling. + * \return relaxation factor. + */ + su2double GetwallModelRelFac(void) const { return wallModelRelFac; } + + /*! + * \brief Get the value of the minimum Y+ value below which the wall function is deactivated + * \return minimum Y+ value. + */ + su2double GetwallModelMinYPlus(void) const { return wallModelMinYplus; } + /*! * \brief Get the value of the von Karman constant kappa for turbulence wall modeling. * \return von Karman constant. diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp index 56d83ed7b96..e5cfe4cf460 100644 --- a/Common/include/option_structure.hpp +++ b/Common/include/option_structure.hpp @@ -945,7 +945,7 @@ enum class WALL_FUNCTIONS { LOGARITHMIC_WALL_MODEL /*!< \brief Logarithmic law-of-the-wall model for LES. */ }; static const MapType Wall_Functions_Map = { - MakePair("NONE", WALL_FUNCTIONS::NONE) + MakePair("NO_WALL_FUNCTION", WALL_FUNCTIONS::NONE) MakePair("STANDARD_WALL_FUNCTION", WALL_FUNCTIONS::STANDARD_WALL_FUNCTION) MakePair("ADAPTIVE_WALL_FUNCTION", WALL_FUNCTIONS::ADAPTIVE_WALL_FUNCTION) MakePair("SCALABLE_WALL_FUNCTION", WALL_FUNCTIONS::SCALABLE_WALL_FUNCTION) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 6013ba92414..aa6d6b92dca 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1225,6 +1225,12 @@ void CConfig::SetConfig_Options() { addDoubleOption("PRANDTL_TURB", Prandtl_Turb, 0.90); /*!\brief WALLMODELKAPPA \n DESCRIPTION: von Karman constant used for the wall model \n DEFAULT 0.41 \ingroup Config*/ addDoubleOption("WALLMODELKAPPA", wallModelKappa, 0.41); + /*!\brief WALLMODELMAXITER \n DESCRIPTION: Max iterations used for the wall model \n DEFAULT 200 \ingroup Config*/ + addUnsignedShortOption("WALLMODELMAXITER", wallModelMaxIter, 200); + /*!\brief WALLMODELRELFAC \n DESCRIPTION: Relaxation factor used for the wall model \n DEFAULT 0.5 \ingroup Config*/ + addDoubleOption("WALLMODELRELFAC", wallModelRelFac, 0.5); + /*!\brief WALLMODELMINYPLUS \n DESCRIPTION: lower limit for Y+ used for the wall model \n DEFAULT 5.0 \ingroup Config*/ + addDoubleOption("WALLMODELMINYPLUS", wallModelMinYplus, 5.0); /*!\brief WALLMODELB \n DESCRIPTION: constant B used for the wall model \n DEFAULT 5.0 \ingroup Config*/ addDoubleOption("WALLMODELB", wallModelB, 5.5); /*!\brief BULK_MODULUS \n DESCRIPTION: Value of the Bulk Modulus \n DEFAULT 1.42E5 \ingroup Config*/ diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index c90c06a64b8..d6e7d046b29 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2420,6 +2420,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr UnitNormal[3] = {0.0}, TauElem[3] = {0.0}, TauTangent[3] = {0.0}, Tau[3][3] = {{0.0}}, Cp, thermal_conductivity, MaxNorm = 8.0, Grad_Vel[3][3] = {{0.0}}, Grad_Temp[3] = {0.0}, AxiFactor; const su2double *Coord = nullptr, *Coord_Normal = nullptr, *Normal = nullptr; + const su2double minYPlus = config->GetwallModelMinYPlus(); string Marker_Tag, Monitoring_Tag; @@ -2437,6 +2438,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr bool roughwall = (config->GetnRoughWall() > 0); bool nemo = config->GetNEMOProblem(); + /*--- Get the locations of the primitive variables for NEMO ---*/ if (nemo) { unsigned short nSpecies = config->GetnSpecies(); @@ -2557,8 +2559,8 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; /* --- in case of wall functions, we have computed the skin friction in the turbulence solver --- */ /* --- Note that in the wall model, we switch off the computation when the computed y+ < 5 --- */ - /* --- We put YPlus to 1.0 so we have to compute skinfriction and the actual y+ in that case as well --- */ - if (!wallfunctions || (wallfunctions && YPlus[iMarker][iVertex] < 5.0)) + /* --- We have to compute skinfriction in that case as well (we do not recompute y+) --- */ + if (!wallfunctions || (wallfunctions && YPlus[iMarker][iVertex] < minYPlus)) CSkinFriction[iMarker](iVertex,iDim) = TauTangent[iDim] * factorFric; WallShearStress[iMarker][iVertex] += TauTangent[iDim] * TauTangent[iDim]; @@ -2578,7 +2580,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr /* --- Note that we do not recompute y+ when y+<5 because y+ can become > 5 again --- */ if (!wallfunctions) YPlus[iMarker][iVertex] = WallDistMod * FrictionVel / (Viscosity / Density); - + /*--- Compute total and maximum heat flux on the wall ---*/ /// TODO: Move these ifs to specialized functions. diff --git a/SU2_CFD/include/solvers/CIncNSSolver.hpp b/SU2_CFD/include/solvers/CIncNSSolver.hpp index dd5cbf2746b..0e67ba73f69 100644 --- a/SU2_CFD/include/solvers/CIncNSSolver.hpp +++ b/SU2_CFD/include/solvers/CIncNSSolver.hpp @@ -81,12 +81,12 @@ class CIncNSSolver final : public CIncEulerSolver { * \param[in] solver_container - Container vector with all the solutions. * \param[in] config - Definition of the particular problem. */ - void SetTurbVars_WF(CGeometry *geometry, - CSolver **solver_container, - CNumerics *conv_numerics, - CNumerics *visc_numerics, - const CConfig *config, - unsigned short val_marker) ; + //void SetTurbVars_WF(CGeometry *geometry, + // CSolver **solver_container, + // CNumerics *conv_numerics, + // CNumerics *visc_numerics, + // const CConfig *config, + // unsigned short val_marker) ; /*! * \brief Compute necessary quantities (massflow, integrated heatflux, avg density) diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index b5dc7036208..1f1fa2f17f9 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -627,14 +627,13 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container su2double U_Tau, Y_Plus; const su2double Gas_Constant = config->GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; - //su2double Eddy_Visc = 1.0e-6; /*--- nonzero starting value for eddy viscosity---*/ - constexpr unsigned short max_iter =200; /*--- maximum number of iterations for the Newton Solver---*/ - const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ - const su2double relax = 0.5; /*--- relaxation factor for the Newton solver ---*/ - - /*--- Compute the recovery factor ---*/ + const unsigned short max_iter =config->GetwallModelMaxIter(); /*--- maximum number of iterations for the Newton Solver---*/ + const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ + const su2double relax = config->GetwallModelRelFac(); /*--- relaxation factor for the Newton solver ---*/ + const su2double minYPlus = config->GetwallModelMinYPlus(); - // Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) + /*--- Compute the recovery factor + * use Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) ---*/ const su2double Recovery = pow(config->GetPrandtl_Lam(), (1.0/3.0)); /*--- Typical constants from boundary layer theory ---*/ @@ -770,12 +769,13 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container unsigned long counter = 0; su2double diff = 1.0; U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall)); - Y_Plus = 4.99; // clipping value + Y_Plus = 0.99*minYPlus; // clipping value + su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; - /*--- Automatic switch off when y+ < 5 according to Nichols & Nelson (2004) ---*/ + /*--- Automatic switch off when y+ < 5.0 according to Nichols & Nelson (2004) ---*/ - if (Y_Plus_Start < 5.0) { + if (Y_Plus_Start < minYPlus) { /*--- impose a minimum y+ for stability reasons---*/ smallYPlusCounter++; } diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 73b3440933e..77d3577ea77 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -735,23 +735,23 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c At this moment, the wall function is only available for adiabatic flows. ---*/ su2double RefDensity=Density_Inf,RefVel2=0.0; - if ((config->GetRef_Inc_NonDim() == DIMENSIONAL) || (config->GetRef_Inc_NonDim() == INITIAL_VALUES)) { + if ((config->GetRef_NonDim() == DIMENSIONAL) || (config->GetRef_NonDim() == INITIAL_VALUES)) { for (auto iDim = 0u; iDim < nDim; iDim++) RefVel2 += Velocity_Inf[iDim] * Velocity_Inf[iDim]; - } else if (config->GetRef_Inc_NonDim() == REFERENCE_VALUES) { - RefDensity = config->GetInc_Density_Ref(); - RefVel2 = config->GetInc_Velocity_Ref() * config->GetInc_Velocity_Ref(); + } else if (config->GetRef_NonDim() == REFERENCE_VALUES) { + RefDensity = config->GetDensity_Ref(); + RefVel2 = config->GetVelocity_Ref() * config->GetVelocity_Ref(); } unsigned long int notConvergedCounter=0; su2double grad_diff; const su2double Gas_Constant = config->GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; - su2double Eddy_Visc,Y_Plus,U_Tau; + su2double Y_Plus,U_Plus,U_Tau; - constexpr unsigned short max_iter = 200; /*--- maximum number of iterations for the Newton Solver---*/ - const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ - const su2double relax = 0.5; /*--- relaxation factor for the Newton solver ---*/ + const unsigned short max_iter = config->GetwallModelMaxIter() ; /*--- maximum number of iterations for the Newton Solver---*/ + const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ + const su2double relax = config->GetwallModelRelFac(); /*--- relaxation factor for the Newton solver ---*/ /*--- Compute the recovery factor ---*/ // Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) @@ -860,10 +860,12 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- Compute the shear stress at the wall in the regular fashion - by using the stress tensor on the surface ---*/ + * by using the stress tensor on the surface ---*/ su2double tau[MAXNDIM][MAXNDIM] = {{0.0}}, TauElem[MAXNDIM] = {0.0}; su2double Lam_Visc_Wall = nodes->GetLaminarViscosity(iPoint); + su2double Eddy_Visc_Wall = nodes->GetEddyViscosity(iPoint); + CNumerics::ComputeStressTensor(nDim, tau, nodes->GetGradient_Primitive(iPoint)+1, Lam_Visc_Wall); for (auto iDim = 0u; iDim < nDim; iDim++) { @@ -871,7 +873,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c } /*--- Compute wall shear stress as the magnitude of the wall-tangential - component of the shear stress tensor---*/ + * component of the shear stress tensor---*/ su2double TauNormal = GeometryToolbox::DotProduct(nDim, TauElem, UnitNormal); @@ -883,52 +885,52 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- Calculate the quantities from boundary layer theory and - iteratively solve for a new wall shear stress. Use the current wall - shear stress as a starting guess for the wall function. ---*/ + * iteratively solve for a new wall shear stress. Use the current wall + * shear stress as a starting guess for the wall function. ---*/ unsigned long counter = 0; su2double diff = 1.0; U_Tau = sqrt(WallShearStress/Density_Wall); - Y_Plus = 0.0; // to avoid warning + Y_Plus = 0.99*config->GetwallModelMinYPlus(); // to avoid warning su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; - /*--- Automatic switch off when y+ < 5 according to Nichols & Nelson (2004) ---*/ + /*--- Automatic switch off when y+ < 5.0 according to Nichols & Nelson (2004) ---*/ - if (Y_Plus_Start < 5.0) { + if (Y_Plus_Start < config->GetwallModelMinYPlus()) { cout << "skipping stress due to wall model" << endl; continue; } - + else { while (fabs(diff) > tol) { /*--- Friction velocity and u+ ---*/ - su2double U_Plus = VelTangMod/U_Tau; + U_Plus = VelTangMod/U_Tau; /*--- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) page 1110 ---*/ su2double Gam = Recovery*U_Tau*U_Tau/(2.0*Cp*T_Wall); - /*--- nijso: heated wall needs validation testcase! ---*/ + /*--- nijso: heated wall needs validation testcase! ---*/ su2double Beta = q_w*Lam_Visc_Wall/(Density_Wall*T_Wall*Conductivity_Wall*U_Tau); // TODO: nonzero heatflux needs validation case su2double Q = sqrt(Beta*Beta + 4.0*Gam); su2double Phi = asin(-1.0*Beta/Q); - /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ + /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); /*--- Spalding's universal form for the BL velocity with the - outer velocity form of White & Christoph above. ---*/ + * outer velocity form of White & Christoph above. ---*/ su2double kUp = kappa*U_Plus; - su2double Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); + Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); - Eddy_Visc = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp(-1.0*kappa*B)* + Eddy_Visc_Wall = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp(-1.0*kappa*B)* (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0) - Lam_Visc_Normal/Lam_Visc_Wall); - Eddy_Visc = max(1.0e-6, Eddy_Visc); + Eddy_Visc_Wall = max(1.0e-6, Eddy_Visc_Wall); /* --- Define function for Newton method to zero --- */ @@ -946,27 +948,30 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c U_Tau = U_Tau - relax*(diff / grad_diff); counter++; - + //cout << counter << " "<< Y_Plus <<" "<< Eddy_Visc_Wall <<" " + // << diff <<" "< max_iter) { notConvergedCounter++; - // cout << "Warning: Y+ did not converge within the max number of iterations!" << endl; + cout << "Warning: Y+ did not converge within the max number of iterations!" << endl; // cout << "diff = " << endl; // do not break, use some safe values for convergence // break; Y_Plus = 30.0; - Eddy_Visc = 1.0; + Eddy_Visc_Wall = 1.0; U_Tau = 1.0; } } - + } /*--- Calculate an updated value for the wall shear stress using the y+ value, the definition of y+, and the definition of the friction velocity. ---*/ - + if ((Coord[0] < 1.05) && (Coord[0] > 0.95)) + cout << Coord[0] <<","<SetPrimitive(V_domain, V_inlet); - /*--- Set the turbulent variable states (prescribed for an inflow) ---*/ - - //Solution_i[0] = nodes->GetSolution(iPoint,0); - - /*--- Load the inlet turbulence variable (uniform by default). ---*/ - - //Solution_j[0] = Inlet_TurbVars[val_marker][iVertex][0]; - conv_numerics->SetTurbVar(nodes->GetSolution(iPoint), Inlet_TurbVars[val_marker][iVertex]); /*--- Set various other quantities in the conv_numerics class ---*/ @@ -1584,7 +1576,8 @@ void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contain const CConfig *config, unsigned short val_marker) { const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); - + const su2double minYPlus = config->GetwallModelMinYPlus(); + /*--- We use a very high max nr of iterations, but we only need this the first couple of iterations ---*/ constexpr unsigned short max_iter = 200; @@ -1616,9 +1609,9 @@ void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contain /*--- Do not use wall model at the ipoint when y+ < 5.0 ---*/ - if (Y_Plus < 5.0) { + if (Y_Plus < minYPlus) { - /* --- note that we do not do anything for y+ < 5, meaning that we have a zero flux (Neumann) boundary condition --- */ + /* --- note that we do not do anything for y+ < 5.0, meaning that we have a zero flux (Neumann) boundary condition --- */ continue; } diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 842b4b59f11..ff6f65f388d 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -468,6 +468,7 @@ void CTurbSSTSolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contai /*--- von Karman constant from boundary layer theory ---*/ const su2double kappa = config->GetwallModelKappa(); + const su2double minYPlus = config->GetwallModelMinYPlus(); const su2double relax = 0.5; /*--- relaxation factor for k-omega values ---*/ //const su2double beta_1 = constants[4]; su2double k,omega; @@ -483,7 +484,7 @@ void CTurbSSTSolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contai /*--- Do not use wall model at the ipoint when y+ < 5.0 ---*/ - if (Y_Plus < 5.0) { + if (Y_Plus < minYPlus) { /* --- use zero flux (Neumann) conditions --- */ diff --git a/config_template.cfg b/config_template.cfg index 42c65ce49a9..bc5936a3607 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -914,10 +914,10 @@ MARKER_PLOTTING = ( airfoil ) MARKER_MONITORING = ( airfoil ) % % Viscous wall markers for which wall functions must be applied. (NONE = no marker) -% Format: ( marker name, wall function type -NONE, STANDARD_WALL_FUNCTION, +% Format: ( marker name, wall function type -NO_WALL_FUNCTION, STANDARD_WALL_FUNCTION, % ADAPTIVE_WALL_FUNCTION, SCALABLE_WALL_FUNCTION, EQUILIBRIUM_WALL_MODEL, % NONEQUILIBRIUM_WALL_MODEL-, ... ) -MARKER_WALL_FUNCTIONS= ( airfoil, NONE ) +MARKER_WALL_FUNCTIONS= ( airfoil, NO_WALL_FUNCTION ) % % Marker(s) of the surface where custom thermal BC's are defined. MARKER_PYTHON_CUSTOM = ( NONE ) From 90723afeacaffcc753d1a16fb8c499420cc080fb Mon Sep 17 00:00:00 2001 From: Pedro Gomes Date: Sun, 13 Jun 2021 18:40:25 +0100 Subject: [PATCH 35/88] some fixes and better warnings --- .../include/solvers/CFVMFlowSolverBase.inl | 2 + SU2_CFD/src/solvers/CIncNSSolver.cpp | 72 +++++++++++-------- SU2_CFD/src/solvers/CNSSolver.cpp | 64 +++++++++++------ SU2_CFD/src/solvers/CTurbSASolver.cpp | 31 +++----- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 8 +-- 5 files changed, 95 insertions(+), 82 deletions(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index e332a00df7b..b4dc537102d 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -1780,6 +1780,8 @@ void CFVMFlowSolverBase::Pressure_Forces(const CGeometry* geometr auto Origin = config->GetRefOriginMoment(0); bool axisymmetric = config->GetAxisymmetric(); + SetReferenceValues(*config); + const su2double factor = 1.0 / AeroCoeffForceRef; /*--- Reference pressure is always the far-field value. ---*/ diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 1c996197171..5a749ddfea8 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -615,11 +615,9 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container unsigned long notConvergedCounter = 0; /*--- counts the number of wall cells that are not converged ---*/ unsigned long smallYPlusCounter = 0; /*--- counts the number of wall cells where y+ < 5 ---*/ - su2double grad_diff; - su2double U_Tau, Y_Plus; + const su2double Gas_Constant = config->GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; - //su2double Eddy_Visc = 1.0e-6; /*--- nonzero starting value for eddy viscosity---*/ constexpr unsigned short max_iter =200; /*--- maximum number of iterations for the Newton Solver---*/ const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ const su2double relax = 0.5; /*--- relaxation factor for the Newton solver ---*/ @@ -690,9 +688,6 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container for (auto iDim = 0u; iDim < nDim; iDim++) Vel[iDim] = nodes->GetVelocity(Point_Normal,iDim); - // su2double P_Normal = nodes->GetPressure(Point_Normal); - // su2double T_Normal = nodes->GetTemperature(Point_Normal); - /*--- Compute the wall-parallel velocity at first point off the wall ---*/ su2double VelNormal = GeometryToolbox::DotProduct(int(MAXNDIM), Vel, UnitNormal); @@ -710,17 +705,9 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container su2double WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); - /*--- Compute mach number ---*/ - - // M_Normal = VelTangMod / sqrt(Gamma * Gas_Constant * T_Normal); - - /*--- Compute the wall temperature using the Crocco-Buseman equation ---*/ - - //T_Normal = T_Wall * (1.0 + 0.5*Gamma_Minus_One*Recovery*u_normal*u_normal); - // this means that T_Wall = T_Normal/(1.0+0.5*Gamma_Minus_One*Recovery*u_normal*u_normal) - //T_Wall = T_Normal/(1.0+0.5*Gamma_Minus_One*Recovery*VelTangMod*VelTangMod); - // in incompressible flows, we can assume that there is no velocity-related temperature change - // Prandtl: T+ = Pr*y+ + /*--- Compute the wall temperature using the Crocco-Buseman equation. + * In incompressible flows, we can assume that there is no velocity-related + * temperature change Prandtl: T+ = Pr*y+ ---*/ su2double T_Wall = nodes->GetTemperature(iPoint); /*--- Extrapolate the pressure from the interior & compute the @@ -750,14 +737,16 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container iteratively solve for a new wall shear stress. Use the current wall shear stress as a starting guess for the wall function. ---*/ - unsigned long counter = 0; su2double diff = 1.0; - U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall)); - Y_Plus = 4.99; // clipping value + unsigned long counter = 0; + su2double diff = 1.0; + su2double U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall)); + su2double Y_Plus = 5.0; // clipping value + su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; /*--- Automatic switch off when y+ < 5 according to Nichols & Nelson (2004) ---*/ - if (Y_Plus_Start < 5.0) { + if (Y_Plus_Start < Y_Plus) { /*--- impose a minimum y+ for stability reasons---*/ smallYPlusCounter++; } @@ -799,7 +788,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container /* --- Gradient of function defined above --- */ - grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + + su2double grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + kappa /(U_Tau * sqrt(Gam)) * asin(U_Plus * sqrt(Gam)) * Y_Plus_White - exp(-1.0 * B * kappa) * (0.5 * pow(VelTangMod * kappa / U_Tau, 3) + pow(VelTangMod * kappa / U_Tau, 2) + VelTangMod * kappa / U_Tau) / U_Tau; @@ -809,10 +798,12 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container U_Tau = U_Tau - relax*(diff / grad_diff); counter++; - if (counter > max_iter) { notConvergedCounter++; - cout << "Warning: Y+ did not converge within the max number of iterations!" << endl; + // use some safe values for convergence + Y_Plus = 30.0; + Eddy_Visc_Wall = 1.0; + U_Tau = 1.0; break; } } @@ -846,12 +837,33 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container END_SU2_OMP_FOR } - if (notConvergedCounter>0) { - cout << "Warning: computation of wall coefficients (y+) did not converge in " << notConvergedCounter<< " points"<GetComm_Level() == COMM_FULL) { + static unsigned long globalCounter1, globalCounter2; - //if (smallYPlusCounter>0) { - // cout << "Warning: y+ < 5.0 in " << smallYPlusCounter<< " points, wall model not active in these points."<GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; - su2double Eddy_Visc,Y_Plus,U_Tau; constexpr unsigned short max_iter = 200; /*--- maximum number of iterations for the Newton Solver---*/ const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ @@ -831,13 +829,10 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c su2double WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); - /*--- Compute mach number ---*/ - - // M_Normal = VelTangMod / sqrt(Gamma * Gas_Constant * T_Normal); - /*--- Compute the wall temperature using the Crocco-Buseman equation ---*/ - //T_Wall = T_Normal * (1.0 + 0.5*Gamma_Minus_One*Recovery*M_Normal*M_Normal); + //Mach2_Normal = pow(VelTangMod,2) / (Gamma * Gas_Constant * T_Normal); + //T_Wall = T_Normal * (1.0 + 0.5*Gamma_Minus_One*Recovery*Mach2_Normal); su2double T_Wall = T_Normal + Recovery*pow(VelTangMod,2.0)/(2.0*Cp); /*--- Extrapolate the pressure from the interior & compute the @@ -866,20 +861,19 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c iteratively solve for a new wall shear stress. Use the current wall shear stress as a starting guess for the wall function. ---*/ - unsigned long counter = 0; su2double diff = 1.0; - U_Tau = sqrt(WallShearStress/Density_Wall); - Y_Plus = 0.0; // to avoid warning + unsigned long counter = 0; + su2double diff = 1.0, Eddy_Visc = 1.0; + su2double U_Tau = sqrt(WallShearStress/Density_Wall); + su2double Y_Plus = 5.0; su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; /*--- Automatic switch off when y+ < 5 according to Nichols & Nelson (2004) ---*/ - if (Y_Plus_Start < 5.0) { - cout << "skipping stress due to wall model" << endl; - continue; + if (Y_Plus_Start < Y_Plus) { + skipCounter++; } - - while (fabs(diff) > tol) { + else while (fabs(diff) > tol) { /*--- Friction velocity and u+ ---*/ @@ -893,7 +887,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c su2double Q = sqrt(Beta*Beta + 4.0*Gam); su2double Phi = asin(-1.0*Beta/Q); - /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ + /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); @@ -901,7 +895,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c outer velocity form of White & Christoph above. ---*/ su2double kUp = kappa*U_Plus; - su2double Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); + su2double Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); @@ -916,7 +910,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /* --- Gradient of function defined above --- */ - grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + + su2double grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + kappa /(U_Tau * sqrt(Gam)) * asin(U_Plus * sqrt(Gam)) * Y_Plus_White - exp(-1.0 * B * kappa) * (0.5 * pow(VelTangMod * kappa / U_Tau, 3) + pow(VelTangMod * kappa / U_Tau, 2) + VelTangMod * kappa / U_Tau) / U_Tau; @@ -927,15 +921,14 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c counter++; - if (counter > max_iter) { notConvergedCounter++; // use some safe values for convergence Y_Plus = 30.0; Eddy_Visc = 1.0; U_Tau = 1.0; + break; } - } /*--- Calculate an updated value for the wall shear stress @@ -961,8 +954,33 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c } END_SU2_OMP_FOR - if (notConvergedCounter>0) { - cout << "Warning: computation of wall coefficients (y+) did not converge in " << notConvergedCounter<< " points"<GetComm_Level() == COMM_FULL) { + static unsigned long globalCounter1, globalCounter2; + + ompMasterAssignBarrier(globalCounter1,0, globalCounter2,0); + + SU2_OMP_ATOMIC + globalCounter1 += notConvergedCounter; + + SU2_OMP_ATOMIC + globalCounter2 += skipCounter; + + SU2_OMP_BARRIER + SU2_OMP_MASTER { + SU2_MPI::Allreduce(&globalCounter1, ¬ConvergedCounter, 1, MPI_UNSIGNED_LONG, MPI_SUM, SU2_MPI::GetComm()); + SU2_MPI::Allreduce(&globalCounter2, &skipCounter, 1, MPI_UNSIGNED_LONG, MPI_SUM, SU2_MPI::GetComm()); + + if (rank == MASTER_NODE) { + if (notConvergedCounter) + cout << "Warning: Computation of wall coefficients (y+) did not converge in " + << notConvergedCounter << " points." << endl; + + if (skipCounter) + cout << "Warning: y+ < 5.0 in " << skipCounter + << " points, for which the wall model is not active." << endl; + } + } + END_SU2_OMP_MASTER } } diff --git a/SU2_CFD/src/solvers/CTurbSASolver.cpp b/SU2_CFD/src/solvers/CTurbSASolver.cpp index 4daa0233d39..21d307bdac0 100644 --- a/SU2_CFD/src/solvers/CTurbSASolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSASolver.cpp @@ -1578,7 +1578,6 @@ void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contain const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); - /*--- We use a very high max nr of iterations, but we only need this the first couple of iterations ---*/ constexpr unsigned short max_iter = 200; @@ -1588,7 +1587,6 @@ void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contain /*--- Typical constants from boundary layer theory ---*/ - const su2double cv1_3 = 7.1*7.1*7.1; CVariable* flow_nodes = solver_container[FLOW_SOL]->GetNodes(); @@ -1598,23 +1596,17 @@ void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contain 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(); /*--- Check if the node belongs to the domain (i.e, not a halo node) ---*/ - if (geometry->nodes->GetDomain(iPoint)) { - - const auto iPoint_Neighbor = geometry->vertex[val_marker][iVertex]->GetNormal_Neighbor(); + if (geometry->nodes->GetDomain(iPoint_Neighbor)) { su2double Y_Plus = solver_container[FLOW_SOL]->GetYPlus(val_marker, iVertex); - /*--- Do not use wall model at the ipoint when y+ < 5.0 ---*/ - - if (Y_Plus < 5.0) { + /*--- note that we do not do anything for y+ < 5, meaning that we have a zero flux (Neumann) boundary condition ---*/ - /* --- note that we do not do anything for y+ < 5, meaning that we have a zero flux (Neumann) boundary condition --- */ - - continue; - } + if (Y_Plus < 5.0) continue; su2double Lam_Visc_Normal = flow_nodes->GetLaminarViscosity(iPoint_Neighbor); su2double Density_Normal = flow_nodes->GetDensity(iPoint_Neighbor); @@ -1633,8 +1625,8 @@ void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contain relax = 0.5; while (diff > tol) { // note the error in Nichols and Nelson - su2double func = nu_til_old*nu_til_old*nu_til_old*nu_til_old - (Eddy_Visc/Density_Normal)*(nu_til_old*nu_til_old*nu_til_old + Kin_Visc_Normal*Kin_Visc_Normal*Kin_Visc_Normal*cv1_3); - su2double func_prim = 4.0 * nu_til_old*nu_til_old*nu_til_old - 3.0*(Eddy_Visc/Density_Normal)*(nu_til_old*nu_til_old); + su2double func = pow(nu_til_old,4) - (Eddy_Visc/Density_Normal)*(pow(nu_til_old,3) + pow(Kin_Visc_Normal,3)*cv1_3); + su2double func_prim = 4.0 * pow(nu_til_old,3) - 3.0*(Eddy_Visc/Density_Normal)*pow(nu_til_old,2); // damped Newton method nu_til = nu_til_old - relax*(func/func_prim); @@ -1644,18 +1636,12 @@ void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contain // sometimes we get negative values when the solution has not converged yet, we just reset the nu_tilde in that case. if (nu_til_oldGetSolution(iPoint,0)<<" , nutilde="<GetSolution(iPoint,0)/relax; } counter++; - if (counter > max_iter) { - cout << "WARNING: Nu_tilde evaluation did not converge in " < max_iter) break; } nodes->SetSolution_Old(iPoint_Neighbor, &nu_til); @@ -1664,7 +1650,6 @@ void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contain /*--- includes 1 in the diagonal ---*/ if (implicit) Jacobian.DeleteValsRowi(iPoint_Neighbor); - } } } diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 2045620d786..819a57c0a49 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -373,7 +373,6 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont SU2_OMP_MASTER SetTurbVars_WF(geometry, solver_container, config, val_marker); END_SU2_OMP_MASTER - SU2_OMP_BARRIER return; } @@ -479,12 +478,9 @@ void CTurbSSTSolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contai su2double Y_Plus = solver_container[FLOW_SOL]->GetYPlus(val_marker, iVertex); su2double Lam_Visc_Wall = solver_container[FLOW_SOL]->GetNodes()->GetLaminarViscosity(iPoint); - /*--- Do not use wall model at the ipoint when y+ < 5.0 ---*/ + /*--- Do not use wall model at the ipoint when y+ < 5.0, use zero flux (Neumann) conditions. ---*/ - if (Y_Plus < 5.0) { - /*--- use zero flux (Neumann) conditions ---*/ - continue; - } + if (Y_Plus < 5.0) continue; su2double Eddy_Visc = solver_container[FLOW_SOL]->GetEddyViscWall(val_marker, iVertex); su2double k = nodes->GetSolution(iPoint_Neighbor,0); From 9fd30a9f17d43c10f3be3a297c1fda99f674a25a Mon Sep 17 00:00:00 2001 From: bigfooted rockmidget Date: Tue, 15 Jun 2021 16:02:31 +0200 Subject: [PATCH 36/88] add testcase --- .../include/solvers/CFVMFlowSolverBase.inl | 52 ++++++--- SU2_CFD/src/solvers/CIncNSSolver.cpp | 5 +- SU2_CFD/src/solvers/CNSSolver.cpp | 110 +++++++++--------- TestCases/serial_regression.py | 12 ++ 4 files changed, 107 insertions(+), 72 deletions(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index 0dfd7e53905..a78e7fcb7bb 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2504,31 +2504,57 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr TauElem[iDim] += Tau[iDim][jDim] * UnitNormal[jDim]; } } - + + /*--- Compute wall shear stress (using the stress tensor). Compute wall skin friction coefficient, and heat flux * on the wall ---*/ - TauNormal = 0.0; - for (iDim = 0; iDim < nDim; iDim++) TauNormal += TauElem[iDim] * UnitNormal[iDim]; + //TauNormal = 0.0; + //for (iDim = 0; iDim < nDim; iDim++) TauNormal += TauElem[iDim] * UnitNormal[iDim]; + + //TauNormal = GeometryToolbox::DotProduct(int(MAXNDIM), TauElem, UnitNormal); + + //WallShearStress[iMarker][iVertex] = 0.0; + + su2double TauTangent[MAXNDIM] = {0.0}; + GeometryToolbox::TangentProjection(nDim, Tau, UnitNormal, TauTangent); + + WallShearStress[iMarker][iVertex] = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); + + + /*--- for wall functions, the wall stresses need to be scald by the wallfunction stress Tau_Wall---*/ + if (wallfunctions && YPlus[iMarker][iVertex] > minYPlus){ + su2double Tau_Wall = nodes->GetTauWall(iPoint); + for (iDim = 0; iDim < nDim; iDim++) TauTangent[iDim] = (Tau_Wall/WallShearStress[iMarker][iVertex])*TauTangent[iDim]; + for (iDim = 0; iDim < nDim; iDim++) TauElem[iDim] = (Tau_Wall/WallShearStress[iMarker][iVertex])*TauElem[iDim]; + WallShearStress[iMarker][iVertex] = Tau_Wall; + } - WallShearStress[iMarker][iVertex] = 0.0; for (iDim = 0; iDim < nDim; iDim++) { - TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; + // TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; + + /* --- in case of wall functions, we have computed the skin friction in the turbulence solver --- */ /* --- Note that in the wall model, we switch off the computation when the computed y+ < 5 --- */ /* --- We have to compute skinfriction in that case as well (we do not recompute y+) --- */ - if (!wallfunctions || (wallfunctions && YPlus[iMarker][iVertex] < minYPlus)) + //if (!wallfunctions || (wallfunctions && YPlus[iMarker][iVertex] < minYPlus)) CSkinFriction[iMarker](iVertex,iDim) = TauTangent[iDim] * factorFric; + //CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / DynamicPressureRef; - WallShearStress[iMarker][iVertex] += TauTangent[iDim] * TauTangent[iDim]; + //WallShearStress[iMarker][iVertex] += TauTangent[iDim] * TauTangent[iDim]; } - WallShearStress[iMarker][iVertex] = sqrt(WallShearStress[iMarker][iVertex]); + //WallShearStress[iMarker][iVertex] = sqrt(WallShearStress[iMarker][iVertex]); + + su2double WallDist[MAXNDIM] = {0.0}; + GeometryToolbox::Distance(nDim, Coord, Coord_Normal, WallDist); + + WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); - for (iDim = 0; iDim < nDim; iDim++) WallDist[iDim] = (Coord[iDim] - Coord_Normal[iDim]); - WallDistMod = 0.0; - for (iDim = 0; iDim < nDim; iDim++) WallDistMod += WallDist[iDim] * WallDist[iDim]; - WallDistMod = sqrt(WallDistMod); + //for (iDim = 0; iDim < nDim; iDim++) WallDist[iDim] = (Coord[iDim] - Coord_Normal[iDim]); + //WallDistMod = 0.0; + //for (iDim = 0; iDim < nDim; iDim++) WallDistMod += WallDist[iDim] * WallDist[iDim]; + //WallDistMod = sqrt(WallDistMod); /*--- Compute y+ and non-dimensional velocity ---*/ @@ -2536,7 +2562,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr /* --- in case of wall functions, we have computed YPlus in the turbulence class --- */ /* --- Note that we do not recompute y+ when y+<5 because y+ can become > 5 again --- */ - if (!wallfunctions) + //if (!wallfunctions) YPlus[iMarker][iVertex] = WallDistMod * FrictionVel / (Viscosity / Density); /*--- Compute total and maximum heat flux on the wall ---*/ diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 9a45bac7eb1..903edbe7721 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -831,8 +831,9 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container // nijso: skinfriction for wall functions gives opposite sign? - for (auto iDim = 0u; iDim < nDim; iDim++) - CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / DynamicPressureRef; + // done in CFVMFlowSolverBase.inl + //for (auto iDim = 0u; iDim < nDim; iDim++) + // CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / DynamicPressureRef; nodes->SetTauWall(iPoint, Tau_Wall); diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 65b72c015f5..c9394cbfcb9 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -732,8 +732,7 @@ void CNSSolver::BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **solver void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config) { /*--- - The wall function implemented herein is based on Nichols and Nelson AIAAJ v32 n6 2004. - At this moment, the wall function is only available for adiabatic flows. + The wall function implemented herein is based on Nichols and Nelson, AIAA J. v32 n6 2004. ---*/ unsigned long int notConvergedCounter=0; @@ -768,9 +767,6 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c if (config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::STANDARD_FUNCTION) continue; - /*--- Get the specified wall heat flux from config ---*/ - // note that we can get the heat flux from the temperature gradient - /*--- Loop over all of the vertices on this boundary marker ---*/ SU2_OMP_FOR_DYN(OMP_MIN_SIZE) @@ -881,84 +877,83 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- Automatic switch off when y+ < 5.0 according to Nichols & Nelson (2004) ---*/ if (Y_Plus_Start < config->GetwallModelMinYPlus()) { - cout << "skipping stress due to wall model (Y+="<< Y_Plus_Start<<")"<< endl; + cout << "resolving the wall (Y+="<< Y_Plus_Start<<")"<< endl; continue; } else { - while (fabs(diff) > tol) { - - /*--- Friction velocity and u+ ---*/ + while (fabs(diff) > tol) { - U_Plus = VelTangMod/U_Tau; + /*--- Friction velocity and u+ ---*/ - /*--- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) page 1110 ---*/ + U_Plus = VelTangMod/U_Tau; - su2double Gam = Recovery*U_Tau*U_Tau/(2.0*Cp*T_Wall); - /*--- nijso: heated wall needs validation testcase! ---*/ - su2double Beta = q_w*Lam_Visc_Wall/(Density_Wall*T_Wall*Conductivity_Wall*U_Tau); - su2double Q = sqrt(Beta*Beta + 4.0*Gam); - su2double Phi = asin(-1.0*Beta/Q); + /*--- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) page 1110 ---*/ - /*--- Crocco- Busemann equation for wall temperature (eq. 11 of Nichols and Nelson) ---*/ + su2double Gam = Recovery*U_Tau*U_Tau/(2.0*Cp*T_Wall); + su2double Beta = q_w*Lam_Visc_Wall/(Density_Wall*T_Wall*Conductivity_Wall*U_Tau); + su2double Q = sqrt(Beta*Beta + 4.0*Gam); + su2double Phi = asin(-1.0*Beta/Q); - su2double denum = (1.0 + Beta*U_Plus - Gam*U_Plus*U_Plus); + /*--- Crocco-Busemann equation for wall temperature (eq. 11 of Nichols and Nelson) ---*/ - /*--- update T_Wall due to aerodynamic heating, unless the wall is isothermal ---*/ - - if ((config->GetMarker_All_KindBC(iMarker) != ISOTHERMAL) { su2double denum = (1.0 + Beta*U_Plus - Gam*U_Plus*U_Plus); - if (abs(denum)>1.0e-12) - T_Wall = T_Normal / denum; - } - /*--- update of wall density ---*/ + /*--- update T_Wall due to aerodynamic heating, unless the wall is isothermal ---*/ - Density_Wall = P_Wall/(Gas_Constant*T_Wall); + if (config->GetMarker_All_KindBC(iMarker) != ISOTHERMAL) { + su2double denum = (1.0 + Beta*U_Plus - Gam*U_Plus*U_Plus); + if (abs(denum)>EPS) + T_Wall = T_Normal / denum; + } - /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ + /*--- update of wall density ---*/ - su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); + Density_Wall = P_Wall/(Gas_Constant*T_Wall); - /*--- Spalding's universal form for the BL velocity with the - * outer velocity form of White & Christoph above. ---*/ + /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ - su2double kUp = kappa*U_Plus; - Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); + su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); - su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); + /*--- Spalding's universal form for the BL velocity with the + * outer velocity form of White & Christoph above. ---*/ + + su2double kUp = kappa*U_Plus; + Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); - Eddy_Visc_Wall = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp(-1.0*kappa*B)* - (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0) - - Lam_Visc_Normal/Lam_Visc_Wall); - Eddy_Visc_Wall = max(1.0e-6, Eddy_Visc_Wall); + su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); - /* --- Define function for Newton method to zero --- */ + Eddy_Visc_Wall = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp(-1.0*kappa*B)* + (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0) + - Lam_Visc_Normal/Lam_Visc_Wall); + Eddy_Visc_Wall = max(1.0e-6, Eddy_Visc_Wall); - diff = (Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall) - Y_Plus; + /* --- Define function for Newton method to zero --- */ - /* --- Gradient of function defined above --- */ + diff = (Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall) - Y_Plus; - grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + - kappa /(U_Tau * sqrt(Gam)) * asin(U_Plus * sqrt(Gam)) * Y_Plus_White - - exp(-1.0 * B * kappa) * (0.5 * pow(VelTangMod * kappa / U_Tau, 3) + - pow(VelTangMod * kappa / U_Tau, 2) + VelTangMod * kappa / U_Tau) / U_Tau; + /* --- Gradient of function defined above --- */ - /* --- Newton Step --- */ + grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + + kappa /(U_Tau * sqrt(Gam)) * asin(U_Plus * sqrt(Gam)) * Y_Plus_White - + exp(-1.0 * B * kappa) * (0.5 * pow(VelTangMod * kappa / U_Tau, 3) + + pow(VelTangMod * kappa / U_Tau, 2) + VelTangMod * kappa / U_Tau) / U_Tau; - U_Tau = U_Tau - relax*(diff / grad_diff); + /* --- Newton Step --- */ - counter++; + U_Tau = U_Tau - relax*(diff / grad_diff); + counter++; - if (counter > max_iter) { - notConvergedCounter++; - // use some safe values for convergence - Y_Plus = 30.0; - Eddy_Visc_Wall = 1.0; - U_Tau = 1.0; - } + + if (counter > max_iter) { + notConvergedCounter++; + // use some safe values for convergence + Y_Plus = 30.0; + Eddy_Visc_Wall = 1.0; + U_Tau = 1.0; + } - } + } } /*--- Calculate an updated value for the wall shear stress using the y+ value, the definition of y+, and the definition of @@ -970,8 +965,9 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c // wall model value su2double Tau_Wall = (1.0/Density_Wall)*pow(Y_Plus*Lam_Visc_Wall/WallDistMod,2.0); - for (auto iDim = 0u; iDim < nDim; iDim++) - CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / DynamicPressureRef; + // done in CFVMFlowSolverBase.inl + //for (auto iDim = 0u; iDim < nDim; iDim++) + // CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / DynamicPressureRef; /*--- Store this value for the wall shear stress at the node. ---*/ diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 6a715ac5478..8ab5774e317 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -548,6 +548,17 @@ def main(): inc_turb_naca0012_sst_sust.tol = 0.00001 test_list.append(inc_turb_naca0012_sst_sust) + # FLAT PLATE, WALL FUNCTIONS + inc_turb_wallfunction_flatplate_sa = TestCase('inc_turb_wallfunction_flatplate') + inc_turb_wallfunction_flatplate_sa.cfg_dir = "wallfunctions/flatplate" + inc_turb_wallfunction_flatplate_sa.cfg_file = "turb_SA_flatplate.cfg" + inc_turb_wallfunction_flatplate_sa.test_iter = 10 + inc_turb_wallfunction_flatplate_sa.test_vals = [-3.070676, -5.386050, 0.057197, 0.005347] #last 4 columns + inc_turb_wallfunction_flatplate_sa.su2_exec = "SU2_CFD" + inc_turb_wallfunction_flatplate_sa.timeout = 1600 + inc_turb_wallfunction_flatplate_sa.tol = 0.00001 + test_list.append(inc_turb_wallfunction_flatplate_sa) + #################### ### DG-FEM Euler ### #################### @@ -1515,6 +1526,7 @@ def main(): ### RUN TESTS ### ###################################### + pass_list = [ test.run_test() for test in test_list ] From 3306eb934c34ccd506eb37881e2a3699b97aa71d Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 16 Jul 2021 20:10:58 +0200 Subject: [PATCH 37/88] fix y+ bug --- .../numerics_simd/flow/diffusion/viscous_fluxes.hpp | 2 -- SU2_CFD/src/solvers/CNSSolver.cpp | 8 ++++---- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 3 ++- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp b/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp index 4c208cb2b01..bbb9897bd7f 100644 --- a/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp +++ b/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp @@ -161,8 +161,6 @@ class CCompressibleViscousFluxBase : public CNumericsSIMD { } if(wallFun) addTauWall(iPoint, jPoint, solution.GetTauWall(), unitNormal, tau); - if(wallFun) addTauWall(iPoint, jPoint, solution.GetTauWall(), unitNormal, tau); - Double cond = derived->thermalConductivity(avgV); VectorDbl heatFlux; for (size_t iDim = 0; iDim < nDim; ++iDim) { diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 3202ae9ba50..86d03666513 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -892,12 +892,12 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- update T_Wall due to aerodynamic heating, unless the wall is isothermal ---*/ - if (config->GetMarker_All_KindBC(iMarker) != ISOTHERMAL) { - su2double denum = (1.0 + Beta*U_Plus - Gam*U_Plus*U_Plus); - if (abs(denum)>EPS) + //if (config->GetMarker_All_KindBC(iMarker) != ISOTHERMAL) { + // su2double denum = (1.0 + Beta*U_Plus - Gam*U_Plus*U_Plus); + // if (abs(denum)>EPS) // nijso TODO FIXME // T_Wall = T_Normal / denum; - } + //} /*--- update of wall density ---*/ // nijso TODO FIXME diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 4b63d8c57af..12cf5a2bc38 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -480,7 +480,8 @@ void CTurbSSTSolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contai /*--- Do not use wall model at the ipoint when y+ < 5.0, use zero flux (Neumann) conditions. ---*/ - if (Y_Plus < config->GetwallModelMinYPlus()) continue; + //if (Y_Plus < config->GetwallModelMinYPlus()) continue; + if (Y_Plus < 5) continue; su2double Eddy_Visc = solver_container[FLOW_SOL]->GetEddyViscWall(val_marker, iVertex); su2double k = nodes->GetSolution(iPoint_Neighbor,0); From 8c0a1f291f515a2eb362c7cd6f7158290ecc2481 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 24 Aug 2021 09:59:26 +0200 Subject: [PATCH 38/88] added testcase --- .../flow/diffusion/viscous_fluxes.hpp | 1 + .../include/solvers/CFVMFlowSolverBase.inl | 60 ++++++++++--------- SU2_CFD/src/solvers/CIncNSSolver.cpp | 14 ++--- SU2_CFD/src/solvers/CNSSolver.cpp | 38 ++++++------ SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 8 ++- .../flatplate/turb_SA_flatplate.cfg | 27 +++++---- 6 files changed, 75 insertions(+), 73 deletions(-) diff --git a/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp b/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp index bbb9897bd7f..95c1b30e824 100644 --- a/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp +++ b/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp @@ -159,6 +159,7 @@ class CCompressibleViscousFluxBase : public CNumericsSIMD { addPerturbedRSM(avgV, avgGrad, turb_ke, tau, uq_eigval_comp, uq_permute, uq_delta_b, uq_urlx); } + if(wallFun) addTauWall(iPoint, jPoint, solution.GetTauWall(), unitNormal, tau); Double cond = derived->thermalConductivity(avgV); diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index ea21b11bb72..1af05cb98e8 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2509,46 +2509,52 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr /*--- Compute wall shear stress (using the stress tensor). Compute wall skin friction coefficient, and heat flux * on the wall ---*/ - TauNormal = 0.0; - for (iDim = 0; iDim < nDim; iDim++) TauNormal += TauElem[iDim] * UnitNormal[iDim]; + //TauNormal = 0.0; + //for (iDim = 0; iDim < nDim; iDim++) TauNormal += TauElem[iDim] * UnitNormal[iDim]; //TauNormal = GeometryToolbox::DotProduct(int(MAXNDIM), TauElem, UnitNormal); - WallShearStress[iMarker][iVertex] = 0.0; - //su2double TauTangent[MAXNDIM] = {0.0}; - //GeometryToolbox::TangentProjection(nDim, Tau, UnitNormal, TauTangent); - //WallShearStress[iMarker][iVertex] = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); + //WallShearStress[iMarker][iVertex] = 0.0; + + su2double TauTangent[MAXNDIM] = {0.0}; + GeometryToolbox::TangentProjection(nDim, Tau, UnitNormal, TauTangent); + + WallShearStress[iMarker][iVertex] = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); + + /*--- for wall functions, the wall stresses need to be scald by the wallfunction stress Tau_Wall---*/ - //if (wallfunctions && YPlus[iMarker][iVertex] > minYPlus){ - // su2double Tau_Wall = nodes->GetTauWall(iPoint); - // for (iDim = 0; iDim < nDim; iDim++) TauTangent[iDim] = (Tau_Wall/WallShearStress[iMarker][iVertex])*TauTangent[iDim]; - // for (iDim = 0; iDim < nDim; iDim++) TauElem[iDim] = (Tau_Wall/WallShearStress[iMarker][iVertex])*TauElem[iDim]; - // WallShearStress[iMarker][iVertex] = Tau_Wall; - //} + if (wallfunctions && YPlus[iMarker][iVertex] > minYPlus){ + su2double Tau_Wall = nodes->GetTauWall(iPoint); + for (iDim = 0; iDim < nDim; iDim++) TauTangent[iDim] = (Tau_Wall/WallShearStress[iMarker][iVertex])*TauTangent[iDim]; + for (iDim = 0; iDim < nDim; iDim++) TauElem[iDim] = (Tau_Wall/WallShearStress[iMarker][iVertex])*TauElem[iDim]; + WallShearStress[iMarker][iVertex] = Tau_Wall; + } for (iDim = 0; iDim < nDim; iDim++) { - TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; + // TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; + + /* --- in case of wall functions, we have computed the skin friction in the turbulence solver --- */ /* --- Note that in the wall model, we switch off the computation when the computed y+ < 5 --- */ /* --- We have to compute skinfriction in that case as well (we do not recompute y+) --- */ - if (!wallfunctions || (wallfunctions && YPlus[iMarker][iVertex] < minYPlus)) + + //if (!wallfunctions || (wallfunctions && YPlus[iMarker][iVertex] < minYPlus)) CSkinFriction[iMarker](iVertex,iDim) = TauTangent[iDim] * factorFric; //CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / DynamicPressureRef; - WallShearStress[iMarker][iVertex] += TauTangent[iDim] * TauTangent[iDim]; + //WallShearStress[iMarker][iVertex] += TauTangent[iDim] * TauTangent[iDim]; } - //nijso: TODO FIXME: why comment wallshearstress here? - WallShearStress[iMarker][iVertex] = sqrt(WallShearStress[iMarker][iVertex]); + //WallShearStress[iMarker][iVertex] = sqrt(WallShearStress[iMarker][iVertex]); + + su2double WallDist[MAXNDIM] = {0.0}; + GeometryToolbox::Distance(nDim, Coord, Coord_Normal, WallDist); - // nijso: FIXME check if this gives the same solution - //su2double WallDist[MAXNDIM] = {0.0}; - //GeometryToolbox::Distance(nDim, Coord, Coord_Normal, WallDist); - //WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); + WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); - for (iDim = 0; iDim < nDim; iDim++) WallDist[iDim] = (Coord[iDim] - Coord_Normal[iDim]); - WallDistMod = 0.0; - for (iDim = 0; iDim < nDim; iDim++) WallDistMod += WallDist[iDim] * WallDist[iDim]; - WallDistMod = sqrt(WallDistMod); + //for (iDim = 0; iDim < nDim; iDim++) WallDist[iDim] = (Coord[iDim] - Coord_Normal[iDim]); + //WallDistMod = 0.0; + //for (iDim = 0; iDim < nDim; iDim++) WallDistMod += WallDist[iDim] * WallDist[iDim]; + //WallDistMod = sqrt(WallDistMod); /*--- Compute y+ and non-dimensional velocity ---*/ @@ -2556,9 +2562,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr /* --- in case of wall functions, we have computed YPlus in the turbulence class --- */ /* --- Note that we do not recompute y+ when y+<5 because y+ can become > 5 again --- */ - //nijso TODO FIXME - if (!wallfunctions) - // nijso: note that we have updated wallshearstress so the computation of y+ is correct in case of wall functions + //if (!wallfunctions) YPlus[iMarker][iVertex] = WallDistMod * FrictionVel / (Viscosity / Density); /*--- Compute total and maximum heat flux on the wall ---*/ diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 3eeb8c38e40..7d611e9e7ed 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -720,14 +720,11 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container //su2double T_w = config->GetIsothermal_Temperature(Marker_Tag); su2double T_n = nodes->GetTemperature(Point_Normal); q_w = Conductivity_Wall * (T_Wall - T_n) / WallDistMod; - cout << "wall heat flux = " << q_w << endl; } else if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) { su2double T_n = nodes->GetTemperature(Point_Normal); q_w = Conductivity_Wall * (T_Wall - T_n) / WallDistMod; - cout << "estimated wall heat flux = " << q_w << endl; q_w = config->GetWall_HeatFlux(Marker_Tag); - cout << "wall heat flux = " << q_w << endl; } @@ -757,7 +754,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container unsigned long counter = 0; su2double diff = 1.0; su2double U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall)); - su2double Y_Plus = 5.0; // clipping value + su2double Y_Plus = 0.99*config->GetwallModelMinYPlus(); // clipping value su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; @@ -775,8 +772,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container /*--- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) page 1110 ---*/ su2double Gam = Recovery*U_Tau*U_Tau/(2.0*Cp*T_Wall); - /*--- nijso: heated wall needs validation testcase! ---*/ - su2double Beta = q_w*Lam_Visc_Wall/(Density_Wall*T_Wall*Conductivity_Wall*U_Tau); // TODO: nonzero heatflux needs validation case + su2double Beta = q_w*Lam_Visc_Wall/(Density_Wall*T_Wall*Conductivity_Wall*U_Tau); su2double Q = sqrt(Beta*Beta + 4.0*Gam); su2double Phi = asin(-1.0*Beta/Q); @@ -833,11 +829,9 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container su2double Tau_Wall = (1.0/Density_Wall)*pow(Y_Plus*Lam_Visc_Wall/WallDistMod,2.0); - // nijso: skinfriction for wall functions gives opposite sign? - // done in CFVMFlowSolverBase.inl - for (auto iDim = 0u; iDim < nDim; iDim++) - CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / DynamicPressureRef; + //for (auto iDim = 0u; iDim < nDim; iDim++) + // CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / DynamicPressureRef; nodes->SetTauWall(iPoint, Tau_Wall); diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 86d03666513..f13b074870f 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -742,7 +742,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c const unsigned short max_iter = config->GetwallModelMaxIter() ; /*--- maximum number of iterations for the Newton Solver---*/ const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ const su2double relax = config->GetwallModelRelFac(); /*--- relaxation factor for the Newton solver ---*/ - + /*--- Compute the recovery factor ---*/ // Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) const su2double Recovery = pow(config->GetPrandtl_Lam(), (1.0/3.0)); @@ -821,7 +821,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c su2double WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); /*--- Compute the wall temperature using the Crocco-Buseman equation ---*/ - + /*--- For compressible flow: aerodynamic wall heating ---*/ //T_Wall = T_Normal * (1.0 + 0.5*Gamma_Minus_One*Recovery*M_Normal*M_Normal); //su2double T_Wall = T_Normal + Recovery*pow(VelTangMod,2.0)/(2.0*Cp); @@ -832,7 +832,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) { q_w = config->GetWall_HeatFlux(Marker_Tag); - T_Wall = T_Normal + Recovery*pow(VelTangMod,2.0)/(2.0*Cp); + //T_Wall = T_Normal + Recovery*pow(VelTangMod,2.0)/(2.0*Cp); } /*--- Extrapolate the pressure from the interior & compute the @@ -864,9 +864,10 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c * shear stress as a starting guess for the wall function. ---*/ unsigned long counter = 0; - su2double diff = 1.0, Eddy_Visc = 1.0; + su2double diff = 1.0; + su2double Eddy_Visc = 1.0; su2double U_Tau = sqrt(WallShearStress/Density_Wall); - su2double Y_Plus = 5.0; + su2double Y_Plus = 0.99*config->GetwallModelMinYPlus(); // to avoid warning su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; @@ -874,6 +875,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c if (Y_Plus_Start < config->GetwallModelMinYPlus() ) { skipCounter++; + continue; } else while (fabs(diff) > tol) { @@ -888,20 +890,17 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- Crocco-Busemann equation for wall temperature (eq. 11 of Nichols and Nelson) ---*/ - su2double denum = (1.0 + Beta*U_Plus - Gam*U_Plus*U_Plus); - /*--- update T_Wall due to aerodynamic heating, unless the wall is isothermal ---*/ - //if (config->GetMarker_All_KindBC(iMarker) != ISOTHERMAL) { - // su2double denum = (1.0 + Beta*U_Plus - Gam*U_Plus*U_Plus); - // if (abs(denum)>EPS) - // nijso TODO FIXME - // T_Wall = T_Normal / denum; - //} + if (config->GetMarker_All_KindBC(iMarker) != ISOTHERMAL) { + su2double denum = (1.0 + Beta*U_Plus - Gam*U_Plus*U_Plus); + if (abs(denum)>EPS) + T_Wall = T_Normal / denum; + /* nijso: at this point we should also update the global wall temperature */ + } - /*--- update of wall density ---*/ - // nijso TODO FIXME - //Density_Wall = P_Wall/(Gas_Constant*T_Wall); + /*--- update of wall density using the wall temperature ---*/ + Density_Wall = P_Wall/(Gas_Constant*T_Wall); /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ @@ -911,7 +910,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c * outer velocity form of White & Christoph above. ---*/ su2double kUp = kappa*U_Plus; - su2double Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); + Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); @@ -936,7 +935,6 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c U_Tau = U_Tau - relax*(diff / grad_diff); counter++; - if (counter > max_iter) { notConvergedCounter++; // use some safe values for convergence @@ -960,8 +958,8 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c // done in CFVMFlowSolverBase.inl // nijso TODO FIXME - for (auto iDim = 0u; iDim < nDim; iDim++) - CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / DynamicPressureRef; + //for (auto iDim = 0u; iDim < nDim; iDim++) + // CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / DynamicPressureRef; /*--- Store this value for the wall shear stress at the node. ---*/ diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 12cf5a2bc38..3da4e6adbf5 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -464,7 +464,7 @@ void CTurbSSTSolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contai /*--- von Karman constant from boundary layer theory ---*/ const su2double kappa = config->GetwallModelKappa(); - + const su2double minYPlus = config->GetwallModelMinYPlus(); /*--- relaxation factor for k-omega values ---*/ const su2double relax = config->GetwallModelRelFac(); @@ -480,8 +480,10 @@ void CTurbSSTSolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contai /*--- Do not use wall model at the ipoint when y+ < 5.0, use zero flux (Neumann) conditions. ---*/ - //if (Y_Plus < config->GetwallModelMinYPlus()) continue; - if (Y_Plus < 5) continue; + if (Y_Plus < minYPlus) { + /* --- use zero flux (Neumann) conditions --- */ + continue; + } su2double Eddy_Visc = solver_container[FLOW_SOL]->GetEddyViscWall(val_marker, iVertex); su2double k = nodes->GetSolution(iPoint_Neighbor,0); diff --git a/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg b/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg index 81194c57a0c..89b74a38e4b 100644 --- a/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg @@ -23,7 +23,7 @@ KIND_TURB_MODEL= SA MATH_PROBLEM= DIRECT % % Restart solution (NO, YES) -RESTART_SOL= NO +RESTART_SOL= NO % % ----------- COMPRESSIBLE AND INCOMPRESSIBLE FREE-STREAM DEFINITION ----------% @@ -62,8 +62,8 @@ REF_AREA= 2.0 % -------------------- BOUNDARY CONDITION DEFINITION --------------------------% % % Navier-Stokes wall boundary marker(s) (NONE = no marker) -MARKER_HEATFLUX= ( wall, 500.0 ) -MARKER_WALL_FUNCTIONS= (wall, STANDARD_WALL_FUNCTION) +MARKER_HEATFLUX= ( wall, 0.0 ) + % % Inlet boundary marker(s) (NONE = no marker) % Format: ( inlet marker, total temperature, total pressure, flow_direction_x, @@ -85,19 +85,21 @@ MARKER_MONITORING= ( wall ) % ------------------------ WALL FUNCTION DEFINITION --------------------------% % -% The von Karman constant, the constant below is only used in the standard wall function model +MARKER_WALL_FUNCTIONS= ( wall, STANDARD_WALL_FUNCTION ) +% +% The von Karman constant, the constant below is only used in the standard wall function model (default: 0.41) WALLMODELKAPPA= 0.41 % -% The wall function model constant B +% The wall function model constant B (default: 5.5) WALLMODELB= 5.5 % -% The y+ value below which the wall function is switched off and we resolve the wall +% The y+ value below which the wall function is switched off and we resolve the wall (default: 5.0) WALLMODELMINYPLUS= 5.0 % -% [Expert] Max Newton iterations used for the standard wall function +% [Expert] Max Newton iterations used for the standard wall function (default: 200) WALLMODELMAXITER= 200 % -% [Expert] relaxation factor for the Newton iterations of the standard wall function +% [Expert] relaxation factor for the Newton iterations of the standard wall function (default: 0.5) WALLMODELRELFAC= 0.5 % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% @@ -107,7 +109,7 @@ WALLMODELRELFAC= 0.5 NUM_METHOD_GRAD= GREEN_GAUSS % % Courant-Friedrichs-Lewy condition of the finest grid -CFL_NUMBER= 10.0 +CFL_NUMBER= 200.0 % % Adaptive CFL number (NO, YES) CFL_ADAPT= NO @@ -120,7 +122,7 @@ CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 ) RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) % % Number of total iterations -ITER= 99999 +ITER= 2000 % ----------------------- SLOPE LIMITER DEFINITION ----------------------------% % @@ -212,7 +214,8 @@ CONV_CAUCHY_EPS= 1E-6 % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% % % Mesh input file -MESH_FILENAME= mesh_flatplate_xcoarse.su2 +%MESH_FILENAME= mesh_flatplate_turb_137x97.su2 +MESH_FILENAME= mesh_xcoarse.su2 % % Mesh input file format (SU2, CGNS, NETCDF_ASCII) MESH_FORMAT= SU2 @@ -258,4 +261,4 @@ OUTPUT_WRT_FREQ= 1000 % % % Screen output fields -SCREEN_OUTPUT= (INNER_ITER, RMS_DENSITY, RMS_NU_TILDE, LIFT, DRAG) +SCREEN_OUTPUT= (INNER_ITER, WALL_TIME, RMS_DENSITY, RMS_NU_TILDE, RMS_TKE, RMS_DISSIPATION, LIFT, DRAG) From 3a68a3e1b91a12459bf9a81055b44d1f531d8483 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 24 Aug 2021 11:14:26 +0200 Subject: [PATCH 39/88] remove deleted files CDiscAdFEAVariable --- .../include/variables/CDiscAdjFEAVariable.hpp | 238 ------------------ SU2_CFD/src/variables/CDiscAdjFEAVariable.cpp | 81 ------ 2 files changed, 319 deletions(-) delete mode 100644 SU2_CFD/include/variables/CDiscAdjFEAVariable.hpp delete mode 100644 SU2_CFD/src/variables/CDiscAdjFEAVariable.cpp diff --git a/SU2_CFD/include/variables/CDiscAdjFEAVariable.hpp b/SU2_CFD/include/variables/CDiscAdjFEAVariable.hpp deleted file mode 100644 index c9ce1e723a6..00000000000 --- a/SU2_CFD/include/variables/CDiscAdjFEAVariable.hpp +++ /dev/null @@ -1,238 +0,0 @@ -/*! - * \file CDiscAdjFEAVariable.hpp - * \brief Main class for defining the variables of the adjoint FEA solver. - * \author T. Albring, R. Sanchez. - * \version 7.1.1 "Blackbird" - * - * SU2 Project Website: https://su2code.github.io - * - * The SU2 Project is maintained by the SU2 Foundation - * (http://su2foundation.org) - * - * Copyright 2012-2021, SU2 Contributors (cf. AUTHORS.md) - * - * SU2 is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * SU2 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with SU2. If not, see . - */ - -#pragma once - -#include "CVariable.hpp" - -/*! - * \class CDiscAdjFEAVariable - * \brief Main class for defining the variables of the adjoint solver. - * \ingroup Discrete_Adjoint - * \author T. Albring, R. Sanchez. - * \version 7.1.1 "Blackbird" - */ -class CDiscAdjFEAVariable : public CVariable { -protected: - MatrixType Sensitivity; /* Vector holding the derivative of target functional with respect to the coordinates at this node*/ - MatrixType Solution_Direct; - - MatrixType Dynamic_Derivative; - MatrixType Dynamic_Derivative_n; - MatrixType Dynamic_Derivative_Vel; - MatrixType Dynamic_Derivative_Vel_n; - MatrixType Dynamic_Derivative_Accel; - MatrixType Dynamic_Derivative_Accel_n; - - MatrixType Solution_Vel; - MatrixType Solution_Accel; - - MatrixType Solution_Vel_time_n; - MatrixType Solution_Accel_time_n; - - MatrixType Solution_Old_Vel; - MatrixType Solution_Old_Accel; - - MatrixType Solution_Direct_Vel; - MatrixType Solution_Direct_Accel; - - /*! - * \brief Constructor of the class. - * \param[in] disp - Pointer to the adjoint value (initialization value). - * \param[in] vel - Pointer to the adjoint value (initialization value). - * \param[in] accel - Pointer to the adjoint value (initialization value). - * \param[in] npoint - Number of points/nodes/vertices in the domain. - * \param[in] ndim - Number of dimensions of the problem. - * \param[in] nvar - Number of variables of the problem. - * \param[in] unsteady - Allocate velocity and acceleration. - * \param[in] config - Definition of the particular problem. - */ - CDiscAdjFEAVariable(const su2double *disp, const su2double *vel, const su2double *accel, - unsigned long npoint, unsigned long ndim, unsigned long nvar, bool unsteady, CConfig *config); - -public: - /*! - * \brief Destructor of the class. - */ - ~CDiscAdjFEAVariable() override = default; - - /*! - * \brief Set the sensitivity at the node - * \param[in] iDim - spacial component - * \param[in] val - value of the Sensitivity - */ - inline void SetSensitivity(unsigned long iPoint, unsigned long iDim, su2double val) final { Sensitivity(iPoint,iDim) = val; } - - /*! - * \brief Get the Sensitivity at the node - * \param[in] iDim - spacial component - * \return value of the Sensitivity - */ - inline su2double GetSensitivity(unsigned long iPoint, unsigned long iDim) const final { return Sensitivity(iPoint,iDim);} - - inline void SetDynamic_Derivative(unsigned long iPoint, unsigned long iVar, su2double der) final { - Dynamic_Derivative(iPoint,iVar) = der; - } - - inline void SetDynamic_Derivative_n(unsigned long iPoint, unsigned long iVar, su2double der) final { - Dynamic_Derivative_n(iPoint,iVar) = der; - } - - inline su2double GetDynamic_Derivative(unsigned long iPoint, unsigned long iVar) const final { - return Dynamic_Derivative(iPoint,iVar); - } - - inline su2double GetDynamic_Derivative_n(unsigned long iPoint, unsigned long iVar) const final { - return Dynamic_Derivative_n(iPoint,iVar); - } - - inline void SetDynamic_Derivative_Vel(unsigned long iPoint, unsigned long iVar, su2double der) final { - Dynamic_Derivative_Vel(iPoint,iVar) = der; - } - - inline void SetDynamic_Derivative_Vel_n(unsigned long iPoint, unsigned long iVar, su2double der) final { - Dynamic_Derivative_Vel_n(iPoint,iVar) = der; - } - - inline su2double GetDynamic_Derivative_Vel(unsigned long iPoint, unsigned long iVar) const final { - return Dynamic_Derivative_Vel(iPoint,iVar); - } - - inline su2double GetDynamic_Derivative_Vel_n(unsigned long iPoint, unsigned long iVar) const final { - return Dynamic_Derivative_Vel_n(iPoint,iVar); - } - - inline void SetDynamic_Derivative_Accel(unsigned long iPoint, unsigned long iVar, su2double der) final { - Dynamic_Derivative_Accel(iPoint,iVar) = der; - } - - inline void SetDynamic_Derivative_Accel_n(unsigned long iPoint, unsigned long iVar, su2double der) final { - Dynamic_Derivative_Accel_n(iPoint,iVar) = der; - } - - inline su2double GetDynamic_Derivative_Accel(unsigned long iPoint, unsigned long iVar) const final { - return Dynamic_Derivative_Accel(iPoint,iVar); - } - - inline su2double GetDynamic_Derivative_Accel_n(unsigned long iPoint, unsigned long iVar) const final { - return Dynamic_Derivative_Accel_n(iPoint,iVar); - } - - inline void SetSolution_Direct(unsigned long iPoint, const su2double *val_solution_direct) final { - for (unsigned long iVar = 0; iVar < nVar; iVar++) Solution_Direct(iPoint,iVar) = val_solution_direct[iVar]; - } - - inline void SetSolution_Vel_Direct(unsigned long iPoint, const su2double *val_solution_direct) final { - for (unsigned long iVar = 0; iVar < nVar; iVar++) Solution_Direct_Vel(iPoint,iVar) = val_solution_direct[iVar]; - } - - inline void SetSolution_Accel_Direct(unsigned long iPoint, const su2double *val_solution_direct) final { - for (unsigned long iVar = 0; iVar < nVar; iVar++) Solution_Direct_Accel(iPoint,iVar) = val_solution_direct[iVar]; - } - - inline su2double* GetSolution_Direct(unsigned long iPoint) final { return Solution_Direct[iPoint]; } - - inline su2double* GetSolution_Vel_Direct(unsigned long iPoint) final { return Solution_Direct_Vel[iPoint]; } - - inline su2double* GetSolution_Accel_Direct(unsigned long iPoint) final { return Solution_Direct_Accel[iPoint]; } - - inline su2double GetSolution_Old_Vel(unsigned long iPoint, unsigned long iVar) const final { return Solution_Old_Vel(iPoint,iVar); } - - inline su2double GetSolution_Old_Accel(unsigned long iPoint, unsigned long iVar) const final { return Solution_Old_Accel(iPoint,iVar); } - - /*! - * \brief Get the acceleration (Structural Analysis). - * \param[in] iVar - Index of the variable. - * \return Value of the solution for the index iVar. - */ - inline su2double GetSolution_Accel(unsigned long iPoint, unsigned long iVar) const final { return Solution_Accel(iPoint,iVar); } - - /*! - * \brief Get the acceleration of the nodes (Structural Analysis) at time n. - * \param[in] iVar - Index of the variable. - * \return Pointer to the old solution vector. - */ - inline su2double GetSolution_Accel_time_n(unsigned long iPoint, unsigned long iVar) const final { return Solution_Accel_time_n(iPoint,iVar); } - - /*! - * \brief Get the velocity (Structural Analysis). - * \param[in] iVar - Index of the variable. - * \return Value of the solution for the index iVar. - */ - inline su2double GetSolution_Vel(unsigned long iPoint, unsigned long iVar) const final { return Solution_Vel(iPoint,iVar); } - - /*! - * \brief Get the velocity of the nodes (Structural Analysis) at time n. - * \param[in] iVar - Index of the variable. - * \return Pointer to the old solution vector. - */ - inline su2double GetSolution_Vel_time_n(unsigned long iPoint, unsigned long iVar) const final { return Solution_Vel_time_n(iPoint,iVar); } - - /*! - * \brief Set the value of the acceleration (Structural Analysis - adjoint). - * \param[in] val_solution - Solution of the problem (acceleration). - */ - inline void SetSolution_Accel(unsigned long iPoint, const su2double *val_solution_accel) final { - for (unsigned long iVar = 0; iVar < nVar; iVar++) - Solution_Accel(iPoint,iVar) = val_solution_accel[iVar]; - } - - /*! - * \brief Set the value of the velocity (Structural Analysis - adjoint). - * \param[in] val_solution - Solution of the problem (velocity). - */ - inline void SetSolution_Vel(unsigned long iPoint, const su2double *val_solution_vel) final { - for (unsigned long iVar = 0; iVar < nVar; iVar++) Solution_Vel(iPoint,iVar) = val_solution_vel[iVar]; - } - - /*! - * \brief Set the value of the adjoint acceleration (Structural Analysis) at time n. - * \param[in] val_solution_old - Pointer to the residual vector. - */ - inline void SetSolution_Accel_time_n(unsigned long iPoint, const su2double *val_solution_accel_time_n) final { - for (unsigned long iVar = 0; iVar < nVar; iVar++) Solution_Accel_time_n(iPoint,iVar) = val_solution_accel_time_n[iVar]; - } - - /*! - * \brief Set the value of the adjoint velocity (Structural Analysis) at time n. - * \param[in] val_solution_old - Pointer to the residual vector. - */ - inline void SetSolution_Vel_time_n(unsigned long iPoint, const su2double *val_solution_vel_time_n) final { - for (unsigned long iVar = 0; iVar < nVar; iVar++) Solution_Vel_time_n(iPoint,iVar) = val_solution_vel_time_n[iVar]; - } - - /*! - * \brief Set the value of the old acceleration (Structural Analysis - adjoint). - */ - void Set_OldSolution_Accel() final; - - /*! - * \brief Set the value of the old velocity (Structural Analysis - adjoint). - */ - void Set_OldSolution_Vel() final; - -}; diff --git a/SU2_CFD/src/variables/CDiscAdjFEAVariable.cpp b/SU2_CFD/src/variables/CDiscAdjFEAVariable.cpp deleted file mode 100644 index b1cdc07c433..00000000000 --- a/SU2_CFD/src/variables/CDiscAdjFEAVariable.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/*! - * \file CDiscAdjFEAVariable.cpp - * \brief Definition of the variables for FEM adjoint elastic structural problems. - * \author R. Sanchez - * \version 7.1.1 "Blackbird" - * - * SU2 Project Website: https://su2code.github.io - * - * The SU2 Project is maintained by the SU2 Foundation - * (http://su2foundation.org) - * - * Copyright 2012-2021, SU2 Contributors (cf. AUTHORS.md) - * - * SU2 is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * SU2 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with SU2. If not, see . - */ - - -#include "../../include/variables/CDiscAdjFEAVariable.hpp" - - -CDiscAdjFEAVariable::CDiscAdjFEAVariable(const su2double *disp, const su2double *vel, const su2double *accel, unsigned long npoint, - unsigned long ndim, unsigned long nvar, bool unsteady, CConfig *config) : CVariable(npoint, ndim, nvar, config) { - - Solution_Direct.resize(nPoint,nVar); - - Sensitivity.resize(nPoint,nDim) = su2double(0.0); - - for (unsigned long iPoint = 0; iPoint < nPoint; ++iPoint) - for (unsigned long iVar = 0; iVar < nVar; iVar++) - Solution(iPoint,iVar) = disp[iVar]; - - if (config->GetMultizone_Problem() && config->GetDiscrete_Adjoint()) { - External.resize(nPoint,nVar) = su2double(0.0); - } - - /*--- Nothing else to allocate ---*/ - if (!unsteady) return; - - - Dynamic_Derivative.resize(nPoint,nVar) = su2double(0.0); - Dynamic_Derivative_n.resize(nPoint,nVar) = su2double(0.0); - Dynamic_Derivative_Vel.resize(nPoint,nVar) = su2double(0.0); - Dynamic_Derivative_Vel_n.resize(nPoint,nVar) = su2double(0.0); - Dynamic_Derivative_Accel.resize(nPoint,nVar) = su2double(0.0); - Dynamic_Derivative_Accel_n.resize(nPoint,nVar) = su2double(0.0); - - Solution_Direct_Vel.resize(nPoint,nVar) = su2double(0.0); - Solution_Direct_Accel.resize(nPoint,nVar) = su2double(0.0); - - Solution_Vel.resize(nPoint,nVar); - Solution_Accel.resize(nPoint,nVar); - - Solution_Old_Vel.resize(nPoint,nVar) = su2double(0.0); - Solution_Old_Accel.resize(nPoint,nVar) = su2double(0.0); - - Solution_Vel_time_n.resize(nPoint,nVar) = su2double(0.0); - Solution_Accel_time_n.resize(nPoint,nVar) = su2double(0.0); - - for (unsigned long iPoint = 0; iPoint < nPoint; ++iPoint) { - for (unsigned long iVar = 0; iVar < nVar; iVar++) { - Solution_Vel(iPoint,iVar) = vel[iVar]; - Solution_Accel(iPoint,iVar) = accel[iVar]; - } - } - -} - -void CDiscAdjFEAVariable::Set_OldSolution_Vel() { Solution_Old_Vel = Solution_Vel; } - -void CDiscAdjFEAVariable::Set_OldSolution_Accel() { Solution_Old_Accel = Solution_Accel; } From 075ef48ac5e5aa65df9a5ac3e57dc45f6d2ca98b Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 24 Aug 2021 11:38:50 +0200 Subject: [PATCH 40/88] update wall temperature for aerodynamic heating --- .../include/solvers/CFVMFlowSolverBase.inl | 33 ++----------------- SU2_CFD/src/solvers/CIncNSSolver.cpp | 18 +--------- SU2_CFD/src/solvers/CNSSolver.cpp | 23 ++++--------- 3 files changed, 10 insertions(+), 64 deletions(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index 149ba59e91f..fdb275e5699 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2528,19 +2528,11 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr /*--- Compute wall shear stress (using the stress tensor). Compute wall skin friction coefficient, and heat flux * on the wall ---*/ - //TauNormal = 0.0; - //for (iDim = 0; iDim < nDim; iDim++) TauNormal += TauElem[iDim] * UnitNormal[iDim]; - - //TauNormal = GeometryToolbox::DotProduct(int(MAXNDIM), TauElem, UnitNormal); - - //WallShearStress[iMarker][iVertex] = 0.0; - su2double TauTangent[MAXNDIM] = {0.0}; GeometryToolbox::TangentProjection(nDim, Tau, UnitNormal, TauTangent); WallShearStress[iMarker][iVertex] = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); - /*--- for wall functions, the wall stresses need to be scald by the wallfunction stress Tau_Wall---*/ if (wallfunctions && YPlus[iMarker][iVertex] > minYPlus){ su2double Tau_Wall = nodes->GetTauWall(iPoint); @@ -2550,39 +2542,20 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr } for (iDim = 0; iDim < nDim; iDim++) { - // TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim]; - - - /* --- in case of wall functions, we have computed the skin friction in the turbulence solver --- */ /* --- Note that in the wall model, we switch off the computation when the computed y+ < 5 --- */ - /* --- We have to compute skinfriction in that case as well (we do not recompute y+) --- */ - - //if (!wallfunctions || (wallfunctions && YPlus[iMarker][iVertex] < minYPlus)) - CSkinFriction[iMarker](iVertex,iDim) = TauTangent[iDim] * factorFric; - //CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / DynamicPressureRef; - - //WallShearStress[iMarker][iVertex] += TauTangent[iDim] * TauTangent[iDim]; + CSkinFriction[iMarker](iVertex,iDim) = TauTangent[iDim] * factorFric; } - //WallShearStress[iMarker][iVertex] = sqrt(WallShearStress[iMarker][iVertex]); su2double WallDist[MAXNDIM] = {0.0}; GeometryToolbox::Distance(nDim, Coord, Coord_Normal, WallDist); WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); - //for (iDim = 0; iDim < nDim; iDim++) WallDist[iDim] = (Coord[iDim] - Coord_Normal[iDim]); - //WallDistMod = 0.0; - //for (iDim = 0; iDim < nDim; iDim++) WallDistMod += WallDist[iDim] * WallDist[iDim]; - //WallDistMod = sqrt(WallDistMod); - - /*--- Compute y+ and non-dimensional velocity ---*/ + /*--- Compute non-dimensional velocity and y+ ---*/ FrictionVel = sqrt(fabs(WallShearStress[iMarker][iVertex]) / Density); - /* --- in case of wall functions, we have computed YPlus in the turbulence class --- */ - /* --- Note that we do not recompute y+ when y+<5 because y+ can become > 5 again --- */ - //if (!wallfunctions) - YPlus[iMarker][iVertex] = WallDistMod * FrictionVel / (Viscosity / Density); + YPlus[iMarker][iVertex] = WallDistMod * FrictionVel / (Viscosity / Density); /*--- Compute total and maximum heat flux on the wall ---*/ diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 47d851ea6ef..2d36a05877c 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -680,14 +680,6 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container if (config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::STANDARD_FUNCTION) continue; - /*--- Get the specified wall heat flux from config ---*/ - // note that we can get the heat flux from the temperature gradient - //su2double q_w = 0.0; - - /*--- get the heat flux; when BC is the temperature, we compute it later ---*/ - //if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) - // q_w = config->GetWall_HeatFlux(Marker_Tag); - /*--- Loop over all of the vertices on this boundary marker ---*/ SU2_OMP_FOR_DYN(OMP_MIN_SIZE) @@ -750,9 +742,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container su2double q_w = 0.0; - if (config->GetMarker_All_KindBC(iMarker) == ISOTHERMAL) { - //su2double T_w = config->GetIsothermal_Temperature(Marker_Tag); su2double T_n = nodes->GetTemperature(Point_Normal); q_w = Conductivity_Wall * (T_Wall - T_n) / WallDistMod; } @@ -762,7 +752,6 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container q_w = config->GetWall_HeatFlux(Marker_Tag); } - /*--- incompressible formulation ---*/ su2double Density_Wall = nodes->GetDensity(iPoint); su2double Lam_Visc_Normal = nodes->GetLaminarViscosity(Point_Normal); @@ -773,8 +762,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container su2double tau[MAXNDIM][MAXNDIM] = {{0.0}}; su2double Lam_Visc_Wall = nodes->GetLaminarViscosity(iPoint); su2double Eddy_Visc_Wall = nodes->GetEddyViscosity(iPoint); - // do we need the total viscosity for the stress tensor? - //su2double total_viscosity = (Lam_Visc_Wall + Eddy_Visc_Wall); + CNumerics::ComputeStressTensor(nDim, tau, nodes->GetGradient_Primitive(iPoint)+1, Lam_Visc_Wall); su2double TauTangent[MAXNDIM] = {0.0}; @@ -864,10 +852,6 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container su2double Tau_Wall = (1.0/Density_Wall)*pow(Y_Plus*Lam_Visc_Wall/WallDistMod,2.0); - // done in CFVMFlowSolverBase.inl - //for (auto iDim = 0u; iDim < nDim; iDim++) - // CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / DynamicPressureRef; - nodes->SetTauWall(iPoint, Tau_Wall); } diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index ed2e79c5f8d..ab2e1c724dd 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -874,25 +874,21 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c su2double WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); - /*--- Compute the wall temperature using the Crocco-Buseman equation ---*/ - /*--- For compressible flow: aerodynamic wall heating ---*/ - //T_Wall = T_Normal * (1.0 + 0.5*Gamma_Minus_One*Recovery*M_Normal*M_Normal); - //su2double T_Wall = T_Normal + Recovery*pow(VelTangMod,2.0)/(2.0*Cp); - /*--- initial value for wall temperature ---*/ + su2double T_Wall = nodes->GetTemperature(iPoint); su2double q_w = 0.0; if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) { q_w = config->GetWall_HeatFlux(Marker_Tag); - //T_Wall = T_Normal + Recovery*pow(VelTangMod,2.0)/(2.0*Cp); } /*--- Extrapolate the pressure from the interior & compute the wall density using the equation of state ---*/ /*--- compressible formulation ---*/ + su2double P_Wall = P_Normal; su2double Density_Wall = P_Wall/(Gas_Constant*T_Wall); su2double Lam_Visc_Normal = nodes->GetLaminarViscosity(Point_Normal); @@ -943,15 +939,14 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c su2double Phi = asin(-1.0*Beta/Q); /*--- Crocco-Busemann equation for wall temperature (eq. 11 of Nichols and Nelson) ---*/ - - /*--- update T_Wall due to aerodynamic heating, unless the wall is isothermal ---*/ + /*--- update T_Wall due to aerodynamic heating, unless the wall is isothermal ---*/ if (config->GetMarker_All_KindBC(iMarker) != ISOTHERMAL) { su2double denum = (1.0 + Beta*U_Plus - Gam*U_Plus*U_Plus); if (abs(denum)>EPS) - T_Wall = T_Normal / denum; - /* nijso: at this point we should also update the global wall temperature */ - } + T_Wall = T_Normal / denum; + nodes->SetTemperature(iPoint,T_Wall); + } /*--- update of wall density using the wall temperature ---*/ Density_Wall = P_Wall/(Gas_Constant*T_Wall); @@ -1007,14 +1002,8 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c EddyViscWall[iMarker][iVertex] = Eddy_Visc_Wall; UTau[iMarker][iVertex] = U_Tau; - // wall model value su2double Tau_Wall = (1.0/Density_Wall)*pow(Y_Plus*Lam_Visc_Wall/WallDistMod,2.0); - // done in CFVMFlowSolverBase.inl - // nijso TODO FIXME - //for (auto iDim = 0u; iDim < nDim; iDim++) - // CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / DynamicPressureRef; - /*--- Store this value for the wall shear stress at the node. ---*/ nodes->SetTauWall(iPoint, Tau_Wall); From caf9ab7da911add80cb0b6e3c6141a915c31dde7 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 24 Aug 2021 12:59:23 +0200 Subject: [PATCH 41/88] remove unused variables --- SU2_CFD/include/solvers/CFVMFlowSolverBase.inl | 4 ++-- SU2_CFD/src/solvers/CIncNSSolver.cpp | 1 - SU2_CFD/src/solvers/CNSSolver.cpp | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index fdb275e5699..d9837ce1dc8 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2393,9 +2393,9 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr unsigned long iVertex, iPoint, iPointNormal; unsigned short iMarker, iMarker_Monitoring, iDim, jDim; unsigned short T_INDEX = 0, TVE_INDEX = 0, VEL_INDEX = 0; - su2double Viscosity = 0.0, WallDist[3] = {0.0}, Area, TauNormal, dTn, dTven, + su2double Viscosity = 0.0, Area, dTn, dTven, GradTemperature, Density = 0.0, WallDistMod, FrictionVel, - UnitNormal[3] = {0.0}, TauElem[3] = {0.0}, TauTangent[3] = {0.0}, Tau[3][3] = {{0.0}}, Cp, + UnitNormal[3] = {0.0}, TauElem[3] = {0.0}, Tau[3][3] = {{0.0}}, Cp, thermal_conductivity, MaxNorm = 8.0, Grad_Vel[3][3] = {{0.0}}, Grad_Temp[3] = {0.0}, AxiFactor; const su2double *Coord = nullptr, *Coord_Normal = nullptr, *Normal = nullptr; const su2double minYPlus = config->GetwallModelMinYPlus(); diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 2d36a05877c..360186d0c99 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -656,7 +656,6 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container const unsigned short max_iter =config->GetwallModelMaxIter(); /*--- maximum number of iterations for the Newton Solver---*/ const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ const su2double relax = config->GetwallModelRelFac(); /*--- relaxation factor for the Newton solver ---*/ - const su2double minYPlus = config->GetwallModelMinYPlus(); /*--- Compute the recovery factor * use Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) ---*/ diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index ab2e1c724dd..5e3db394ff0 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -915,7 +915,6 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c unsigned long counter = 0; su2double diff = 1.0; - su2double Eddy_Visc = 1.0; su2double U_Tau = sqrt(WallShearStress/Density_Wall); su2double Y_Plus = 0.99*config->GetwallModelMinYPlus(); // to avoid warning @@ -943,9 +942,10 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c if (config->GetMarker_All_KindBC(iMarker) != ISOTHERMAL) { su2double denum = (1.0 + Beta*U_Plus - Gam*U_Plus*U_Plus); - if (abs(denum)>EPS) + if (abs(denum)>EPS){ T_Wall = T_Normal / denum; nodes->SetTemperature(iPoint,T_Wall); + } } /*--- update of wall density using the wall temperature ---*/ From 8066a2360d325e748b9407612ccb97574a71ce8f Mon Sep 17 00:00:00 2001 From: Nijso Date: Tue, 24 Aug 2021 13:42:03 +0200 Subject: [PATCH 42/88] Update Common/src/CConfig.cpp better naming convention for config options Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> --- Common/src/CConfig.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 6c90c6dc9cc..52ed7dc2a5d 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1224,15 +1224,15 @@ void CConfig::SetConfig_Options() { /*!\brief PRANDTL_TURB \n DESCRIPTION: Turbulent Prandtl number (0.9 (air), only for compressible flows) \n DEFAULT 0.90 \ingroup Config*/ addDoubleOption("PRANDTL_TURB", Prandtl_Turb, 0.90); /*!\brief WALLMODELKAPPA \n DESCRIPTION: von Karman constant used for the wall model \n DEFAULT 0.41 \ingroup Config*/ - addDoubleOption("WALLMODELKAPPA", wallModelKappa, 0.41); - /*!\brief WALLMODELMAXITER \n DESCRIPTION: Max iterations used for the wall model \n DEFAULT 200 \ingroup Config*/ - addUnsignedShortOption("WALLMODELMAXITER", wallModelMaxIter, 200); - /*!\brief WALLMODELRELFAC \n DESCRIPTION: Relaxation factor used for the wall model \n DEFAULT 0.5 \ingroup Config*/ - addDoubleOption("WALLMODELRELFAC", wallModelRelFac, 0.5); - /*!\brief WALLMODELMINYPLUS \n DESCRIPTION: lower limit for Y+ used for the wall model \n DEFAULT 5.0 \ingroup Config*/ - addDoubleOption("WALLMODELMINYPLUS", wallModelMinYplus, 5.0); - /*!\brief WALLMODELB \n DESCRIPTION: constant B used for the wall model \n DEFAULT 5.0 \ingroup Config*/ - addDoubleOption("WALLMODELB", wallModelB, 5.5); + addDoubleOption("WALLMODEL_KAPPA", wallModelKappa, 0.41); + /*!\brief WALLMODEL_MAXITER \n DESCRIPTION: Max iterations used for the wall model \n DEFAULT 200 \ingroup Config*/ + addUnsignedShortOption("WALLMODEL_MAXITER", wallModelMaxIter, 200); + /*!\brief WALLMODEL_RELFAC \n DESCRIPTION: Relaxation factor used for the wall model \n DEFAULT 0.5 \ingroup Config*/ + addDoubleOption("WALLMODEL_RELFAC", wallModelRelFac, 0.5); + /*!\brief WALLMODEL_MINYPLUS \n DESCRIPTION: lower limit for Y+ used for the wall model \n DEFAULT 5.0 \ingroup Config*/ + addDoubleOption("WALLMODEL_MINYPLUS", wallModelMinYplus, 5.0); + /*!\brief WALLMODEL_B \n DESCRIPTION: constant B used for the wall model \n DEFAULT 5.0 \ingroup Config*/ + addDoubleOption("WALLMODEL_B", wallModelB, 5.5); /*!\brief BULK_MODULUS \n DESCRIPTION: Value of the Bulk Modulus \n DEFAULT 1.42E5 \ingroup Config*/ addDoubleOption("BULK_MODULUS", Bulk_Modulus, 1.42E5); /* DESCRIPTION: Epsilon^2 multipier in Beta calculation for incompressible preconditioner. */ From 3ff82e5a5f3168e0e49672cf1752dbf759282c33 Mon Sep 17 00:00:00 2001 From: Nijso Date: Tue, 24 Aug 2021 13:48:03 +0200 Subject: [PATCH 43/88] Update SU2_CFD/include/solvers/CFVMFlowSolverBase.inl change tauwall to const su2double Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> --- SU2_CFD/include/solvers/CFVMFlowSolverBase.inl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index d9837ce1dc8..87d994f74a6 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2533,9 +2533,9 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr WallShearStress[iMarker][iVertex] = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); - /*--- for wall functions, the wall stresses need to be scald by the wallfunction stress Tau_Wall---*/ - if (wallfunctions && YPlus[iMarker][iVertex] > minYPlus){ - su2double Tau_Wall = nodes->GetTauWall(iPoint); + /*--- For wall functions, the wall stresses need to be scaled by the wallfunction stress Tau_Wall---*/ + if (wallfunctions && (YPlus[iMarker][iVertex] > minYPlus)){ + const su2double Tau_Wall = nodes->GetTauWall(iPoint); for (iDim = 0; iDim < nDim; iDim++) TauTangent[iDim] = (Tau_Wall/WallShearStress[iMarker][iVertex])*TauTangent[iDim]; for (iDim = 0; iDim < nDim; iDim++) TauElem[iDim] = (Tau_Wall/WallShearStress[iMarker][iVertex])*TauElem[iDim]; WallShearStress[iMarker][iVertex] = Tau_Wall; From ec5ececa1ac33f8e9942da29ba9c07946e0dee27 Mon Sep 17 00:00:00 2001 From: Nijso Date: Tue, 24 Aug 2021 13:48:27 +0200 Subject: [PATCH 44/88] Update Common/include/CConfig.hpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> --- Common/include/CConfig.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 3cb82f610a9..31d6bd0b9e9 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -1680,19 +1680,19 @@ class CConfig { * \brief Get the value of the max. number of Newton iterations for turbulence wall modeling. * \return max number of iterations. */ - unsigned short GetwallModelMaxIter(void) const { return wallModelMaxIter; } + unsigned short GetwallModelMaxIter() const { return wallModelMaxIter; } /*! * \brief Get the value of the relaxation factor for turbulence wall modeling. * \return relaxation factor. */ - su2double GetwallModelRelFac(void) const { return wallModelRelFac; } + su2double GetwallModelRelFac() const { return wallModelRelFac; } /*! * \brief Get the value of the minimum Y+ value below which the wall function is deactivated * \return minimum Y+ value. */ - su2double GetwallModelMinYPlus(void) const { return wallModelMinYplus; } + su2double GetwallModelMinYPlus() const { return wallModelMinYplus; } /*! * \brief Get the value of the von Karman constant kappa for turbulence wall modeling. From 67b1a530969577bdc73738f1154eb0770c8d7ac7 Mon Sep 17 00:00:00 2001 From: Nijso Date: Tue, 24 Aug 2021 14:04:13 +0200 Subject: [PATCH 45/88] Update TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> --- .../wallfunctions/flatplate/turb_SA_flatplate.cfg | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg b/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg index 89b74a38e4b..fbaba7bb107 100644 --- a/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg @@ -124,20 +124,6 @@ RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) % Number of total iterations ITER= 2000 -% ----------------------- SLOPE LIMITER DEFINITION ----------------------------% -% -% Coefficient for the limiter -VENKAT_LIMITER_COEFF= 0.1 -% -% Coefficient for the sharp edges limiter -ADJ_SHARP_LIMITER_COEFF= 3.0 -% -% Reference coefficient (sensitivity) for detecting sharp edges. -REF_SHARP_EDGES= 3.0 -% -% Remove sharp edges from the sensitivity evaluation (NO, YES) -SENS_REMOVE_SHARP= NO - % -------------------------- MULTIGRID PARAMETERS -----------------------------% % % Multi-Grid Levels (0 = no multi-grid) From 1591c7c9a70ee9d99f4381e49c82c20785688d70 Mon Sep 17 00:00:00 2001 From: Nijso Date: Tue, 24 Aug 2021 14:12:49 +0200 Subject: [PATCH 46/88] Update SU2_CFD/src/solvers/CIncNSSolver.cpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> --- SU2_CFD/src/solvers/CIncNSSolver.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 360186d0c99..0f4109c7355 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -742,12 +742,10 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container su2double q_w = 0.0; if (config->GetMarker_All_KindBC(iMarker) == ISOTHERMAL) { - su2double T_n = nodes->GetTemperature(Point_Normal); + const su2double T_n = nodes->GetTemperature(Point_Normal); q_w = Conductivity_Wall * (T_Wall - T_n) / WallDistMod; } else if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) { - su2double T_n = nodes->GetTemperature(Point_Normal); - q_w = Conductivity_Wall * (T_Wall - T_n) / WallDistMod; q_w = config->GetWall_HeatFlux(Marker_Tag); } From de13cebaef5f9f38fc5b14b314f74e8b259a8cda Mon Sep 17 00:00:00 2001 From: Nijso Date: Tue, 24 Aug 2021 14:13:19 +0200 Subject: [PATCH 47/88] Update SU2_CFD/src/solvers/CIncNSSolver.cpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> --- SU2_CFD/src/solvers/CIncNSSolver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 0f4109c7355..a6026c3420d 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -653,9 +653,9 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container const su2double Gas_Constant = config->GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; - const unsigned short max_iter =config->GetwallModelMaxIter(); /*--- maximum number of iterations for the Newton Solver---*/ - const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ - const su2double relax = config->GetwallModelRelFac(); /*--- relaxation factor for the Newton solver ---*/ + const unsigned short max_iter =config->GetwallModelMaxIter(); /*!< \brief maximum number of iterations for the Newton Solver */ + const su2double tol = 1e-12; /*!< \brief convergence criterium for the Newton solver, note that 1e-10 is too large */ + const su2double relax = config->GetwallModelRelFac(); /*!< \brief relaxation factor for the Newton solver */ /*--- Compute the recovery factor * use Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) ---*/ From f7d3a6b0a6a0ee58ef69a4d81320b03efdb1eb96 Mon Sep 17 00:00:00 2001 From: Nijso Date: Tue, 24 Aug 2021 14:15:58 +0200 Subject: [PATCH 48/88] Update SU2_CFD/src/solvers/CIncNSSolver.cpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> --- SU2_CFD/src/solvers/CIncNSSolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index a6026c3420d..774fc97684a 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -803,7 +803,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container /*--- Spalding's universal form for the BL velocity with the outer velocity form of White & Christoph above. ---*/ - su2double kUp = kappa*U_Plus; + const su2double kUp = kappa*U_Plus; Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); From 2d762655a10e1360d112595e973fe8d88fde157b Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 24 Aug 2021 14:17:11 +0200 Subject: [PATCH 49/88] reviewer changes --- Common/src/CConfig.cpp | 2 +- .../include/solvers/CFVMFlowSolverBase.inl | 1 - .../flatplate/turb_SA_flatplate.cfg | 38 +------------------ config_template.cfg | 17 ++++++--- 4 files changed, 13 insertions(+), 45 deletions(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 52ed7dc2a5d..864d643ab69 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1223,7 +1223,7 @@ void CConfig::SetConfig_Options() { addDoubleOption("PRANDTL_LAM", Prandtl_Lam, 0.72); /*!\brief PRANDTL_TURB \n DESCRIPTION: Turbulent Prandtl number (0.9 (air), only for compressible flows) \n DEFAULT 0.90 \ingroup Config*/ addDoubleOption("PRANDTL_TURB", Prandtl_Turb, 0.90); - /*!\brief WALLMODELKAPPA \n DESCRIPTION: von Karman constant used for the wall model \n DEFAULT 0.41 \ingroup Config*/ + /*!\brief WALLMODEL_KAPPA \n DESCRIPTION: von Karman constant used for the wall model \n DEFAULT 0.41 \ingroup Config*/ addDoubleOption("WALLMODEL_KAPPA", wallModelKappa, 0.41); /*!\brief WALLMODEL_MAXITER \n DESCRIPTION: Max iterations used for the wall model \n DEFAULT 200 \ingroup Config*/ addUnsignedShortOption("WALLMODEL_MAXITER", wallModelMaxIter, 200); diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index d9837ce1dc8..7cb4716fdda 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2542,7 +2542,6 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr } for (iDim = 0; iDim < nDim; iDim++) { - /* --- Note that in the wall model, we switch off the computation when the computed y+ < 5 --- */ CSkinFriction[iMarker](iVertex,iDim) = TauTangent[iDim] * factorFric; } diff --git a/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg b/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg index 89b74a38e4b..e2c901cfe5f 100644 --- a/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg @@ -124,42 +124,10 @@ RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) % Number of total iterations ITER= 2000 -% ----------------------- SLOPE LIMITER DEFINITION ----------------------------% -% -% Coefficient for the limiter -VENKAT_LIMITER_COEFF= 0.1 -% -% Coefficient for the sharp edges limiter -ADJ_SHARP_LIMITER_COEFF= 3.0 -% -% Reference coefficient (sensitivity) for detecting sharp edges. -REF_SHARP_EDGES= 3.0 -% -% Remove sharp edges from the sensitivity evaluation (NO, YES) -SENS_REMOVE_SHARP= NO - % -------------------------- MULTIGRID PARAMETERS -----------------------------% % % Multi-Grid Levels (0 = no multi-grid) MGLEVEL= 0 -% -% Multi-grid cycle (V_CYCLE, W_CYCLE, FULLMG_CYCLE) -MGCYCLE= V_CYCLE -% -% Multi-grid pre-smoothing level -MG_PRE_SMOOTH= ( 1, 2, 3, 3 ) -% -% Multi-grid post-smoothing level -MG_POST_SMOOTH= ( 2, 2, 2, 2) -% -% Jacobi implicit smoothing of the correction -MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 ) -% -% Damping factor for the residual restriction -MG_DAMP_RESTRICTION= 0.8 -% -% Damping factor for the correction prolongation -MG_DAMP_PROLONGATION= 0.8 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % @@ -190,9 +158,6 @@ CONV_NUM_METHOD_TURB= SCALAR_UPWIND % Required for 2nd order upwind schemes (NO, YES) MUSCL_TURB= NO % -% Slope limiter (VENKATAKRISHNAN, MINMOD) -SLOPE_LIMITER_TURB= VENKATAKRISHNAN -% % Time discretization (EULER_IMPLICIT) TIME_DISCRE_TURB= EULER_IMPLICIT @@ -214,8 +179,7 @@ CONV_CAUCHY_EPS= 1E-6 % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% % % Mesh input file -%MESH_FILENAME= mesh_flatplate_turb_137x97.su2 -MESH_FILENAME= mesh_xcoarse.su2 +MESH_FILENAME= mesh_flatplate_140x100.su2 % % Mesh input file format (SU2, CGNS, NETCDF_ASCII) MESH_FORMAT= SU2 diff --git a/config_template.cfg b/config_template.cfg index f377d0906fb..35c0974635f 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -915,20 +915,25 @@ WALL_ROUGHNESS = (wall1, ks1, wall2, ks2) % ------------------------ WALL FUNCTION DEFINITION --------------------------% % -% The von Karman constant, the constant below is only used in the standard wall function model -WALLMODELKAPPA= 0.41 +% The von Karman constant, the constant below only affects the standard wall function model +% default: 0.41 +WALLMODEL_KAPPA= 0.41 % % The wall function model constant B -WALLMODELB= 5.5 +% default: 5.5 +WALLMODEL_B= 5.5 % % The y+ value below which the wall function is switched off and we resolve the wall -WALLMODELMINYPLUS= 5.0 +% default: 5.0 +WALLMODEL_MINYPLUS= 5.0 % % [Expert] Max Newton iterations used for the standard wall function -WALLMODELMAXITER= 200 +% default: 200 +WALLMODEL_MAXITER= 200 % % [Expert] relaxation factor for the Newton iterations of the standard wall function -WALLMODELRELFAC= 0.5 +% default: 0.5 +WALLMODEL_RELFAC= 0.5 % ------------------------ SURFACES IDENTIFICATION ----------------------------% % From d7197e0829476a0524b7f1d6b020829a13521dea Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 24 Aug 2021 15:53:21 +0200 Subject: [PATCH 50/88] update testcase --- .../wallfunctions/flatplate/turb_SA_flatplate.cfg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg b/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg index e2c901cfe5f..9c743d8e442 100644 --- a/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg @@ -88,19 +88,19 @@ MARKER_MONITORING= ( wall ) MARKER_WALL_FUNCTIONS= ( wall, STANDARD_WALL_FUNCTION ) % % The von Karman constant, the constant below is only used in the standard wall function model (default: 0.41) -WALLMODELKAPPA= 0.41 +WALLMODEL_KAPPA= 0.41 % % The wall function model constant B (default: 5.5) -WALLMODELB= 5.5 +WALLMODEL_B= 5.5 % % The y+ value below which the wall function is switched off and we resolve the wall (default: 5.0) -WALLMODELMINYPLUS= 5.0 +WALLMODEL_MINYPLUS= 5.0 % % [Expert] Max Newton iterations used for the standard wall function (default: 200) -WALLMODELMAXITER= 200 +WALLMODEL_MAXITER= 200 % % [Expert] relaxation factor for the Newton iterations of the standard wall function (default: 0.5) -WALLMODELRELFAC= 0.5 +WALLMODEL_RELFAC= 0.5 % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % From 9f39f7d6e01ee808f7a63a5059aedc1b5e8efbca Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 25 Aug 2021 09:39:30 +0200 Subject: [PATCH 51/88] Update SU2_CFD/include/solvers/CFVMFlowSolverBase.inl cleaner implementation of tautangent and tauelem Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/include/solvers/CFVMFlowSolverBase.inl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index 98a3bd80e2c..c5bdaacae5b 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2536,8 +2536,11 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr /*--- For wall functions, the wall stresses need to be scaled by the wallfunction stress Tau_Wall---*/ if (wallfunctions && (YPlus[iMarker][iVertex] > minYPlus)){ const su2double Tau_Wall = nodes->GetTauWall(iPoint); - for (iDim = 0; iDim < nDim; iDim++) TauTangent[iDim] = (Tau_Wall/WallShearStress[iMarker][iVertex])*TauTangent[iDim]; - for (iDim = 0; iDim < nDim; iDim++) TauElem[iDim] = (Tau_Wall/WallShearStress[iMarker][iVertex])*TauElem[iDim]; + const su2double scale = Tau_Wall / WallShearStress[iMarker][iVertex]; + for (iDim = 0; iDim < nDim; iDim++) { + TauTangent[iDim] *= scale; + TauElem[iDim] *= scale; + } WallShearStress[iMarker][iVertex] = Tau_Wall; } From ea14c02ec9a91602445e043f47cdeb5d935b3f55 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 25 Aug 2021 09:40:13 +0200 Subject: [PATCH 52/88] Update SU2_CFD/include/solvers/CFVMFlowSolverBase.inl modify implementation of walldistmod Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/include/solvers/CFVMFlowSolverBase.inl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index c5bdaacae5b..321c1169056 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2548,10 +2548,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr CSkinFriction[iMarker](iVertex,iDim) = TauTangent[iDim] * factorFric; } - su2double WallDist[MAXNDIM] = {0.0}; - GeometryToolbox::Distance(nDim, Coord, Coord_Normal, WallDist); - - WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); + WallDistMod = GeometryToolbox::Distance(nDim, Coord, Coord_Normal); /*--- Compute non-dimensional velocity and y+ ---*/ From 4226dbfd84ce2bdc4643536d96fd4f5973406820 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 25 Aug 2021 09:41:00 +0200 Subject: [PATCH 53/88] Update SU2_CFD/src/solvers/CIncNSSolver.cpp cleanup comments Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/src/solvers/CIncNSSolver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 774fc97684a..dd7026d7ef7 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -653,9 +653,9 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container const su2double Gas_Constant = config->GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; - const unsigned short max_iter =config->GetwallModelMaxIter(); /*!< \brief maximum number of iterations for the Newton Solver */ - const su2double tol = 1e-12; /*!< \brief convergence criterium for the Newton solver, note that 1e-10 is too large */ - const su2double relax = config->GetwallModelRelFac(); /*!< \brief relaxation factor for the Newton solver */ + const su2double tol = 1e-12; /*!< \brief convergence criterium for the Newton solver, note that 1e-10 is too large */ + const unsigned short max_iter =config->GetwallModelMaxIter(); + const su2double relax = config->GetwallModelRelFac(); /*--- Compute the recovery factor * use Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) ---*/ From b00e0ec41d0e2259405e494a927133fbc9433297 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 25 Aug 2021 09:48:08 +0200 Subject: [PATCH 54/88] Update SU2_CFD/src/solvers/CIncNSSolver.cpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/src/solvers/CIncNSSolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index dd7026d7ef7..4d7e62f0fff 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -778,7 +778,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; - /*--- Automatic switch off when y+ < 5.0 according to Nichols & Nelson (2004) ---*/ + /*--- Automatic switch off when y+ < "limit" according to Nichols & Nelson (2004) ---*/ if (Y_Plus_Start < config->GetwallModelMinYPlus()) { smallYPlusCounter++; From 5af611168e33ae9d89dfede87ec319918baeb516 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 25 Aug 2021 09:49:41 +0200 Subject: [PATCH 55/88] Update SU2_CFD/src/solvers/CNSSolver.cpp cleanup comments Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/src/solvers/CNSSolver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 5e3db394ff0..15e5d414acd 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -793,9 +793,9 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c const su2double Gas_Constant = config->GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; - const unsigned short max_iter = config->GetwallModelMaxIter() ; /*--- maximum number of iterations for the Newton Solver---*/ - const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ - const su2double relax = config->GetwallModelRelFac(); /*--- relaxation factor for the Newton solver ---*/ + const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ + const unsigned short max_iter = config->GetwallModelMaxIter(); + const su2double relax = config->GetwallModelRelFac(); /*--- Compute the recovery factor ---*/ // Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) From b268a9d42a5aa4b85bf2bd36c18eaaef8a69f580 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 25 Aug 2021 09:50:04 +0200 Subject: [PATCH 56/88] Update SU2_CFD/src/solvers/CNSSolver.cpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> --- SU2_CFD/src/solvers/CNSSolver.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 15e5d414acd..8baf522e93a 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -796,7 +796,6 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ const unsigned short max_iter = config->GetwallModelMaxIter(); const su2double relax = config->GetwallModelRelFac(); - /*--- Compute the recovery factor ---*/ // Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) const su2double Recovery = pow(config->GetPrandtl_Lam(), (1.0/3.0)); From 73f456c2079dc8a755ff41f4e521a539176a8882 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 25 Aug 2021 09:51:02 +0200 Subject: [PATCH 57/88] Update SU2_CFD/src/solvers/CNSSolver.cpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> --- SU2_CFD/src/solvers/CNSSolver.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 8baf522e93a..2d88a2574e5 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -875,7 +875,6 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- initial value for wall temperature ---*/ - su2double T_Wall = nodes->GetTemperature(iPoint); su2double q_w = 0.0; From b2db011a519a8585e4d6946685e5af0f6618e11c Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 25 Aug 2021 09:51:37 +0200 Subject: [PATCH 58/88] Update SU2_CFD/src/solvers/CNSSolver.cpp move T_Wall Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> --- SU2_CFD/src/solvers/CNSSolver.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 2d88a2574e5..941e4ed074e 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -887,6 +887,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- compressible formulation ---*/ + su2double T_Wall = nodes->GetTemperature(iPoint); su2double P_Wall = P_Normal; su2double Density_Wall = P_Wall/(Gas_Constant*T_Wall); su2double Lam_Visc_Normal = nodes->GetLaminarViscosity(Point_Normal); From 0940d87bda9e79416089a1ac6b1f235ecc4744f5 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 25 Aug 2021 09:52:48 +0200 Subject: [PATCH 59/88] Update SU2_CFD/src/solvers/CNSSolver.cpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/src/solvers/CNSSolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 941e4ed074e..348bdf3eab8 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -919,7 +919,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; - /*--- Automatic switch off when y+ < 5.0 according to Nichols & Nelson (2004) ---*/ + /*--- Automatic switch off when y+ < "limit" according to Nichols & Nelson (2004) ---*/ if (Y_Plus_Start < config->GetwallModelMinYPlus() ) { skipCounter++; From 238c9e5259c389a5743e1230b8e84602455db904 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 25 Aug 2021 10:05:44 +0200 Subject: [PATCH 60/88] Update SU2_CFD/src/solvers/CNSSolver.cpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> --- SU2_CFD/src/solvers/CNSSolver.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 348bdf3eab8..16d24c4a019 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -956,7 +956,6 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- Spalding's universal form for the BL velocity with the * outer velocity form of White & Christoph above. ---*/ - su2double kUp = kappa*U_Plus; Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); From 474cee3fd1dbf004411728658df0e984e7a03818 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 25 Aug 2021 10:07:17 +0200 Subject: [PATCH 61/88] Update SU2_CFD/src/solvers/CTurbSASolver.cpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/src/solvers/CTurbSASolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CTurbSASolver.cpp b/SU2_CFD/src/solvers/CTurbSASolver.cpp index b0749fcd6a6..cc90c5aa813 100644 --- a/SU2_CFD/src/solvers/CTurbSASolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSASolver.cpp @@ -1284,7 +1284,7 @@ void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contain su2double Y_Plus = solver_container[FLOW_SOL]->GetYPlus(val_marker, iVertex); - /*--- Do not use wall model at the ipoint when y+ < 5.0 ---*/ + /*--- Do not use wall model at the ipoint when y+ < "limit" ---*/ if (Y_Plus < config->GetwallModelMinYPlus()) continue; From 310585b485d53eead9a6cd141e59ef42fbc6cca4 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 25 Aug 2021 10:07:42 +0200 Subject: [PATCH 62/88] Update SU2_CFD/src/solvers/CTurbSSTSolver.cpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 93beeea690f..eece51d95d9 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -485,7 +485,7 @@ void CTurbSSTSolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contai su2double Y_Plus = solver_container[FLOW_SOL]->GetYPlus(val_marker, iVertex); su2double Lam_Visc_Wall = solver_container[FLOW_SOL]->GetNodes()->GetLaminarViscosity(iPoint); - /*--- Do not use wall model at the ipoint when y+ < 5.0, use zero flux (Neumann) conditions. ---*/ + /*--- Do not use wall model at the ipoint when y+ < "limit", use zero flux (Neumann) conditions. ---*/ if (Y_Plus < minYPlus) { /* --- use zero flux (Neumann) conditions --- */ From 34a6eff72dca75c1e540c5a4c2eaa7f686babeb9 Mon Sep 17 00:00:00 2001 From: Nijso Date: Wed, 25 Aug 2021 10:08:21 +0200 Subject: [PATCH 63/88] Update SU2_CFD/src/solvers/CTurbSSTSolver.cpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> --- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index eece51d95d9..dd7052d447f 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -488,7 +488,7 @@ void CTurbSSTSolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contai /*--- Do not use wall model at the ipoint when y+ < "limit", use zero flux (Neumann) conditions. ---*/ if (Y_Plus < minYPlus) { - /* --- use zero flux (Neumann) conditions --- */ + /* --- Use zero flux (Neumann) conditions, i.e. nothing has to be done. --- */ continue; } From 322f010f85f4c3c5c415fd42ff6c09308df9d181 Mon Sep 17 00:00:00 2001 From: Nijso Date: Mon, 6 Sep 2021 15:35:39 +0200 Subject: [PATCH 64/88] Update SU2_CFD/src/solvers/CNSSolver.cpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/src/solvers/CNSSolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 16d24c4a019..8056fdeb33d 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -941,7 +941,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c if (config->GetMarker_All_KindBC(iMarker) != ISOTHERMAL) { su2double denum = (1.0 + Beta*U_Plus - Gam*U_Plus*U_Plus); - if (abs(denum)>EPS){ + if (denum > EPS){ T_Wall = T_Normal / denum; nodes->SetTemperature(iPoint,T_Wall); } From 10a69be5617d9c8af61adb877ac7b6ebf3c9ba62 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Mon, 6 Sep 2021 15:48:28 +0200 Subject: [PATCH 65/88] change some comments --- SU2_CFD/src/solvers/CIncNSSolver.cpp | 2 +- SU2_CFD/src/solvers/CNSSolver.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 774fc97684a..77d9474cb23 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -774,7 +774,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container unsigned long counter = 0; su2double diff = 1.0; su2double U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall)); - su2double Y_Plus = 0.99*config->GetwallModelMinYPlus(); // clipping value + su2double Y_Plus = 0.99*config->GetwallModelMinYPlus(); // use clipping value as minimum su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 5e3db394ff0..5104d0bb8b3 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -942,9 +942,12 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c if (config->GetMarker_All_KindBC(iMarker) != ISOTHERMAL) { su2double denum = (1.0 + Beta*U_Plus - Gam*U_Plus*U_Plus); - if (abs(denum)>EPS){ + if (denum>EPS){ T_Wall = T_Normal / denum; nodes->SetTemperature(iPoint,T_Wall); + } + else { + cout << "Warning: T_Wall < 0 " << endl; } } From 7c9b44709564707d6d3b7879340ace55a0840b7b Mon Sep 17 00:00:00 2001 From: Nijso Date: Mon, 6 Sep 2021 15:53:20 +0200 Subject: [PATCH 66/88] Update TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg | 8 -------- 1 file changed, 8 deletions(-) diff --git a/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg b/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg index 9c743d8e442..d9ec0687c33 100644 --- a/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg @@ -113,14 +113,6 @@ CFL_NUMBER= 200.0 % % Adaptive CFL number (NO, YES) CFL_ADAPT= NO -% -% Parameters of the adaptive CFL number (factor down, factor up, CFL min value, -% CFL max value ) -CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 ) -% -% Runge-Kutta alpha coefficients -RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) -% % Number of total iterations ITER= 2000 From 3f4c2d0839fe5d754e4c426ab52f1992989255ee Mon Sep 17 00:00:00 2001 From: Nijso Date: Mon, 6 Sep 2021 15:53:42 +0200 Subject: [PATCH 67/88] Update TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg | 7 ------- 1 file changed, 7 deletions(-) diff --git a/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg b/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg index d9ec0687c33..36c55563f52 100644 --- a/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/turb_SA_flatplate.cfg @@ -130,14 +130,7 @@ CONV_NUM_METHOD_FLOW= ROE % Monotonic Upwind Scheme for Conservation Laws (TVD) in the flow equations. % Required for 2nd order upwind schemes (NO, YES) MUSCL_FLOW= YES -% -% Slope limiter (NONE, VENKATAKRISHNAN, VENKATAKRISHNAN_WANG, -% BARTH_JESPERSEN, VAN_ALBADA_EDGE) SLOPE_LIMITER_FLOW= NONE -% -% 2nd and 4th order artificial dissipation coefficients -JST_SENSOR_COEFF= ( 0.5, 0.02 ) -% % Time discretization (RUNGE-KUTTA_EXPLICIT, EULER_IMPLICIT, EULER_EXPLICIT) TIME_DISCRE_FLOW= EULER_IMPLICIT From 827fbbcec39048a761a0db9aebd919750f32c332 Mon Sep 17 00:00:00 2001 From: Nijso Date: Mon, 6 Sep 2021 15:56:08 +0200 Subject: [PATCH 68/88] Update SU2_CFD/src/solvers/CIncNSSolver.cpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> --- SU2_CFD/src/solvers/CIncNSSolver.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 4d7e62f0fff..a900ab02569 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -748,6 +748,11 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container else if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) { q_w = config->GetWall_HeatFlux(Marker_Tag); } + else if (config->GetMarker_All_KindBC(iMarker) == HEAT_TRANSFER) { + const su2double Transfer_Coefficient = config->GetWall_HeatTransfer_Coefficient(Marker_Tag) * config->GetTemperature_Ref()/config->GetHeat_Flux_Ref(); + const su2double Tinfinity = config->GetWall_HeatTransfer_Temperature(Marker_Tag)/config->GetTemperature_Ref(); + q_w = Transfer_Coefficient * (Tinfinity - T_Wall); + } /*--- incompressible formulation ---*/ su2double Density_Wall = nodes->GetDensity(iPoint); From dfd2939b925e42172447add2c4c6d72e0a40e816 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Mon, 20 Sep 2021 11:26:19 +0200 Subject: [PATCH 69/88] added incomp. and comp. testcases --- .../include/solvers/CFVMFlowSolverBase.inl | 7 +- SU2_CFD/include/variables/CIncNSVariable.hpp | 13 + SU2_CFD/src/solvers/CIncNSSolver.cpp | 31 +- SU2_CFD/src/solvers/CNSSolver.cpp | 52 +- SU2_CFD/src/variables/CIncNSVariable.cpp | 1 + TestCases/log | 2672 +++++++++++++++++ TestCases/serial_regression.py | 48 +- .../compressible_SA/turb_SA_flatplate.cfg | 22 +- .../compressible_SST/turb_SST_flatplate.cfg | 22 +- .../incompressible_SA/turb_SA_flatplate.cfg | 22 +- .../incompressible_SST/turb_SST_flatplate.cfg | 22 +- 11 files changed, 2842 insertions(+), 70 deletions(-) create mode 100644 TestCases/log diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index 321c1169056..ef4e5cf12d8 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2534,13 +2534,15 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr WallShearStress[iMarker][iVertex] = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); /*--- For wall functions, the wall stresses need to be scaled by the wallfunction stress Tau_Wall---*/ + su2double Tau_Wall, scale; if (wallfunctions && (YPlus[iMarker][iVertex] > minYPlus)){ - const su2double Tau_Wall = nodes->GetTauWall(iPoint); - const su2double scale = Tau_Wall / WallShearStress[iMarker][iVertex]; + Tau_Wall = nodes->GetTauWall(iPoint); + scale = Tau_Wall / WallShearStress[iMarker][iVertex]; for (iDim = 0; iDim < nDim; iDim++) { TauTangent[iDim] *= scale; TauElem[iDim] *= scale; } + WallShearStress[iMarker][iVertex] = Tau_Wall; } @@ -2553,7 +2555,6 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr /*--- Compute non-dimensional velocity and y+ ---*/ FrictionVel = sqrt(fabs(WallShearStress[iMarker][iVertex]) / Density); - YPlus[iMarker][iVertex] = WallDistMod * FrictionVel / (Viscosity / Density); /*--- Compute total and maximum heat flux on the wall ---*/ diff --git a/SU2_CFD/include/variables/CIncNSVariable.hpp b/SU2_CFD/include/variables/CIncNSVariable.hpp index 0ffedfeb5a9..f0e5ec570f6 100644 --- a/SU2_CFD/include/variables/CIncNSVariable.hpp +++ b/SU2_CFD/include/variables/CIncNSVariable.hpp @@ -38,6 +38,7 @@ */ class CIncNSVariable final : public CIncEulerVariable { private: + VectorType Tau_Wall; /*!< \brief Magnitude of the wall shear stress from a wall function. */ VectorType DES_LengthScale; public: @@ -105,6 +106,18 @@ class CIncNSVariable final : public CIncEulerVariable { bool SetPrimVar(unsigned long iPoint, su2double eddy_visc, su2double turb_ke, CFluidModel *FluidModel) override; using CVariable::SetPrimVar; + /*! + * \brief Set the value of the wall shear stress computed by a wall function. + */ + inline void SetTauWall(unsigned long iPoint, su2double val_tau_wall) override { Tau_Wall(iPoint) = val_tau_wall; } + + /*! + * \brief Get the value of the wall shear stress computed by a wall function. + * \return Value of the wall shear stress computed by a wall function. + */ + inline su2double GetTauWall(unsigned long iPoint) const override { return Tau_Wall(iPoint); } + inline const VectorType& GetTauWall() const { return Tau_Wall; } + /*! * \brief Set the DES Length Scale. */ diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 2817a0b5fb9..93e77f9b930 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -644,8 +644,7 @@ void CIncNSSolver::BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **sol void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config) { /*--- - The wall function implemented herein is based on Nichols and Nelson AIAAJ v32 n6 2004. - At this moment, the wall function is only available for adiabatic flows. + The wall function implemented herein is based on Nichols and Nelson, AIAA J. v32 n6 2004. ---*/ unsigned long notConvergedCounter = 0; /*--- counts the number of wall cells that are not converged ---*/ @@ -654,8 +653,8 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container const su2double Gas_Constant = config->GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; const su2double tol = 1e-12; /*!< \brief convergence criterium for the Newton solver, note that 1e-10 is too large */ - const unsigned short max_iter =config->GetwallModelMaxIter(); - const su2double relax = config->GetwallModelRelFac(); + const unsigned short max_iter = config->GetwallModelMaxIter(); + const su2double relax = config->GetwallModelRelFac(); /*--- Compute the recovery factor * use Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) ---*/ @@ -677,7 +676,8 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container /*--- Jump to another BC if it is not wall function ---*/ - if (config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::STANDARD_FUNCTION) continue; + if (config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::STANDARD_FUNCTION) + continue; /*--- Loop over all of the vertices on this boundary marker ---*/ @@ -688,7 +688,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container const auto Point_Normal = geometry->vertex[iMarker][iVertex]->GetNormal_Neighbor(); /*--- Check if the node belongs to the domain (i.e, not a halo node) - and the neighbor is not part of the physical boundary ---*/ + * and the neighbor is not part of the physical boundary ---*/ if (!geometry->nodes->GetDomain(iPoint)) continue; @@ -744,17 +744,18 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container if (config->GetMarker_All_KindBC(iMarker) == ISOTHERMAL) { const su2double T_n = nodes->GetTemperature(Point_Normal); q_w = Conductivity_Wall * (T_Wall - T_n) / WallDistMod; - } + } else if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) { q_w = config->GetWall_HeatFlux(Marker_Tag); } /*--- incompressible formulation ---*/ + su2double Density_Wall = nodes->GetDensity(iPoint); su2double Lam_Visc_Normal = nodes->GetLaminarViscosity(Point_Normal); /*--- Compute the shear stress at the wall in the regular fashion - by using the stress tensor on the surface ---*/ + * by using the stress tensor on the surface ---*/ su2double tau[MAXNDIM][MAXNDIM] = {{0.0}}; su2double Lam_Visc_Wall = nodes->GetLaminarViscosity(iPoint); @@ -768,8 +769,8 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container su2double WallShearStress = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); /*--- Calculate the quantities from boundary layer theory and - iteratively solve for a new wall shear stress. Use the current wall - shear stress as a starting guess for the wall function. ---*/ + * iteratively solve for a new wall shear stress. Use the current wall + * shear stress as a starting guess for the wall function. ---*/ unsigned long counter = 0; su2double diff = 1.0; @@ -782,6 +783,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container if (Y_Plus_Start < config->GetwallModelMinYPlus()) { smallYPlusCounter++; + continue; } else while (fabs(diff) > tol) { @@ -801,8 +803,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); /*--- Spalding's universal form for the BL velocity with the - outer velocity form of White & Christoph above. ---*/ - + * outer velocity form of White & Christoph above. ---*/ const su2double kUp = kappa*U_Plus; Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); @@ -840,15 +841,15 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container } /*--- Calculate an updated value for the wall shear stress - using the y+ value, the definition of y+, and the definition of - the friction velocity. ---*/ - + * using the y+ value, the definition of y+, and the definition of + * the friction velocity. ---*/ YPlus[iMarker][iVertex] = Y_Plus; EddyViscWall[iMarker][iVertex] = Eddy_Visc_Wall; UTau[iMarker][iVertex] = U_Tau; su2double Tau_Wall = (1.0/Density_Wall)*pow(Y_Plus*Lam_Visc_Wall/WallDistMod,2.0); + /*--- Store this value for the wall shear stress at the node. ---*/ nodes->SetTauWall(iPoint, Tau_Wall); } diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 5579c557ba5..3b03a7a24bf 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -1,6 +1,6 @@ /*! * \file CNSSolver.cpp - * \brief Main subrotuines for solving Finite-Volume Navier-Stokes flow problems. + * \brief Main subroutines for solving Finite-Volume Navier-Stokes flow problems. * \author F. Palacios, T. Economon * \version 7.2.0 "Blackbird" * @@ -789,15 +789,18 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c The wall function implemented herein is based on Nichols and Nelson, AIAA J. v32 n6 2004. ---*/ - unsigned long notConvergedCounter = 0, skipCounter = 0; + unsigned long notConvergedCounter = 0; /*--- counts the number of wall cells that are not converged ---*/ + unsigned long smallYPlusCounter = 0; /*--- counts the number of wall cells where y+ < 5 ---*/ + const su2double Gas_Constant = config->GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; - - const su2double tol = 1e-12; /*--- convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ + const su2double tol = 1e-12; /*!< \brief convergence criterium for the Newton solver, note that 1e-10 is too large */ const unsigned short max_iter = config->GetwallModelMaxIter(); const su2double relax = config->GetwallModelRelFac(); - /*--- Compute the recovery factor ---*/ - // Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) + + /*--- Compute the recovery factor + * use Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) ---*/ + const su2double Recovery = pow(config->GetPrandtl_Lam(), (1.0/3.0)); /*--- Typical constants from boundary layer theory ---*/ @@ -827,7 +830,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c const auto Point_Normal = geometry->vertex[iMarker][iVertex]->GetNormal_Neighbor(); /*--- Check if the node belongs to the domain (i.e, not a halo node) - and the neighbor is not part of the physical boundary ---*/ + * and the neighbor is not part of the physical boundary ---*/ if (!geometry->nodes->GetDomain(iPoint)) continue; @@ -880,14 +883,14 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) { q_w = config->GetWall_HeatFlux(Marker_Tag); - } + } /*--- Extrapolate the pressure from the interior & compute the wall density using the equation of state ---*/ /*--- compressible formulation ---*/ - su2double T_Wall = nodes->GetTemperature(iPoint); + su2double T_Wall = nodes->GetTemperature(iPoint); su2double P_Wall = P_Normal; su2double Density_Wall = P_Wall/(Gas_Constant*T_Wall); su2double Lam_Visc_Normal = nodes->GetLaminarViscosity(Point_Normal); @@ -914,19 +917,21 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c unsigned long counter = 0; su2double diff = 1.0; - su2double U_Tau = sqrt(WallShearStress/Density_Wall); - su2double Y_Plus = 0.99*config->GetwallModelMinYPlus(); // to avoid warning + su2double U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall)); + su2double Y_Plus = 0.99*config->GetwallModelMinYPlus(); // use clipping value as minimum su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; /*--- Automatic switch off when y+ < "limit" according to Nichols & Nelson (2004) ---*/ - if (Y_Plus_Start < config->GetwallModelMinYPlus() ) { - skipCounter++; + if (Y_Plus_Start < config->GetwallModelMinYPlus()) { + smallYPlusCounter++; continue; } else while (fabs(diff) > tol) { + /*--- Friction velocity and u+ ---*/ + su2double U_Plus = VelTangMod/U_Tau; /*--- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) page 1110 ---*/ @@ -959,14 +964,14 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- Spalding's universal form for the BL velocity with the * outer velocity form of White & Christoph above. ---*/ - su2double kUp = kappa*U_Plus; + const su2double kUp = kappa*U_Plus; Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); Eddy_Visc_Wall = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp(-1.0*kappa*B)* - (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0) - - Lam_Visc_Normal/Lam_Visc_Wall); + (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0) + - Lam_Visc_Normal/Lam_Visc_Wall); Eddy_Visc_Wall = max(1.0e-6, Eddy_Visc_Wall); /* --- Define function for Newton method to zero --- */ @@ -996,8 +1001,8 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c } /*--- Calculate an updated value for the wall shear stress - using the y+ value, the definition of y+, and the definition of - the friction velocity. ---*/ + * using the y+ value, the definition of y+, and the definition of + * the friction velocity. ---*/ YPlus[iMarker][iVertex] = Y_Plus; EddyViscWall[iMarker][iVertex] = Eddy_Visc_Wall; @@ -1010,9 +1015,8 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c nodes->SetTauWall(iPoint, Tau_Wall); } - + END_SU2_OMP_FOR } - END_SU2_OMP_FOR if (config->GetComm_Level() == COMM_FULL) { static unsigned long globalCounter1, globalCounter2; @@ -1023,20 +1027,20 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c globalCounter1 += notConvergedCounter; SU2_OMP_ATOMIC - globalCounter2 += skipCounter; + globalCounter2 += smallYPlusCounter; SU2_OMP_BARRIER SU2_OMP_MASTER { SU2_MPI::Allreduce(&globalCounter1, ¬ConvergedCounter, 1, MPI_UNSIGNED_LONG, MPI_SUM, SU2_MPI::GetComm()); - SU2_MPI::Allreduce(&globalCounter2, &skipCounter, 1, MPI_UNSIGNED_LONG, MPI_SUM, SU2_MPI::GetComm()); + SU2_MPI::Allreduce(&globalCounter2, &smallYPlusCounter, 1, MPI_UNSIGNED_LONG, MPI_SUM, SU2_MPI::GetComm()); if (rank == MASTER_NODE) { if (notConvergedCounter) cout << "Warning: Computation of wall coefficients (y+) did not converge in " << notConvergedCounter << " points." << endl; - if (skipCounter) - cout << "Warning: y+ < 5.0 in " << skipCounter + if (smallYPlusCounter) + cout << "Warning: y+ < 5.0 in " << smallYPlusCounter << " points, for which the wall model is not active." << endl; } } diff --git a/SU2_CFD/src/variables/CIncNSVariable.cpp b/SU2_CFD/src/variables/CIncNSVariable.cpp index 2f0c213820c..053994aaff6 100644 --- a/SU2_CFD/src/variables/CIncNSVariable.cpp +++ b/SU2_CFD/src/variables/CIncNSVariable.cpp @@ -34,6 +34,7 @@ CIncNSVariable::CIncNSVariable(su2double pressure, const su2double *velocity, su Vorticity.resize(nPoint,3); StrainMag.resize(nPoint); + Tau_Wall.resize(nPoint) = su2double(-1.0); DES_LengthScale.resize(nPoint) = su2double(0.0); Max_Lambda_Visc.resize(nPoint); diff --git a/TestCases/log b/TestCases/log new file mode 100644 index 00000000000..a6b47c68afd --- /dev/null +++ b/TestCases/log @@ -0,0 +1,2672 @@ + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named 5x5Mesh.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: thermalbath ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/nonequilibrium/thermalbath/finitechemistry +thermalbath: FAILED +Output for the failed case +execution command: SU2_CFD thermalbath.cfg.autotest > thermalbath.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): 0.945997, 0.945997, -12.018025, -12.217291, -32.000000, 10.013239 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: thermalbath ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named 5x5Mesh.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: thermalbath_frozen ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/nonequilibrium/thermalbath/frozen +thermalbath_frozen: FAILED +Output for the failed case +execution command: SU2_CFD thermalbath_frozen.cfg.autotest > thermalbath_frozen.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -32.000000, -32.000000, -12.018022, -12.217291, -32.000000, 10.013545 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: thermalbath_frozen ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named invwedge.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: invwedge ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/nonequilibrium/invwedge +invwedge: FAILED +Output for the failed case +execution command: SU2_CFD invwedge.cfg.autotest > invwedge.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -0.956173, -1.480936, -16.738781, -17.063703, -17.011887, 2.371977, 1.732488, 5.399642, 0.953492 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: invwedge ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named viscwedge.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: visc_cone ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/nonequilibrium/axi_visccone +visc_cone: FAILED +Output for the failed case +execution command: SU2_CFD axi_visccone.cfg.autotest > axi_visccone.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -5.173078, -5.697841, -20.831296, -20.719164, -23.419769, -1.564084, -2.069040, 2.203924, -2.590729 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: visc_cone ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_channel_256x128.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: dry run Euler ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/euler/channel +dry run Euler: FAILED +Output for the failed case +execution command: SU2_CFD -d inv_channel_RK.cfg > inv_channel_RK_check.log 2>&1 +test duration: 0.00 min +==================== End Test: dry run Euler ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_channel_256x128.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: channel ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/euler/channel +channel: FAILED +Output for the failed case +execution command: SU2_CFD inv_channel_RK.cfg.autotest > inv_channel_RK.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -2.475872, 3.046370, -0.203974, 0.036018 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: channel ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_NACA0012_inv.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: naca0012 ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/euler/naca0012 +naca0012: FAILED +Output for the failed case +execution command: SU2_CFD inv_NACA0012_Roe.cfg.autotest > inv_NACA0012_Roe.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=20 +test_vals (stored): -4.023999, -3.515034, 0.339426, 0.022217 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: naca0012 ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +mesh_wedge_inv.cgns was not found or is not a properly formatted CGNS file. +Note that SU2 expects unstructured CGNS files in ADF data format. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: wedge ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/euler/wedge +wedge: FAILED +Output for the failed case +execution command: SU2_CFD inv_wedge_HLLC.cfg.autotest > inv_wedge_HLLC.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=20 +test_vals (stored): -0.942862, 4.784581, -0.208106, 0.036665 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: wedge ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_ONERAM6_inv_ffd.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: oneram6 ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/euler/oneram6 +oneram6: FAILED +Output for the failed case +execution command: SU2_CFD inv_ONERAM6.cfg.autotest > inv_ONERAM6.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -9.279396, -8.697739, 0.281703, 0.011821 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: oneram6 ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_NACA0012_inv.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: fixedcl_naca0012 ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/fixed_cl/naca0012 +fixedcl_naca0012: FAILED +Output for the failed case +execution command: SU2_CFD inv_NACA0012.cfg.autotest > inv_NACA0012.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -7.382410, -1.879887, 0.300000, 0.019471 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: fixedcl_naca0012 ==================== + +9 lines read from control file: polarCtrl.in + +-------------------------------------------------------------------------------------- + +Configuration file: inv_NACA0012.cfg +PolarSweepType = 1 Polar sweep in aoa using 5 angles/Mach No + +-------------------------------------------------------------------------------------- + + +=============================================================================== + Polar sweep in 2D ; output in Body system +=============================================================================== + +Mach = 0.8 AOA = 0.0 +case :DIRECT_M_0.8_AOA_0.0 + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.1.1 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_NACA0012_inv.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +==================== Start Test: polar_naca0012 ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/polar/naca0012 +polar_naca0012: FAILED +Output for the failed case +execution command: compute_polar.py -n 1 -i 11 > inv_NACA0012.cfg.log +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -1.243326, 4.224483, 0.016432, 0.016145 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: polar_naca0012 ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named blunt_91.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: bluntbody ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/euler/bluntbody +bluntbody: FAILED +Output for the failed case +execution command: SU2_CFD blunt.cfg.autotest > blunt.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=20 +test_vals (stored): 0.540009, 6.916653, -0.000000, 1.868975 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: bluntbody ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_flatplate_65x65.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: dry run NS ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/navierstokes/flatplate +dry run NS: FAILED +Output for the failed case +execution command: SU2_CFD -d lam_flatplate.cfg > lam_flatplate_check.log 2>&1 +test duration: 0.00 min +==================== End Test: dry run NS ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_flatplate_65x65.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: flatplate ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/navierstokes/flatplate +flatplate: FAILED +Output for the failed case +execution command: SU2_CFD lam_flatplate.cfg.autotest > lam_flatplate.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=20 +test_vals (stored): -4.680777, 0.781234, -0.135957, 0.022977, 0.002854, 2.362100, -2.359200 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: flatplate ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_cylinder_lam.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: cylinder ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/navierstokes/cylinder +cylinder: FAILED +Output for the failed case +execution command: SU2_CFD lam_cylinder.cfg.autotest > lam_cylinder.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=25 +test_vals (stored): -6.765430, -1.297426, 0.019508, 0.310015 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: cylinder ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_cylinder_lam.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: cylinder_lowmach ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/navierstokes/cylinder +cylinder_lowmach: FAILED +Output for the failed case +execution command: SU2_CFD cylinder_lowmach.cfg.autotest > cylinder_lowmach.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=25 +test_vals (stored): -6.850123, -1.388088, -0.056090, 108.140176 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: cylinder_lowmach ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_poiseuille_51x51.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: poiseuille ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/navierstokes/poiseuille +poiseuille: FAILED +Output for the failed case +execution command: SU2_CFD lam_poiseuille.cfg.autotest > lam_poiseuille.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -5.050732, 0.648355, 0.012273, 13.643219 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: poiseuille ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_poiseuille_51x51.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: poiseuille_profile ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/navierstokes/poiseuille +poiseuille_profile: FAILED +Output for the failed case +execution command: SU2_CFD profile_poiseuille.cfg.autotest > profile_poiseuille.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -12.494720, -7.711373, -0.000000, 2.085796 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: poiseuille_profile ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_RAE2822_turb.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: dry run RANS ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/rae2822 +dry run RANS: FAILED +Output for the failed case +execution command: SU2_CFD -d turb_SA_RAE2822.cfg > turb_SA_RAE2822_check.log 2>&1 +test duration: 0.00 min +==================== End Test: dry run RANS ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_RAE2822_turb.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: rae2822_sa ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/rae2822 +rae2822_sa: FAILED +Output for the failed case +execution command: SU2_CFD turb_SA_RAE2822.cfg.autotest > turb_SA_RAE2822.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=20 +test_vals (stored): -2.020123, -5.269330, 0.807147, 0.060499 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: rae2822_sa ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_RAE2822_turb.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: rae2822_sst ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/rae2822 +rae2822_sst: FAILED +Output for the failed case +execution command: SU2_CFD turb_SST_RAE2822.cfg.autotest > turb_SST_RAE2822.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=20 +test_vals (stored): -0.510639, 4.872266, 0.812659, 0.061095 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: rae2822_sst ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_RAE2822_turb.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: rae2822_sst_sust ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/rae2822 +rae2822_sst_sust: FAILED +Output for the failed case +execution command: SU2_CFD turb_SST_SUST_RAE2822.cfg.autotest > turb_SST_SUST_RAE2822.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=20 +test_vals (stored): -2.431741, 4.872266, 0.812658, 0.061095 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: rae2822_sst_sust ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_flatplate_turb_137x97.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: turb_flatplate ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/flatplate +turb_flatplate: FAILED +Output for the failed case +execution command: SU2_CFD turb_SA_flatplate.cfg.autotest > turb_SA_flatplate.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=20 +test_vals (stored): -4.157169, -6.737133, -0.176253, 0.057446 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: turb_flatplate ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_ONERAM6_turb_hexa_43008.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: turb_oneram6 ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/oneram6 +turb_oneram6: FAILED +Output for the failed case +execution command: SU2_CFD turb_ONERAM6.cfg.autotest > turb_ONERAM6.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -2.388841, -6.689414, 0.230321, 0.157640 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: turb_oneram6 ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named n0012_225-65.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: turb_naca0012_sa ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/naca0012 +turb_naca0012_sa: FAILED +Output for the failed case +execution command: SU2_CFD turb_NACA0012_sa.cfg.autotest > turb_NACA0012_sa.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -11.133933, -14.498178, 1.064330, 0.019756 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: turb_naca0012_sa ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named n0012_225-65.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: turb_naca0012_sst ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/naca0012 +turb_naca0012_sst: FAILED +Output for the failed case +execution command: SU2_CFD turb_NACA0012_sst.cfg.autotest > turb_NACA0012_sst.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -11.451010, -12.798258, -5.863895, 1.049989, 0.019163, -1.925018 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: turb_naca0012_sst ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named n0012_225-65.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: turb_naca0012_sst_sust ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/naca0012 +turb_naca0012_sst_sust: FAILED +Output for the failed case +execution command: SU2_CFD turb_NACA0012_sst_sust.cfg.autotest > turb_NACA0012_sst_sust.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -11.367386, -12.640857, -5.747260, 1.005233, 0.019017, -1.985871 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: turb_naca0012_sst_sust ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named n0012_113-33.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: turb_naca0012_sst_fixedvalues ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/naca0012 +turb_naca0012_sst_fixedvalues: FAILED +Output for the failed case +execution command: SU2_CFD turb_NACA0012_sst_fixedvalues.cfg.autotest > turb_NACA0012_sst_fixedvalues.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -5.206744, -9.562435, -1.566603, 1.022029, 0.040549, -3.483576 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: turb_naca0012_sst_fixedvalues ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named ActuatorDisk.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: propeller ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/propeller +propeller: FAILED +Output for the failed case +execution command: SU2_CFD propeller.cfg.autotest > propeller.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -3.389575, -8.409529, 0.000048, 0.056329 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: propeller ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named nozzle.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: axi_rans_air_nozzle ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/axisymmetric_rans/air_nozzle +axi_rans_air_nozzle: FAILED +Output for the failed case +execution command: SU2_CFD air_nozzle.cfg.autotest > air_nozzle.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -12.097563, -6.650115, -8.875944, -2.393285 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: axi_rans_air_nozzle ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named n0012_113-33.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: turb_naca0012_sst_restart_mg ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/naca0012 +turb_naca0012_sst_restart_mg: FAILED +Output for the failed case +execution command: SU2_CFD turb_NACA0012_sst_multigrid_restart.cfg.autotest > turb_NACA0012_sst_multigrid_restart.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=50 +test_vals (stored): -7.653235, -7.729550, -1.981855, -0.000015, 0.079061 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: turb_naca0012_sst_restart_mg ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_NACA0012_5deg_6814.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: dry run Inc Euler ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_euler/naca0012 +dry run Inc Euler: FAILED +Output for the failed case +execution command: SU2_CFD -d incomp_NACA0012.cfg > incomp_NACA0012_check.log 2>&1 +test duration: 0.00 min +==================== End Test: dry run Inc Euler ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_NACA0012_5deg_6814.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: inc_euler_naca0012 ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_euler/naca0012 +inc_euler_naca0012: FAILED +Output for the failed case +execution command: SU2_CFD incomp_NACA0012.cfg.autotest > incomp_NACA0012.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=20 +test_vals (stored): -4.858287, -3.810487, 0.491850, 0.007002 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: inc_euler_naca0012 ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_nozzle_inv.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: inc_nozzle ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_euler/nozzle +inc_nozzle: FAILED +Output for the failed case +execution command: SU2_CFD inv_nozzle.cfg.autotest > inv_nozzle.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=20 +test_vals (stored): -5.971283, -4.911145, -0.000201, 0.121631 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: inc_nozzle ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_cylinder_lam.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: dry run Inc. NS ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_navierstokes/cylinder +dry run Inc. NS: FAILED +Output for the failed case +execution command: SU2_CFD -d incomp_cylinder.cfg > incomp_cylinder_check.log 2>&1 +test duration: 0.00 min +==================== End Test: dry run Inc. NS ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_cylinder_lam.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: inc_lam_cylinder ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_navierstokes/cylinder +inc_lam_cylinder: FAILED +Output for the failed case +execution command: SU2_CFD incomp_cylinder.cfg.autotest > incomp_cylinder.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -4.004277, -3.227956, 0.003852, 7.626578 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: inc_lam_cylinder ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_cavity_65x65.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: inc_buoyancy ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_navierstokes/buoyancy_cavity +inc_buoyancy: FAILED +Output for the failed case +execution command: SU2_CFD lam_buoyancy_cavity.cfg.autotest > lam_buoyancy_cavity.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=20 +test_vals (stored): -4.436657, 0.507847, 0.000000, 0.000000 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: inc_buoyancy ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_cylinder_lam.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: inc_poly_cylinder ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_navierstokes/cylinder +inc_poly_cylinder: FAILED +Output for the failed case +execution command: SU2_CFD poly_cylinder.cfg.autotest > poly_cylinder.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=20 +test_vals (stored): -8.106741, -2.160042, 0.019225, 1.902421 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: inc_poly_cylinder ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +mesh_bend_coarse.cgns was not found or is not a properly formatted CGNS file. +Note that SU2 expects unstructured CGNS files in ADF data format. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: inc_lam_bend ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_navierstokes/bend +inc_lam_bend: FAILED +Output for the failed case +execution command: SU2_CFD lam_bend.cfg.autotest > lam_bend.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -3.450879, -3.083720, -0.020699, -0.168420 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: inc_lam_bend ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_NACA0012_turb_897x257.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: dry run Inc. RANS ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_rans/naca0012 +dry run Inc. RANS: FAILED +Output for the failed case +execution command: SU2_CFD -d naca0012.cfg > naca0012_check.log 2>&1 +test duration: 0.00 min +==================== End Test: dry run Inc. RANS ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_NACA0012_turb_897x257.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: inc_turb_naca0012 ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_rans/naca0012 +inc_turb_naca0012: FAILED +Output for the failed case +execution command: SU2_CFD naca0012.cfg.autotest > naca0012.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=20 +test_vals (stored): -4.788495, -11.040511, 0.000023, 0.309503 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: inc_turb_naca0012 ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_NACA0012_turb_897x257.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: inc_turb_naca0012_sst_sust ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_rans/naca0012 +inc_turb_naca0012_sst_sust: FAILED +Output for the failed case +execution command: SU2_CFD naca0012_SST_SUST.cfg.autotest > naca0012_SST_SUST.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=20 +test_vals (stored): -7.276273, 0.145895, 0.000021, 0.312004 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: inc_turb_naca0012_sst_sust ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_flatplate_140x100.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: turb_sst_wallfunction_flatplate ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/wallfunctions/flatplate/compressible_SST +turb_sst_wallfunction_flatplate: FAILED +Output for the failed case +execution command: SU2_CFD turb_SST_flatplate.cfg.autotest > turb_SST_flatplate.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -3.070676, -5.386050, 0.057197, 0.005347 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: turb_sst_wallfunction_flatplate ==================== + + + +Error in "void CConfig::SetPostprocessing(SU2_COMPONENT, short unsigned int, short unsigned int)": +------------------------------------------------------------------------- +Inlet types for incompressible problem improperly specified. + Use INC_INLET_TYPE= VELOCITY_INLET or PRESSURE_INLET. + Must list a type for each inlet marker, including duplicates, e.g., + INC_INLET_TYPE= VELOCITY_INLET VELOCITY_INLET PRESSURE_INLET +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: inc_turb_sst_wallfunction_flatplate ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/wallfunctions/flatplate/incompressible_SST +inc_turb_sst_wallfunction_flatplate: FAILED +Output for the failed case +execution command: SU2_CFD turb_SST_flatplate.cfg.autotest > turb_SST_flatplate.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -3.070676, -5.386050, 0.057197, 0.005347 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: inc_turb_sst_wallfunction_flatplate ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_flatplate_140x100.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: turb_sa_wallfunction_flatplate ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/wallfunctions/flatplate/compressible_SA +turb_sa_wallfunction_flatplate: FAILED +Output for the failed case +execution command: SU2_CFD turb_SA_flatplate.cfg.autotest > turb_SA_flatplate.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -3.070676, -5.386050, 0.057197, 0.005347 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: turb_sa_wallfunction_flatplate ==================== + + + +Error in "void CConfig::SetPostprocessing(SU2_COMPONENT, short unsigned int, short unsigned int)": +------------------------------------------------------------------------- +Inlet types for incompressible problem improperly specified. + Use INC_INLET_TYPE= VELOCITY_INLET or PRESSURE_INLET. + Must list a type for each inlet marker, including duplicates, e.g., + INC_INLET_TYPE= VELOCITY_INLET VELOCITY_INLET PRESSURE_INLET +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: inc_turb_sa_wallfunction_flatplate ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/wallfunctions/flatplate/incompressible_SA +inc_turb_sa_wallfunction_flatplate: FAILED +Output for the failed case +execution command: SU2_CFD turb_SA_flatplate.cfg.autotest > turb_SA_flatplate.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -3.070676, -5.386050, 0.057197, 0.005347 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: inc_turb_sa_wallfunction_flatplate ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named Naca0012_nPoly4.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: dry run DG Euler ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/hom_euler/NACA0012_5thOrder +dry run DG Euler: FAILED +Output for the failed case +execution command: SU2_CFD -d fem_NACA0012_reg.cfg > fem_NACA0012_reg_check.log 2>&1 +test duration: 0.00 min +==================== End Test: dry run DG Euler ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named Naca0012_nPoly4.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: fem_euler_naca0012 ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/hom_euler/NACA0012_5thOrder +fem_euler_naca0012: FAILED +Output for the failed case +execution command: SU2_CFD fem_NACA0012_reg.cfg.autotest > fem_NACA0012_reg.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=10 +test_vals (stored): -6.519946, -5.976944, 0.255551, 0.000028 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: fem_euler_naca0012 ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_flatplate_64x64_p4.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: dry run DG NS ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/hom_navierstokes/FlatPlate/nPoly4 +dry run DG NS: FAILED +Output for the failed case +execution command: SU2_CFD -d lam_flatplate_reg.cfg > lam_flatplate_reg_check.log 2>&1 +test duration: 0.00 min +==================== End Test: dry run DG NS ==================== + + +------------------------------------------------------------------------- +| ___ _ _ ___ | +| / __| | | |_ ) Release 7.2.0 "Blackbird" | +| \__ \ |_| |/ / | +| |___/\___//___| Suite (Computational Fluid Dynamics Code) | +| | +------------------------------------------------------------------------- +| SU2 Project Website: https://su2code.github.io | +| | +| The SU2 Project is maintained by the SU2 Foundation | +| (http://su2foundation.org) | +------------------------------------------------------------------------- +| Copyright 2012-2021, SU2 Contributors | +| | +| SU2 is free software; you can redistribute it and/or | +| modify it under the terms of the GNU Lesser General Public | +| License as published by the Free Software Foundation; either | +| version 2.1 of the License, or (at your option) any later version. | +| | +| SU2 is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +| Lesser General Public License for more details. | +| | +| You should have received a copy of the GNU Lesser General Public | +| License along with SU2. If not, see . | +------------------------------------------------------------------------- + +Parsing config file for zone 0 + + +Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": +------------------------------------------------------------------------- +The SU2 mesh file named mesh_flatplate_64x64_p4.su2 was not found. +------------------------------ Error Exit ------------------------------- + + +application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 +[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 +: +system msg for write_line failure : Bad file descriptor +==================== Start Test: fem_ns_flatplate ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/hom_navierstokes/FlatPlate/nPoly4 +fem_ns_flatplate: FAILED +Output for the failed case +execution command: SU2_CFD lam_flatplate_reg.cfg.autotest > lam_flatplate_reg.cfg.log 2>&1 +ERROR: The code was not able to get to the "Begin solver" section. +test_iter=25 +test_vals (stored): 1.383727, 3.175247, 0.058387, 0.257951 +sim_vals (computed): +delta_vals: +test duration: 0.00 min +==================== End Test: fem_ns_flatplate ==================== + +==================== Start Test: fem_ns_cylinder ==================== +/home/nijso/Codes/su2_bigfoot/SU2/TestCases/hom_navierstokes/CylinderViscous/nPoly3 diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 5da1c436088..8cb0ccc0bad 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -316,6 +316,28 @@ def main(): turb_flatplate.tol = 0.00001 test_list.append(turb_flatplate) + # FLAT PLATE, WALL FUNCTIONS, COMPRESSIBLE SST + turb_wallfunction_flatplate_sst = TestCase('turb_sst_wallfunction_flatplate') + turb_wallfunction_flatplate_sst.cfg_dir = "wallfunctions/flatplate/compressible_SST" + turb_wallfunction_flatplate_sst.cfg_file = "turb_SST_flatplate.cfg" + turb_wallfunction_flatplate_sst.test_iter = 10 + turb_wallfunction_flatplate_sst.test_vals = [-1.624124, 1.785764, -2.829997, 0.002593] #last 4 columns + turb_wallfunction_flatplate_sst.su2_exec = "SU2_CFD" + turb_wallfunction_flatplate_sst.timeout = 1600 + turb_wallfunction_flatplate_sst.tol = 0.00001 + test_list.append(turb_wallfunction_flatplate_sst) + + # FLAT PLATE, WALL FUNCTIONS, COMPRESSIBLE SA + turb_wallfunction_flatplate_sa = TestCase('turb_sa_wallfunction_flatplate') + turb_wallfunction_flatplate_sa.cfg_dir = "wallfunctions/flatplate/compressible_SA" + turb_wallfunction_flatplate_sa.cfg_file = "turb_SA_flatplate.cfg" + turb_wallfunction_flatplate_sa.test_iter = 10 + turb_wallfunction_flatplate_sa.test_vals = [-4.436048, -5.393726, 0.069744, 0.002686] #last 4 columns + turb_wallfunction_flatplate_sa.su2_exec = "SU2_CFD" + turb_wallfunction_flatplate_sa.timeout = 1600 + turb_wallfunction_flatplate_sa.tol = 0.00001 + test_list.append(turb_wallfunction_flatplate_sa) + # ONERA M6 Wing turb_oneram6 = TestCase('turb_oneram6') turb_oneram6.cfg_dir = "rans/oneram6" @@ -548,45 +570,23 @@ def main(): inc_turb_naca0012_sst_sust.tol = 0.00001 test_list.append(inc_turb_naca0012_sst_sust) - # FLAT PLATE, WALL FUNCTIONS, COMPRESSIBLE SST - turb_wallfunction_flatplate_sst = TestCase('turb_sst_wallfunction_flatplate') - turb_wallfunction_flatplate_sst.cfg_dir = "wallfunctions/flatplate/compressible_SST" - turb_wallfunction_flatplate_sst.cfg_file = "turb_SST_flatplate.cfg" - turb_wallfunction_flatplate_sst.test_iter = 10 - turb_wallfunction_flatplate_sst.test_vals = [-3.070676, -5.386050, 0.057197, 0.005347] #last 4 columns - turb_wallfunction_flatplate_sst.su2_exec = "SU2_CFD" - turb_wallfunction_flatplate_sst.timeout = 1600 - turb_wallfunction_flatplate_sst.tol = 0.00001 - test_list.append(turb_wallfunction_flatplate_sst) - # FLAT PLATE, WALL FUNCTIONS, INCOMPRESSIBLE SST inc_turb_wallfunction_flatplate_sst = TestCase('inc_turb_sst_wallfunction_flatplate') inc_turb_wallfunction_flatplate_sst.cfg_dir = "wallfunctions/flatplate/incompressible_SST" inc_turb_wallfunction_flatplate_sst.cfg_file = "turb_SST_flatplate.cfg" inc_turb_wallfunction_flatplate_sst.test_iter = 10 - inc_turb_wallfunction_flatplate_sst.test_vals = [-3.070676, -5.386050, 0.057197, 0.005347] #last 4 columns + inc_turb_wallfunction_flatplate_sst.test_vals = [-7.629242, -2.680155, 0.001857, 0.002187] #last 4 columns inc_turb_wallfunction_flatplate_sst.su2_exec = "SU2_CFD" inc_turb_wallfunction_flatplate_sst.timeout = 1600 inc_turb_wallfunction_flatplate_sst.tol = 0.00001 test_list.append(inc_turb_wallfunction_flatplate_sst) - # FLAT PLATE, WALL FUNCTIONS, COMPRESSIBLE SA - turb_wallfunction_flatplate_sa = TestCase('turb_sa_wallfunction_flatplate') - turb_wallfunction_flatplate_sa.cfg_dir = "wallfunctions/flatplate/compressible_SA" - turb_wallfunction_flatplate_sa.cfg_file = "turb_SA_flatplate.cfg" - turb_wallfunction_flatplate_sa.test_iter = 10 - turb_wallfunction_flatplate_sa.test_vals = [-3.070676, -5.386050, 0.057197, 0.005347] #last 4 columns - turb_wallfunction_flatplate_sa.su2_exec = "SU2_CFD" - turb_wallfunction_flatplate_sa.timeout = 1600 - turb_wallfunction_flatplate_sa.tol = 0.00001 - test_list.append(turb_wallfunction_flatplate_sa) - # FLAT PLATE, WALL FUNCTIONS, INCOMPRESSIBLE SA inc_turb_wallfunction_flatplate_sa = TestCase('inc_turb_sa_wallfunction_flatplate') inc_turb_wallfunction_flatplate_sa.cfg_dir = "wallfunctions/flatplate/incompressible_SA" inc_turb_wallfunction_flatplate_sa.cfg_file = "turb_SA_flatplate.cfg" inc_turb_wallfunction_flatplate_sa.test_iter = 10 - inc_turb_wallfunction_flatplate_sa.test_vals = [-3.070676, -5.386050, 0.057197, 0.005347] #last 4 columns + inc_turb_wallfunction_flatplate_sa.test_vals = [0.055660, -9.556782, 0.002294, 0.001011] #last 4 columns inc_turb_wallfunction_flatplate_sa.su2_exec = "SU2_CFD" inc_turb_wallfunction_flatplate_sa.timeout = 1600 inc_turb_wallfunction_flatplate_sa.tol = 0.00001 diff --git a/TestCases/wallfunctions/flatplate/compressible_SA/turb_SA_flatplate.cfg b/TestCases/wallfunctions/flatplate/compressible_SA/turb_SA_flatplate.cfg index 926b714f8d9..f622ef35340 100644 --- a/TestCases/wallfunctions/flatplate/compressible_SA/turb_SA_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/compressible_SA/turb_SA_flatplate.cfg @@ -25,7 +25,27 @@ MATH_PROBLEM= DIRECT % Restart solution (NO, YES) RESTART_SOL= NO % - +% --------------------------- VISCOSITY MODEL ---------------------------------% +% +% Viscosity model (SUTHERLAND, CONSTANT_VISCOSITY, POLYNOMIAL_VISCOSITY). +VISCOSITY_MODEL= CONSTANT_VISCOSITY +% +% Molecular Viscosity that would be constant (1.716E-5 by default) +MU_CONSTANT= 1.716E-5 +% +% Sutherland Viscosity Ref (1.716E-5 default value for AIR SI) +MU_REF= 1.716E-5 +% +% Sutherland Temperature Ref (273.15 K default value for AIR SI) +MU_T_REF= 273.15 +% +% Sutherland constant (110.4 default value for AIR SI) +SUTHERLAND_CONSTANT= 110.4 +% +% Temperature polynomial coefficients (up to quartic) for viscosity. +% Format -> Mu(T) : b0 + b1*T + b2*T^2 + b3*T^3 + b4*T^4 +MU_POLYCOEFFS= (0.0, 0.0, 0.0, 0.0, 0.0) +% % ----------- COMPRESSIBLE AND INCOMPRESSIBLE FREE-STREAM DEFINITION ----------% % % Mach number (non-dimensional, based on the free-stream values) diff --git a/TestCases/wallfunctions/flatplate/compressible_SST/turb_SST_flatplate.cfg b/TestCases/wallfunctions/flatplate/compressible_SST/turb_SST_flatplate.cfg index f40c20f12f3..df1d59651dc 100644 --- a/TestCases/wallfunctions/flatplate/compressible_SST/turb_SST_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/compressible_SST/turb_SST_flatplate.cfg @@ -25,7 +25,27 @@ MATH_PROBLEM= DIRECT % Restart solution (NO, YES) RESTART_SOL= NO % - +% --------------------------- VISCOSITY MODEL ---------------------------------% +% +% Viscosity model (SUTHERLAND, CONSTANT_VISCOSITY, POLYNOMIAL_VISCOSITY). +VISCOSITY_MODEL= CONSTANT_VISCOSITY +% +% Molecular Viscosity that would be constant (1.716E-5 by default) +MU_CONSTANT= 1.716E-5 +% +% Sutherland Viscosity Ref (1.716E-5 default value for AIR SI) +MU_REF= 1.716E-5 +% +% Sutherland Temperature Ref (273.15 K default value for AIR SI) +MU_T_REF= 273.15 +% +% Sutherland constant (110.4 default value for AIR SI) +SUTHERLAND_CONSTANT= 110.4 +% +% Temperature polynomial coefficients (up to quartic) for viscosity. +% Format -> Mu(T) : b0 + b1*T + b2*T^2 + b3*T^3 + b4*T^4 +MU_POLYCOEFFS= (0.0, 0.0, 0.0, 0.0, 0.0) +% % ----------- COMPRESSIBLE AND INCOMPRESSIBLE FREE-STREAM DEFINITION ----------% % % Mach number (non-dimensional, based on the free-stream values) diff --git a/TestCases/wallfunctions/flatplate/incompressible_SA/turb_SA_flatplate.cfg b/TestCases/wallfunctions/flatplate/incompressible_SA/turb_SA_flatplate.cfg index 9d2cc8f9458..ce780c4befe 100644 --- a/TestCases/wallfunctions/flatplate/incompressible_SA/turb_SA_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/incompressible_SA/turb_SA_flatplate.cfg @@ -25,7 +25,27 @@ MATH_PROBLEM= DIRECT % Restart solution (NO, YES) RESTART_SOL= NO % - +% --------------------------- VISCOSITY MODEL ---------------------------------% +% +% Viscosity model (SUTHERLAND, CONSTANT_VISCOSITY, POLYNOMIAL_VISCOSITY). +VISCOSITY_MODEL= CONSTANT_VISCOSITY +% +% Molecular Viscosity that would be constant (1.716E-5 by default) +MU_CONSTANT= 1.716E-5 +% +% Sutherland Viscosity Ref (1.716E-5 default value for AIR SI) +MU_REF= 1.716E-5 +% +% Sutherland Temperature Ref (273.15 K default value for AIR SI) +MU_T_REF= 273.15 +% +% Sutherland constant (110.4 default value for AIR SI) +SUTHERLAND_CONSTANT= 110.4 +% +% Temperature polynomial coefficients (up to quartic) for viscosity. +% Format -> Mu(T) : b0 + b1*T + b2*T^2 + b3*T^3 + b4*T^4 +MU_POLYCOEFFS= (0.0, 0.0, 0.0, 0.0, 0.0) +% % ----------- COMPRESSIBLE AND INCOMPRESSIBLE FREE-STREAM DEFINITION ----------% % % Mach number (non-dimensional, based on the free-stream values) diff --git a/TestCases/wallfunctions/flatplate/incompressible_SST/turb_SST_flatplate.cfg b/TestCases/wallfunctions/flatplate/incompressible_SST/turb_SST_flatplate.cfg index 52e1a4e97d7..84b1a6113c1 100644 --- a/TestCases/wallfunctions/flatplate/incompressible_SST/turb_SST_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/incompressible_SST/turb_SST_flatplate.cfg @@ -25,7 +25,27 @@ MATH_PROBLEM= DIRECT % Restart solution (NO, YES) RESTART_SOL= NO % - +% --------------------------- VISCOSITY MODEL ---------------------------------% +% +% Viscosity model (SUTHERLAND, CONSTANT_VISCOSITY, POLYNOMIAL_VISCOSITY). +VISCOSITY_MODEL= CONSTANT_VISCOSITY +% +% Molecular Viscosity that would be constant (1.716E-5 by default) +MU_CONSTANT= 1.716E-5 +% +% Sutherland Viscosity Ref (1.716E-5 default value for AIR SI) +MU_REF= 1.716E-5 +% +% Sutherland Temperature Ref (273.15 K default value for AIR SI) +MU_T_REF= 273.15 +% +% Sutherland constant (110.4 default value for AIR SI) +SUTHERLAND_CONSTANT= 110.4 +% +% Temperature polynomial coefficients (up to quartic) for viscosity. +% Format -> Mu(T) : b0 + b1*T + b2*T^2 + b3*T^3 + b4*T^4 +MU_POLYCOEFFS= (0.0, 0.0, 0.0, 0.0, 0.0) +% % ----------- COMPRESSIBLE AND INCOMPRESSIBLE FREE-STREAM DEFINITION ----------% % % Mach number (non-dimensional, based on the free-stream values) From 00548d9592830f7ababa4d8ac5d99f2c9ea32b07 Mon Sep 17 00:00:00 2001 From: Nijso Date: Tue, 21 Sep 2021 08:05:36 +0200 Subject: [PATCH 70/88] Update SU2_CFD/src/solvers/CIncNSSolver.cpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/src/solvers/CIncNSSolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index b9db47bcbfb..0000025b130 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -790,7 +790,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container smallYPlusCounter++; continue; } - else while (fabs(diff) > tol) { + while (fabs(diff) > tol) { /*--- Friction velocity and u+ ---*/ From 7f5a34231f6e169b3f16233464058bff0ba6c73d Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 21 Sep 2021 08:07:06 +0200 Subject: [PATCH 71/88] removed logfile --- TestCases/log | 2672 ------------------------------------------------- 1 file changed, 2672 deletions(-) delete mode 100644 TestCases/log diff --git a/TestCases/log b/TestCases/log deleted file mode 100644 index a6b47c68afd..00000000000 --- a/TestCases/log +++ /dev/null @@ -1,2672 +0,0 @@ - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named 5x5Mesh.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: thermalbath ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/nonequilibrium/thermalbath/finitechemistry -thermalbath: FAILED -Output for the failed case -execution command: SU2_CFD thermalbath.cfg.autotest > thermalbath.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): 0.945997, 0.945997, -12.018025, -12.217291, -32.000000, 10.013239 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: thermalbath ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named 5x5Mesh.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: thermalbath_frozen ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/nonequilibrium/thermalbath/frozen -thermalbath_frozen: FAILED -Output for the failed case -execution command: SU2_CFD thermalbath_frozen.cfg.autotest > thermalbath_frozen.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -32.000000, -32.000000, -12.018022, -12.217291, -32.000000, 10.013545 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: thermalbath_frozen ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named invwedge.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: invwedge ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/nonequilibrium/invwedge -invwedge: FAILED -Output for the failed case -execution command: SU2_CFD invwedge.cfg.autotest > invwedge.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -0.956173, -1.480936, -16.738781, -17.063703, -17.011887, 2.371977, 1.732488, 5.399642, 0.953492 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: invwedge ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named viscwedge.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: visc_cone ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/nonequilibrium/axi_visccone -visc_cone: FAILED -Output for the failed case -execution command: SU2_CFD axi_visccone.cfg.autotest > axi_visccone.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -5.173078, -5.697841, -20.831296, -20.719164, -23.419769, -1.564084, -2.069040, 2.203924, -2.590729 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: visc_cone ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_channel_256x128.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: dry run Euler ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/euler/channel -dry run Euler: FAILED -Output for the failed case -execution command: SU2_CFD -d inv_channel_RK.cfg > inv_channel_RK_check.log 2>&1 -test duration: 0.00 min -==================== End Test: dry run Euler ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_channel_256x128.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: channel ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/euler/channel -channel: FAILED -Output for the failed case -execution command: SU2_CFD inv_channel_RK.cfg.autotest > inv_channel_RK.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -2.475872, 3.046370, -0.203974, 0.036018 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: channel ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_NACA0012_inv.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: naca0012 ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/euler/naca0012 -naca0012: FAILED -Output for the failed case -execution command: SU2_CFD inv_NACA0012_Roe.cfg.autotest > inv_NACA0012_Roe.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=20 -test_vals (stored): -4.023999, -3.515034, 0.339426, 0.022217 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: naca0012 ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -mesh_wedge_inv.cgns was not found or is not a properly formatted CGNS file. -Note that SU2 expects unstructured CGNS files in ADF data format. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: wedge ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/euler/wedge -wedge: FAILED -Output for the failed case -execution command: SU2_CFD inv_wedge_HLLC.cfg.autotest > inv_wedge_HLLC.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=20 -test_vals (stored): -0.942862, 4.784581, -0.208106, 0.036665 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: wedge ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_ONERAM6_inv_ffd.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: oneram6 ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/euler/oneram6 -oneram6: FAILED -Output for the failed case -execution command: SU2_CFD inv_ONERAM6.cfg.autotest > inv_ONERAM6.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -9.279396, -8.697739, 0.281703, 0.011821 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: oneram6 ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_NACA0012_inv.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: fixedcl_naca0012 ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/fixed_cl/naca0012 -fixedcl_naca0012: FAILED -Output for the failed case -execution command: SU2_CFD inv_NACA0012.cfg.autotest > inv_NACA0012.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -7.382410, -1.879887, 0.300000, 0.019471 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: fixedcl_naca0012 ==================== - -9 lines read from control file: polarCtrl.in - --------------------------------------------------------------------------------------- - -Configuration file: inv_NACA0012.cfg -PolarSweepType = 1 Polar sweep in aoa using 5 angles/Mach No - --------------------------------------------------------------------------------------- - - -=============================================================================== - Polar sweep in 2D ; output in Body system -=============================================================================== - -Mach = 0.8 AOA = 0.0 -case :DIRECT_M_0.8_AOA_0.0 - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.1.1 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_NACA0012_inv.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -==================== Start Test: polar_naca0012 ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/polar/naca0012 -polar_naca0012: FAILED -Output for the failed case -execution command: compute_polar.py -n 1 -i 11 > inv_NACA0012.cfg.log -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -1.243326, 4.224483, 0.016432, 0.016145 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: polar_naca0012 ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named blunt_91.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: bluntbody ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/euler/bluntbody -bluntbody: FAILED -Output for the failed case -execution command: SU2_CFD blunt.cfg.autotest > blunt.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=20 -test_vals (stored): 0.540009, 6.916653, -0.000000, 1.868975 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: bluntbody ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_flatplate_65x65.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: dry run NS ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/navierstokes/flatplate -dry run NS: FAILED -Output for the failed case -execution command: SU2_CFD -d lam_flatplate.cfg > lam_flatplate_check.log 2>&1 -test duration: 0.00 min -==================== End Test: dry run NS ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_flatplate_65x65.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: flatplate ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/navierstokes/flatplate -flatplate: FAILED -Output for the failed case -execution command: SU2_CFD lam_flatplate.cfg.autotest > lam_flatplate.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=20 -test_vals (stored): -4.680777, 0.781234, -0.135957, 0.022977, 0.002854, 2.362100, -2.359200 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: flatplate ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_cylinder_lam.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: cylinder ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/navierstokes/cylinder -cylinder: FAILED -Output for the failed case -execution command: SU2_CFD lam_cylinder.cfg.autotest > lam_cylinder.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=25 -test_vals (stored): -6.765430, -1.297426, 0.019508, 0.310015 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: cylinder ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_cylinder_lam.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: cylinder_lowmach ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/navierstokes/cylinder -cylinder_lowmach: FAILED -Output for the failed case -execution command: SU2_CFD cylinder_lowmach.cfg.autotest > cylinder_lowmach.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=25 -test_vals (stored): -6.850123, -1.388088, -0.056090, 108.140176 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: cylinder_lowmach ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_poiseuille_51x51.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: poiseuille ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/navierstokes/poiseuille -poiseuille: FAILED -Output for the failed case -execution command: SU2_CFD lam_poiseuille.cfg.autotest > lam_poiseuille.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -5.050732, 0.648355, 0.012273, 13.643219 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: poiseuille ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_poiseuille_51x51.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: poiseuille_profile ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/navierstokes/poiseuille -poiseuille_profile: FAILED -Output for the failed case -execution command: SU2_CFD profile_poiseuille.cfg.autotest > profile_poiseuille.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -12.494720, -7.711373, -0.000000, 2.085796 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: poiseuille_profile ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_RAE2822_turb.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: dry run RANS ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/rae2822 -dry run RANS: FAILED -Output for the failed case -execution command: SU2_CFD -d turb_SA_RAE2822.cfg > turb_SA_RAE2822_check.log 2>&1 -test duration: 0.00 min -==================== End Test: dry run RANS ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_RAE2822_turb.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: rae2822_sa ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/rae2822 -rae2822_sa: FAILED -Output for the failed case -execution command: SU2_CFD turb_SA_RAE2822.cfg.autotest > turb_SA_RAE2822.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=20 -test_vals (stored): -2.020123, -5.269330, 0.807147, 0.060499 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: rae2822_sa ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_RAE2822_turb.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: rae2822_sst ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/rae2822 -rae2822_sst: FAILED -Output for the failed case -execution command: SU2_CFD turb_SST_RAE2822.cfg.autotest > turb_SST_RAE2822.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=20 -test_vals (stored): -0.510639, 4.872266, 0.812659, 0.061095 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: rae2822_sst ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_RAE2822_turb.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: rae2822_sst_sust ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/rae2822 -rae2822_sst_sust: FAILED -Output for the failed case -execution command: SU2_CFD turb_SST_SUST_RAE2822.cfg.autotest > turb_SST_SUST_RAE2822.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=20 -test_vals (stored): -2.431741, 4.872266, 0.812658, 0.061095 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: rae2822_sst_sust ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_flatplate_turb_137x97.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: turb_flatplate ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/flatplate -turb_flatplate: FAILED -Output for the failed case -execution command: SU2_CFD turb_SA_flatplate.cfg.autotest > turb_SA_flatplate.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=20 -test_vals (stored): -4.157169, -6.737133, -0.176253, 0.057446 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: turb_flatplate ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_ONERAM6_turb_hexa_43008.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: turb_oneram6 ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/oneram6 -turb_oneram6: FAILED -Output for the failed case -execution command: SU2_CFD turb_ONERAM6.cfg.autotest > turb_ONERAM6.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -2.388841, -6.689414, 0.230321, 0.157640 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: turb_oneram6 ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named n0012_225-65.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: turb_naca0012_sa ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/naca0012 -turb_naca0012_sa: FAILED -Output for the failed case -execution command: SU2_CFD turb_NACA0012_sa.cfg.autotest > turb_NACA0012_sa.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -11.133933, -14.498178, 1.064330, 0.019756 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: turb_naca0012_sa ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named n0012_225-65.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: turb_naca0012_sst ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/naca0012 -turb_naca0012_sst: FAILED -Output for the failed case -execution command: SU2_CFD turb_NACA0012_sst.cfg.autotest > turb_NACA0012_sst.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -11.451010, -12.798258, -5.863895, 1.049989, 0.019163, -1.925018 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: turb_naca0012_sst ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named n0012_225-65.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: turb_naca0012_sst_sust ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/naca0012 -turb_naca0012_sst_sust: FAILED -Output for the failed case -execution command: SU2_CFD turb_NACA0012_sst_sust.cfg.autotest > turb_NACA0012_sst_sust.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -11.367386, -12.640857, -5.747260, 1.005233, 0.019017, -1.985871 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: turb_naca0012_sst_sust ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named n0012_113-33.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: turb_naca0012_sst_fixedvalues ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/naca0012 -turb_naca0012_sst_fixedvalues: FAILED -Output for the failed case -execution command: SU2_CFD turb_NACA0012_sst_fixedvalues.cfg.autotest > turb_NACA0012_sst_fixedvalues.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -5.206744, -9.562435, -1.566603, 1.022029, 0.040549, -3.483576 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: turb_naca0012_sst_fixedvalues ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named ActuatorDisk.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: propeller ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/propeller -propeller: FAILED -Output for the failed case -execution command: SU2_CFD propeller.cfg.autotest > propeller.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -3.389575, -8.409529, 0.000048, 0.056329 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: propeller ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named nozzle.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: axi_rans_air_nozzle ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/axisymmetric_rans/air_nozzle -axi_rans_air_nozzle: FAILED -Output for the failed case -execution command: SU2_CFD air_nozzle.cfg.autotest > air_nozzle.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -12.097563, -6.650115, -8.875944, -2.393285 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: axi_rans_air_nozzle ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named n0012_113-33.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: turb_naca0012_sst_restart_mg ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/rans/naca0012 -turb_naca0012_sst_restart_mg: FAILED -Output for the failed case -execution command: SU2_CFD turb_NACA0012_sst_multigrid_restart.cfg.autotest > turb_NACA0012_sst_multigrid_restart.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=50 -test_vals (stored): -7.653235, -7.729550, -1.981855, -0.000015, 0.079061 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: turb_naca0012_sst_restart_mg ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_NACA0012_5deg_6814.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: dry run Inc Euler ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_euler/naca0012 -dry run Inc Euler: FAILED -Output for the failed case -execution command: SU2_CFD -d incomp_NACA0012.cfg > incomp_NACA0012_check.log 2>&1 -test duration: 0.00 min -==================== End Test: dry run Inc Euler ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_NACA0012_5deg_6814.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: inc_euler_naca0012 ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_euler/naca0012 -inc_euler_naca0012: FAILED -Output for the failed case -execution command: SU2_CFD incomp_NACA0012.cfg.autotest > incomp_NACA0012.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=20 -test_vals (stored): -4.858287, -3.810487, 0.491850, 0.007002 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: inc_euler_naca0012 ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_nozzle_inv.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: inc_nozzle ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_euler/nozzle -inc_nozzle: FAILED -Output for the failed case -execution command: SU2_CFD inv_nozzle.cfg.autotest > inv_nozzle.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=20 -test_vals (stored): -5.971283, -4.911145, -0.000201, 0.121631 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: inc_nozzle ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_cylinder_lam.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: dry run Inc. NS ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_navierstokes/cylinder -dry run Inc. NS: FAILED -Output for the failed case -execution command: SU2_CFD -d incomp_cylinder.cfg > incomp_cylinder_check.log 2>&1 -test duration: 0.00 min -==================== End Test: dry run Inc. NS ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_cylinder_lam.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: inc_lam_cylinder ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_navierstokes/cylinder -inc_lam_cylinder: FAILED -Output for the failed case -execution command: SU2_CFD incomp_cylinder.cfg.autotest > incomp_cylinder.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -4.004277, -3.227956, 0.003852, 7.626578 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: inc_lam_cylinder ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_cavity_65x65.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: inc_buoyancy ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_navierstokes/buoyancy_cavity -inc_buoyancy: FAILED -Output for the failed case -execution command: SU2_CFD lam_buoyancy_cavity.cfg.autotest > lam_buoyancy_cavity.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=20 -test_vals (stored): -4.436657, 0.507847, 0.000000, 0.000000 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: inc_buoyancy ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_cylinder_lam.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: inc_poly_cylinder ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_navierstokes/cylinder -inc_poly_cylinder: FAILED -Output for the failed case -execution command: SU2_CFD poly_cylinder.cfg.autotest > poly_cylinder.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=20 -test_vals (stored): -8.106741, -2.160042, 0.019225, 1.902421 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: inc_poly_cylinder ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -mesh_bend_coarse.cgns was not found or is not a properly formatted CGNS file. -Note that SU2 expects unstructured CGNS files in ADF data format. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: inc_lam_bend ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_navierstokes/bend -inc_lam_bend: FAILED -Output for the failed case -execution command: SU2_CFD lam_bend.cfg.autotest > lam_bend.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -3.450879, -3.083720, -0.020699, -0.168420 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: inc_lam_bend ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_NACA0012_turb_897x257.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: dry run Inc. RANS ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_rans/naca0012 -dry run Inc. RANS: FAILED -Output for the failed case -execution command: SU2_CFD -d naca0012.cfg > naca0012_check.log 2>&1 -test duration: 0.00 min -==================== End Test: dry run Inc. RANS ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_NACA0012_turb_897x257.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: inc_turb_naca0012 ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_rans/naca0012 -inc_turb_naca0012: FAILED -Output for the failed case -execution command: SU2_CFD naca0012.cfg.autotest > naca0012.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=20 -test_vals (stored): -4.788495, -11.040511, 0.000023, 0.309503 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: inc_turb_naca0012 ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_NACA0012_turb_897x257.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: inc_turb_naca0012_sst_sust ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/incomp_rans/naca0012 -inc_turb_naca0012_sst_sust: FAILED -Output for the failed case -execution command: SU2_CFD naca0012_SST_SUST.cfg.autotest > naca0012_SST_SUST.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=20 -test_vals (stored): -7.276273, 0.145895, 0.000021, 0.312004 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: inc_turb_naca0012_sst_sust ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_flatplate_140x100.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: turb_sst_wallfunction_flatplate ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/wallfunctions/flatplate/compressible_SST -turb_sst_wallfunction_flatplate: FAILED -Output for the failed case -execution command: SU2_CFD turb_SST_flatplate.cfg.autotest > turb_SST_flatplate.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -3.070676, -5.386050, 0.057197, 0.005347 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: turb_sst_wallfunction_flatplate ==================== - - - -Error in "void CConfig::SetPostprocessing(SU2_COMPONENT, short unsigned int, short unsigned int)": -------------------------------------------------------------------------- -Inlet types for incompressible problem improperly specified. - Use INC_INLET_TYPE= VELOCITY_INLET or PRESSURE_INLET. - Must list a type for each inlet marker, including duplicates, e.g., - INC_INLET_TYPE= VELOCITY_INLET VELOCITY_INLET PRESSURE_INLET ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: inc_turb_sst_wallfunction_flatplate ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/wallfunctions/flatplate/incompressible_SST -inc_turb_sst_wallfunction_flatplate: FAILED -Output for the failed case -execution command: SU2_CFD turb_SST_flatplate.cfg.autotest > turb_SST_flatplate.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -3.070676, -5.386050, 0.057197, 0.005347 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: inc_turb_sst_wallfunction_flatplate ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_flatplate_140x100.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: turb_sa_wallfunction_flatplate ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/wallfunctions/flatplate/compressible_SA -turb_sa_wallfunction_flatplate: FAILED -Output for the failed case -execution command: SU2_CFD turb_SA_flatplate.cfg.autotest > turb_SA_flatplate.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -3.070676, -5.386050, 0.057197, 0.005347 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: turb_sa_wallfunction_flatplate ==================== - - - -Error in "void CConfig::SetPostprocessing(SU2_COMPONENT, short unsigned int, short unsigned int)": -------------------------------------------------------------------------- -Inlet types for incompressible problem improperly specified. - Use INC_INLET_TYPE= VELOCITY_INLET or PRESSURE_INLET. - Must list a type for each inlet marker, including duplicates, e.g., - INC_INLET_TYPE= VELOCITY_INLET VELOCITY_INLET PRESSURE_INLET ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: inc_turb_sa_wallfunction_flatplate ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/wallfunctions/flatplate/incompressible_SA -inc_turb_sa_wallfunction_flatplate: FAILED -Output for the failed case -execution command: SU2_CFD turb_SA_flatplate.cfg.autotest > turb_SA_flatplate.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -3.070676, -5.386050, 0.057197, 0.005347 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: inc_turb_sa_wallfunction_flatplate ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named Naca0012_nPoly4.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: dry run DG Euler ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/hom_euler/NACA0012_5thOrder -dry run DG Euler: FAILED -Output for the failed case -execution command: SU2_CFD -d fem_NACA0012_reg.cfg > fem_NACA0012_reg_check.log 2>&1 -test duration: 0.00 min -==================== End Test: dry run DG Euler ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named Naca0012_nPoly4.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: fem_euler_naca0012 ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/hom_euler/NACA0012_5thOrder -fem_euler_naca0012: FAILED -Output for the failed case -execution command: SU2_CFD fem_NACA0012_reg.cfg.autotest > fem_NACA0012_reg.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=10 -test_vals (stored): -6.519946, -5.976944, 0.255551, 0.000028 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: fem_euler_naca0012 ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_flatplate_64x64_p4.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: dry run DG NS ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/hom_navierstokes/FlatPlate/nPoly4 -dry run DG NS: FAILED -Output for the failed case -execution command: SU2_CFD -d lam_flatplate_reg.cfg > lam_flatplate_reg_check.log 2>&1 -test duration: 0.00 min -==================== End Test: dry run DG NS ==================== - - -------------------------------------------------------------------------- -| ___ _ _ ___ | -| / __| | | |_ ) Release 7.2.0 "Blackbird" | -| \__ \ |_| |/ / | -| |___/\___//___| Suite (Computational Fluid Dynamics Code) | -| | -------------------------------------------------------------------------- -| SU2 Project Website: https://su2code.github.io | -| | -| The SU2 Project is maintained by the SU2 Foundation | -| (http://su2foundation.org) | -------------------------------------------------------------------------- -| Copyright 2012-2021, SU2 Contributors | -| | -| SU2 is free software; you can redistribute it and/or | -| modify it under the terms of the GNU Lesser General Public | -| License as published by the Free Software Foundation; either | -| version 2.1 of the License, or (at your option) any later version. | -| | -| SU2 is distributed in the hope that it will be useful, | -| but WITHOUT ANY WARRANTY; without even the implied warranty of | -| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -| Lesser General Public License for more details. | -| | -| You should have received a copy of the GNU Lesser General Public | -| License along with SU2. If not, see . | -------------------------------------------------------------------------- - -Parsing config file for zone 0 - - -Error in "static short unsigned int CConfig::GetnDim(std::string, short unsigned int)": -------------------------------------------------------------------------- -The SU2 mesh file named mesh_flatplate_64x64_p4.su2 was not found. ------------------------------- Error Exit ------------------------------- - - -application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 -[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1 -: -system msg for write_line failure : Bad file descriptor -==================== Start Test: fem_ns_flatplate ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/hom_navierstokes/FlatPlate/nPoly4 -fem_ns_flatplate: FAILED -Output for the failed case -execution command: SU2_CFD lam_flatplate_reg.cfg.autotest > lam_flatplate_reg.cfg.log 2>&1 -ERROR: The code was not able to get to the "Begin solver" section. -test_iter=25 -test_vals (stored): 1.383727, 3.175247, 0.058387, 0.257951 -sim_vals (computed): -delta_vals: -test duration: 0.00 min -==================== End Test: fem_ns_flatplate ==================== - -==================== Start Test: fem_ns_cylinder ==================== -/home/nijso/Codes/su2_bigfoot/SU2/TestCases/hom_navierstokes/CylinderViscous/nPoly3 From 0ca421fc2c901d2b74ccaf437bc33f6ab0006720 Mon Sep 17 00:00:00 2001 From: Nijso Date: Tue, 21 Sep 2021 08:08:49 +0200 Subject: [PATCH 72/88] Update SU2_CFD/src/solvers/CNSSolver.cpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/src/solvers/CNSSolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 3b03a7a24bf..06d27c600bf 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -953,7 +953,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c else { cout << "Warning: T_Wall < 0 " << endl; } - } + } /*--- update of wall density using the wall temperature ---*/ Density_Wall = P_Wall/(Gas_Constant*T_Wall); From 1dd5c96833be7c56d1d22073db1e2150a2cf78b8 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Wed, 29 Sep 2021 23:30:39 +0200 Subject: [PATCH 73/88] added nondimensionalization --- SU2_CFD/src/solvers/CIncNSSolver.cpp | 4 ++-- SU2_CFD/src/solvers/CNSSolver.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 0000025b130..81ecd0a0673 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -743,10 +743,10 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container if (config->GetMarker_All_KindBC(iMarker) == ISOTHERMAL) { const su2double T_n = nodes->GetTemperature(Point_Normal); - q_w = Conductivity_Wall * (T_Wall - T_n) / WallDistMod; + q_w = Conductivity_Wall * (T_Wall - T_n) / (WallDistMod*config->GetHeat_Flux_Ref()); } else if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) { - q_w = config->GetWall_HeatFlux(Marker_Tag); + q_w = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); } else if (config->GetMarker_All_KindBC(iMarker) == HEAT_TRANSFER) { const su2double Transfer_Coefficient = config->GetWall_HeatTransfer_Coefficient(Marker_Tag) * config->GetTemperature_Ref()/config->GetHeat_Flux_Ref(); diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 3b03a7a24bf..5135b912993 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -882,7 +882,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c su2double q_w = 0.0; if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) { - q_w = config->GetWall_HeatFlux(Marker_Tag); + q_w = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); } /*--- Extrapolate the pressure from the interior & compute the From fc03901ce070f59a0cf97213c1f4ecb7eb30884e Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Thu, 30 Sep 2021 15:26:16 +0200 Subject: [PATCH 74/88] Changes to Testcases cfg's. Fix convergence for inc cases. Mostly some cosmetic changes. Added all residual fields and Linear Solver stuff. CFL for inc cases was too high to properly converge. This will break the regression test so that needs to be changed in a future commit. An open questions that needs to be answered is which input values are given to the case: Re, Ma, mu_lam, etc? And which ones are free. --- .../compressible_SA/turb_SA_flatplate.cfg | 38 +++++++++++------ .../compressible_SST/turb_SST_flatplate.cfg | 40 +++++++++++------- .../incompressible_SA/turb_SA_flatplate.cfg | 42 ++++++++++++------- .../incompressible_SST/turb_SST_flatplate.cfg | 32 +++++++++----- 4 files changed, 101 insertions(+), 51 deletions(-) diff --git a/TestCases/wallfunctions/flatplate/compressible_SA/turb_SA_flatplate.cfg b/TestCases/wallfunctions/flatplate/compressible_SA/turb_SA_flatplate.cfg index 961a1c51cd9..d4ce4f7996c 100644 --- a/TestCases/wallfunctions/flatplate/compressible_SA/turb_SA_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/compressible_SA/turb_SA_flatplate.cfg @@ -8,19 +8,21 @@ % File Version 7.2.0 "Blackbird" % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% SOLVER= RANS KIND_TURB_MODEL= SA MATH_PROBLEM= DIRECT RESTART_SOL= NO -% --------------------------- VISCOSITY MODEL ---------------------------------% -VISCOSITY_MODEL= CONSTANT_VISCOSITY -MU_CONSTANT= 1.8573E-5 % ----------- COMPRESSIBLE AND INCOMPRESSIBLE FREE-STREAM DEFINITION ----------% MACH_NUMBER= 0.2 FREESTREAM_TEMPERATURE= 300.0 -REYNOLDS_NUMBER= 5000000.0 +REYNOLDS_NUMBER= 5e6 REYNOLDS_LENGTH= 1.0 +% --------------------------- VISCOSITY MODEL ---------------------------------% +VISCOSITY_MODEL= CONSTANT_VISCOSITY +% NOTE check where the material conditions come from https://turbmodels.larc.nasa.gov/flatplate.html ... is this even active +MU_CONSTANT= 1.8573E-5 % ---------------------- REFERENCE VALUE DEFINITION ---------------------------% REF_LENGTH= 1.0 REF_AREA= 2.0 @@ -32,17 +34,26 @@ MARKER_SYM= ( symmetry ) MARKER_PLOTTING= ( wall ) MARKER_MONITORING= ( wall ) % ------------------------ WALL FUNCTION DEFINITION --------------------------% +% MARKER_WALL_FUNCTIONS= ( wall, STANDARD_WALL_FUNCTION ) WALLMODEL_KAPPA= 0.41 WALLMODEL_B= 5.5 WALLMODEL_MINYPLUS= 5.0 WALLMODEL_MAXITER= 200 WALLMODEL_RELFAC= 0.5 +% % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% NUM_METHOD_GRAD= GREEN_GAUSS -CFL_NUMBER= 1000.0 +CFL_NUMBER= 1e3 CFL_ADAPT= NO ITER= 1000 +% ------------------------ LINEAR SOLVER DEFINITION ---------------------------% +% +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= ILU +LINEAR_SOLVER_ERROR= 1e-15 +LINEAR_SOLVER_ITER= 10 +% % -------------------------- MULTIGRID PARAMETERS -----------------------------% MGLEVEL= 0 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% @@ -61,13 +72,16 @@ CONV_STARTITER= 10 CONV_CAUCHY_ELEMS= 100 CONV_CAUCHY_EPS= 1E-6 % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% +% MESH_FILENAME= ../mesh_flatplate_140x100.su2 MESH_FORMAT= SU2 -SOLUTION_FILENAME= solution_flow.dat -TABULAR_FORMAT= CSV -CONV_FILENAME= history -RESTART_FILENAME= restart_flow.dat -VOLUME_FILENAME= flow -SURFACE_FILENAME= surface_flow +% +SCREEN_OUTPUT= (INNER_ITER, WALL_TIME, RMS_DENSITY, RMS_MOMENTUM-X, RMS_MOMENTUM-Y, RMS_ENERGY, RMS_NU_TILDE, \ + LINSOL_ITER, LINSOL_RESIDUAL, LIFT, DRAG) +SCREEN_WRT_FREQ_INNER= 10 +% +HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF, FLOW_COEFF) +% +OUTPUT_FILES= RESTART, PARAVIEW_MULTIBLOCK +VOLUME_OUTPUT= RESIDUAL, PRIMITIVE OUTPUT_WRT_FREQ= 1000 -SCREEN_OUTPUT= (INNER_ITER, WALL_TIME, RMS_DENSITY, RMS_NU_TILDE, RMS_TKE, RMS_DISSIPATION, LIFT, DRAG) diff --git a/TestCases/wallfunctions/flatplate/compressible_SST/turb_SST_flatplate.cfg b/TestCases/wallfunctions/flatplate/compressible_SST/turb_SST_flatplate.cfg index 69639df27cf..24d35f09377 100644 --- a/TestCases/wallfunctions/flatplate/compressible_SST/turb_SST_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/compressible_SST/turb_SST_flatplate.cfg @@ -1,11 +1,11 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % SU2 configuration file % -% Case description: Turbulent flow over flat plate with zero pressure gradient % -% Author: Thomas D. Economon % -% Institution: Stanford University % -% Date: 2011.11.10 % -% File Version 7.1.1 "Blackbird" % +% Case description: Turbulent flow over flat plate, wall functions % +% Author: Nijso Beishuizen % +% Institution: Bosch Thermotechnology % +% Date: 2021.09.01 % +% File Version 7.2.0 "Blackbird" % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -21,7 +21,8 @@ REYNOLDS_NUMBER= 5000000.0 REYNOLDS_LENGTH= 1.0 % --------------------------- VISCOSITY MODEL ---------------------------------% VISCOSITY_MODEL= CONSTANT_VISCOSITY -MU_CONSTANT= 1.716E-5 +% NOTE check where the material conditions come from https://turbmodels.larc.nasa.gov/flatplate.html ... is this even active +MU_CONSTANT= 1.8573E-5 % ---------------------- REFERENCE VALUE DEFINITION ---------------------------% REF_LENGTH= 1.0 REF_AREA= 2.0 @@ -33,17 +34,26 @@ MARKER_SYM= ( symmetry ) MARKER_PLOTTING= ( wall ) MARKER_MONITORING= ( wall ) % ------------------------ WALL FUNCTION DEFINITION --------------------------% +% MARKER_WALL_FUNCTIONS= ( wall, STANDARD_WALL_FUNCTION ) WALLMODEL_KAPPA= 0.41 WALLMODEL_B= 5.5 WALLMODEL_MINYPLUS= 5.0 WALLMODEL_MAXITER= 200 WALLMODEL_RELFAC= 0.5 +% % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% NUM_METHOD_GRAD= GREEN_GAUSS CFL_NUMBER= 400.0 CFL_ADAPT= NO ITER= 2000 +% ------------------------ LINEAR SOLVER DEFINITION ---------------------------% +% +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= ILU +LINEAR_SOLVER_ERROR= 1e-15 +LINEAR_SOLVER_ITER= 10 +% % -------------------------- MULTIGRID PARAMETERS -----------------------------% MGLEVEL= 0 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% @@ -62,14 +72,16 @@ CONV_STARTITER= 10 CONV_CAUCHY_ELEMS= 100 CONV_CAUCHY_EPS= 1E-6 % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% +% MESH_FILENAME= ../mesh_flatplate_140x100.su2 MESH_FORMAT= SU2 -SOLUTION_FILENAME= solution_flow.dat -TABULAR_FORMAT= CSV -CONV_FILENAME= history -RESTART_FILENAME= restart_flow.dat -VOLUME_FILENAME= flow -SURFACE_FILENAME= surface_flow -OUTPUT_WRT_FREQ= 1000 +% +SCREEN_OUTPUT= (INNER_ITER, WALL_TIME, RMS_DENSITY, RMS_MOMENTUM-X, RMS_MOMENTUM-Y, RMS_ENERGY, RMS_TKE, RMS_DISSIPATION, \ + LINSOL_ITER, LINSOL_RESIDUAL, LIFT, DRAG) +SCREEN_WRT_FREQ_INNER= 10 +% HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF, FLOW_COEFF) -SCREEN_OUTPUT= (INNER_ITER, WALL_TIME, RMS_TKE, RMS_DISSIPATION, LIFT, DRAG) +% +OUTPUT_FILES= RESTART, PARAVIEW_MULTIBLOCK +VOLUME_OUTPUT= RESIDUAL +OUTPUT_WRT_FREQ= 1000 diff --git a/TestCases/wallfunctions/flatplate/incompressible_SA/turb_SA_flatplate.cfg b/TestCases/wallfunctions/flatplate/incompressible_SA/turb_SA_flatplate.cfg index 583703188c2..4d874247bae 100644 --- a/TestCases/wallfunctions/flatplate/incompressible_SA/turb_SA_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/incompressible_SA/turb_SA_flatplate.cfg @@ -14,16 +14,15 @@ SOLVER= INC_RANS KIND_TURB_MODEL= SA MATH_PROBLEM= DIRECT RESTART_SOL= NO -% --------------------------- VISCOSITY MODEL ---------------------------------% -VISCOSITY_MODEL= CONSTANT_VISCOSITY -MU_CONSTANT= 1.8573E-5 % ---------------- INCOMPRESSIBLE FLOW CONDITION DEFINITION -------------------% INC_DENSITY_MODEL= CONSTANT INC_DENSITY_INIT= 1.3254 +INC_ENERGY_EQUATION= YES INC_TEMPERATURE_INIT= 300.00 INC_VELOCITY_INIT= (70, 0.0, 0.0 ) -INC_INLET_TYPE= VELOCITY_INLET -INC_OUTLET_TYPE= PRESSURE_OUTLET PRESSURE_OUTLET +% --------------------------- VISCOSITY MODEL ---------------------------------% +VISCOSITY_MODEL= CONSTANT_VISCOSITY +MU_CONSTANT= 1.8573E-5 % ----------- COMPRESSIBLE AND INCOMPRESSIBLE FREE-STREAM DEFINITION ----------% MACH_NUMBER= 0.2 FREESTREAM_TEMPERATURE= 300.0 @@ -34,23 +33,34 @@ REF_LENGTH= 1.0 REF_AREA= 2.0 % -------------------- BOUNDARY CONDITION DEFINITION --------------------------% MARKER_HEATFLUX= ( wall, 0.0 ) +INC_INLET_TYPE= VELOCITY_INLET MARKER_INLET= ( inlet, 302.4, 70.0, 1.0, 0.0, 0.0 ) +INC_OUTLET_TYPE= PRESSURE_OUTLET PRESSURE_OUTLET MARKER_OUTLET= ( outlet, 0.0, farfield, 0.0 ) MARKER_SYM= ( symmetry ) MARKER_PLOTTING= ( wall ) MARKER_MONITORING= ( wall ) % ------------------------ WALL FUNCTION DEFINITION --------------------------% +% MARKER_WALL_FUNCTIONS= ( wall, STANDARD_WALL_FUNCTION ) WALLMODEL_KAPPA= 0.41 WALLMODEL_B= 5.5 WALLMODEL_MINYPLUS= 5.0 WALLMODEL_MAXITER= 200 WALLMODEL_RELFAC= 0.5 +% % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% NUM_METHOD_GRAD= GREEN_GAUSS -CFL_NUMBER= 1000.0 +CFL_NUMBER= 1e2 CFL_ADAPT= NO ITER= 1000 +% ------------------------ LINEAR SOLVER DEFINITION ---------------------------% +% +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= ILU +LINEAR_SOLVER_ERROR= 1e-15 +LINEAR_SOLVER_ITER= 10 +% % -------------------------- MULTIGRID PARAMETERS -----------------------------% MGLEVEL= 0 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% @@ -64,19 +74,21 @@ MUSCL_TURB= NO SLOPE_LIMITER_TURB= NONE TIME_DISCRE_TURB= EULER_IMPLICIT % --------------------------- CONVERGENCE PARAMETERS --------------------------% -CONV_RESIDUAL_MINVAL= -15 +CONV_RESIDUAL_MINVAL= -17 CONV_STARTITER= 10 CONV_CAUCHY_ELEMS= 100 CONV_CAUCHY_EPS= 1E-6 % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% +% MESH_FILENAME= ../mesh_flatplate_140x100.su2 MESH_FORMAT= SU2 -SOLUTION_FILENAME= solution_flow.dat -TABULAR_FORMAT= CSV -CONV_FILENAME= history -RESTART_FILENAME= restart_flow.dat -VOLUME_FILENAME= flow -SURFACE_FILENAME= surface_flow -OUTPUT_WRT_FREQ= 1000 +% +SCREEN_OUTPUT= (INNER_ITER, WALL_TIME, RMS_PRESSURE, RMS_VELOCITY-X, RMS_VELOCITY-Y, RMS_TEMPERATURE, RMS_NU_TILDE, \ + LINSOL_ITER, LINSOL_RESIDUAL, LIFT, DRAG) +SCREEN_WRT_FREQ_INNER= 10 +% HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF, FLOW_COEFF) -SCREEN_OUTPUT= (INNER_ITER, WALL_TIME, RMS_NU_TILDE, LIFT, DRAG) +% +OUTPUT_FILES= RESTART, PARAVIEW_MULTIBLOCK +VOLUME_OUTPUT= RESIDUAL +OUTPUT_WRT_FREQ= 1000 diff --git a/TestCases/wallfunctions/flatplate/incompressible_SST/turb_SST_flatplate.cfg b/TestCases/wallfunctions/flatplate/incompressible_SST/turb_SST_flatplate.cfg index 9c8340dd4d2..6b119545052 100644 --- a/TestCases/wallfunctions/flatplate/incompressible_SST/turb_SST_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/incompressible_SST/turb_SST_flatplate.cfg @@ -20,6 +20,7 @@ MU_CONSTANT= 1.8573E-5 % ---------------- INCOMPRESSIBLE FLOW CONDITION DEFINITION -------------------% INC_DENSITY_MODEL= CONSTANT INC_DENSITY_INIT= 1.3254 +INC_ENERGY_EQUATION= YES INC_TEMPERATURE_INIT= 300.00 INC_VELOCITY_INIT= (70, 0.0, 0.0 ) INC_INLET_TYPE= VELOCITY_INLET @@ -40,17 +41,26 @@ MARKER_SYM= ( symmetry ) MARKER_PLOTTING= ( wall ) MARKER_MONITORING= ( wall ) % ------------------------ WALL FUNCTION DEFINITION --------------------------% +% MARKER_WALL_FUNCTIONS= ( wall, STANDARD_WALL_FUNCTION ) WALLMODEL_KAPPA= 0.41 WALLMODEL_B= 5.5 WALLMODEL_MINYPLUS= 5.0 WALLMODEL_MAXITER= 200 WALLMODEL_RELFAC= 0.5 +% % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% NUM_METHOD_GRAD= GREEN_GAUSS -CFL_NUMBER= 1000.0 +CFL_NUMBER= 1e2 CFL_ADAPT= NO ITER= 1000 +% ------------------------ LINEAR SOLVER DEFINITION ---------------------------% +% +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= ILU +LINEAR_SOLVER_ERROR= 1e-15 +LINEAR_SOLVER_ITER= 10 +% % -------------------------- MULTIGRID PARAMETERS -----------------------------% MGLEVEL= 0 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% @@ -64,19 +74,21 @@ MUSCL_TURB= NO SLOPE_LIMITER_TURB= NONE TIME_DISCRE_TURB= EULER_IMPLICIT % --------------------------- CONVERGENCE PARAMETERS --------------------------% -CONV_RESIDUAL_MINVAL= -15 +CONV_RESIDUAL_MINVAL= -17 CONV_STARTITER= 10 CONV_CAUCHY_ELEMS= 100 CONV_CAUCHY_EPS= 1E-6 % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% +% MESH_FILENAME= ../mesh_flatplate_140x100.su2 MESH_FORMAT= SU2 -SOLUTION_FILENAME= solution_flow.dat -TABULAR_FORMAT= CSV -CONV_FILENAME= history -RESTART_FILENAME= restart_flow.dat -VOLUME_FILENAME= flow -SURFACE_FILENAME= surface_flow -OUTPUT_WRT_FREQ= 1000 +% +SCREEN_OUTPUT= (INNER_ITER, WALL_TIME, RMS_PRESSURE, RMS_VELOCITY-X, RMS_VELOCITY-Y, RMS_TEMPERATURE, RMS_TKE, RMS_DISSIPATION, \ + LINSOL_ITER, LINSOL_RESIDUAL, LIFT, DRAG) +SCREEN_WRT_FREQ_INNER= 10 +% HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF, FLOW_COEFF) -SCREEN_OUTPUT= (INNER_ITER, WALL_TIME, RMS_TKE, RMS_DISSIPATION, LIFT, DRAG) +% +OUTPUT_FILES= RESTART, PARAVIEW_MULTIBLOCK +VOLUME_OUTPUT= RESIDUAL +OUTPUT_WRT_FREQ= 1000 From 437d1fc442532377dc72b0fffed21ce0c659ce82 Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Thu, 30 Sep 2021 15:49:49 +0200 Subject: [PATCH 75/88] Add '_' in some var names to be consistent with cfg. Plus some smaller comment changes. --- Common/include/CConfig.hpp | 36 +++++++++---------- Common/src/CConfig.cpp | 10 +++--- Common/src/wall_model.cpp | 2 +- .../include/solvers/CFVMFlowSolverBase.inl | 2 +- SU2_CFD/src/solvers/CIncNSSolver.cpp | 12 +++---- SU2_CFD/src/solvers/CNSSolver.cpp | 12 +++---- SU2_CFD/src/solvers/CTurbSASolver.cpp | 6 ++-- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 6 ++-- 8 files changed, 43 insertions(+), 43 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 31d6bd0b9e9..c2f5462103d 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -766,7 +766,6 @@ class CConfig { Wrt_Projected_Sensitivity, /*!< \brief Write projected sensitivities (dJ/dx) on surfaces to ASCII file. */ Plot_Section_Forces; /*!< \brief Write sectional forces for specified markers. */ unsigned short - wallModelMaxIter, /*!< \brief maximum number of iterations for the Newton method for the wall model */ Console_Output_Verb, /*!< \brief Level of verbosity for console output */ Kind_Average; /*!< \brief Particular average for the marker analyze. */ su2double Gamma, /*!< \brief Ratio of specific heats of the gas. */ @@ -822,12 +821,13 @@ class CConfig { Pressure_Thermodynamic, /*!< \brief Thermodynamic pressure of the fluid. */ Temperature_FreeStream, /*!< \brief Total temperature of the fluid. */ Temperature_ve_FreeStream; /*!< \brief Total vibrational-electronic temperature of the fluid. */ - su2double Prandtl_Lam, /*!< \brief Laminar Prandtl number for the gas. */ - Prandtl_Turb, /*!< \brief Turbulent Prandtl number for the gas. */ - wallModelKappa, /*!< \brief von Karman constant kappa for turbulence wall modeling */ - wallModelB, /*!< \brief constant B for turbulence wall modeling */ - wallModelRelFac, /*!< \brief relaxation factor for the Newton method used in the wall model */ - wallModelMinYplus, /*!< \brief minimum Y+ value, below which the wall model is not used anymore */ + unsigned short wallModel_MaxIter; /*!< \brief maximum number of iterations for the Newton method for the wall model */ + su2double wallModel_Kappa, /*!< \brief von Karman constant kappa for turbulence wall modeling */ + wallModel_B, /*!< \brief constant B for turbulence wall modeling */ + wallModel_RelFac, /*!< \brief relaxation factor for the Newton method used in the wall model */ + wallModel_MinYplus; /*!< \brief minimum Y+ value, below which the wall model is not used anymore */ + su2double Prandtl_Lam, /*!< \brief Laminar Prandtl number for the gas. */ + Prandtl_Turb, /*!< \brief Turbulent Prandtl number for the gas. */ Length_Ref, /*!< \brief Reference length for non-dimensionalization. */ Pressure_Ref, /*!< \brief Reference pressure for non-dimensionalization. */ Temperature_Ref, /*!< \brief Reference temperature for non-dimensionalization.*/ @@ -1674,31 +1674,31 @@ class CConfig { * \brief Get the value of the von Karman constant kappa for turbulence wall modeling. * \return von Karman constant. */ - su2double GetwallModelKappa(void) const { return wallModelKappa; } + su2double GetwallModel_Kappa() const { return wallModel_Kappa; } /*! * \brief Get the value of the max. number of Newton iterations for turbulence wall modeling. - * \return max number of iterations. + * \return Max number of iterations. */ - unsigned short GetwallModelMaxIter() const { return wallModelMaxIter; } + unsigned short GetwallModel_MaxIter() const { return wallModel_MaxIter; } /*! * \brief Get the value of the relaxation factor for turbulence wall modeling. - * \return relaxation factor. + * \return Relaxation factor. */ - su2double GetwallModelRelFac() const { return wallModelRelFac; } + su2double GetwallModel_RelFac() const { return wallModel_RelFac; } /*! - * \brief Get the value of the minimum Y+ value below which the wall function is deactivated - * \return minimum Y+ value. + * \brief Get the value of the minimum Y+ value below which the wall function is deactivated. + * \return Minimum Y+ value. */ - su2double GetwallModelMinYPlus() const { return wallModelMinYplus; } + su2double GetwallModel_MinYPlus() const { return wallModel_MinYplus; } /*! - * \brief Get the value of the von Karman constant kappa for turbulence wall modeling. - * \return von Karman constant. + * \brief Get the value of the wall model constant B for turbulence wall modeling. + * \return Wall model constant B. */ - su2double GetwallModelB(void) const { return wallModelB; } + su2double GetwallModel_B() const { return wallModel_B; } /*! * \brief Get the value of the thermal diffusivity for solids. diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 864d643ab69..96c21813282 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1224,15 +1224,15 @@ void CConfig::SetConfig_Options() { /*!\brief PRANDTL_TURB \n DESCRIPTION: Turbulent Prandtl number (0.9 (air), only for compressible flows) \n DEFAULT 0.90 \ingroup Config*/ addDoubleOption("PRANDTL_TURB", Prandtl_Turb, 0.90); /*!\brief WALLMODEL_KAPPA \n DESCRIPTION: von Karman constant used for the wall model \n DEFAULT 0.41 \ingroup Config*/ - addDoubleOption("WALLMODEL_KAPPA", wallModelKappa, 0.41); + addDoubleOption("WALLMODEL_KAPPA", wallModel_Kappa, 0.41); /*!\brief WALLMODEL_MAXITER \n DESCRIPTION: Max iterations used for the wall model \n DEFAULT 200 \ingroup Config*/ - addUnsignedShortOption("WALLMODEL_MAXITER", wallModelMaxIter, 200); + addUnsignedShortOption("WALLMODEL_MAXITER", wallModel_MaxIter, 200); /*!\brief WALLMODEL_RELFAC \n DESCRIPTION: Relaxation factor used for the wall model \n DEFAULT 0.5 \ingroup Config*/ - addDoubleOption("WALLMODEL_RELFAC", wallModelRelFac, 0.5); + addDoubleOption("WALLMODEL_RELFAC", wallModel_RelFac, 0.5); /*!\brief WALLMODEL_MINYPLUS \n DESCRIPTION: lower limit for Y+ used for the wall model \n DEFAULT 5.0 \ingroup Config*/ - addDoubleOption("WALLMODEL_MINYPLUS", wallModelMinYplus, 5.0); + addDoubleOption("WALLMODEL_MINYPLUS", wallModel_MinYplus, 5.0); /*!\brief WALLMODEL_B \n DESCRIPTION: constant B used for the wall model \n DEFAULT 5.0 \ingroup Config*/ - addDoubleOption("WALLMODEL_B", wallModelB, 5.5); + addDoubleOption("WALLMODEL_B", wallModel_B, 5.5); /*!\brief BULK_MODULUS \n DESCRIPTION: Value of the Bulk Modulus \n DEFAULT 1.42E5 \ingroup Config*/ addDoubleOption("BULK_MODULUS", Bulk_Modulus, 1.42E5); /* DESCRIPTION: Epsilon^2 multipier in Beta calculation for incompressible preconditioner. */ diff --git a/Common/src/wall_model.cpp b/Common/src/wall_model.cpp index 64d704dbc62..a8e3482d363 100644 --- a/Common/src/wall_model.cpp +++ b/Common/src/wall_model.cpp @@ -41,7 +41,7 @@ CWallModel::CWallModel(CConfig *config) { Pr_lam = config->GetPrandtl_Lam(); Pr_turb = config->GetPrandtl_Turb(); - karman = config->GetwallModelKappa(); // von Karman constant -> k = 0.41; or 0.38; + karman = config->GetwallModel_Kappa(); // von Karman constant -> k = 0.41; or 0.38; } void CWallModel::WallShearStressAndHeatFlux(const su2double rhoExchange, diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index ef4e5cf12d8..9243a512992 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2398,7 +2398,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr UnitNormal[3] = {0.0}, TauElem[3] = {0.0}, Tau[3][3] = {{0.0}}, Cp, thermal_conductivity, MaxNorm = 8.0, Grad_Vel[3][3] = {{0.0}}, Grad_Temp[3] = {0.0}, AxiFactor; const su2double *Coord = nullptr, *Coord_Normal = nullptr, *Normal = nullptr; - const su2double minYPlus = config->GetwallModelMinYPlus(); + const su2double minYPlus = config->GetwallModel_MinYPlus(); string Marker_Tag, Monitoring_Tag; diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 81ecd0a0673..433ca4b5326 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -653,8 +653,8 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container const su2double Gas_Constant = config->GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; const su2double tol = 1e-12; /*!< \brief convergence criterium for the Newton solver, note that 1e-10 is too large */ - const unsigned short max_iter = config->GetwallModelMaxIter(); - const su2double relax = config->GetwallModelRelFac(); + const unsigned short max_iter = config->GetwallModel_MaxIter(); + const su2double relax = config->GetwallModel_RelFac(); /*--- Compute the recovery factor * use Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) ---*/ @@ -663,8 +663,8 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container /*--- Typical constants from boundary layer theory ---*/ - const su2double kappa = config->GetwallModelKappa(); - const su2double B = config->GetwallModelB(); + const su2double kappa = config->GetwallModel_Kappa(); + const su2double B = config->GetwallModel_B(); for (auto iMarker = 0u; iMarker < config->GetnMarker_All(); iMarker++) { @@ -780,13 +780,13 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container unsigned long counter = 0; su2double diff = 1.0; su2double U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall)); - su2double Y_Plus = 0.99*config->GetwallModelMinYPlus(); // use clipping value as minimum + su2double Y_Plus = 0.99*config->GetwallModel_MinYPlus(); // use clipping value as minimum su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; /*--- Automatic switch off when y+ < "limit" according to Nichols & Nelson (2004) ---*/ - if (Y_Plus_Start < config->GetwallModelMinYPlus()) { + if (Y_Plus_Start < config->GetwallModel_MinYPlus()) { smallYPlusCounter++; continue; } diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 4f264130d05..26465a386d9 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -795,8 +795,8 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c const su2double Gas_Constant = config->GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; const su2double tol = 1e-12; /*!< \brief convergence criterium for the Newton solver, note that 1e-10 is too large */ - const unsigned short max_iter = config->GetwallModelMaxIter(); - const su2double relax = config->GetwallModelRelFac(); + const unsigned short max_iter = config->GetwallModel_MaxIter(); + const su2double relax = config->GetwallModel_RelFac(); /*--- Compute the recovery factor * use Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) ---*/ @@ -805,8 +805,8 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- Typical constants from boundary layer theory ---*/ - const su2double kappa = config->GetwallModelKappa(); - const su2double B = config->GetwallModelB(); + const su2double kappa = config->GetwallModel_Kappa(); + const su2double B = config->GetwallModel_B(); for (auto iMarker = 0u; iMarker < config->GetnMarker_All(); iMarker++) { @@ -918,13 +918,13 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c unsigned long counter = 0; su2double diff = 1.0; su2double U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall)); - su2double Y_Plus = 0.99*config->GetwallModelMinYPlus(); // use clipping value as minimum + su2double Y_Plus = 0.99*config->GetwallModel_MinYPlus(); // use clipping value as minimum su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; /*--- Automatic switch off when y+ < "limit" according to Nichols & Nelson (2004) ---*/ - if (Y_Plus_Start < config->GetwallModelMinYPlus()) { + if (Y_Plus_Start < config->GetwallModel_MinYPlus()) { smallYPlusCounter++; continue; } diff --git a/SU2_CFD/src/solvers/CTurbSASolver.cpp b/SU2_CFD/src/solvers/CTurbSASolver.cpp index c05ef0cb019..b909a6ac6a5 100644 --- a/SU2_CFD/src/solvers/CTurbSASolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSASolver.cpp @@ -1273,7 +1273,7 @@ void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contain const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); /*--- We use a very high max nr of iterations, but we only need this the first couple of iterations ---*/ - const unsigned short max_iter = config->GetwallModelMaxIter(); + const unsigned short max_iter = config->GetwallModel_MaxIter(); /* --- tolerance has LARGE impact on convergence, do not increase this value! --- */ const su2double tol = 1e-12; @@ -1300,7 +1300,7 @@ void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contain /*--- Do not use wall model at the ipoint when y+ < "limit" ---*/ - if (Y_Plus < config->GetwallModelMinYPlus()) continue; + if (Y_Plus < config->GetwallModel_MinYPlus()) continue; su2double Lam_Visc_Normal = flow_nodes->GetLaminarViscosity(iPoint_Neighbor); su2double Density_Normal = flow_nodes->GetDensity(iPoint_Neighbor); @@ -1316,7 +1316,7 @@ void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contain unsigned short counter = 0; su2double diff = 1.0; - su2double relax = config->GetwallModelRelFac(); + su2double relax = config->GetwallModel_RelFac(); while (diff > tol) { // note the error in Nichols and Nelson su2double func = pow(nu_til_old,4) - (Eddy_Visc/Density_Normal)*(pow(nu_til_old,3) + pow(Kin_Visc_Normal,3)*cv1_3); diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index e995832cf28..995348fed5f 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -479,10 +479,10 @@ void CTurbSSTSolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contai const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); /*--- von Karman constant from boundary layer theory ---*/ - const su2double kappa = config->GetwallModelKappa(); - const su2double minYPlus = config->GetwallModelMinYPlus(); + const su2double kappa = config->GetwallModel_Kappa(); + const su2double minYPlus = config->GetwallModel_MinYPlus(); /*--- relaxation factor for k-omega values ---*/ - const su2double relax = config->GetwallModelRelFac(); + const su2double relax = config->GetwallModel_RelFac(); /*--- Loop over all of the vertices on this boundary marker ---*/ From 651d669216a53c56e047822fffa6e7b8bb36aafd Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Thu, 30 Sep 2021 15:53:26 +0200 Subject: [PATCH 76/88] Remove unused Wall_Functions Marker from Testcases repo. No need for them to carry a WALL_FUNCTIONS=NO marker around if that case does not intend to use Wall Functions. --- TestCases/disc_adj_euler/arina2k/Arina2KRS.cfg | 4 ---- .../flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg | 4 ---- 2 files changed, 8 deletions(-) diff --git a/TestCases/disc_adj_euler/arina2k/Arina2KRS.cfg b/TestCases/disc_adj_euler/arina2k/Arina2KRS.cfg index dab3898583f..261c9205bd9 100644 --- a/TestCases/disc_adj_euler/arina2k/Arina2KRS.cfg +++ b/TestCases/disc_adj_euler/arina2k/Arina2KRS.cfg @@ -172,10 +172,6 @@ MARKER_PLOTTING = ( WALL1 ) % Marker(s) of the surface where the non-dimensional coefficients are evaluated. MARKER_MONITORING = ( WALL1 ) % -% Viscous wall markers for which wall functions must be applied. (NONE = no marker) -% Format: ( marker name, wall function type, ... ) -MARKER_WALL_FUNCTIONS= ( NONE ) -% % Marker(s) of the surface where custom thermal BC's are defined. MARKER_PYTHON_CUSTOM = ( NONE ) % diff --git a/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg b/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg index 872a6c58e52..ffab73ecea9 100644 --- a/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg +++ b/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg @@ -210,10 +210,6 @@ MARKER_PLOTTING = ( plate ) % Marker(s) of the surface where the non-dimensional coefficients are evaluated. MARKER_MONITORING = ( plate ) % -% Viscous wall markers for which wall functions must be applied. (NONE = no marker) -% Format: ( marker name, wall function type, ... ) -MARKER_WALL_FUNCTIONS= ( plate, NO_WALL_FUNCTION ) -% % Marker(s) of the surface where custom thermal BC's are defined. MARKER_PYTHON_CUSTOM = (plate) % From e48ba407587859d6f484359a887bea85859fdd2e Mon Sep 17 00:00:00 2001 From: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> Date: Thu, 30 Sep 2021 15:58:51 +0200 Subject: [PATCH 77/88] Remove empty added line. --- SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp b/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp index 844eef41626..db05f8d16a6 100644 --- a/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp +++ b/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp @@ -159,7 +159,6 @@ class CCompressibleViscousFluxBase : public CNumericsSIMD { addPerturbedRSM(avgV, avgGrad, turb_ke, tau, uq_eigval_comp, uq_permute, uq_delta_b, uq_urlx); } - if(wallFun) addTauWall(iPoint, jPoint, solution.GetTauWall(), unitNormal, tau); Double cond = derived->thermalConductivity(avgV); From 578822e08bd8520791ee29acdda1315ecfbf6298 Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Fri, 1 Oct 2021 11:33:39 +0200 Subject: [PATCH 78/88] Rename TauWall functions to Tau_Wall to be consistent with var-name. --- SU2_CFD/include/numerics/CNumerics.hpp | 2 +- SU2_CFD/include/numerics/flow/flow_diffusion.hpp | 2 +- .../include/numerics_simd/flow/diffusion/viscous_fluxes.hpp | 2 +- SU2_CFD/include/solvers/CFVMFlowSolverBase.inl | 6 +++--- SU2_CFD/include/solvers/CIncNSSolver.hpp | 2 +- SU2_CFD/include/solvers/CNEMONSSolver.hpp | 2 +- SU2_CFD/include/solvers/CNSSolver.hpp | 2 +- SU2_CFD/include/variables/CIncNSVariable.hpp | 6 +++--- SU2_CFD/include/variables/CNSVariable.hpp | 6 +++--- SU2_CFD/include/variables/CVariable.hpp | 4 ++-- SU2_CFD/src/solvers/CIncNSSolver.cpp | 6 +++--- SU2_CFD/src/solvers/CNEMONSSolver.cpp | 4 ++-- SU2_CFD/src/solvers/CNSSolver.cpp | 6 +++--- 13 files changed, 25 insertions(+), 25 deletions(-) diff --git a/SU2_CFD/include/numerics/CNumerics.hpp b/SU2_CFD/include/numerics/CNumerics.hpp index 111defe50f3..265f89a184a 100644 --- a/SU2_CFD/include/numerics/CNumerics.hpp +++ b/SU2_CFD/include/numerics/CNumerics.hpp @@ -1529,7 +1529,7 @@ class CNumerics { * \param[in] val_tauwall_i - Tauwall at point i * \param[in] val_tauwall_j - Tauwall at point j */ - inline virtual void SetTauWall(su2double val_tauwall_i, su2double val_tauwall_j) { } + inline virtual void SetTau_Wall(su2double val_tauwall_i, su2double val_tauwall_j) { } /*! * \brief - Calculate the central/upwind blending function for a face diff --git a/SU2_CFD/include/numerics/flow/flow_diffusion.hpp b/SU2_CFD/include/numerics/flow/flow_diffusion.hpp index a65b7e12ddd..398f9a834e1 100644 --- a/SU2_CFD/include/numerics/flow/flow_diffusion.hpp +++ b/SU2_CFD/include/numerics/flow/flow_diffusion.hpp @@ -186,7 +186,7 @@ class CAvgGrad_Base : public CNumerics { * \param[in] val_tauwall_i - Value of the wall shear stress at point i. * \param[in] val_tauwall_j - Value of the wall shear stress at point j. */ - inline void SetTauWall(su2double val_tauwall_i, su2double val_tauwall_j) override { + inline void SetTau_Wall(su2double val_tauwall_i, su2double val_tauwall_j) override { TauWall_i = val_tauwall_i; TauWall_j = val_tauwall_j; } diff --git a/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp b/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp index 844eef41626..7e61e6211e3 100644 --- a/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp +++ b/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp @@ -160,7 +160,7 @@ class CCompressibleViscousFluxBase : public CNumericsSIMD { uq_eigval_comp, uq_permute, uq_delta_b, uq_urlx); } - if(wallFun) addTauWall(iPoint, jPoint, solution.GetTauWall(), unitNormal, tau); + if(wallFun) addTauWall(iPoint, jPoint, solution.GetTau_Wall(), unitNormal, tau); Double cond = derived->thermalConductivity(avgV); VectorDbl heatFlux; diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index 9243a512992..6987f01177a 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -443,8 +443,8 @@ void CFVMFlowSolverBase::Viscous_Residual_impl(unsigned long iEdge, CGeome /*--- Wall shear stress values (wall functions) ---*/ - numerics->SetTauWall(nodes->GetTauWall(iPoint), - nodes->GetTauWall(jPoint)); + numerics->SetTau_Wall(nodes->GetTau_Wall(iPoint), + nodes->GetTau_Wall(jPoint)); /*--- Compute and update residual ---*/ @@ -2536,7 +2536,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr /*--- For wall functions, the wall stresses need to be scaled by the wallfunction stress Tau_Wall---*/ su2double Tau_Wall, scale; if (wallfunctions && (YPlus[iMarker][iVertex] > minYPlus)){ - Tau_Wall = nodes->GetTauWall(iPoint); + Tau_Wall = nodes->GetTau_Wall(iPoint); scale = Tau_Wall / WallShearStress[iMarker][iVertex]; for (iDim = 0; iDim < nDim; iDim++) { TauTangent[iDim] *= scale; diff --git a/SU2_CFD/include/solvers/CIncNSSolver.hpp b/SU2_CFD/include/solvers/CIncNSSolver.hpp index 2f0b6ea8224..dac50532fcb 100644 --- a/SU2_CFD/include/solvers/CIncNSSolver.hpp +++ b/SU2_CFD/include/solvers/CIncNSSolver.hpp @@ -71,7 +71,7 @@ class CIncNSSolver final : public CIncEulerSolver { * \param[in] solver_container - Container vector with all the solutions. * \param[in] config - Definition of the particular problem. */ - void SetTauWall_WF(CGeometry *geometry, + void SetTau_Wall_WF(CGeometry *geometry, CSolver** solver_container, const CConfig* config); diff --git a/SU2_CFD/include/solvers/CNEMONSSolver.hpp b/SU2_CFD/include/solvers/CNEMONSSolver.hpp index 78b91114fb6..fbe74536735 100644 --- a/SU2_CFD/include/solvers/CNEMONSSolver.hpp +++ b/SU2_CFD/include/solvers/CNEMONSSolver.hpp @@ -70,7 +70,7 @@ class CNEMONSSolver final : public CNEMOEulerSolver { * \param[in] solver_container - Container vector with all the solutions. * \param[in] config - Definition of the particular problem. */ - void SetTauWall_WF(CGeometry *geometry, CSolver** solver_container, const CConfig* config); + void SetTau_Wall_WF(CGeometry *geometry, CSolver** solver_container, const CConfig* config); public: diff --git a/SU2_CFD/include/solvers/CNSSolver.hpp b/SU2_CFD/include/solvers/CNSSolver.hpp index 38f99d1f4d0..2680ec9dc20 100644 --- a/SU2_CFD/include/solvers/CNSSolver.hpp +++ b/SU2_CFD/include/solvers/CNSSolver.hpp @@ -121,7 +121,7 @@ class CNSSolver final : public CEulerSolver { * \param[in] solver_container - Container vector with all the solutions. * \param[in] config - Definition of the particular problem. */ - void SetTauWall_WF(CGeometry *geometry, CSolver** solver_container, const CConfig* config); + void SetTau_Wall_WF(CGeometry *geometry, CSolver** solver_container, const CConfig* config); public: /*! diff --git a/SU2_CFD/include/variables/CIncNSVariable.hpp b/SU2_CFD/include/variables/CIncNSVariable.hpp index 23a05aade29..1a5f6fbec66 100644 --- a/SU2_CFD/include/variables/CIncNSVariable.hpp +++ b/SU2_CFD/include/variables/CIncNSVariable.hpp @@ -104,14 +104,14 @@ class CIncNSVariable final : public CIncEulerVariable { /*! * \brief Set the value of the wall shear stress computed by a wall function. */ - inline void SetTauWall(unsigned long iPoint, su2double val_tau_wall) override { Tau_Wall(iPoint) = val_tau_wall; } + inline void SetTau_Wall(unsigned long iPoint, su2double val_tau_wall) override { Tau_Wall(iPoint) = val_tau_wall; } /*! * \brief Get the value of the wall shear stress computed by a wall function. * \return Value of the wall shear stress computed by a wall function. */ - inline su2double GetTauWall(unsigned long iPoint) const override { return Tau_Wall(iPoint); } - inline const VectorType& GetTauWall() const { return Tau_Wall; } + inline su2double GetTau_Wall(unsigned long iPoint) const override { return Tau_Wall(iPoint); } + inline const VectorType& GetTau_Wall() const { return Tau_Wall; } /*! * \brief Set the DES Length Scale. diff --git a/SU2_CFD/include/variables/CNSVariable.hpp b/SU2_CFD/include/variables/CNSVariable.hpp index 250910027d5..cb5dfc484ba 100644 --- a/SU2_CFD/include/variables/CNSVariable.hpp +++ b/SU2_CFD/include/variables/CNSVariable.hpp @@ -158,14 +158,14 @@ class CNSVariable final : public CEulerVariable { /*! * \brief Set the value of the wall shear stress computed by a wall function. */ - inline void SetTauWall(unsigned long iPoint, su2double val_tau_wall) override { Tau_Wall(iPoint) = val_tau_wall; } + inline void SetTau_Wall(unsigned long iPoint, su2double val_tau_wall) override { Tau_Wall(iPoint) = val_tau_wall; } /*! * \brief Get the value of the wall shear stress computed by a wall function. * \return Value of the wall shear stress computed by a wall function. */ - inline su2double GetTauWall(unsigned long iPoint) const override { return Tau_Wall(iPoint); } - inline const VectorType& GetTauWall() const { return Tau_Wall; } + inline su2double GetTau_Wall(unsigned long iPoint) const override { return Tau_Wall(iPoint); } + inline const VectorType& GetTau_Wall() const { return Tau_Wall; } /*! * \brief Get the DES length scale diff --git a/SU2_CFD/include/variables/CVariable.hpp b/SU2_CFD/include/variables/CVariable.hpp index 7acc31f7fbe..e3cf0029578 100644 --- a/SU2_CFD/include/variables/CVariable.hpp +++ b/SU2_CFD/include/variables/CVariable.hpp @@ -2153,9 +2153,9 @@ class CVariable { */ inline virtual su2double GetSensitivity(unsigned long iPoint, unsigned long iDim) const { return 0.0; } - inline virtual void SetTauWall(unsigned long iPoint, su2double val_tau_wall) {} + inline virtual void SetTau_Wall(unsigned long iPoint, su2double val_tau_wall) {} - inline virtual su2double GetTauWall(unsigned long iPoint) const { return 0.0; } + inline virtual su2double GetTau_Wall(unsigned long iPoint) const { return 0.0; } inline virtual void SetVortex_Tilting(unsigned long iPoint, CMatrixView PrimGrad_Flow, const su2double* Vorticity, su2double LaminarViscosity) {} diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 433ca4b5326..672e6adff1b 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -102,7 +102,7 @@ void CIncNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container if (wall_functions) { SU2_OMP_MASTER - SetTauWall_WF(geometry, solver_container, config); + SetTau_Wall_WF(geometry, solver_container, config); END_SU2_OMP_MASTER // nijso: we have to set this as well?? // seteddyviscfirstpoint @@ -642,7 +642,7 @@ void CIncNSSolver::BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **sol END_SU2_OMP_FOR } -void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config) { +void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config) { /*--- The wall function implemented herein is based on Nichols and Nelson, AIAA J. v32 n6 2004. ---*/ @@ -855,7 +855,7 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container su2double Tau_Wall = (1.0/Density_Wall)*pow(Y_Plus*Lam_Visc_Wall/WallDistMod,2.0); /*--- Store this value for the wall shear stress at the node. ---*/ - nodes->SetTauWall(iPoint, Tau_Wall); + nodes->SetTau_Wall(iPoint, Tau_Wall); } END_SU2_OMP_FOR diff --git a/SU2_CFD/src/solvers/CNEMONSSolver.cpp b/SU2_CFD/src/solvers/CNEMONSSolver.cpp index 6235c5f453a..7315da3a529 100644 --- a/SU2_CFD/src/solvers/CNEMONSSolver.cpp +++ b/SU2_CFD/src/solvers/CNEMONSSolver.cpp @@ -99,7 +99,7 @@ void CNEMONSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_containe ComputeVorticityAndStrainMag(*config, iMesh, offset); if (wall_functions) { - SetTauWall_WF(geometry, solver_container, config); + SetTau_Wall_WF(geometry, solver_container, config); } } @@ -1068,6 +1068,6 @@ void CNEMONSSolver::BC_Smoluchowski_Maxwell(CGeometry *geometry, END_SU2_OMP_FOR } -void CNEMONSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config) { +void CNEMONSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config) { SU2_MPI::Error("Wall Functions not yet operational in NEMO.", CURRENT_FUNCTION); } diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 26465a386d9..cea772cc119 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -121,7 +121,7 @@ void CNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container, C /*--- Compute the TauWall from the wall functions ---*/ if (wall_functions) { - SetTauWall_WF(geometry, solver_container, config); + SetTau_Wall_WF(geometry, solver_container, config); } } @@ -784,7 +784,7 @@ void CNSSolver::BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **solver BC_Isothermal_Wall_Generic(geometry, solver_container, conv_numerics, nullptr, config, val_marker, true); } -void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config) { +void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config) { /*--- The wall function implemented herein is based on Nichols and Nelson, AIAA J. v32 n6 2004. ---*/ @@ -1012,7 +1012,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /*--- Store this value for the wall shear stress at the node. ---*/ - nodes->SetTauWall(iPoint, Tau_Wall); + nodes->SetTau_Wall(iPoint, Tau_Wall); } END_SU2_OMP_FOR From 3daef8509aef426c416dc3231e10aca435515fc9 Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Fri, 1 Oct 2021 11:36:19 +0200 Subject: [PATCH 79/88] Update reg test vals. Adding more screen output fields. --- TestCases/serial_regression.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 7dbf07c34bb..817e6253a47 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -321,7 +321,7 @@ def main(): turb_wallfunction_flatplate_sst.cfg_dir = "wallfunctions/flatplate/compressible_SST" turb_wallfunction_flatplate_sst.cfg_file = "turb_SST_flatplate.cfg" turb_wallfunction_flatplate_sst.test_iter = 10 - turb_wallfunction_flatplate_sst.test_vals = [-1.624124, 1.785764, -2.829997, 0.002593] #last 4 columns + turb_wallfunction_flatplate_sst.test_vals = [-4.230000, -1.930543, -1.998684, 1.250334, -1.635534, 1.462491, 10, -2.151894, 0.072872, 0.002514] #last 10 columns turb_wallfunction_flatplate_sst.su2_exec = "SU2_CFD" turb_wallfunction_flatplate_sst.timeout = 1600 turb_wallfunction_flatplate_sst.tol = 0.00001 @@ -332,7 +332,7 @@ def main(): turb_wallfunction_flatplate_sa.cfg_dir = "wallfunctions/flatplate/compressible_SA" turb_wallfunction_flatplate_sa.cfg_file = "turb_SA_flatplate.cfg" turb_wallfunction_flatplate_sa.test_iter = 10 - turb_wallfunction_flatplate_sa.test_vals = [-4.436048, -5.393726, 0.069744, 0.002686] #last 4 columns + turb_wallfunction_flatplate_sa.test_vals = [-4.436048, -2.044706, -2.114644, 0.979771, -5.393729, 10, -1.589465, 0.069744, 0.002686] #last 9 columns turb_wallfunction_flatplate_sa.su2_exec = "SU2_CFD" turb_wallfunction_flatplate_sa.timeout = 1600 turb_wallfunction_flatplate_sa.tol = 0.00001 @@ -575,7 +575,7 @@ def main(): inc_turb_wallfunction_flatplate_sst.cfg_dir = "wallfunctions/flatplate/incompressible_SST" inc_turb_wallfunction_flatplate_sst.cfg_file = "turb_SST_flatplate.cfg" inc_turb_wallfunction_flatplate_sst.test_iter = 10 - inc_turb_wallfunction_flatplate_sst.test_vals = [-7.629242, -2.680155, 0.001857, 0.002187] #last 4 columns + inc_turb_wallfunction_flatplate_sst.test_vals = [-6.561293, -5.730190, -6.305916, -4.230297, -7.164083, -2.047256, 10, -2.941818, 0.000974, 0.003195] #last 10 columns inc_turb_wallfunction_flatplate_sst.su2_exec = "SU2_CFD" inc_turb_wallfunction_flatplate_sst.timeout = 1600 inc_turb_wallfunction_flatplate_sst.tol = 0.00001 @@ -586,7 +586,7 @@ def main(): inc_turb_wallfunction_flatplate_sa.cfg_dir = "wallfunctions/flatplate/incompressible_SA" inc_turb_wallfunction_flatplate_sa.cfg_file = "turb_SA_flatplate.cfg" inc_turb_wallfunction_flatplate_sa.test_iter = 10 - inc_turb_wallfunction_flatplate_sa.test_vals = [0.055660, -9.556782, 0.002294, 0.001011] #last 4 columns + inc_turb_wallfunction_flatplate_sa.test_vals = [-6.561221, -5.718427, -6.306321, -4.230222, -9.586624, 10, -2.927239, 0.000858, 0.003794 ] #last 9 columns inc_turb_wallfunction_flatplate_sa.su2_exec = "SU2_CFD" inc_turb_wallfunction_flatplate_sa.timeout = 1600 inc_turb_wallfunction_flatplate_sa.tol = 0.00001 From dde0a9f9c871aa07c400cf83f47bc09b579f602a Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Thu, 7 Oct 2021 10:40:49 +0200 Subject: [PATCH 80/88] Remove unnecessary nondim. All values come from the solver itself. And not from the config. --- SU2_CFD/src/solvers/CIncNSSolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 672e6adff1b..c06b30ddc1e 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -743,7 +743,7 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe if (config->GetMarker_All_KindBC(iMarker) == ISOTHERMAL) { const su2double T_n = nodes->GetTemperature(Point_Normal); - q_w = Conductivity_Wall * (T_Wall - T_n) / (WallDistMod*config->GetHeat_Flux_Ref()); + q_w = Conductivity_Wall * (T_Wall - T_n) / (WallDistMod); } else if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) { q_w = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); From 194692ccd6f25fda7e2cb8da7b81fceb11d931d0 Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Thu, 7 Oct 2021 10:42:25 +0200 Subject: [PATCH 81/88] Const-ing vars in SetTau_Wall_WF func for NS and IncNS. Plus some other minor cosmetic things. --- SU2_CFD/src/solvers/CIncNSSolver.cpp | 62 ++++++++++++++-------------- SU2_CFD/src/solvers/CNSSolver.cpp | 53 ++++++++++++------------ 2 files changed, 57 insertions(+), 58 deletions(-) diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index c06b30ddc1e..09bbcf988a1 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -643,21 +643,17 @@ void CIncNSSolver::BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **sol } void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, const CConfig *config) { - /*--- - The wall function implemented herein is based on Nichols and Nelson, AIAA J. v32 n6 2004. - ---*/ + /*--- The wall function implemented herein is based on Nichols and Nelson, AIAA J. v32 n6 2004. ---*/ - unsigned long notConvergedCounter = 0; /*--- counts the number of wall cells that are not converged ---*/ - unsigned long smallYPlusCounter = 0; /*--- counts the number of wall cells where y+ < 5 ---*/ + unsigned long notConvergedCounter = 0; /*--- Counts the number of wall cells that are not converged ---*/ + unsigned long smallYPlusCounter = 0; /*--- Counts the number of wall cells where y+ < 5 ---*/ const su2double Gas_Constant = config->GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; - const su2double tol = 1e-12; /*!< \brief convergence criterium for the Newton solver, note that 1e-10 is too large */ - const unsigned short max_iter = config->GetwallModel_MaxIter(); + const auto max_iter = config->GetwallModel_MaxIter(); const su2double relax = config->GetwallModel_RelFac(); - /*--- Compute the recovery factor - * use Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) ---*/ + /*--- Compute the recovery factor use Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) ---*/ const su2double Recovery = pow(config->GetPrandtl_Lam(), (1.0/3.0)); @@ -701,7 +697,7 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe const auto Normal = geometry->vertex[iMarker][iVertex]->GetNormal(); - su2double Area = GeometryToolbox::Norm(nDim, Normal); + const su2double Area = GeometryToolbox::Norm(nDim, Normal); su2double UnitNormal[MAXNDIM] = {0.0}; for (auto iDim = 0u; iDim < nDim; iDim++) @@ -716,13 +712,13 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe /*--- Compute the wall-parallel velocity at first point off the wall ---*/ - su2double VelNormal = GeometryToolbox::DotProduct(int(MAXNDIM), Vel, UnitNormal); + const su2double VelNormal = GeometryToolbox::DotProduct(int(MAXNDIM), Vel, UnitNormal); su2double VelTang[MAXNDIM] = {0.0}; for (auto iDim = 0u; iDim < nDim; iDim++) VelTang[iDim] = Vel[iDim] - VelNormal*UnitNormal[iDim]; - su2double VelTangMod = GeometryToolbox::Norm(int(MAXNDIM), VelTang); + const su2double VelTangMod = GeometryToolbox::Norm(int(MAXNDIM), VelTang); /*--- Compute normal distance of the interior point from the wall ---*/ @@ -735,9 +731,9 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe * In incompressible flows, we can assume that there is no velocity-related * temperature change Prandtl: T+ = Pr*y+ ---*/ su2double T_Wall = nodes->GetTemperature(iPoint); - su2double Conductivity_Wall = nodes->GetThermalConductivity(iPoint); + const su2double Conductivity_Wall = nodes->GetThermalConductivity(iPoint); - /*--- if a wall temperature was given, we compute the local heat flux using k*dT/dn ---*/ + /*--- If a wall temperature was given, we compute the local heat flux using k*dT/dn ---*/ su2double q_w = 0.0; @@ -746,24 +742,25 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe q_w = Conductivity_Wall * (T_Wall - T_n) / (WallDistMod); } else if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) { - q_w = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); + q_w = config->GetWall_HeatFlux(Marker_Tag) / config->GetHeat_Flux_Ref(); } else if (config->GetMarker_All_KindBC(iMarker) == HEAT_TRANSFER) { - const su2double Transfer_Coefficient = config->GetWall_HeatTransfer_Coefficient(Marker_Tag) * config->GetTemperature_Ref()/config->GetHeat_Flux_Ref(); - const su2double Tinfinity = config->GetWall_HeatTransfer_Temperature(Marker_Tag)/config->GetTemperature_Ref(); + const su2double Transfer_Coefficient = config->GetWall_HeatTransfer_Coefficient(Marker_Tag) * + config->GetTemperature_Ref()/config->GetHeat_Flux_Ref(); + const su2double Tinfinity = config->GetWall_HeatTransfer_Temperature(Marker_Tag) / config->GetTemperature_Ref(); q_w = Transfer_Coefficient * (Tinfinity - T_Wall); } - /*--- incompressible formulation ---*/ + /*--- Incompressible formulation ---*/ su2double Density_Wall = nodes->GetDensity(iPoint); - su2double Lam_Visc_Normal = nodes->GetLaminarViscosity(Point_Normal); + const su2double Lam_Visc_Normal = nodes->GetLaminarViscosity(Point_Normal); /*--- Compute the shear stress at the wall in the regular fashion * by using the stress tensor on the surface ---*/ su2double tau[MAXNDIM][MAXNDIM] = {{0.0}}; - su2double Lam_Visc_Wall = nodes->GetLaminarViscosity(iPoint); + const su2double Lam_Visc_Wall = nodes->GetLaminarViscosity(iPoint); su2double Eddy_Visc_Wall = nodes->GetEddyViscosity(iPoint); CNumerics::ComputeStressTensor(nDim, tau, nodes->GetGradient_Primitive(iPoint)+1, Lam_Visc_Wall); @@ -771,7 +768,7 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe su2double TauTangent[MAXNDIM] = {0.0}; GeometryToolbox::TangentProjection(nDim, tau, UnitNormal, TauTangent); - su2double WallShearStress = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); + const su2double WallShearStress = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); /*--- Calculate the quantities from boundary layer theory and * iteratively solve for a new wall shear stress. Use the current wall @@ -782,7 +779,7 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe su2double U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall)); su2double Y_Plus = 0.99*config->GetwallModel_MinYPlus(); // use clipping value as minimum - su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; + const su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; /*--- Automatic switch off when y+ < "limit" according to Nichols & Nelson (2004) ---*/ @@ -790,29 +787,32 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe smallYPlusCounter++; continue; } + + /*--- Convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ + const su2double tol = 1e-12; while (fabs(diff) > tol) { /*--- Friction velocity and u+ ---*/ - su2double U_Plus = VelTangMod/U_Tau; + const su2double U_Plus = VelTangMod/U_Tau; /*--- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) page 1110 ---*/ - su2double Gam = Recovery*U_Tau*U_Tau/(2.0*Cp*T_Wall); - su2double Beta = q_w*Lam_Visc_Wall/(Density_Wall*T_Wall*Conductivity_Wall*U_Tau); - su2double Q = sqrt(Beta*Beta + 4.0*Gam); - su2double Phi = asin(-1.0*Beta/Q); + const su2double Gam = Recovery*U_Tau*U_Tau/(2.0*Cp*T_Wall); + const su2double Beta = q_w*Lam_Visc_Wall/(Density_Wall*T_Wall*Conductivity_Wall*U_Tau); + const su2double Q = sqrt(Beta*Beta + 4.0*Gam); + const su2double Phi = asin(-1.0*Beta/Q); /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ - su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); + const su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); /*--- Spalding's universal form for the BL velocity with the * outer velocity form of White & Christoph above. ---*/ const su2double kUp = kappa*U_Plus; Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); - su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); + const su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); Eddy_Visc_Wall = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp(-1.0*kappa*B)* (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0) @@ -825,7 +825,7 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe /* --- Gradient of function defined above --- */ - su2double grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + + const su2double grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + kappa /(U_Tau * sqrt(Gam)) * asin(U_Plus * sqrt(Gam)) * Y_Plus_White - exp(-1.0 * B * kappa) * (0.5 * pow(VelTangMod * kappa / U_Tau, 3) + pow(VelTangMod * kappa / U_Tau, 2) + VelTangMod * kappa / U_Tau) / U_Tau; @@ -852,7 +852,7 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe EddyViscWall[iMarker][iVertex] = Eddy_Visc_Wall; UTau[iMarker][iVertex] = U_Tau; - su2double Tau_Wall = (1.0/Density_Wall)*pow(Y_Plus*Lam_Visc_Wall/WallDistMod,2.0); + const su2double Tau_Wall = (1.0/Density_Wall)*pow(Y_Plus*Lam_Visc_Wall/WallDistMod,2.0); /*--- Store this value for the wall shear stress at the node. ---*/ nodes->SetTau_Wall(iPoint, Tau_Wall); diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index cea772cc119..c2e28f86aaf 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -843,7 +843,7 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, const auto Normal = geometry->vertex[iMarker][iVertex]->GetNormal(); - su2double Area = GeometryToolbox::Norm(nDim, Normal); + const su2double Area = GeometryToolbox::Norm(nDim, Normal); su2double UnitNormal[MAXNDIM] = {0.0}; for (auto iDim = 0u; iDim < nDim; iDim++) @@ -856,52 +856,51 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, for (auto iDim = 0u; iDim < nDim; iDim++) Vel[iDim] = nodes->GetVelocity(Point_Normal,iDim); - su2double P_Normal = nodes->GetPressure(Point_Normal); - su2double T_Normal = nodes->GetTemperature(Point_Normal); + const su2double P_Normal = nodes->GetPressure(Point_Normal); + const su2double T_Normal = nodes->GetTemperature(Point_Normal); /*--- Compute the wall-parallel velocity at first point off the wall ---*/ - su2double VelNormal = GeometryToolbox::DotProduct(int(MAXNDIM), Vel, UnitNormal); + const su2double VelNormal = GeometryToolbox::DotProduct(int(MAXNDIM), Vel, UnitNormal); su2double VelTang[MAXNDIM] = {0.0}; for (auto iDim = 0u; iDim < nDim; iDim++) VelTang[iDim] = Vel[iDim] - VelNormal*UnitNormal[iDim]; - su2double VelTangMod = GeometryToolbox::Norm(int(MAXNDIM), VelTang); + const su2double VelTangMod = GeometryToolbox::Norm(int(MAXNDIM), VelTang); /*--- Compute normal distance of the interior point from the wall ---*/ su2double WallDist[MAXNDIM] = {0.0}; GeometryToolbox::Distance(nDim, Coord, Coord_Normal, WallDist); - su2double WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); + const su2double WallDistMod = GeometryToolbox::Norm(int(MAXNDIM), WallDist); - /*--- initial value for wall temperature ---*/ + /*--- Initial value for wall temperature ---*/ - su2double q_w = 0.0; if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) { - q_w = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); + q_w = config->GetWall_HeatFlux(Marker_Tag) / config->GetHeat_Flux_Ref(); } /*--- Extrapolate the pressure from the interior & compute the wall density using the equation of state ---*/ - /*--- compressible formulation ---*/ + /*--- Compressible formulation ---*/ su2double T_Wall = nodes->GetTemperature(iPoint); - su2double P_Wall = P_Normal; - su2double Density_Wall = P_Wall/(Gas_Constant*T_Wall); - su2double Lam_Visc_Normal = nodes->GetLaminarViscosity(Point_Normal); - su2double Conductivity_Wall = nodes->GetThermalConductivity(iPoint); + const su2double P_Wall = P_Normal; + su2double Density_Wall = P_Wall / (Gas_Constant * T_Wall); + const su2double Lam_Visc_Normal = nodes->GetLaminarViscosity(Point_Normal); + const su2double Conductivity_Wall = nodes->GetThermalConductivity(iPoint); /*--- Compute the shear stress at the wall in the regular fashion * by using the stress tensor on the surface ---*/ su2double tau[MAXNDIM][MAXNDIM] = {{0.0}}; - su2double Lam_Visc_Wall = nodes->GetLaminarViscosity(iPoint); + const su2double Lam_Visc_Wall = nodes->GetLaminarViscosity(iPoint); su2double Eddy_Visc_Wall = nodes->GetEddyViscosity(iPoint); CNumerics::ComputeStressTensor(nDim, tau, nodes->GetGradient_Primitive(iPoint)+1, Lam_Visc_Wall); @@ -909,7 +908,7 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, su2double TauTangent[MAXNDIM] = {0.0}; GeometryToolbox::TangentProjection(nDim, tau, UnitNormal, TauTangent); - su2double WallShearStress = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); + const su2double WallShearStress = GeometryToolbox::Norm(int(MAXNDIM), TauTangent); /*--- Calculate the quantities from boundary layer theory and * iteratively solve for a new wall shear stress. Use the current wall @@ -920,7 +919,7 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, su2double U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall)); su2double Y_Plus = 0.99*config->GetwallModel_MinYPlus(); // use clipping value as minimum - su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; + const su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; /*--- Automatic switch off when y+ < "limit" according to Nichols & Nelson (2004) ---*/ @@ -932,20 +931,20 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, /*--- Friction velocity and u+ ---*/ - su2double U_Plus = VelTangMod/U_Tau; + const su2double U_Plus = VelTangMod/U_Tau; /*--- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) page 1110 ---*/ - su2double Gam = Recovery*U_Tau*U_Tau/(2.0*Cp*T_Wall); - su2double Beta = q_w*Lam_Visc_Wall/(Density_Wall*T_Wall*Conductivity_Wall*U_Tau); - su2double Q = sqrt(Beta*Beta + 4.0*Gam); - su2double Phi = asin(-1.0*Beta/Q); + const su2double Gam = Recovery*U_Tau*U_Tau/(2.0*Cp*T_Wall); + const su2double Beta = q_w*Lam_Visc_Wall/(Density_Wall*T_Wall*Conductivity_Wall*U_Tau); + const su2double Q = sqrt(Beta*Beta + 4.0*Gam); + const su2double Phi = asin(-1.0*Beta/Q); /*--- Crocco-Busemann equation for wall temperature (eq. 11 of Nichols and Nelson) ---*/ /*--- update T_Wall due to aerodynamic heating, unless the wall is isothermal ---*/ if (config->GetMarker_All_KindBC(iMarker) != ISOTHERMAL) { - su2double denum = (1.0 + Beta*U_Plus - Gam*U_Plus*U_Plus); + const su2double denum = (1.0 + Beta*U_Plus - Gam*U_Plus*U_Plus); if (denum > EPS){ T_Wall = T_Normal / denum; nodes->SetTemperature(iPoint,T_Wall); @@ -960,14 +959,14 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ - su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); + const su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); /*--- Spalding's universal form for the BL velocity with the * outer velocity form of White & Christoph above. ---*/ const su2double kUp = kappa*U_Plus; Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*B)* (1.0 + kUp + 0.5*kUp*kUp + kUp*kUp*kUp/6.0)); - su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); + const su2double dypw_dyp = 2.0*Y_Plus_White*(kappa*sqrt(Gam)/Q)*sqrt(1.0 - pow(2.0*Gam*U_Plus - Beta,2.0)/(Q*Q)); Eddy_Visc_Wall = Lam_Visc_Wall*(1.0 + dypw_dyp - kappa*exp(-1.0*kappa*B)* (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0) @@ -980,7 +979,7 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, /* --- Gradient of function defined above --- */ - su2double grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + + const su2double grad_diff = Density_Wall * WallDistMod / Lam_Visc_Wall + VelTangMod / (U_Tau * U_Tau) + kappa /(U_Tau * sqrt(Gam)) * asin(U_Plus * sqrt(Gam)) * Y_Plus_White - exp(-1.0 * B * kappa) * (0.5 * pow(VelTangMod * kappa / U_Tau, 3) + pow(VelTangMod * kappa / U_Tau, 2) + VelTangMod * kappa / U_Tau) / U_Tau; @@ -1008,7 +1007,7 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, EddyViscWall[iMarker][iVertex] = Eddy_Visc_Wall; UTau[iMarker][iVertex] = U_Tau; - su2double Tau_Wall = (1.0/Density_Wall)*pow(Y_Plus*Lam_Visc_Wall/WallDistMod,2.0); + const su2double Tau_Wall = (1.0/Density_Wall)*pow(Y_Plus*Lam_Visc_Wall/WallDistMod,2.0); /*--- Store this value for the wall shear stress at the node. ---*/ From 9fe38b7ae77ff27867ff32f817200db0d2642750 Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Thu, 7 Oct 2021 10:44:12 +0200 Subject: [PATCH 82/88] Rename Conductivity_Ref -> Thermal_Conductivity_Ref. --- Common/include/CConfig.hpp | 10 +++++----- Common/src/CConfig.cpp | 17 +++++++++++++---- SU2_CFD/include/variables/CIncNSVariable.hpp | 2 +- SU2_CFD/include/variables/CNSVariable.hpp | 2 +- SU2_CFD/include/variables/CVariable.hpp | 2 +- .../interfaces/cht/CConjugateHeatInterface.cpp | 2 +- SU2_CFD/src/output/CFlowOutput.cpp | 2 +- SU2_CFD/src/output/output_structure_legacy.cpp | 2 +- SU2_CFD/src/solvers/CEulerSolver.cpp | 2 +- SU2_CFD/src/solvers/CFEM_DG_EulerSolver.cpp | 2 +- SU2_CFD/src/solvers/CIncEulerSolver.cpp | 2 +- TestCases/serial_regression.py | 1 - 12 files changed, 27 insertions(+), 19 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index c2f5462103d..36444de33b8 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -836,7 +836,7 @@ class CConfig { Velocity_Ref, /*!< \brief Reference velocity for non-dimensionalization.*/ Time_Ref, /*!< \brief Reference time for non-dimensionalization. */ Viscosity_Ref, /*!< \brief Reference viscosity for non-dimensionalization. */ - Conductivity_Ref, /*!< \brief Reference conductivity for non-dimensionalization. */ + Thermal_Conductivity_Ref, /*!< \brief Reference conductivity for non-dimensionalization. */ Energy_Ref, /*!< \brief Reference viscosity for non-dimensionalization. */ Wall_Temperature, /*!< \brief Temperature at an isotropic wall in Kelvin. */ Omega_Ref, /*!< \brief Reference angular velocity for non-dimensionalization. */ @@ -1774,10 +1774,10 @@ class CConfig { su2double GetFan_Poly_Eff(void) const { return Fan_Poly_Eff; } /*! - * \brief Get the value of the reference conductivity for non-dimensionalization. - * \return Reference conductivity for non-dimensionalization. + * \brief Get the value of the reference thermal conductivity for non-dimensionalization. + * \return Reference thermal conductivity for non-dimensionalization. */ - su2double GetConductivity_Ref(void) const { return Conductivity_Ref; } + su2double GetThermal_Conductivity_Ref(void) const { return Thermal_Conductivity_Ref; } /*! * \brief Get the value of the reference angular velocity for non-dimensionalization. @@ -2397,7 +2397,7 @@ class CConfig { * \brief Set the reference conductivity for nondimensionalization. * \param[in] val_conductivity_ref - Value of the reference conductivity. */ - void SetConductivity_Ref(su2double val_conductivity_ref) { Conductivity_Ref = val_conductivity_ref; } + void SetConductivity_Ref(su2double val_conductivity_ref) { Thermal_Conductivity_Ref = val_conductivity_ref; } /*! * \brief Set the nondimensionalized freestream pressure. diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 96c21813282..7d3c7386427 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1223,6 +1223,9 @@ void CConfig::SetConfig_Options() { addDoubleOption("PRANDTL_LAM", Prandtl_Lam, 0.72); /*!\brief PRANDTL_TURB \n DESCRIPTION: Turbulent Prandtl number (0.9 (air), only for compressible flows) \n DEFAULT 0.90 \ingroup Config*/ addDoubleOption("PRANDTL_TURB", Prandtl_Turb, 0.90); + + /*--- Options related to wall models. ---*/ + /*!\brief WALLMODEL_KAPPA \n DESCRIPTION: von Karman constant used for the wall model \n DEFAULT 0.41 \ingroup Config*/ addDoubleOption("WALLMODEL_KAPPA", wallModel_Kappa, 0.41); /*!\brief WALLMODEL_MAXITER \n DESCRIPTION: Max iterations used for the wall model \n DEFAULT 200 \ingroup Config*/ @@ -1231,8 +1234,9 @@ void CConfig::SetConfig_Options() { addDoubleOption("WALLMODEL_RELFAC", wallModel_RelFac, 0.5); /*!\brief WALLMODEL_MINYPLUS \n DESCRIPTION: lower limit for Y+ used for the wall model \n DEFAULT 5.0 \ingroup Config*/ addDoubleOption("WALLMODEL_MINYPLUS", wallModel_MinYplus, 5.0); - /*!\brief WALLMODEL_B \n DESCRIPTION: constant B used for the wall model \n DEFAULT 5.0 \ingroup Config*/ + /*!\brief WALLMODEL_B \n DESCRIPTION: constant B used for the wall model \n DEFAULT 5.5 \ingroup Config*/ addDoubleOption("WALLMODEL_B", wallModel_B, 5.5); + /*!\brief BULK_MODULUS \n DESCRIPTION: Value of the Bulk Modulus \n DEFAULT 1.42E5 \ingroup Config*/ addDoubleOption("BULK_MODULUS", Bulk_Modulus, 1.42E5); /* DESCRIPTION: Epsilon^2 multipier in Beta calculation for incompressible preconditioner. */ @@ -3291,11 +3295,16 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i if (Kind_WallFunctions[iMarker] != WALL_FUNCTIONS::NONE) Wall_Functions = true; - if ((Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::ADAPTIVE_FUNCTION) || (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::SCALABLE_FUNCTION) - || (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::NONEQUILIBRIUM_MODEL)) - + if ((Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::ADAPTIVE_FUNCTION) || + (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::SCALABLE_FUNCTION) || + (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::NONEQUILIBRIUM_MODEL)) SU2_MPI::Error(string("For RANS problems, use NONE, STANDARD_WALL_FUNCTION or EQUILIBRIUM_WALL_MODEL.\n"), CURRENT_FUNCTION); + if (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::STANDARD_FUNCTION) { + /// TODO TK:: Add warnings, errors, incompatibilities here. + + } + } } diff --git a/SU2_CFD/include/variables/CIncNSVariable.hpp b/SU2_CFD/include/variables/CIncNSVariable.hpp index 1a5f6fbec66..395be341247 100644 --- a/SU2_CFD/include/variables/CIncNSVariable.hpp +++ b/SU2_CFD/include/variables/CIncNSVariable.hpp @@ -104,7 +104,7 @@ class CIncNSVariable final : public CIncEulerVariable { /*! * \brief Set the value of the wall shear stress computed by a wall function. */ - inline void SetTau_Wall(unsigned long iPoint, su2double val_tau_wall) override { Tau_Wall(iPoint) = val_tau_wall; } + inline void SetTau_Wall(unsigned long iPoint, su2double tau_wall) override { Tau_Wall(iPoint) = tau_wall; } /*! * \brief Get the value of the wall shear stress computed by a wall function. diff --git a/SU2_CFD/include/variables/CNSVariable.hpp b/SU2_CFD/include/variables/CNSVariable.hpp index cb5dfc484ba..9450a07916b 100644 --- a/SU2_CFD/include/variables/CNSVariable.hpp +++ b/SU2_CFD/include/variables/CNSVariable.hpp @@ -158,7 +158,7 @@ class CNSVariable final : public CEulerVariable { /*! * \brief Set the value of the wall shear stress computed by a wall function. */ - inline void SetTau_Wall(unsigned long iPoint, su2double val_tau_wall) override { Tau_Wall(iPoint) = val_tau_wall; } + inline void SetTau_Wall(unsigned long iPoint, su2double tau_wall) override { Tau_Wall(iPoint) = tau_wall; } /*! * \brief Get the value of the wall shear stress computed by a wall function. diff --git a/SU2_CFD/include/variables/CVariable.hpp b/SU2_CFD/include/variables/CVariable.hpp index 1a0ee18aaf5..0ef4b858a67 100644 --- a/SU2_CFD/include/variables/CVariable.hpp +++ b/SU2_CFD/include/variables/CVariable.hpp @@ -2159,7 +2159,7 @@ class CVariable { */ inline virtual su2double GetSensitivity(unsigned long iPoint, unsigned long iDim) const { return 0.0; } - inline virtual void SetTau_Wall(unsigned long iPoint, su2double val_tau_wall) {} + inline virtual void SetTau_Wall(unsigned long iPoint, su2double tau_wall) {} inline virtual su2double GetTau_Wall(unsigned long iPoint) const { return 0.0; } diff --git a/SU2_CFD/src/interfaces/cht/CConjugateHeatInterface.cpp b/SU2_CFD/src/interfaces/cht/CConjugateHeatInterface.cpp index 201de1cbb1c..22ecd6ed114 100644 --- a/SU2_CFD/src/interfaces/cht/CConjugateHeatInterface.cpp +++ b/SU2_CFD/src/interfaces/cht/CConjugateHeatInterface.cpp @@ -104,7 +104,7 @@ void CConjugateHeatInterface::GetDonor_Variable(CSolver *donor_solution, CGeomet switch (donor_config->GetKind_ConductivityModel()) { case CONDUCTIVITYMODEL::CONSTANT: - thermal_conductivity = thermal_conductivityND*donor_config->GetConductivity_Ref(); + thermal_conductivity = thermal_conductivityND*donor_config->GetThermal_Conductivity_Ref(); break; case CONDUCTIVITYMODEL::CONSTANT_PRANDTL: diff --git a/SU2_CFD/src/output/CFlowOutput.cpp b/SU2_CFD/src/output/CFlowOutput.cpp index 246c777ed8e..1d57ead4077 100644 --- a/SU2_CFD/src/output/CFlowOutput.cpp +++ b/SU2_CFD/src/output/CFlowOutput.cpp @@ -1807,7 +1807,7 @@ void CFlowOutput::WriteForcesBreakdown(const CConfig* config, const CSolver* flo file << "Reference viscosity: " << config->GetViscosity_Ref(); if (si_units) file << " N.s/m^2.\n"; else file << " lbf.s/ft^2.\n"; - file << "Reference conductivity: " << config->GetConductivity_Ref(); + file << "Reference conductivity: " << config->GetThermal_Conductivity_Ref(); if (si_units) file << " W/m^2.K.\n"; else file << " lbf/ft.s.R.\n"; } diff --git a/SU2_CFD/src/output/output_structure_legacy.cpp b/SU2_CFD/src/output/output_structure_legacy.cpp index 23bcf5b028c..af17bfc727d 100644 --- a/SU2_CFD/src/output/output_structure_legacy.cpp +++ b/SU2_CFD/src/output/output_structure_legacy.cpp @@ -3122,7 +3122,7 @@ void COutputLegacy::SpecialOutput_ForcesBreakdown(CSolver *****solver, CGeometry if (config[val_iZone]->GetSystemMeasurements() == SI) Breakdown_file << " N.s/m^2." << "\n"; else if (config[val_iZone]->GetSystemMeasurements() == US) Breakdown_file << " lbf.s/ft^2." << "\n"; if (compressible){ - Breakdown_file << "Reference conductivity: " << config[val_iZone]->GetConductivity_Ref(); + Breakdown_file << "Reference conductivity: " << config[val_iZone]->GetThermal_Conductivity_Ref(); if (config[val_iZone]->GetSystemMeasurements() == SI) Breakdown_file << " W/m^2.K." << "\n"; else if (config[val_iZone]->GetSystemMeasurements() == US) Breakdown_file << " lbf/ft.s.R." << "\n"; } diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index 2cd9ba5569f..78d56ad1010 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -1277,7 +1277,7 @@ void CEulerSolver::SetNondimensionalization(CConfig *config, unsigned short iMes Unit.str(""); if (config->GetSystemMeasurements() == SI) Unit << "W/m^2.K"; else if (config->GetSystemMeasurements() == US) Unit << "lbf/ft.s.R"; - NonDimTable << "Conductivity" << "-" << config->GetConductivity_Ref() << Unit.str() << "-"; + NonDimTable << "Conductivity" << "-" << config->GetThermal_Conductivity_Ref() << Unit.str() << "-"; Unit.str(""); if (turbulent){ if (config->GetSystemMeasurements() == SI) Unit << "m^2/s^2"; diff --git a/SU2_CFD/src/solvers/CFEM_DG_EulerSolver.cpp b/SU2_CFD/src/solvers/CFEM_DG_EulerSolver.cpp index 1e594b30d71..f48da8deeb0 100644 --- a/SU2_CFD/src/solvers/CFEM_DG_EulerSolver.cpp +++ b/SU2_CFD/src/solvers/CFEM_DG_EulerSolver.cpp @@ -1267,7 +1267,7 @@ void CFEM_DG_EulerSolver::SetNondimensionalization(CConfig *config, Unit.str(""); if (config->GetSystemMeasurements() == SI) Unit << "W/m^2.K"; else if (config->GetSystemMeasurements() == US) Unit << "lbf/ft.s.R"; - NonDimTable << "Conductivity" << "-" << config->GetConductivity_Ref() << Unit.str() << "-"; + NonDimTable << "Conductivity" << "-" << config->GetThermal_Conductivity_Ref() << Unit.str() << "-"; Unit.str(""); if (turbulent) { if (config->GetSystemMeasurements() == SI) Unit << "m^2/s^2"; diff --git a/SU2_CFD/src/solvers/CIncEulerSolver.cpp b/SU2_CFD/src/solvers/CIncEulerSolver.cpp index 52644844da0..cd607d140e7 100644 --- a/SU2_CFD/src/solvers/CIncEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CIncEulerSolver.cpp @@ -778,7 +778,7 @@ void CIncEulerSolver::SetNondimensionalization(CConfig *config, unsigned short i Unit.str(""); if (config->GetSystemMeasurements() == SI) Unit << "W/m^2.K"; else if (config->GetSystemMeasurements() == US) Unit << "lbf/ft.s.R"; - NonDimTable << "Conductivity" << "-" << config->GetConductivity_Ref() << Unit.str() << "-"; + NonDimTable << "Conductivity" << "-" << config->GetThermal_Conductivity_Ref() << Unit.str() << "-"; Unit.str(""); if (turbulent){ if (config->GetSystemMeasurements() == SI) Unit << "m^2/s^2"; diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 817e6253a47..45265bdcea7 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -1546,7 +1546,6 @@ def main(): ### RUN TESTS ### ###################################### - pass_list = [ test.run_test() for test in test_list ] From 0af828bbb5a140b8ab9ee17e6d2738126aee3ad8 Mon Sep 17 00:00:00 2001 From: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> Date: Thu, 7 Oct 2021 13:13:09 +0100 Subject: [PATCH 83/88] else not needed due to continue --- SU2_CFD/src/solvers/CNSSolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index c2e28f86aaf..71ecef38caa 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -927,7 +927,7 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, smallYPlusCounter++; continue; } - else while (fabs(diff) > tol) { + while (fabs(diff) > tol) { /*--- Friction velocity and u+ ---*/ From d3b2fed18e70c6d23c6fcf84b47dfdcaf36d5cca Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Thu, 7 Oct 2021 14:41:35 +0200 Subject: [PATCH 84/88] Minor changes. Comments and moved variable. --- SU2_CFD/src/solvers/CIncNSSolver.cpp | 3 ++- SU2_CFD/src/solvers/CNSSolver.cpp | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 09bbcf988a1..b87dd3c1d68 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -777,7 +777,8 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe unsigned long counter = 0; su2double diff = 1.0; su2double U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall)); - su2double Y_Plus = 0.99*config->GetwallModel_MinYPlus(); // use clipping value as minimum + /*--- Use minimum y+ as defined in the config, in case the routine below for computing y+ does not converge ---*/ + su2double Y_Plus = 0.99*config->GetwallModel_MinYPlus(); const su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index c2e28f86aaf..fe86daf6132 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -794,7 +794,6 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, const su2double Gas_Constant = config->GetGas_ConstantND(); const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant; - const su2double tol = 1e-12; /*!< \brief convergence criterium for the Newton solver, note that 1e-10 is too large */ const unsigned short max_iter = config->GetwallModel_MaxIter(); const su2double relax = config->GetwallModel_RelFac(); @@ -917,6 +916,7 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, unsigned long counter = 0; su2double diff = 1.0; su2double U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall)); + /*--- Use minimum y+ as defined in the config, in case the routine below for computing y+ does not converge ---*/ su2double Y_Plus = 0.99*config->GetwallModel_MinYPlus(); // use clipping value as minimum const su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall; @@ -927,7 +927,10 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, smallYPlusCounter++; continue; } - else while (fabs(diff) > tol) { + + /*--- Convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ + const su2double tol = 1e-12; + while (fabs(diff) > tol) { /*--- Friction velocity and u+ ---*/ From dd8d9816fc4361642060ac489834878445be3279 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Sat, 16 Oct 2021 12:52:30 +0200 Subject: [PATCH 85/88] do not recompute y+ when wall functions are used --- SU2_CFD/include/solvers/CFVMFlowSolverBase.inl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index 2c72a7bd59d..d4232408436 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2554,7 +2554,10 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr /*--- Compute non-dimensional velocity and y+ ---*/ FrictionVel = sqrt(fabs(WallShearStress[iMarker][iVertex]) / Density); - YPlus[iMarker][iVertex] = WallDistMod * FrictionVel / (Viscosity / Density); + + if (!wallfunctions) { + YPlus[iMarker][iVertex] = WallDistMod * FrictionVel / (Viscosity / Density); + } /*--- Compute total and maximum heat flux on the wall ---*/ From b9e83e78e13ed83c988d0d1b0edfcb4aa50d85ec Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Sat, 16 Oct 2021 16:26:03 +0200 Subject: [PATCH 86/88] Update cfg files. Cleaning + formatting. --- .../compressible_SA/turb_SA_flatplate.cfg | 42 ++++++++++---- .../compressible_SST/turb_SST_flatplate.cfg | 46 ++++++++++++---- .../incompressible_SA/turb_SA_flatplate.cfg | 45 ++++++++++----- .../incompressible_SST/turb_SST_flatplate.cfg | 55 ++++++++++++------- 4 files changed, 133 insertions(+), 55 deletions(-) diff --git a/TestCases/wallfunctions/flatplate/compressible_SA/turb_SA_flatplate.cfg b/TestCases/wallfunctions/flatplate/compressible_SA/turb_SA_flatplate.cfg index d4ce4f7996c..c58c578606c 100644 --- a/TestCases/wallfunctions/flatplate/compressible_SA/turb_SA_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/compressible_SA/turb_SA_flatplate.cfg @@ -1,38 +1,48 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % SU2 configuration file % -% Case description: Turbulent flow over flat plate, wall functions % -% Author: Nijso Beishuizen % +% Case description: Comp. turbulent flow over flat plate, wall functions % +% https://turbmodels.larc.nasa.gov/flatplate_sa.html % +% Author: Nijso Beishuizen, T. Kattmann % % Institution: Bosch Thermotechnology % % Date: 2021.09.01 % % File Version 7.2.0 "Blackbird" % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - +% % ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% +% SOLVER= RANS KIND_TURB_MODEL= SA -MATH_PROBLEM= DIRECT -RESTART_SOL= NO +RESTART_SOL= NO +% % ----------- COMPRESSIBLE AND INCOMPRESSIBLE FREE-STREAM DEFINITION ----------% -MACH_NUMBER= 0.2 +% FREESTREAM_TEMPERATURE= 300.0 +MACH_NUMBER= 0.2 REYNOLDS_NUMBER= 5e6 REYNOLDS_LENGTH= 1.0 +% % --------------------------- VISCOSITY MODEL ---------------------------------% +% VISCOSITY_MODEL= CONSTANT_VISCOSITY % NOTE check where the material conditions come from https://turbmodels.larc.nasa.gov/flatplate.html ... is this even active MU_CONSTANT= 1.8573E-5 +% % ---------------------- REFERENCE VALUE DEFINITION ---------------------------% +% +REF_DIMENSIONALIZATION= DIMENSIONAL REF_LENGTH= 1.0 REF_AREA= 2.0 +% % -------------------- BOUNDARY CONDITION DEFINITION --------------------------% +% MARKER_HEATFLUX= ( wall, 0.0 ) +MARKER_SYM= ( symmetry ) +% MARKER_INLET= ( inlet, 302.4, 118309.784, 1.0, 0.0, 0.0 ) MARKER_OUTLET= ( outlet, 115056.0, farfield, 115056.0 ) -MARKER_SYM= ( symmetry ) -MARKER_PLOTTING= ( wall ) -MARKER_MONITORING= ( wall ) +% % ------------------------ WALL FUNCTION DEFINITION --------------------------% % MARKER_WALL_FUNCTIONS= ( wall, STANDARD_WALL_FUNCTION ) @@ -43,10 +53,12 @@ WALLMODEL_MAXITER= 200 WALLMODEL_RELFAC= 0.5 % % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% +% NUM_METHOD_GRAD= GREEN_GAUSS CFL_NUMBER= 1e3 CFL_ADAPT= NO ITER= 1000 +% % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% % LINEAR_SOLVER= FGMRES @@ -55,22 +67,30 @@ LINEAR_SOLVER_ERROR= 1e-15 LINEAR_SOLVER_ITER= 10 % % -------------------------- MULTIGRID PARAMETERS -----------------------------% +% MGLEVEL= 0 +% % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% +% CONV_NUM_METHOD_FLOW= ROE MUSCL_FLOW= YES SLOPE_LIMITER_FLOW= NONE TIME_DISCRE_FLOW= EULER_IMPLICIT +% % -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------% +% CONV_NUM_METHOD_TURB= SCALAR_UPWIND MUSCL_TURB= NO SLOPE_LIMITER_TURB= NONE TIME_DISCRE_TURB= EULER_IMPLICIT +% % --------------------------- CONVERGENCE PARAMETERS --------------------------% +% CONV_RESIDUAL_MINVAL= -15 CONV_STARTITER= 10 CONV_CAUCHY_ELEMS= 100 CONV_CAUCHY_EPS= 1E-6 +% % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% % MESH_FILENAME= ../mesh_flatplate_140x100.su2 @@ -81,7 +101,9 @@ SCREEN_OUTPUT= (INNER_ITER, WALL_TIME, RMS_DENSITY, RMS_MOMENTUM-X, RMS_MOMENTUM SCREEN_WRT_FREQ_INNER= 10 % HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF, FLOW_COEFF) +MARKER_PLOTTING= ( wall ) +MARKER_MONITORING= ( wall ) % OUTPUT_FILES= RESTART, PARAVIEW_MULTIBLOCK -VOLUME_OUTPUT= RESIDUAL, PRIMITIVE +VOLUME_OUTPUT= RESIDUAL, PRIMITIVE, RESIDUAL OUTPUT_WRT_FREQ= 1000 diff --git a/TestCases/wallfunctions/flatplate/compressible_SST/turb_SST_flatplate.cfg b/TestCases/wallfunctions/flatplate/compressible_SST/turb_SST_flatplate.cfg index 24d35f09377..ed79f8c9207 100644 --- a/TestCases/wallfunctions/flatplate/compressible_SST/turb_SST_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/compressible_SST/turb_SST_flatplate.cfg @@ -1,38 +1,48 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % SU2 configuration file % -% Case description: Turbulent flow over flat plate, wall functions % -% Author: Nijso Beishuizen % +% Case description: Comp. turbulent flow over flat plate, wall functions % +% https://turbmodels.larc.nasa.gov/flatplate_sa.html % +% Author: Nijso Beishuizen, T. Kattmann % % Institution: Bosch Thermotechnology % % Date: 2021.09.01 % % File Version 7.2.0 "Blackbird" % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - +% % ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% +% SOLVER= RANS KIND_TURB_MODEL= SST -MATH_PROBLEM= DIRECT -RESTART_SOL= NO +RESTART_SOL= NO +% % ----------- COMPRESSIBLE AND INCOMPRESSIBLE FREE-STREAM DEFINITION ----------% -MACH_NUMBER= 0.2 +% FREESTREAM_TEMPERATURE= 300.0 -REYNOLDS_NUMBER= 5000000.0 +MACH_NUMBER= 0.2 +REYNOLDS_NUMBER= 5e6 REYNOLDS_LENGTH= 1.0 +% % --------------------------- VISCOSITY MODEL ---------------------------------% +% VISCOSITY_MODEL= CONSTANT_VISCOSITY % NOTE check where the material conditions come from https://turbmodels.larc.nasa.gov/flatplate.html ... is this even active MU_CONSTANT= 1.8573E-5 +% % ---------------------- REFERENCE VALUE DEFINITION ---------------------------% +% +REF_DIMENSIONALIZATION= DIMENSIONAL REF_LENGTH= 1.0 REF_AREA= 2.0 +% % -------------------- BOUNDARY CONDITION DEFINITION --------------------------% +% MARKER_HEATFLUX= ( wall, 0.0 ) +MARKER_SYM= ( symmetry ) +% MARKER_INLET= ( inlet, 302.4, 118309.784, 1.0, 0.0, 0.0 ) MARKER_OUTLET= ( outlet, 115056.0, farfield, 115056.0 ) -MARKER_SYM= ( symmetry ) -MARKER_PLOTTING= ( wall ) -MARKER_MONITORING= ( wall ) +% % ------------------------ WALL FUNCTION DEFINITION --------------------------% % MARKER_WALL_FUNCTIONS= ( wall, STANDARD_WALL_FUNCTION ) @@ -43,10 +53,12 @@ WALLMODEL_MAXITER= 200 WALLMODEL_RELFAC= 0.5 % % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% +% NUM_METHOD_GRAD= GREEN_GAUSS -CFL_NUMBER= 400.0 +CFL_NUMBER= 4e2 CFL_ADAPT= NO ITER= 2000 +% % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% % LINEAR_SOLVER= FGMRES @@ -55,22 +67,30 @@ LINEAR_SOLVER_ERROR= 1e-15 LINEAR_SOLVER_ITER= 10 % % -------------------------- MULTIGRID PARAMETERS -----------------------------% +% MGLEVEL= 0 +% % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% +% CONV_NUM_METHOD_FLOW= ROE MUSCL_FLOW= YES SLOPE_LIMITER_FLOW= NONE TIME_DISCRE_FLOW= EULER_IMPLICIT +% % -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------% +% CONV_NUM_METHOD_TURB= SCALAR_UPWIND MUSCL_TURB= NO SLOPE_LIMITER_TURB= NONE TIME_DISCRE_TURB= EULER_IMPLICIT +% % --------------------------- CONVERGENCE PARAMETERS --------------------------% +% CONV_RESIDUAL_MINVAL= -15 CONV_STARTITER= 10 CONV_CAUCHY_ELEMS= 100 CONV_CAUCHY_EPS= 1E-6 +% % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% % MESH_FILENAME= ../mesh_flatplate_140x100.su2 @@ -81,7 +101,9 @@ SCREEN_OUTPUT= (INNER_ITER, WALL_TIME, RMS_DENSITY, RMS_MOMENTUM-X, RMS_MOMENTUM SCREEN_WRT_FREQ_INNER= 10 % HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF, FLOW_COEFF) +MARKER_PLOTTING= ( wall ) +MARKER_MONITORING= ( wall ) % OUTPUT_FILES= RESTART, PARAVIEW_MULTIBLOCK -VOLUME_OUTPUT= RESIDUAL +VOLUME_OUTPUT= RESIDUAL, PRIMITIVE, RESIDUAL OUTPUT_WRT_FREQ= 1000 diff --git a/TestCases/wallfunctions/flatplate/incompressible_SA/turb_SA_flatplate.cfg b/TestCases/wallfunctions/flatplate/incompressible_SA/turb_SA_flatplate.cfg index 4d874247bae..8065f7d1c86 100644 --- a/TestCases/wallfunctions/flatplate/incompressible_SA/turb_SA_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/incompressible_SA/turb_SA_flatplate.cfg @@ -1,45 +1,51 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % SU2 configuration file % -% Case description: Turbulent flow over flat plate, wall functions % -% Author: Nijso Beishuizen % +% Case description: Incomp. turbulent flow over flat plate, wall functions % +% https://turbmodels.larc.nasa.gov/flatplate_sa.html % +% Author: Nijso Beishuizen, T. Kattmann % % Institution: Bosch Thermotechnology % % Date: 2021.09.01 % % File Version 7.2.0 "Blackbird" % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - +% % ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% +% SOLVER= INC_RANS KIND_TURB_MODEL= SA -MATH_PROBLEM= DIRECT -RESTART_SOL= NO +RESTART_SOL= NO +% % ---------------- INCOMPRESSIBLE FLOW CONDITION DEFINITION -------------------% +% INC_DENSITY_MODEL= CONSTANT INC_DENSITY_INIT= 1.3254 INC_ENERGY_EQUATION= YES INC_TEMPERATURE_INIT= 300.00 INC_VELOCITY_INIT= (70, 0.0, 0.0 ) +% % --------------------------- VISCOSITY MODEL ---------------------------------% +% VISCOSITY_MODEL= CONSTANT_VISCOSITY MU_CONSTANT= 1.8573E-5 -% ----------- COMPRESSIBLE AND INCOMPRESSIBLE FREE-STREAM DEFINITION ----------% -MACH_NUMBER= 0.2 -FREESTREAM_TEMPERATURE= 300.0 -REYNOLDS_NUMBER= 5000000.0 -REYNOLDS_LENGTH= 1.0 +% % ---------------------- REFERENCE VALUE DEFINITION ---------------------------% +% +INC_NONDIM= INITIAL_VALUES REF_LENGTH= 1.0 REF_AREA= 2.0 +% % -------------------- BOUNDARY CONDITION DEFINITION --------------------------% +% MARKER_HEATFLUX= ( wall, 0.0 ) +MARKER_SYM= ( symmetry ) +% INC_INLET_TYPE= VELOCITY_INLET MARKER_INLET= ( inlet, 302.4, 70.0, 1.0, 0.0, 0.0 ) +% INC_OUTLET_TYPE= PRESSURE_OUTLET PRESSURE_OUTLET MARKER_OUTLET= ( outlet, 0.0, farfield, 0.0 ) -MARKER_SYM= ( symmetry ) -MARKER_PLOTTING= ( wall ) -MARKER_MONITORING= ( wall ) +% % ------------------------ WALL FUNCTION DEFINITION --------------------------% % MARKER_WALL_FUNCTIONS= ( wall, STANDARD_WALL_FUNCTION ) @@ -50,10 +56,12 @@ WALLMODEL_MAXITER= 200 WALLMODEL_RELFAC= 0.5 % % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% +% NUM_METHOD_GRAD= GREEN_GAUSS CFL_NUMBER= 1e2 CFL_ADAPT= NO ITER= 1000 +% % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% % LINEAR_SOLVER= FGMRES @@ -62,22 +70,29 @@ LINEAR_SOLVER_ERROR= 1e-15 LINEAR_SOLVER_ITER= 10 % % -------------------------- MULTIGRID PARAMETERS -----------------------------% +% MGLEVEL= 0 +% % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% +% CONV_NUM_METHOD_FLOW= FDS MUSCL_FLOW= YES SLOPE_LIMITER_FLOW= NONE TIME_DISCRE_FLOW= EULER_IMPLICIT +% % -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------% +% CONV_NUM_METHOD_TURB= SCALAR_UPWIND MUSCL_TURB= NO SLOPE_LIMITER_TURB= NONE TIME_DISCRE_TURB= EULER_IMPLICIT +% % --------------------------- CONVERGENCE PARAMETERS --------------------------% CONV_RESIDUAL_MINVAL= -17 CONV_STARTITER= 10 CONV_CAUCHY_ELEMS= 100 CONV_CAUCHY_EPS= 1E-6 +% % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% % MESH_FILENAME= ../mesh_flatplate_140x100.su2 @@ -88,7 +103,9 @@ SCREEN_OUTPUT= (INNER_ITER, WALL_TIME, RMS_PRESSURE, RMS_VELOCITY-X, RMS_VELOCIT SCREEN_WRT_FREQ_INNER= 10 % HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF, FLOW_COEFF) +MARKER_PLOTTING= ( wall ) +MARKER_MONITORING= ( wall ) % OUTPUT_FILES= RESTART, PARAVIEW_MULTIBLOCK -VOLUME_OUTPUT= RESIDUAL +VOLUME_OUTPUT= RESIDUAL, PRIMITIVE, RESIDUAL OUTPUT_WRT_FREQ= 1000 diff --git a/TestCases/wallfunctions/flatplate/incompressible_SST/turb_SST_flatplate.cfg b/TestCases/wallfunctions/flatplate/incompressible_SST/turb_SST_flatplate.cfg index 6b119545052..22b34b120aa 100644 --- a/TestCases/wallfunctions/flatplate/incompressible_SST/turb_SST_flatplate.cfg +++ b/TestCases/wallfunctions/flatplate/incompressible_SST/turb_SST_flatplate.cfg @@ -1,45 +1,51 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % SU2 configuration file % -% Case description: Turbulent flow over flat plate, wall functions % -% Author: Nijso Beishuizen % +% Case description: Incomp. turbulent flow over flat plate, wall functions % +% https://turbmodels.larc.nasa.gov/flatplate_sa.html % +% Author: Nijso Beishuizen, T. Kattmann % % Institution: Bosch Thermotechnology % % Date: 2021.09.01 % % File Version 7.2.0 "Blackbird" % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - +% % ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% +% SOLVER= INC_RANS KIND_TURB_MODEL= SST -MATH_PROBLEM= DIRECT -RESTART_SOL= NO -% --------------------------- VISCOSITY MODEL ---------------------------------% -VISCOSITY_MODEL= CONSTANT_VISCOSITY -MU_CONSTANT= 1.8573E-5 +RESTART_SOL= NO +% % ---------------- INCOMPRESSIBLE FLOW CONDITION DEFINITION -------------------% +% INC_DENSITY_MODEL= CONSTANT INC_DENSITY_INIT= 1.3254 INC_ENERGY_EQUATION= YES INC_TEMPERATURE_INIT= 300.00 INC_VELOCITY_INIT= (70, 0.0, 0.0 ) -INC_INLET_TYPE= VELOCITY_INLET -INC_OUTLET_TYPE= PRESSURE_OUTLET PRESSURE_OUTLET -% ----------- COMPRESSIBLE AND INCOMPRESSIBLE FREE-STREAM DEFINITION ----------% -MACH_NUMBER= 0.2 -FREESTREAM_TEMPERATURE= 300.0 -REYNOLDS_NUMBER= 5000000.0 -REYNOLDS_LENGTH= 1.0 +% +% --------------------------- VISCOSITY MODEL ---------------------------------% +% +VISCOSITY_MODEL= CONSTANT_VISCOSITY +MU_CONSTANT= 1.8573E-5 +% % ---------------------- REFERENCE VALUE DEFINITION ---------------------------% +% +INC_NONDIM= INITIAL_VALUES REF_LENGTH= 1.0 REF_AREA= 2.0 +% % -------------------- BOUNDARY CONDITION DEFINITION --------------------------% +% MARKER_HEATFLUX= ( wall, 0.0 ) +MARKER_SYM= ( symmetry ) +% +INC_INLET_TYPE= VELOCITY_INLET MARKER_INLET= ( inlet, 302.4, 70.0, 1.0, 0.0, 0.0 ) +% +INC_OUTLET_TYPE= PRESSURE_OUTLET PRESSURE_OUTLET MARKER_OUTLET= ( outlet, 0.0, farfield, 0.0 ) -MARKER_SYM= ( symmetry ) -MARKER_PLOTTING= ( wall ) -MARKER_MONITORING= ( wall ) +% % ------------------------ WALL FUNCTION DEFINITION --------------------------% % MARKER_WALL_FUNCTIONS= ( wall, STANDARD_WALL_FUNCTION ) @@ -50,10 +56,12 @@ WALLMODEL_MAXITER= 200 WALLMODEL_RELFAC= 0.5 % % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% +% NUM_METHOD_GRAD= GREEN_GAUSS CFL_NUMBER= 1e2 CFL_ADAPT= NO ITER= 1000 +% % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% % LINEAR_SOLVER= FGMRES @@ -62,22 +70,29 @@ LINEAR_SOLVER_ERROR= 1e-15 LINEAR_SOLVER_ITER= 10 % % -------------------------- MULTIGRID PARAMETERS -----------------------------% +% MGLEVEL= 0 +% % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% +% CONV_NUM_METHOD_FLOW= FDS MUSCL_FLOW= YES SLOPE_LIMITER_FLOW= NONE TIME_DISCRE_FLOW= EULER_IMPLICIT +% % -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------% +% CONV_NUM_METHOD_TURB= SCALAR_UPWIND MUSCL_TURB= NO SLOPE_LIMITER_TURB= NONE TIME_DISCRE_TURB= EULER_IMPLICIT +% % --------------------------- CONVERGENCE PARAMETERS --------------------------% CONV_RESIDUAL_MINVAL= -17 CONV_STARTITER= 10 CONV_CAUCHY_ELEMS= 100 CONV_CAUCHY_EPS= 1E-6 +% % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% % MESH_FILENAME= ../mesh_flatplate_140x100.su2 @@ -88,7 +103,9 @@ SCREEN_OUTPUT= (INNER_ITER, WALL_TIME, RMS_PRESSURE, RMS_VELOCITY-X, RMS_VELOCIT SCREEN_WRT_FREQ_INNER= 10 % HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF, FLOW_COEFF) +MARKER_PLOTTING= ( wall ) +MARKER_MONITORING= ( wall ) % OUTPUT_FILES= RESTART, PARAVIEW_MULTIBLOCK -VOLUME_OUTPUT= RESIDUAL +VOLUME_OUTPUT= RESIDUAL, PRIMITIVE, RESIDUAL OUTPUT_WRT_FREQ= 1000 From af850b9b54c571670d84f075cb3649470062ea16 Mon Sep 17 00:00:00 2001 From: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> Date: Tue, 19 Oct 2021 11:47:19 +0100 Subject: [PATCH 87/88] Update TestCases/serial_regression.py --- TestCases/serial_regression.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 5d2be01e144..2fdeefff9f4 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -321,7 +321,7 @@ def main(): turb_wallfunction_flatplate_sst.cfg_dir = "wallfunctions/flatplate/compressible_SST" turb_wallfunction_flatplate_sst.cfg_file = "turb_SST_flatplate.cfg" turb_wallfunction_flatplate_sst.test_iter = 10 - turb_wallfunction_flatplate_sst.test_vals = [-4.230000, -1.930543, -1.998684, 1.250334, -1.635534, 1.462491, 10, -2.151894, 0.072872, 0.002514] #last 10 columns + turb_wallfunction_flatplate_sst.test_vals = [-4.229955, -1.930560, -1.998477, 1.250383, -1.635663, 1.462396, 10.000000, -2.151959, 0.072873, 0.002514] #last 10 columns turb_wallfunction_flatplate_sst.su2_exec = "SU2_CFD" turb_wallfunction_flatplate_sst.timeout = 1600 turb_wallfunction_flatplate_sst.tol = 0.00001 From d492fb42bd41ef9d48d97b020124b7489d270ef5 Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Tue, 19 Oct 2021 18:45:13 +0200 Subject: [PATCH 88/88] Do some checks for the wall function impl in CConfig. --- Common/src/CConfig.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index b70be9dcc81..70dfc083773 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -3311,8 +3311,10 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i SU2_MPI::Error(string("For RANS problems, use NONE, STANDARD_WALL_FUNCTION or EQUILIBRIUM_WALL_MODEL.\n"), CURRENT_FUNCTION); if (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::STANDARD_FUNCTION) { - /// TODO TK:: Add warnings, errors, incompatibilities here. - + if (!((Kind_Solver == RANS) || (Kind_Solver == INC_RANS))) + SU2_MPI::Error(string("Wall model STANDARD_FUNCTION only available for RANS or INC_RANS.\n"), CURRENT_FUNCTION); + if (nRough_Wall != 0) + SU2_MPI::Error(string("Wall model STANDARD_FUNCTION and WALL_ROUGHNESS migh not be compatible. Checking required!\n"), CURRENT_FUNCTION); } }