diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 9a39043c587..2e4345c7e33 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -821,10 +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 */ + 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.*/ @@ -833,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. */ @@ -1671,13 +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 von Karman constant kappa for turbulence wall modeling. - * \return von Karman constant. + * \brief Get the value of the max. number of Newton iterations for turbulence wall modeling. + * \return Max number of iterations. + */ + unsigned short GetwallModel_MaxIter() const { return wallModel_MaxIter; } + + /*! + * \brief Get the value of the relaxation factor for turbulence wall modeling. + * \return Relaxation factor. + */ + 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. + */ + su2double GetwallModel_MinYPlus() const { return wallModel_MinYplus; } + + /*! + * \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. @@ -1753,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. @@ -2376,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 4f74f76e680..70dfc083773 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1223,10 +1223,20 @@ 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("WALLMODELB", wallModelB, 5.5); + + /*--- 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*/ + 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", 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.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. */ @@ -3295,11 +3305,18 @@ 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) { + 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); + } + } } 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/numerics/CNumerics.hpp b/SU2_CFD/include/numerics/CNumerics.hpp index 08ded93d994..20dbffa5e8c 100644 --- a/SU2_CFD/include/numerics/CNumerics.hpp +++ b/SU2_CFD/include/numerics/CNumerics.hpp @@ -1554,7 +1554,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/common.hpp b/SU2_CFD/include/numerics_simd/flow/diffusion/common.hpp index a17401b3f4b..ec0f2722a1e 100644 --- a/SU2_CFD/include/numerics_simd/flow/diffusion/common.hpp +++ b/SU2_CFD/include/numerics_simd/flow/diffusion/common.hpp @@ -151,7 +151,7 @@ FORCEINLINE void addQCR(const MatrixType& grad, MatrixDbl& tau) { /*! * \brief Scale the stress tensor according to the target (from a - * wall function) magnitute in the tangential direction. + * wall function) magnitude in the tangential direction. */ template FORCEINLINE void addTauWall(Int iPoint, Int jPoint, 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 db05f8d16a6..7e61e6211e3 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,8 @@ 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); + + 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 97a3d8e19a9..628b64b9a15 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 ---*/ @@ -2393,10 +2393,11 @@ 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, Density = 0.0, GradTemperature = 0.0, - UnitNormal[3] = {0.0}, TauElem[3] = {0.0}, TauTangent[3] = {0.0}, Tau[3][3] = {{0.0}}, Cp, + su2double Viscosity = 0.0, Area, Density = 0.0, GradTemperature = 0.0, WallDistMod, FrictionVel, + 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->GetwallModel_MinYPlus(); string Marker_Tag, Monitoring_Tag; @@ -2526,30 +2527,37 @@ 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 ---*/ - su2double TauNormal = GeometryToolbox::DotProduct(nDim, TauElem, UnitNormal); + su2double TauTangent[MAXNDIM] = {0.0}; + GeometryToolbox::TangentProjection(nDim, Tau, UnitNormal, TauTangent); - 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 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] = 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)){ + Tau_Wall = nodes->GetTau_Wall(iPoint); + scale = Tau_Wall / WallShearStress[iMarker][iVertex]; + for (iDim = 0; iDim < nDim; iDim++) { + TauTangent[iDim] *= scale; + TauElem[iDim] *= scale; + } + + WallShearStress[iMarker][iVertex] = Tau_Wall; } - WallShearStress[iMarker][iVertex] = GeometryToolbox::Norm(nDim, TauTangent); - for (iDim = 0; iDim < nDim; iDim++) WallDist[iDim] = (Coord[iDim] - Coord_Normal[iDim]); - - su2double WallDistMod = GeometryToolbox::Norm(nDim, WallDist); + for (iDim = 0; iDim < nDim; iDim++) { + CSkinFriction[iMarker](iVertex,iDim) = TauTangent[iDim] * factorFric; + } - /*--- Compute y+ and non-dimensional velocity ---*/ + WallDistMod = GeometryToolbox::Distance(nDim, Coord, Coord_Normal); - su2double FrictionVel = sqrt(fabs(WallShearStress[iMarker][iVertex]) / Density); + /*--- Compute non-dimensional velocity and y+ ---*/ - /* --- 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) + FrictionVel = sqrt(fabs(WallShearStress[iMarker][iVertex]) / Density); + + 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 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 4245f64c44f..395be341247 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: @@ -100,6 +101,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 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. + * \return Value of the wall shear stress computed by a wall function. + */ + 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..9450a07916b 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 tau_wall) override { Tau_Wall(iPoint) = 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 03f23d7b76d..0ef4b858a67 100644 --- a/SU2_CFD/include/variables/CVariable.hpp +++ b/SU2_CFD/include/variables/CVariable.hpp @@ -2159,9 +2159,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 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/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 f48c187cde8..1d66afac8fb 100644 --- a/SU2_CFD/src/output/CFlowOutput.cpp +++ b/SU2_CFD/src/output/CFlowOutput.cpp @@ -1808,7 +1808,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 74238103e2d..22f91366005 100644 --- a/SU2_CFD/src/output/output_structure_legacy.cpp +++ b/SU2_CFD/src/output/output_structure_legacy.cpp @@ -3128,7 +3128,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 1e9a6c76e55..88b12a0a4e2 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 30e29bf23b8..cc001376962 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 2c4eca0d5ea..bc1a74d1efb 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/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 27faa9eb549..089fb881f0b 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,30 +642,25 @@ 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. - At this moment, the wall function is only available for adiabatic flows. - ---*/ +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. ---*/ - 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; - 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 auto max_iter = config->GetwallModel_MaxIter(); + const su2double relax = config->GetwallModel_RelFac(); - /*--- Compute the recovery factor ---*/ + /*--- Compute the recovery factor use Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) ---*/ - // 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 ---*/ - 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++) { @@ -677,16 +672,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; - - /*--- 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); - - // heat flux from temperature: q_w = h*(T_wall - T_fluid) + if (config->GetWallFunction_Treatment(Marker_Tag) != WALL_FUNCTIONS::STANDARD_FUNCTION) + continue; /*--- Loop over all of the vertices on this boundary marker ---*/ @@ -697,7 +684,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; @@ -710,7 +697,7 @@ void CIncNSSolver::SetTauWall_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++) @@ -725,13 +712,13 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container /*--- 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 ---*/ @@ -744,129 +731,132 @@ void CIncNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container * In incompressible flows, we can assume that there is no velocity-related * temperature change Prandtl: T+ = Pr*y+ ---*/ su2double T_Wall = nodes->GetTemperature(iPoint); + const su2double Conductivity_Wall = nodes->GetThermalConductivity(iPoint); - /*--- Extrapolate the pressure from the interior & compute the - wall density using the equation of state ---*/ + /*--- If a wall temperature was given, we compute the local heat flux using k*dT/dn ---*/ + + su2double q_w = 0.0; + + 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) / 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(); + q_w = Transfer_Coefficient * (Tinfinity - T_Wall); + } + + /*--- Incompressible formulation ---*/ - /*--- incompressible formulation ---*/ su2double Density_Wall = nodes->GetDensity(iPoint); - su2double Conductivity_Wall = nodes->GetThermalConductivity(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 ---*/ + * 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); - // 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}; 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 - 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; su2double U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall)); - su2double Y_Plus = 5.0; // clipping value + /*--- 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(); - 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+ < 5 according to Nichols & Nelson (2004) ---*/ + /*--- Automatic switch off when y+ < "limit" according to Nichols & Nelson (2004) ---*/ - if (Y_Plus_Start < Y_Plus) { - /*--- impose a minimum y+ for stability reasons---*/ + if (Y_Plus_Start < config->GetwallModel_MinYPlus()) { smallYPlusCounter++; + continue; } - else { - while (fabs(diff) > tol) { - /*--- Friction velocity and u+ ---*/ + /*--- Convergence criterium for the Newton solver, note that 1e-10 is too large ---*/ + const su2double tol = 1e-12; + while (fabs(diff) > tol) { - su2double U_Plus = VelTangMod/U_Tau; + /*--- Friction velocity and u+ ---*/ - /*--- Gamma, Beta, Q, and Phi, defined by Nichols & Nelson (2004) page 1110 ---*/ + const su2double 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); // TODO: nonzero heatflux needs validation case - 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 ---*/ - /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - 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); - su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); + /*--- Y+ defined by White & Christoph (compressibility and heat transfer) negative value for (2.0*Gam*U_Plus - Beta)/Q ---*/ - /*--- Spalding's universal form for the BL velocity with the - outer velocity form of White & Christoph above. ---*/ + const su2double Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*B); - 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)); + /*--- 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) - - 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 --- */ - 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; + 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; - /* --- 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++; - // use some safe values for convergence - Y_Plus = 30.0; - Eddy_Visc_Wall = 1.0; - U_Tau = 1.0; - break; - } + 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; + 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. ---*/ - + * 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; - // 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? + const 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; - - 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: - // ...? + /*--- Store this value for the wall shear stress at the node. ---*/ + 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 cacd6df59f7..981c8b2e1fb 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,7 +1068,7 @@ 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 d2a285c2486..ff1e26ae0c9 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" * @@ -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,28 +784,28 @@ 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 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, 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 unsigned short max_iter = config->GetwallModel_MaxIter(); + const su2double relax = config->GetwallModel_RelFac(); - 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 + * use Molecular (Laminar) Prandtl number (see Nichols & Nelson, nomenclature ) ---*/ - /*--- Compute the recovery factor ---*/ - // 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 ---*/ - 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++) { @@ -820,14 +820,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 - 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 ---*/ SU2_OMP_FOR_DYN(OMP_MIN_SIZE) @@ -837,7 +829,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; @@ -850,7 +842,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c 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++) @@ -863,100 +855,126 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c 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); - /*--- Compute the wall temperature using the Crocco-Buseman equation ---*/ + /*--- Initial value for wall temperature ---*/ + + su2double q_w = 0.0; - //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); + if (config->GetMarker_All_KindBC(iMarker) == HEAT_FLUX) { + 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 ---*/ - su2double P_Wall = P_Normal; - su2double Density_Wall = P_Wall/(Gas_Constant*T_Wall); - su2double Conductivity_Wall = nodes->GetThermalConductivity(iPoint); - su2double Lam_Visc_Normal = nodes->GetLaminarViscosity(Point_Normal); + /*--- Compressible formulation ---*/ + + su2double T_Wall = nodes->GetTemperature(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 ---*/ + * 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); 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 - 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, Eddy_Visc = 1.0; - su2double U_Tau = sqrt(WallShearStress/Density_Wall); - su2double Y_Plus = 5.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 - 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+ < 5 according to Nichols & Nelson (2004) ---*/ + /*--- Automatic switch off when y+ < "limit" according to Nichols & Nelson (2004) ---*/ - if (Y_Plus_Start < Y_Plus) { - skipCounter++; + if (Y_Plus_Start < config->GetwallModel_MinYPlus()) { + 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+ ---*/ - 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); - /*--- 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); + 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) { + 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); + } + else { + cout << "Warning: T_Wall < 0 " << endl; + } + } + + /*--- 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 ---*/ - 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. ---*/ - - 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)); + * 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 = 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 --- */ @@ -964,7 +982,7 @@ void CNSSolver::SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, c /* --- 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; @@ -974,39 +992,33 @@ 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 Y_Plus = 30.0; - Eddy_Visc = 1.0; + Eddy_Visc_Wall = 1.0; U_Tau = 1.0; 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. ---*/ + * 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; + 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); - - for (auto iDim = 0u; iDim < nDim; iDim++) - CSkinFriction[iMarker](iVertex,iDim) = (Tau_Wall/WallShearStress)*TauTangent[iDim] / DynamicPressureRef; + 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->SetTauWall(iPoint, Tau_Wall); + nodes->SetTau_Wall(iPoint, Tau_Wall); } - + END_SU2_OMP_FOR } - END_SU2_OMP_FOR if (config->GetComm_Level() == COMM_FULL) { static unsigned long globalCounter1, globalCounter2; @@ -1017,20 +1029,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/solvers/CTurbSASolver.cpp b/SU2_CFD/src/solvers/CTurbSASolver.cpp index 0585959c703..5f892024b32 100644 --- a/SU2_CFD/src/solvers/CTurbSASolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSASolver.cpp @@ -1273,11 +1273,11 @@ 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; + const unsigned short max_iter = config->GetwallModel_MaxIter(); /* --- tolerance has LARGE impact on convergence, do not increase this value! --- */ const su2double tol = 1e-12; - su2double relax = 0.5; /*--- relaxation factor for the Newton solver ---*/ + /*--- Typical constants from boundary layer theory ---*/ @@ -1298,9 +1298,9 @@ void CTurbSASolver::SetTurbVars_WF(CGeometry *geometry, CSolver **solver_contain su2double Y_Plus = solver_container[FLOW_SOL]->GetYPlus(val_marker, iVertex); - /*--- note that we do not do anything for y+ < 5, meaning that we have a zero flux (Neumann) boundary condition ---*/ + /*--- Do not use wall model at the ipoint when y+ < "limit" ---*/ - if (Y_Plus < 5.0) 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; - relax = 0.5; + 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 97e18236fdb..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 kappa = config->GetwallModel_Kappa(); + const su2double minYPlus = config->GetwallModel_MinYPlus(); /*--- relaxation factor for k-omega values ---*/ - const su2double relax = 0.5; + const su2double relax = config->GetwallModel_RelFac(); /*--- Loop over all of the vertices on this boundary marker ---*/ @@ -494,9 +494,12 @@ 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 < 5.0) continue; + if (Y_Plus < minYPlus) { + /* --- Use zero flux (Neumann) conditions, i.e. nothing has to be done. --- */ + continue; + } su2double Eddy_Visc = solver_container[FLOW_SOL]->GetEddyViscWall(val_marker, iVertex); su2double k = nodes->GetSolution(iPoint_Neighbor,0); diff --git a/SU2_CFD/src/variables/CIncNSVariable.cpp b/SU2_CFD/src/variables/CIncNSVariable.cpp index 87ab8e24d9a..0fed2816f11 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/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) % diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 6bb5c099937..2fdeefff9f4 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 = [-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 + 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, -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 + test_list.append(turb_wallfunction_flatplate_sa) + # ONERA M6 Wing turb_oneram6 = TestCase('turb_oneram6') turb_oneram6.cfg_dir = "rans/oneram6" @@ -548,6 +570,28 @@ def main(): inc_turb_naca0012_sst_sust.tol = 0.00001 test_list.append(inc_turb_naca0012_sst_sust) + # 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 = [-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 + test_list.append(inc_turb_wallfunction_flatplate_sst) + + # 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 = [-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 + test_list.append(inc_turb_wallfunction_flatplate_sa) + #################### ### DG-FEM Euler ### #################### diff --git a/TestCases/wallfunctions/flatplate/compressible_SA/turb_SA_flatplate.cfg b/TestCases/wallfunctions/flatplate/compressible_SA/turb_SA_flatplate.cfg new file mode 100644 index 00000000000..c58c578606c --- /dev/null +++ b/TestCases/wallfunctions/flatplate/compressible_SA/turb_SA_flatplate.cfg @@ -0,0 +1,109 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% SU2 configuration file % +% 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 +RESTART_SOL= NO +% +% ----------- COMPRESSIBLE AND INCOMPRESSIBLE FREE-STREAM DEFINITION ----------% +% +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 ) +% +% ------------------------ 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= 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 -----------------------% +% +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 +MESH_FORMAT= SU2 +% +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) +MARKER_PLOTTING= ( wall ) +MARKER_MONITORING= ( wall ) +% +OUTPUT_FILES= RESTART, PARAVIEW_MULTIBLOCK +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 new file mode 100644 index 00000000000..ed79f8c9207 --- /dev/null +++ b/TestCases/wallfunctions/flatplate/compressible_SST/turb_SST_flatplate.cfg @@ -0,0 +1,109 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% SU2 configuration file % +% 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 +RESTART_SOL= NO +% +% ----------- COMPRESSIBLE AND INCOMPRESSIBLE FREE-STREAM DEFINITION ----------% +% +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 ) +% +% ------------------------ 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= 4e2 +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 -----------------------% +% +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 +MESH_FORMAT= SU2 +% +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) +MARKER_PLOTTING= ( wall ) +MARKER_MONITORING= ( wall ) +% +OUTPUT_FILES= RESTART, PARAVIEW_MULTIBLOCK +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 new file mode 100644 index 00000000000..8065f7d1c86 --- /dev/null +++ b/TestCases/wallfunctions/flatplate/incompressible_SA/turb_SA_flatplate.cfg @@ -0,0 +1,111 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% SU2 configuration file % +% 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 +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 +% +% ---------------------- 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 ) +% +% ------------------------ 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= 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 -----------------------% +% +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 +MESH_FORMAT= SU2 +% +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) +MARKER_PLOTTING= ( wall ) +MARKER_MONITORING= ( wall ) +% +OUTPUT_FILES= RESTART, PARAVIEW_MULTIBLOCK +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 new file mode 100644 index 00000000000..22b34b120aa --- /dev/null +++ b/TestCases/wallfunctions/flatplate/incompressible_SST/turb_SST_flatplate.cfg @@ -0,0 +1,111 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% SU2 configuration file % +% 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 +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 +% +% ---------------------- 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 ) +% +% ------------------------ 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= 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 -----------------------% +% +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 +MESH_FORMAT= SU2 +% +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) +MARKER_PLOTTING= ( wall ) +MARKER_MONITORING= ( wall ) +% +OUTPUT_FILES= RESTART, PARAVIEW_MULTIBLOCK +VOLUME_OUTPUT= RESIDUAL, PRIMITIVE, RESIDUAL +OUTPUT_WRT_FREQ= 1000 diff --git a/config_template.cfg b/config_template.cfg index 307183f1278..48a836851c5 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -913,6 +913,23 @@ CATALYTIC_WALL= ( NONE ) WALL_ROUGHNESS = (wall1, ks1, wall2, ks2) %WALL_ROUGHNESS = (wall1, ks1, wall2, 0.0) %is also allowed +% ------------------------ WALL FUNCTION DEFINITION --------------------------% +% +% The von Karman constant, the constant below only affects the standard wall function model +WALLMODEL_KAPPA= 0.41 +% +% The wall function model constant B +WALLMODEL_B= 5.5 +% +% The y+ value below which the wall function is switched off and we resolve the wall +WALLMODEL_MINYPLUS= 5.0 +% +% [Expert] Max Newton iterations used for the standard wall function +WALLMODEL_MAXITER= 200 +% +% [Expert] relaxation factor for the Newton iterations of the standard wall function +WALLMODEL_RELFAC= 0.5 + % ------------------------ SURFACES IDENTIFICATION ----------------------------% % % Marker(s) of the surface in the surface flow solution file