From 78a98ffdc5743f80dc93f5d214fc3412a73ee15c Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Mon, 31 Jan 2022 10:37:16 +0100 Subject: [PATCH 01/15] Add Integrated Heatflux to Inc/Comp flow as well. Therefore a SurfaceArea routine was added to CGeometry which is called once in the GeoPreproc of the Driver. This central Surface area comp makes the HF change straight forward and might be useful in some other cases. The ordering of the SurfaceArea vector of CGeometry follows the Global cfg ordering. --- Common/include/CConfig.hpp | 2 +- Common/include/geometry/CGeometry.hpp | 7 ++++++ Common/src/CConfig.cpp | 4 ++-- Common/src/geometry/CGeometry.cpp | 34 +++++++++++++++++++++++++++ SU2_CFD/src/drivers/CDriver.cpp | 4 ++++ SU2_CFD/src/solvers/CIncNSSolver.cpp | 14 +++++++++++ SU2_CFD/src/solvers/CNSSolver.cpp | 14 +++++++++++ 7 files changed, 76 insertions(+), 3 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 2f103c455276..66f7e35a23ea 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -9099,7 +9099,7 @@ class CConfig { * \brief Check if values passed to the BC_HeatFlux-Routine are already integrated. * \return YES if the passed values is the integrated heat flux over the marker's surface. */ - bool GetIntegrated_HeatFlux(void) const { return Integrated_HeatFlux; } + bool GetIntegrated_HeatFlux() const { return Integrated_HeatFlux; } /*! * \brief Get Compute Average. diff --git a/Common/include/geometry/CGeometry.hpp b/Common/include/geometry/CGeometry.hpp index f1acbb31ceed..1b2ace18316b 100644 --- a/Common/include/geometry/CGeometry.hpp +++ b/Common/include/geometry/CGeometry.hpp @@ -199,6 +199,7 @@ class CGeometry { unsigned long *nElem_Bound{nullptr}; /*!< \brief Number of elements of the boundary. */ string *Tag_to_Marker{nullptr}; /*!< \brief Names of boundary markers. */ vector bound_is_straight; /*!< \brief Bool if boundary-marker is straight(2D)/plane(3D) for each local marker. */ + vector SurfaceArea; /*!< \brief Total Surface area for all markers. */ /*--- Partitioning-specific variables ---*/ @@ -910,6 +911,12 @@ class CGeometry { */ inline virtual void SetRestricted_GridVelocity(const CGeometry *fine_grid) {} + /*! + * \brief Compute the surface area of all global markers. + * \param[in] config - Definition of the particular problem. + */ + void ComputeSurfaceArea(const CConfig *config); + /*! * \brief Check if a boundary is straight(2D) / plane(3D) for EULER_WALL and SYMMETRY_PLANE * only and store the information in bound_is_straight. For all other boundary types diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 9877faf0c2df..f505d1b78526 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1572,6 +1572,8 @@ void CConfig::SetConfig_Options() { /*!\brief MARKER_HEATFLUX \n DESCRIPTION: Specified heat flux wall boundary marker(s) Format: ( Heat flux marker, wall heat flux (static), ... ) \ingroup Config*/ addStringDoubleListOption("MARKER_HEATFLUX", nMarker_HeatFlux, Marker_HeatFlux, Heat_Flux); + /*!\brief INTEGRATED_HEATFLUX \n DESCRIPTION: Prescribe Heatflux in [W] instead of [W/m^2] \ingroup Config \default false */ + addBoolOption("INTEGRATED_HEATFLUX", Integrated_HeatFlux, false); /*!\brief MARKER_HEATTRANSFER DESCRIPTION: Heat flux with specified heat transfer coefficient boundary marker(s)\n * Format: ( Heat transfer marker, heat transfer coefficient, wall temperature (static), ... ) \ingroup Config */ addExhaustOption("MARKER_HEATTRANSFER", nMarker_HeatTransfer, Marker_HeatTransfer, HeatTransfer_Coeff, HeatTransfer_WallTemp); @@ -1589,8 +1591,6 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Fan poly efficiency */ addDoubleOption("FAN_POLY_EFF", Fan_Poly_Eff, 1.0); /*!\brief SUBSONIC_ENGINE\n DESCRIPTION: Engine subsonic intake region \ingroup Config*/ - addBoolOption("INTEGRATED_HEATFLUX", Integrated_HeatFlux, false); - /*!\brief SUBSONIC_ENGINE\n DESCRIPTION: Engine subsonic intake region \ingroup Config*/ addBoolOption("SUBSONIC_ENGINE", SubsonicEngine, false); /* DESCRIPTION: Actuator disk double surface */ addBoolOption("ACTDISK_DOUBLE_SURFACE", ActDisk_DoubleSurface, false); diff --git a/Common/src/geometry/CGeometry.cpp b/Common/src/geometry/CGeometry.cpp index 48e31afae303..98758fe32db1 100644 --- a/Common/src/geometry/CGeometry.cpp +++ b/Common/src/geometry/CGeometry.cpp @@ -2503,6 +2503,40 @@ void CGeometry::UpdateCustomBoundaryConditions(CGeometry **geometry_container, C } } +void CGeometry::ComputeSurfaceArea(const CConfig *config) { + const auto nMarker_Global = config->GetnMarker_CfgFile(); + SurfaceArea.resize(nMarker_Global); + vector LocalSurfaceArea(nMarker_Global, 0.0); + + /*--- Loop over all local markers ---*/ + for (unsigned short iMarker = 0; iMarker < nMarker; iMarker++) { + + const auto Local_TagBound = config->GetMarker_All_TagBound(iMarker); + + /*--- Loop over all global markers, and find the local-global pair via + matching unique string tags. ---*/ + for (unsigned short iMarker_Global = 0; iMarker_Global < nMarker_Global; iMarker_Global++) { + + const auto Global_TagBound = config->GetMarker_CfgFile_TagBound(iMarker_Global); + if (Local_TagBound == Global_TagBound) { + + for(auto iVertex = 0ul; iVertex < nVertex[iMarker]; iVertex++ ) { + + const auto iPoint = vertex[iMarker][iVertex]->GetNode(); + + if(!nodes->GetDomain(iPoint)) continue; + + const auto AreaNormal = vertex[iMarker][iVertex]->GetNormal(); + const auto Area = GeometryToolbox::Norm(nDim, AreaNormal); + + LocalSurfaceArea[iMarker_Global] += Area; + }// for iVertex + }//if Local == Global + }//for iMarker_Global + }//for iMarker + + SU2_MPI::Allreduce(LocalSurfaceArea.data(), SurfaceArea.data(), SurfaceArea.size(), MPI_DOUBLE, MPI_SUM, SU2_MPI::GetComm()); +} void CGeometry::ComputeSurf_Straightness(CConfig *config, bool print_on_screen) { diff --git a/SU2_CFD/src/drivers/CDriver.cpp b/SU2_CFD/src/drivers/CDriver.cpp index fa14d73fe349..3f0cda7faa61 100644 --- a/SU2_CFD/src/drivers/CDriver.cpp +++ b/SU2_CFD/src/drivers/CDriver.cpp @@ -812,6 +812,10 @@ void CDriver::Geometrical_Preprocessing_FVM(CConfig *config, CGeometry **&geomet geometry[MESH_0]->ComputeSurf_Curvature(config); } + /*--- Compute the global surface areas for all markers. ---*/ + + geometry[MESH_0]->ComputeSurfaceArea(config); + /*--- Check for periodicity and disable MG if necessary. ---*/ if (rank == MASTER_NODE) cout << "Checking for periodicity." << endl; diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 9329c8b023a7..dbf98bbe4157 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -387,6 +387,20 @@ void CIncNSSolver::BC_Wall_Generic(const CGeometry *geometry, const CConfig *con switch(kind_boundary) { case HEAT_FLUX: Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); + + /*---For integrated Heatflux in [W] instead [W/m^2] find the precomputed marker Surface Area by local-global string-matching. ---*/ + if(config->GetIntegrated_HeatFlux()) { + + for (unsigned short iMarker_Global = 0; iMarker_Global < config->GetnMarker_CfgFile(); iMarker_Global++) { + + const auto Global_TagBound = config->GetMarker_CfgFile_TagBound(iMarker_Global); + + if (Marker_Tag == Global_TagBound) { + Wall_HeatFlux /= geometry->SurfaceArea[iMarker_Global]; + break; + } + } + } break; case ISOTHERMAL: Twall = config->GetIsothermal_Temperature(Marker_Tag)/config->GetTemperature_Ref(); diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index b6911f527886..df8e0a7253de 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -436,6 +436,20 @@ void CNSSolver::BC_HeatFlux_Wall_Generic(const CGeometry *geometry, const CConfi if (kind_boundary == HEAT_FLUX) { Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); + + /*---For integrated Heatflux in [W] instead [W/m^2] find the precomputed marker Surface Area by local-global string-matching. ---*/ + if(config->GetIntegrated_HeatFlux()) { + + for (unsigned short iMarker_Global = 0; iMarker_Global < config->GetnMarker_CfgFile(); iMarker_Global++) { + + const auto Global_TagBound = config->GetMarker_CfgFile_TagBound(iMarker_Global); + + if (Marker_Tag == Global_TagBound) { + Wall_HeatFlux /= geometry->SurfaceArea[iMarker_Global]; + break; + } + } + } } else if (kind_boundary == HEAT_TRANSFER) { /*--- The required heatflux will be computed for each iPoint individually based on local Temperature. ---*/ From 965f1544552b108519c1d07a749c07f66e320897 Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Mon, 31 Jan 2022 10:42:04 +0100 Subject: [PATCH 02/15] Little cleanup in Heatsolvers heatflux bc --- SU2_CFD/src/solvers/CHeatSolver.cpp | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/SU2_CFD/src/solvers/CHeatSolver.cpp b/SU2_CFD/src/solvers/CHeatSolver.cpp index cd1465983c4d..52fbfb2fb98f 100644 --- a/SU2_CFD/src/solvers/CHeatSolver.cpp +++ b/SU2_CFD/src/solvers/CHeatSolver.cpp @@ -622,28 +622,22 @@ void CHeatSolver::BC_Isothermal_Wall(CGeometry *geometry, CSolver **solver_conta } void CHeatSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, - unsigned short val_marker) { + unsigned short val_marker) { + const auto Marker_Tag = config->GetMarker_All_TagBound(val_marker); - su2double Area, *Normal; - - string Marker_Tag = config->GetMarker_All_TagBound(val_marker); - - su2double Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag); + su2double Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag) / config->GetHeat_Flux_Ref(); if(config->GetIntegrated_HeatFlux()) { - string HeatFlux_Tag, Marker_Tag; - - for (auto iMarker_HeatFlux = 0u; iMarker_HeatFlux < config->GetnMarker_HeatFlux(); iMarker_HeatFlux++ ) { + for (unsigned short iMarker_Global = 0; iMarker_Global < config->GetnMarker_CfgFile(); iMarker_Global++) { - HeatFlux_Tag = config->GetMarker_HeatFlux_TagBound(iMarker_HeatFlux); - Marker_Tag = config->GetMarker_All_TagBound(val_marker); + const auto Global_TagBound = config->GetMarker_CfgFile_TagBound(iMarker_Global); - if (Marker_Tag == HeatFlux_Tag) { - Wall_HeatFlux = Wall_HeatFlux / Surface_Areas[iMarker_HeatFlux]; + if (Marker_Tag == Global_TagBound) { + Wall_HeatFlux = Wall_HeatFlux / geometry->SurfaceArea[iMarker_Global]; + break; } } } - Wall_HeatFlux = Wall_HeatFlux/config->GetHeat_Flux_Ref(); for (auto iVertex = 0ul; iVertex < geometry->nVertex[val_marker]; iVertex++) { @@ -651,8 +645,8 @@ void CHeatSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_contain if (geometry->nodes->GetDomain(iPoint)) { - Normal = geometry->vertex[val_marker][iVertex]->GetNormal(); - Area = GeometryToolbox::Norm(nDim, Normal); + const auto Normal = geometry->vertex[val_marker][iVertex]->GetNormal(); + const auto Area = GeometryToolbox::Norm(nDim, Normal); Res_Visc[0] = 0.0; From 64527108adde0ca6ab9da2adc02c5275289f4229 Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Mon, 31 Jan 2022 10:57:35 +0100 Subject: [PATCH 03/15] Remove now superfluous SurfaceArea computation since that is computed centrally. --- SU2_CFD/include/solvers/CHeatSolver.hpp | 1 - SU2_CFD/src/solvers/CHeatSolver.cpp | 20 +++----------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/SU2_CFD/include/solvers/CHeatSolver.hpp b/SU2_CFD/include/solvers/CHeatSolver.hpp index 15a0e35ce59d..557010f5beba 100644 --- a/SU2_CFD/include/solvers/CHeatSolver.hpp +++ b/SU2_CFD/include/solvers/CHeatSolver.hpp @@ -54,7 +54,6 @@ class CHeatSolver final : public CSolver { su2double AllBound_AverageT; vector Primitive_Flow_i; vector Primitive_Flow_j; - vector Surface_Areas; su2double Total_HeatFlux_Areas; su2double Total_HeatFlux_Areas_Monitor; vector ConjugateVar; diff --git a/SU2_CFD/src/solvers/CHeatSolver.cpp b/SU2_CFD/src/solvers/CHeatSolver.cpp index 52fbfb2fb98f..19c8b335d109 100644 --- a/SU2_CFD/src/solvers/CHeatSolver.cpp +++ b/SU2_CFD/src/solvers/CHeatSolver.cpp @@ -98,7 +98,6 @@ CHeatSolver::CHeatSolver(CGeometry *geometry, CConfig *config, unsigned short iM HeatFlux_per_Marker.resize(nMarker, 0.0); AverageT_per_Marker.resize(nMarker, 0.0); - Surface_Areas.resize(config->GetnMarker_HeatFlux(), 0.0); Set_Heatflux_Areas(geometry, config); @@ -519,14 +518,8 @@ void CHeatSolver::Viscous_Residual(CGeometry *geometry, CSolver **solver_contain void CHeatSolver::Set_Heatflux_Areas(CGeometry *geometry, CConfig *config) { - string HeatFlux_Tag, Marker_Tag; + su2double Local_HeatFlux_Areas_Monitor, Area, *Normal; - su2double *Local_Surface_Areas, Local_HeatFlux_Areas_Monitor, Area, *Normal; - Local_Surface_Areas = new su2double[config->GetnMarker_HeatFlux()]; - - for (auto iMarker_HeatFlux = 0u; iMarker_HeatFlux < config->GetnMarker_HeatFlux(); iMarker_HeatFlux++ ) { - Local_Surface_Areas[iMarker_HeatFlux] = 0.0; - } Local_HeatFlux_Areas_Monitor = 0.0; for (auto iMarker = 0u; iMarker < nMarker; iMarker++) { @@ -535,13 +528,11 @@ void CHeatSolver::Set_Heatflux_Areas(CGeometry *geometry, CConfig *config) { for (auto iMarker_HeatFlux = 0u; iMarker_HeatFlux < config->GetnMarker_HeatFlux(); iMarker_HeatFlux++ ) { - HeatFlux_Tag = config->GetMarker_HeatFlux_TagBound(iMarker_HeatFlux); - Marker_Tag = config->GetMarker_All_TagBound(iMarker); + const auto HeatFlux_Tag = config->GetMarker_HeatFlux_TagBound(iMarker_HeatFlux); + const auto Marker_Tag = config->GetMarker_All_TagBound(iMarker); if (Marker_Tag == HeatFlux_Tag) { - Local_Surface_Areas[iMarker_HeatFlux] = 0.0; - for(auto iVertex = 0ul; iVertex < geometry->nVertex[iMarker]; iVertex++ ) { const auto iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); @@ -551,8 +542,6 @@ void CHeatSolver::Set_Heatflux_Areas(CGeometry *geometry, CConfig *config) { Normal = geometry->vertex[iMarker][iVertex]->GetNormal(); Area = GeometryToolbox::Norm(nDim, Normal); - Local_Surface_Areas[iMarker_HeatFlux] += Area; - if(Monitoring == YES) Local_HeatFlux_Areas_Monitor += Area; @@ -561,15 +550,12 @@ void CHeatSolver::Set_Heatflux_Areas(CGeometry *geometry, CConfig *config) { } } - SU2_MPI::Allreduce(Local_Surface_Areas, Surface_Areas.data(), Surface_Areas.size(), MPI_DOUBLE, MPI_SUM, SU2_MPI::GetComm()); SU2_MPI::Allreduce(&Local_HeatFlux_Areas_Monitor, &Total_HeatFlux_Areas_Monitor, 1, MPI_DOUBLE, MPI_SUM, SU2_MPI::GetComm()); Total_HeatFlux_Areas = 0.0; for(auto iMarker_HeatFlux = 0u; iMarker_HeatFlux < config->GetnMarker_HeatFlux(); iMarker_HeatFlux++ ) { Total_HeatFlux_Areas += Surface_Areas[iMarker_HeatFlux]; } - - delete[] Local_Surface_Areas; } void CHeatSolver::BC_Isothermal_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, From e198acf3013adec2a287d425cbf204e806d3828d Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Mon, 31 Jan 2022 11:13:27 +0100 Subject: [PATCH 04/15] Revert "Remove now superfluous SurfaceArea computation since that is computed centrally." This reverts commit 64527108adde0ca6ab9da2adc02c5275289f4229. --- SU2_CFD/include/solvers/CHeatSolver.hpp | 1 + SU2_CFD/src/solvers/CHeatSolver.cpp | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/SU2_CFD/include/solvers/CHeatSolver.hpp b/SU2_CFD/include/solvers/CHeatSolver.hpp index 557010f5beba..15a0e35ce59d 100644 --- a/SU2_CFD/include/solvers/CHeatSolver.hpp +++ b/SU2_CFD/include/solvers/CHeatSolver.hpp @@ -54,6 +54,7 @@ class CHeatSolver final : public CSolver { su2double AllBound_AverageT; vector Primitive_Flow_i; vector Primitive_Flow_j; + vector Surface_Areas; su2double Total_HeatFlux_Areas; su2double Total_HeatFlux_Areas_Monitor; vector ConjugateVar; diff --git a/SU2_CFD/src/solvers/CHeatSolver.cpp b/SU2_CFD/src/solvers/CHeatSolver.cpp index 19c8b335d109..52fbfb2fb98f 100644 --- a/SU2_CFD/src/solvers/CHeatSolver.cpp +++ b/SU2_CFD/src/solvers/CHeatSolver.cpp @@ -98,6 +98,7 @@ CHeatSolver::CHeatSolver(CGeometry *geometry, CConfig *config, unsigned short iM HeatFlux_per_Marker.resize(nMarker, 0.0); AverageT_per_Marker.resize(nMarker, 0.0); + Surface_Areas.resize(config->GetnMarker_HeatFlux(), 0.0); Set_Heatflux_Areas(geometry, config); @@ -518,8 +519,14 @@ void CHeatSolver::Viscous_Residual(CGeometry *geometry, CSolver **solver_contain void CHeatSolver::Set_Heatflux_Areas(CGeometry *geometry, CConfig *config) { - su2double Local_HeatFlux_Areas_Monitor, Area, *Normal; + string HeatFlux_Tag, Marker_Tag; + su2double *Local_Surface_Areas, Local_HeatFlux_Areas_Monitor, Area, *Normal; + Local_Surface_Areas = new su2double[config->GetnMarker_HeatFlux()]; + + for (auto iMarker_HeatFlux = 0u; iMarker_HeatFlux < config->GetnMarker_HeatFlux(); iMarker_HeatFlux++ ) { + Local_Surface_Areas[iMarker_HeatFlux] = 0.0; + } Local_HeatFlux_Areas_Monitor = 0.0; for (auto iMarker = 0u; iMarker < nMarker; iMarker++) { @@ -528,11 +535,13 @@ void CHeatSolver::Set_Heatflux_Areas(CGeometry *geometry, CConfig *config) { for (auto iMarker_HeatFlux = 0u; iMarker_HeatFlux < config->GetnMarker_HeatFlux(); iMarker_HeatFlux++ ) { - const auto HeatFlux_Tag = config->GetMarker_HeatFlux_TagBound(iMarker_HeatFlux); - const auto Marker_Tag = config->GetMarker_All_TagBound(iMarker); + HeatFlux_Tag = config->GetMarker_HeatFlux_TagBound(iMarker_HeatFlux); + Marker_Tag = config->GetMarker_All_TagBound(iMarker); if (Marker_Tag == HeatFlux_Tag) { + Local_Surface_Areas[iMarker_HeatFlux] = 0.0; + for(auto iVertex = 0ul; iVertex < geometry->nVertex[iMarker]; iVertex++ ) { const auto iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); @@ -542,6 +551,8 @@ void CHeatSolver::Set_Heatflux_Areas(CGeometry *geometry, CConfig *config) { Normal = geometry->vertex[iMarker][iVertex]->GetNormal(); Area = GeometryToolbox::Norm(nDim, Normal); + Local_Surface_Areas[iMarker_HeatFlux] += Area; + if(Monitoring == YES) Local_HeatFlux_Areas_Monitor += Area; @@ -550,12 +561,15 @@ void CHeatSolver::Set_Heatflux_Areas(CGeometry *geometry, CConfig *config) { } } + SU2_MPI::Allreduce(Local_Surface_Areas, Surface_Areas.data(), Surface_Areas.size(), MPI_DOUBLE, MPI_SUM, SU2_MPI::GetComm()); SU2_MPI::Allreduce(&Local_HeatFlux_Areas_Monitor, &Total_HeatFlux_Areas_Monitor, 1, MPI_DOUBLE, MPI_SUM, SU2_MPI::GetComm()); Total_HeatFlux_Areas = 0.0; for(auto iMarker_HeatFlux = 0u; iMarker_HeatFlux < config->GetnMarker_HeatFlux(); iMarker_HeatFlux++ ) { Total_HeatFlux_Areas += Surface_Areas[iMarker_HeatFlux]; } + + delete[] Local_Surface_Areas; } void CHeatSolver::BC_Isothermal_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, From 853f5d65b5488d5253f3bdb80e52116f09087e66 Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Mon, 31 Jan 2022 11:22:25 +0100 Subject: [PATCH 05/15] Move HF adaption to centralized CSolver and add NEMO HF-walls. --- SU2_CFD/include/solvers/CSolver.hpp | 23 +++++++++++++++++++++++ SU2_CFD/src/solvers/CHeatSolver.cpp | 11 +---------- SU2_CFD/src/solvers/CIncNSSolver.cpp | 13 +------------ SU2_CFD/src/solvers/CNEMONSSolver.cpp | 6 ++++++ SU2_CFD/src/solvers/CNSSolver.cpp | 13 +------------ 5 files changed, 32 insertions(+), 34 deletions(-) diff --git a/SU2_CFD/include/solvers/CSolver.hpp b/SU2_CFD/include/solvers/CSolver.hpp index 71dcf9b4ebcd..caa41488c94b 100644 --- a/SU2_CFD/include/solvers/CSolver.hpp +++ b/SU2_CFD/include/solvers/CSolver.hpp @@ -984,6 +984,29 @@ class CSolver { CConfig *config, unsigned short val_marker) { } + /*! + * \brief Adapt Heatflux value for integrated heatflux. + * \param[in,out] Wall_HeatFlux - Heatflux in [W] which is to be adapted to [W/m^2]. + * \param[in] config - Definition of the particular problem. + * \param[in] val_marker - Surface marker where the boundary condition is applied. + * \param[in] geometry - Geometrical definition of the problem. + */ + void UpdateIntegrated_Heatflux(su2double* Wall_HeatFlux, unsigned short val_marker, const CConfig *config, + const CGeometry* geometry) const { + /*---For integrated Heatflux in [W] instead [W/m^2] find the precomputed marker Surface Area by local-global string-matching. ---*/ + const auto Marker_Tag = config->GetMarker_All_TagBound(val_marker); + + for (unsigned short iMarker_Global = 0; iMarker_Global < config->GetnMarker_CfgFile(); iMarker_Global++) { + + const auto Global_TagBound = config->GetMarker_CfgFile_TagBound(iMarker_Global); + + if (Marker_Tag == Global_TagBound) { + *Wall_HeatFlux /= geometry->SurfaceArea[iMarker_Global]; + break; + } + } + } + /*! * \brief Impose a heat flux by prescribing a heat transfer coefficient and a temperature at infinity. * \param[in] geometry - Geometrical definition of the problem. diff --git a/SU2_CFD/src/solvers/CHeatSolver.cpp b/SU2_CFD/src/solvers/CHeatSolver.cpp index 52fbfb2fb98f..a9cad26785ec 100644 --- a/SU2_CFD/src/solvers/CHeatSolver.cpp +++ b/SU2_CFD/src/solvers/CHeatSolver.cpp @@ -627,16 +627,7 @@ void CHeatSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_contain su2double Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag) / config->GetHeat_Flux_Ref(); if(config->GetIntegrated_HeatFlux()) { - - for (unsigned short iMarker_Global = 0; iMarker_Global < config->GetnMarker_CfgFile(); iMarker_Global++) { - - const auto Global_TagBound = config->GetMarker_CfgFile_TagBound(iMarker_Global); - - if (Marker_Tag == Global_TagBound) { - Wall_HeatFlux = Wall_HeatFlux / geometry->SurfaceArea[iMarker_Global]; - break; - } - } + UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config, geometry); } for (auto iVertex = 0ul; iVertex < geometry->nVertex[val_marker]; iVertex++) { diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index dbf98bbe4157..ffbee7751867 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -387,19 +387,8 @@ void CIncNSSolver::BC_Wall_Generic(const CGeometry *geometry, const CConfig *con switch(kind_boundary) { case HEAT_FLUX: Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); - - /*---For integrated Heatflux in [W] instead [W/m^2] find the precomputed marker Surface Area by local-global string-matching. ---*/ if(config->GetIntegrated_HeatFlux()) { - - for (unsigned short iMarker_Global = 0; iMarker_Global < config->GetnMarker_CfgFile(); iMarker_Global++) { - - const auto Global_TagBound = config->GetMarker_CfgFile_TagBound(iMarker_Global); - - if (Marker_Tag == Global_TagBound) { - Wall_HeatFlux /= geometry->SurfaceArea[iMarker_Global]; - break; - } - } + UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config, geometry); } break; case ISOTHERMAL: diff --git a/SU2_CFD/src/solvers/CNEMONSSolver.cpp b/SU2_CFD/src/solvers/CNEMONSSolver.cpp index cd353655da43..a6bab9cd0dfa 100644 --- a/SU2_CFD/src/solvers/CNEMONSSolver.cpp +++ b/SU2_CFD/src/solvers/CNEMONSSolver.cpp @@ -251,6 +251,9 @@ void CNEMONSSolver::BC_HeatFluxNonCatalytic_Wall(CGeometry *geometry, /*--- Local variables ---*/ const auto Marker_Tag = config->GetMarker_All_TagBound(val_marker); su2double Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); + if(config->GetIntegrated_HeatFlux()) { + UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config, geometry); + } const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); /*--- Set "Proportional control" coefficient ---*/ @@ -406,6 +409,9 @@ void CNEMONSSolver::BC_HeatFluxCatalytic_Wall(CGeometry *geometry, /*--- Get the specified wall heat flux from config ---*/ su2double Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag); + if(config->GetIntegrated_HeatFlux()) { + UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config, geometry); + } /*--- Get the locations of the primitive variables ---*/ const unsigned short T_INDEX = nodes->GetTIndex(); diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index df8e0a7253de..d1c2be85cb3d 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -436,19 +436,8 @@ void CNSSolver::BC_HeatFlux_Wall_Generic(const CGeometry *geometry, const CConfi if (kind_boundary == HEAT_FLUX) { Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); - - /*---For integrated Heatflux in [W] instead [W/m^2] find the precomputed marker Surface Area by local-global string-matching. ---*/ if(config->GetIntegrated_HeatFlux()) { - - for (unsigned short iMarker_Global = 0; iMarker_Global < config->GetnMarker_CfgFile(); iMarker_Global++) { - - const auto Global_TagBound = config->GetMarker_CfgFile_TagBound(iMarker_Global); - - if (Marker_Tag == Global_TagBound) { - Wall_HeatFlux /= geometry->SurfaceArea[iMarker_Global]; - break; - } - } + UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config, geometry); } } else if (kind_boundary == HEAT_TRANSFER) { From 6f91db07399a6468e3a7f51a9b6b1fc1571dcf77 Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Mon, 31 Jan 2022 11:30:44 +0100 Subject: [PATCH 06/15] Change SurfaceArea to SurfaceAreaCfgFile Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- Common/include/geometry/CGeometry.hpp | 2 +- Common/src/geometry/CGeometry.cpp | 4 ++-- SU2_CFD/include/solvers/CSolver.hpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Common/include/geometry/CGeometry.hpp b/Common/include/geometry/CGeometry.hpp index 1b2ace18316b..092d09d27e94 100644 --- a/Common/include/geometry/CGeometry.hpp +++ b/Common/include/geometry/CGeometry.hpp @@ -199,7 +199,7 @@ class CGeometry { unsigned long *nElem_Bound{nullptr}; /*!< \brief Number of elements of the boundary. */ string *Tag_to_Marker{nullptr}; /*!< \brief Names of boundary markers. */ vector bound_is_straight; /*!< \brief Bool if boundary-marker is straight(2D)/plane(3D) for each local marker. */ - vector SurfaceArea; /*!< \brief Total Surface area for all markers. */ + vector SurfaceAreaCfgFile; /*!< \brief Total Surface area for all markers. */ /*--- Partitioning-specific variables ---*/ diff --git a/Common/src/geometry/CGeometry.cpp b/Common/src/geometry/CGeometry.cpp index 98758fe32db1..3474e30e83c8 100644 --- a/Common/src/geometry/CGeometry.cpp +++ b/Common/src/geometry/CGeometry.cpp @@ -2505,7 +2505,7 @@ void CGeometry::UpdateCustomBoundaryConditions(CGeometry **geometry_container, C void CGeometry::ComputeSurfaceArea(const CConfig *config) { const auto nMarker_Global = config->GetnMarker_CfgFile(); - SurfaceArea.resize(nMarker_Global); + SurfaceAreaCfgFile.resize(nMarker_Global); vector LocalSurfaceArea(nMarker_Global, 0.0); /*--- Loop over all local markers ---*/ @@ -2535,7 +2535,7 @@ void CGeometry::ComputeSurfaceArea(const CConfig *config) { }//for iMarker_Global }//for iMarker - SU2_MPI::Allreduce(LocalSurfaceArea.data(), SurfaceArea.data(), SurfaceArea.size(), MPI_DOUBLE, MPI_SUM, SU2_MPI::GetComm()); + SU2_MPI::Allreduce(LocalSurfaceArea.data(), SurfaceAreaCfgFile.data(), SurfaceAreaCfgFile.size(), MPI_DOUBLE, MPI_SUM, SU2_MPI::GetComm()); } void CGeometry::ComputeSurf_Straightness(CConfig *config, diff --git a/SU2_CFD/include/solvers/CSolver.hpp b/SU2_CFD/include/solvers/CSolver.hpp index caa41488c94b..cea5dbaf3c51 100644 --- a/SU2_CFD/include/solvers/CSolver.hpp +++ b/SU2_CFD/include/solvers/CSolver.hpp @@ -1001,7 +1001,7 @@ class CSolver { const auto Global_TagBound = config->GetMarker_CfgFile_TagBound(iMarker_Global); if (Marker_Tag == Global_TagBound) { - *Wall_HeatFlux /= geometry->SurfaceArea[iMarker_Global]; + *Wall_HeatFlux /= geometry->SurfaceAreaCfgFile[iMarker_Global]; break; } } From 716f445ca244ecaf04d5ecb3d6f86f77d4f9dc16 Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Mon, 31 Jan 2022 11:40:33 +0100 Subject: [PATCH 07/15] Move central Integrated HF comp to CGeometry from CSolver Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- Common/include/geometry/CGeometry.hpp | 8 ++++++++ Common/src/geometry/CGeometry.cpp | 21 +++++++++++++++++++++ SU2_CFD/include/solvers/CSolver.hpp | 23 ----------------------- SU2_CFD/src/solvers/CHeatSolver.cpp | 2 +- SU2_CFD/src/solvers/CIncNSSolver.cpp | 2 +- SU2_CFD/src/solvers/CNEMONSSolver.cpp | 4 ++-- SU2_CFD/src/solvers/CNSSolver.cpp | 2 +- 7 files changed, 34 insertions(+), 28 deletions(-) diff --git a/Common/include/geometry/CGeometry.hpp b/Common/include/geometry/CGeometry.hpp index 092d09d27e94..b21fb95b9bda 100644 --- a/Common/include/geometry/CGeometry.hpp +++ b/Common/include/geometry/CGeometry.hpp @@ -917,6 +917,14 @@ class CGeometry { */ void ComputeSurfaceArea(const CConfig *config); + /*! + * \brief Adapt Heatflux value for integrated heatflux. + * \param[in,out] Wall_HeatFlux - Heatflux in [W] which is to be adapted to [W/m^2]. + * \param[in] config - Definition of the particular problem. + * \param[in] val_marker - Surface marker where the boundary condition is applied. + */ + void UpdateIntegrated_Heatflux(su2double* Wall_HeatFlux, unsigned short val_marker, const CConfig *config) const; + /*! * \brief Check if a boundary is straight(2D) / plane(3D) for EULER_WALL and SYMMETRY_PLANE * only and store the information in bound_is_straight. For all other boundary types diff --git a/Common/src/geometry/CGeometry.cpp b/Common/src/geometry/CGeometry.cpp index 3474e30e83c8..e8d48fedc6fd 100644 --- a/Common/src/geometry/CGeometry.cpp +++ b/Common/src/geometry/CGeometry.cpp @@ -2538,6 +2538,27 @@ void CGeometry::ComputeSurfaceArea(const CConfig *config) { SU2_MPI::Allreduce(LocalSurfaceArea.data(), SurfaceAreaCfgFile.data(), SurfaceAreaCfgFile.size(), MPI_DOUBLE, MPI_SUM, SU2_MPI::GetComm()); } +/*! + * \brief Adapt Heatflux value for integrated heatflux. + * \param[in,out] Wall_HeatFlux - Heatflux in [W] which is to be adapted to [W/m^2]. + * \param[in] config - Definition of the particular problem. + * \param[in] val_marker - Surface marker where the boundary condition is applied. + */ +void CGeometry::UpdateIntegrated_Heatflux(su2double* Wall_HeatFlux, unsigned short val_marker, const CConfig *config) const { + /*---For integrated Heatflux in [W] instead [W/m^2] find the precomputed marker Surface Area by local-global string-matching. ---*/ + const auto Marker_Tag = config->GetMarker_All_TagBound(val_marker); + + for (unsigned short iMarker_Global = 0; iMarker_Global < config->GetnMarker_CfgFile(); iMarker_Global++) { + + const auto Global_TagBound = config->GetMarker_CfgFile_TagBound(iMarker_Global); + + if (Marker_Tag == Global_TagBound) { + *Wall_HeatFlux /= SurfaceAreaCfgFile[iMarker_Global]; + break; + } + } +} + void CGeometry::ComputeSurf_Straightness(CConfig *config, bool print_on_screen) { diff --git a/SU2_CFD/include/solvers/CSolver.hpp b/SU2_CFD/include/solvers/CSolver.hpp index cea5dbaf3c51..71dcf9b4ebcd 100644 --- a/SU2_CFD/include/solvers/CSolver.hpp +++ b/SU2_CFD/include/solvers/CSolver.hpp @@ -984,29 +984,6 @@ class CSolver { CConfig *config, unsigned short val_marker) { } - /*! - * \brief Adapt Heatflux value for integrated heatflux. - * \param[in,out] Wall_HeatFlux - Heatflux in [W] which is to be adapted to [W/m^2]. - * \param[in] config - Definition of the particular problem. - * \param[in] val_marker - Surface marker where the boundary condition is applied. - * \param[in] geometry - Geometrical definition of the problem. - */ - void UpdateIntegrated_Heatflux(su2double* Wall_HeatFlux, unsigned short val_marker, const CConfig *config, - const CGeometry* geometry) const { - /*---For integrated Heatflux in [W] instead [W/m^2] find the precomputed marker Surface Area by local-global string-matching. ---*/ - const auto Marker_Tag = config->GetMarker_All_TagBound(val_marker); - - for (unsigned short iMarker_Global = 0; iMarker_Global < config->GetnMarker_CfgFile(); iMarker_Global++) { - - const auto Global_TagBound = config->GetMarker_CfgFile_TagBound(iMarker_Global); - - if (Marker_Tag == Global_TagBound) { - *Wall_HeatFlux /= geometry->SurfaceAreaCfgFile[iMarker_Global]; - break; - } - } - } - /*! * \brief Impose a heat flux by prescribing a heat transfer coefficient and a temperature at infinity. * \param[in] geometry - Geometrical definition of the problem. diff --git a/SU2_CFD/src/solvers/CHeatSolver.cpp b/SU2_CFD/src/solvers/CHeatSolver.cpp index a9cad26785ec..ce5e8306ee1c 100644 --- a/SU2_CFD/src/solvers/CHeatSolver.cpp +++ b/SU2_CFD/src/solvers/CHeatSolver.cpp @@ -627,7 +627,7 @@ void CHeatSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_contain su2double Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag) / config->GetHeat_Flux_Ref(); if(config->GetIntegrated_HeatFlux()) { - UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config, geometry); + geometry->UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config); } for (auto iVertex = 0ul; iVertex < geometry->nVertex[val_marker]; iVertex++) { diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index ffbee7751867..31b41c1927b5 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -388,7 +388,7 @@ void CIncNSSolver::BC_Wall_Generic(const CGeometry *geometry, const CConfig *con case HEAT_FLUX: Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); if(config->GetIntegrated_HeatFlux()) { - UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config, geometry); + geometry->UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config); } break; case ISOTHERMAL: diff --git a/SU2_CFD/src/solvers/CNEMONSSolver.cpp b/SU2_CFD/src/solvers/CNEMONSSolver.cpp index a6bab9cd0dfa..dcf87b59a37a 100644 --- a/SU2_CFD/src/solvers/CNEMONSSolver.cpp +++ b/SU2_CFD/src/solvers/CNEMONSSolver.cpp @@ -252,7 +252,7 @@ void CNEMONSSolver::BC_HeatFluxNonCatalytic_Wall(CGeometry *geometry, const auto Marker_Tag = config->GetMarker_All_TagBound(val_marker); su2double Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); if(config->GetIntegrated_HeatFlux()) { - UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config, geometry); + geometry->UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config); } const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); @@ -410,7 +410,7 @@ void CNEMONSSolver::BC_HeatFluxCatalytic_Wall(CGeometry *geometry, /*--- Get the specified wall heat flux from config ---*/ su2double Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag); if(config->GetIntegrated_HeatFlux()) { - UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config, geometry); + geometry->UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config); } /*--- Get the locations of the primitive variables ---*/ diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index d1c2be85cb3d..8f67c75a6b1d 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -437,7 +437,7 @@ void CNSSolver::BC_HeatFlux_Wall_Generic(const CGeometry *geometry, const CConfi if (kind_boundary == HEAT_FLUX) { Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); if(config->GetIntegrated_HeatFlux()) { - UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config, geometry); + geometry->UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config); } } else if (kind_boundary == HEAT_TRANSFER) { From 288a2eb4f3362440515f89d0f2042acbdad36692 Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Mon, 31 Jan 2022 11:56:45 +0100 Subject: [PATCH 08/15] Also call SurfArea comp in UdateGeometry and adapt function ti include 'CfgFile' Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- Common/include/geometry/CGeometry.hpp | 2 +- Common/src/geometry/CGeometry.cpp | 4 +++- SU2_CFD/src/drivers/CDriver.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Common/include/geometry/CGeometry.hpp b/Common/include/geometry/CGeometry.hpp index b21fb95b9bda..54f8a2529c8e 100644 --- a/Common/include/geometry/CGeometry.hpp +++ b/Common/include/geometry/CGeometry.hpp @@ -915,7 +915,7 @@ class CGeometry { * \brief Compute the surface area of all global markers. * \param[in] config - Definition of the particular problem. */ - void ComputeSurfaceArea(const CConfig *config); + void ComputeSurfaceAreaCfgFile(const CConfig *config); /*! * \brief Adapt Heatflux value for integrated heatflux. diff --git a/Common/src/geometry/CGeometry.cpp b/Common/src/geometry/CGeometry.cpp index e8d48fedc6fd..0ef8e00da380 100644 --- a/Common/src/geometry/CGeometry.cpp +++ b/Common/src/geometry/CGeometry.cpp @@ -2436,6 +2436,8 @@ void CGeometry::UpdateGeometry(CGeometry **geometry_container, CConfig *config) } + /*--- Compute the global surface areas for all markers. ---*/ + geometry_container[MESH_0]->ComputeSurfaceAreaCfgFile(config); } void CGeometry::SetCustomBoundary(CConfig *config) { @@ -2503,7 +2505,7 @@ void CGeometry::UpdateCustomBoundaryConditions(CGeometry **geometry_container, C } } -void CGeometry::ComputeSurfaceArea(const CConfig *config) { +void CGeometry::ComputeSurfaceAreaCfgFile(const CConfig *config) { const auto nMarker_Global = config->GetnMarker_CfgFile(); SurfaceAreaCfgFile.resize(nMarker_Global); vector LocalSurfaceArea(nMarker_Global, 0.0); diff --git a/SU2_CFD/src/drivers/CDriver.cpp b/SU2_CFD/src/drivers/CDriver.cpp index 3f0cda7faa61..f6d336671efa 100644 --- a/SU2_CFD/src/drivers/CDriver.cpp +++ b/SU2_CFD/src/drivers/CDriver.cpp @@ -814,7 +814,7 @@ void CDriver::Geometrical_Preprocessing_FVM(CConfig *config, CGeometry **&geomet /*--- Compute the global surface areas for all markers. ---*/ - geometry[MESH_0]->ComputeSurfaceArea(config); + geometry[MESH_0]->ComputeSurfaceAreaCfgFile(config); /*--- Check for periodicity and disable MG if necessary. ---*/ From 8794f1480333567efd17ce25add9b88a989423b0 Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Mon, 31 Jan 2022 12:22:51 +0100 Subject: [PATCH 09/15] Change UpdateIntegratedHF function to GetSurfaceArea. Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- Common/include/geometry/CGeometry.hpp | 8 ++++---- Common/src/geometry/CGeometry.cpp | 15 ++++----------- SU2_CFD/src/solvers/CHeatSolver.cpp | 2 +- SU2_CFD/src/solvers/CIncNSSolver.cpp | 2 +- SU2_CFD/src/solvers/CNEMONSSolver.cpp | 4 ++-- SU2_CFD/src/solvers/CNSSolver.cpp | 2 +- 6 files changed, 13 insertions(+), 20 deletions(-) diff --git a/Common/include/geometry/CGeometry.hpp b/Common/include/geometry/CGeometry.hpp index 54f8a2529c8e..e63ed63869ce 100644 --- a/Common/include/geometry/CGeometry.hpp +++ b/Common/include/geometry/CGeometry.hpp @@ -917,13 +917,13 @@ class CGeometry { */ void ComputeSurfaceAreaCfgFile(const CConfig *config); - /*! + /*! Get global Surface Area to a local marker * \brief Adapt Heatflux value for integrated heatflux. - * \param[in,out] Wall_HeatFlux - Heatflux in [W] which is to be adapted to [W/m^2]. * \param[in] config - Definition of the particular problem. - * \param[in] val_marker - Surface marker where the boundary condition is applied. + * \param[in] val_marker - Local surface marker. + * \return Global Surface Area to the local marker */ - void UpdateIntegrated_Heatflux(su2double* Wall_HeatFlux, unsigned short val_marker, const CConfig *config) const; + su2double GetSurfaceArea(const CConfig *config, unsigned short val_marker) const; /*! * \brief Check if a boundary is straight(2D) / plane(3D) for EULER_WALL and SYMMETRY_PLANE diff --git a/Common/src/geometry/CGeometry.cpp b/Common/src/geometry/CGeometry.cpp index 0ef8e00da380..8947fa2d09e8 100644 --- a/Common/src/geometry/CGeometry.cpp +++ b/Common/src/geometry/CGeometry.cpp @@ -2540,13 +2540,7 @@ void CGeometry::ComputeSurfaceAreaCfgFile(const CConfig *config) { SU2_MPI::Allreduce(LocalSurfaceArea.data(), SurfaceAreaCfgFile.data(), SurfaceAreaCfgFile.size(), MPI_DOUBLE, MPI_SUM, SU2_MPI::GetComm()); } -/*! - * \brief Adapt Heatflux value for integrated heatflux. - * \param[in,out] Wall_HeatFlux - Heatflux in [W] which is to be adapted to [W/m^2]. - * \param[in] config - Definition of the particular problem. - * \param[in] val_marker - Surface marker where the boundary condition is applied. - */ -void CGeometry::UpdateIntegrated_Heatflux(su2double* Wall_HeatFlux, unsigned short val_marker, const CConfig *config) const { +su2double CGeometry::GetSurfaceArea(const CConfig *config, unsigned short val_marker) const { /*---For integrated Heatflux in [W] instead [W/m^2] find the precomputed marker Surface Area by local-global string-matching. ---*/ const auto Marker_Tag = config->GetMarker_All_TagBound(val_marker); @@ -2554,10 +2548,9 @@ void CGeometry::UpdateIntegrated_Heatflux(su2double* Wall_HeatFlux, unsigned sho const auto Global_TagBound = config->GetMarker_CfgFile_TagBound(iMarker_Global); - if (Marker_Tag == Global_TagBound) { - *Wall_HeatFlux /= SurfaceAreaCfgFile[iMarker_Global]; - break; - } + if (Marker_Tag == Global_TagBound) + return SurfaceAreaCfgFile[iMarker_Global]; + } } diff --git a/SU2_CFD/src/solvers/CHeatSolver.cpp b/SU2_CFD/src/solvers/CHeatSolver.cpp index ce5e8306ee1c..70a983cb6b85 100644 --- a/SU2_CFD/src/solvers/CHeatSolver.cpp +++ b/SU2_CFD/src/solvers/CHeatSolver.cpp @@ -627,7 +627,7 @@ void CHeatSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_contain su2double Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag) / config->GetHeat_Flux_Ref(); if(config->GetIntegrated_HeatFlux()) { - geometry->UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config); + Wall_HeatFlux /= geometry->GetSurfaceArea(config, val_marker); } for (auto iVertex = 0ul; iVertex < geometry->nVertex[val_marker]; iVertex++) { diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 31b41c1927b5..54317a8ac0ad 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -388,7 +388,7 @@ void CIncNSSolver::BC_Wall_Generic(const CGeometry *geometry, const CConfig *con case HEAT_FLUX: Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); if(config->GetIntegrated_HeatFlux()) { - geometry->UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config); + Wall_HeatFlux /= geometry->GetSurfaceArea(config, val_marker); } break; case ISOTHERMAL: diff --git a/SU2_CFD/src/solvers/CNEMONSSolver.cpp b/SU2_CFD/src/solvers/CNEMONSSolver.cpp index dcf87b59a37a..c0b4a8013673 100644 --- a/SU2_CFD/src/solvers/CNEMONSSolver.cpp +++ b/SU2_CFD/src/solvers/CNEMONSSolver.cpp @@ -252,7 +252,7 @@ void CNEMONSSolver::BC_HeatFluxNonCatalytic_Wall(CGeometry *geometry, const auto Marker_Tag = config->GetMarker_All_TagBound(val_marker); su2double Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); if(config->GetIntegrated_HeatFlux()) { - geometry->UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config); + Wall_HeatFlux /= geometry->GetSurfaceArea(config, val_marker); } const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); @@ -410,7 +410,7 @@ void CNEMONSSolver::BC_HeatFluxCatalytic_Wall(CGeometry *geometry, /*--- Get the specified wall heat flux from config ---*/ su2double Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag); if(config->GetIntegrated_HeatFlux()) { - geometry->UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config); + Wall_HeatFlux /= geometry->GetSurfaceArea(config, val_marker); } /*--- Get the locations of the primitive variables ---*/ diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index 8f67c75a6b1d..f9ff991e0aa6 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -437,7 +437,7 @@ void CNSSolver::BC_HeatFlux_Wall_Generic(const CGeometry *geometry, const CConfi if (kind_boundary == HEAT_FLUX) { Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); if(config->GetIntegrated_HeatFlux()) { - geometry->UpdateIntegrated_Heatflux(&Wall_HeatFlux, val_marker, config); + Wall_HeatFlux /= geometry->GetSurfaceArea(config, val_marker); } } else if (kind_boundary == HEAT_TRANSFER) { From 06a432eeb06fbcd4e7a61b04498016ee44d05788 Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Mon, 31 Jan 2022 12:44:01 +0100 Subject: [PATCH 10/15] Add error catch in case string matching fails. --- Common/src/geometry/CGeometry.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Common/src/geometry/CGeometry.cpp b/Common/src/geometry/CGeometry.cpp index 8947fa2d09e8..0fe4da969ad9 100644 --- a/Common/src/geometry/CGeometry.cpp +++ b/Common/src/geometry/CGeometry.cpp @@ -2552,6 +2552,9 @@ su2double CGeometry::GetSurfaceArea(const CConfig *config, unsigned short val_ma return SurfaceAreaCfgFile[iMarker_Global]; } + + SU2_MPI::Error("Unable to match local-marker with cfg-marker for Surface Area.", CURRENT_FUNCTION); + return 0.0; } void CGeometry::ComputeSurf_Straightness(CConfig *config, From a57f4a30d3cbdad2a0ee222c35ef13c5a5fe1b3c Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Mon, 31 Jan 2022 13:22:41 +0100 Subject: [PATCH 11/15] Apply clang-format in limited scopes. --- SU2_CFD/src/solvers/CHeatSolver.cpp | 9 +++------ SU2_CFD/src/solvers/CIncNSSolver.cpp | 13 +++++++------ SU2_CFD/src/solvers/CNEMONSSolver.cpp | 8 ++++---- SU2_CFD/src/solvers/CNSSolver.cpp | 17 ++++++++--------- 4 files changed, 22 insertions(+), 25 deletions(-) diff --git a/SU2_CFD/src/solvers/CHeatSolver.cpp b/SU2_CFD/src/solvers/CHeatSolver.cpp index 70a983cb6b85..cdebdc79e69c 100644 --- a/SU2_CFD/src/solvers/CHeatSolver.cpp +++ b/SU2_CFD/src/solvers/CHeatSolver.cpp @@ -621,21 +621,19 @@ void CHeatSolver::BC_Isothermal_Wall(CGeometry *geometry, CSolver **solver_conta } } -void CHeatSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, - unsigned short val_marker) { +void CHeatSolver::BC_HeatFlux_Wall(CGeometry* geometry, CSolver** solver_container, CNumerics* conv_numerics, + CNumerics* visc_numerics, CConfig* config, unsigned short val_marker) { const auto Marker_Tag = config->GetMarker_All_TagBound(val_marker); su2double Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag) / config->GetHeat_Flux_Ref(); - if(config->GetIntegrated_HeatFlux()) { + if (config->GetIntegrated_HeatFlux()) { Wall_HeatFlux /= geometry->GetSurfaceArea(config, val_marker); } for (auto iVertex = 0ul; iVertex < geometry->nVertex[val_marker]; iVertex++) { - const auto iPoint = geometry->vertex[val_marker][iVertex]->GetNode(); if (geometry->nodes->GetDomain(iPoint)) { - const auto Normal = geometry->vertex[val_marker][iVertex]->GetNormal(); const auto Area = GeometryToolbox::Norm(nDim, Normal); @@ -647,7 +645,6 @@ void CHeatSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_contain LinSysRes.SubtractBlock(iPoint, Res_Visc); } - } } diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 54317a8ac0ad..b75a6f449d50 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -384,19 +384,20 @@ void CIncNSSolver::BC_Wall_Generic(const CGeometry *geometry, const CConfig *con su2double Wall_HeatFlux = 0.0, Twall = 0.0, Tinfinity = 0.0, Transfer_Coefficient = 0.0; - switch(kind_boundary) { + switch (kind_boundary) { case HEAT_FLUX: - Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); - if(config->GetIntegrated_HeatFlux()) { + Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag) / config->GetHeat_Flux_Ref(); + if (config->GetIntegrated_HeatFlux()) { Wall_HeatFlux /= geometry->GetSurfaceArea(config, val_marker); } break; case ISOTHERMAL: - Twall = config->GetIsothermal_Temperature(Marker_Tag)/config->GetTemperature_Ref(); + Twall = config->GetIsothermal_Temperature(Marker_Tag) / config->GetTemperature_Ref(); break; case HEAT_TRANSFER: - Transfer_Coefficient = config->GetWall_HeatTransfer_Coefficient(Marker_Tag) * config->GetTemperature_Ref()/config->GetHeat_Flux_Ref(); - Tinfinity = config->GetWall_HeatTransfer_Temperature(Marker_Tag)/config->GetTemperature_Ref(); + Transfer_Coefficient = config->GetWall_HeatTransfer_Coefficient(Marker_Tag) * config->GetTemperature_Ref() / + config->GetHeat_Flux_Ref(); + Tinfinity = config->GetWall_HeatTransfer_Temperature(Marker_Tag) / config->GetTemperature_Ref(); break; default: SU2_MPI::Error("Unknown type of boundary condition.", CURRENT_FUNCTION); diff --git a/SU2_CFD/src/solvers/CNEMONSSolver.cpp b/SU2_CFD/src/solvers/CNEMONSSolver.cpp index c0b4a8013673..e595fbb4f31f 100644 --- a/SU2_CFD/src/solvers/CNEMONSSolver.cpp +++ b/SU2_CFD/src/solvers/CNEMONSSolver.cpp @@ -250,8 +250,8 @@ void CNEMONSSolver::BC_HeatFluxNonCatalytic_Wall(CGeometry *geometry, /*--- Local variables ---*/ const auto Marker_Tag = config->GetMarker_All_TagBound(val_marker); - su2double Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); - if(config->GetIntegrated_HeatFlux()) { + su2double Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag) / config->GetHeat_Flux_Ref(); + if (config->GetIntegrated_HeatFlux()) { Wall_HeatFlux /= geometry->GetSurfaceArea(config, val_marker); } const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); @@ -408,8 +408,8 @@ void CNEMONSSolver::BC_HeatFluxCatalytic_Wall(CGeometry *geometry, string Marker_Tag = config->GetMarker_All_TagBound(val_marker); /*--- Get the specified wall heat flux from config ---*/ - su2double Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag); - if(config->GetIntegrated_HeatFlux()) { + su2double Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag) / config->GetHeat_Flux_Ref(); + if (config->GetIntegrated_HeatFlux()) { Wall_HeatFlux /= geometry->GetSurfaceArea(config, val_marker); } diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index f9ff991e0aa6..1b2ab04ff5f2 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -421,9 +421,8 @@ void CNSSolver::BC_HeatTransfer_Wall(const CGeometry *geometry, const CConfig *c BC_HeatFlux_Wall_Generic(geometry, config, val_marker, HEAT_TRANSFER); } -void CNSSolver::BC_HeatFlux_Wall_Generic(const CGeometry *geometry, const CConfig *config, - unsigned short val_marker, unsigned short kind_boundary) { - +void CNSSolver::BC_HeatFlux_Wall_Generic(const CGeometry* geometry, const CConfig* config, unsigned short val_marker, + unsigned short kind_boundary) { /*--- Identify the boundary by string name and get the specified wall heat flux from config as well as the wall function treatment. ---*/ @@ -435,15 +434,15 @@ void CNSSolver::BC_HeatFlux_Wall_Generic(const CGeometry *geometry, const CConfi su2double Wall_HeatFlux = 0.0, Tinfinity = 0.0, Transfer_Coefficient = 0.0; if (kind_boundary == HEAT_FLUX) { - Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag)/config->GetHeat_Flux_Ref(); - if(config->GetIntegrated_HeatFlux()) { + Wall_HeatFlux = config->GetWall_HeatFlux(Marker_Tag) / config->GetHeat_Flux_Ref(); + if (config->GetIntegrated_HeatFlux()) { Wall_HeatFlux /= geometry->GetSurfaceArea(config, val_marker); } - } - else if (kind_boundary == HEAT_TRANSFER) { + } else if (kind_boundary == HEAT_TRANSFER) { /*--- The required heatflux will be computed for each iPoint individually based on local Temperature. ---*/ - Transfer_Coefficient = config->GetWall_HeatTransfer_Coefficient(Marker_Tag) * config->GetTemperature_Ref()/config->GetHeat_Flux_Ref(); - Tinfinity = config->GetWall_HeatTransfer_Temperature(Marker_Tag)/config->GetTemperature_Ref(); + Transfer_Coefficient = config->GetWall_HeatTransfer_Coefficient(Marker_Tag) * config->GetTemperature_Ref() / + config->GetHeat_Flux_Ref(); + Tinfinity = config->GetWall_HeatTransfer_Temperature(Marker_Tag) / config->GetTemperature_Ref(); } // Wall_Function = config->GetWallFunction_Treatment(Marker_Tag); From f951a07b665be59bc69bc44afaf308c89e6d02c9 Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Mon, 31 Jan 2022 13:24:15 +0100 Subject: [PATCH 12/15] Update comment --- Common/src/geometry/CGeometry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/src/geometry/CGeometry.cpp b/Common/src/geometry/CGeometry.cpp index 0fe4da969ad9..e1ae8e9a5d02 100644 --- a/Common/src/geometry/CGeometry.cpp +++ b/Common/src/geometry/CGeometry.cpp @@ -2541,7 +2541,7 @@ void CGeometry::ComputeSurfaceAreaCfgFile(const CConfig *config) { } su2double CGeometry::GetSurfaceArea(const CConfig *config, unsigned short val_marker) const { - /*---For integrated Heatflux in [W] instead [W/m^2] find the precomputed marker Surface Area by local-global string-matching. ---*/ + /*---Find the precomputed marker surface area by local-global string-matching. ---*/ const auto Marker_Tag = config->GetMarker_All_TagBound(val_marker); for (unsigned short iMarker_Global = 0; iMarker_Global < config->GetnMarker_CfgFile(); iMarker_Global++) { From 084727b440d157f2f100da27495c44dc089fcbbd Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Mon, 31 Jan 2022 15:33:14 +0100 Subject: [PATCH 13/15] Screen output only written by MASTER_NODE makes comparing cases a little less annoying --- Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp b/Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp index 3b2c052b9143..6a4fd4385993 100644 --- a/Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp +++ b/Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp @@ -99,7 +99,7 @@ bool CSU2ASCIIMeshReaderFVM::ReadMetadata(const bool single_pass, CConfig *confi string text_line; if ((nZones > 1 && multizone_file) || harmonic_balance) { if (harmonic_balance) { - cout << "Reading time instance " << config->GetiInst()+1 << "." << endl; + if (rank == MASTER_NODE) cout << "Reading time instance " << config->GetiInst()+1 << "." << endl; } else { bool foundZone = false; @@ -109,7 +109,7 @@ bool CSU2ASCIIMeshReaderFVM::ReadMetadata(const bool single_pass, CConfig *confi text_line.erase (0,6); unsigned short jZone = atoi(text_line.c_str()); if (jZone == myZone+1) { - cout << "Reading zone " << myZone << " from native SU2 ASCII mesh." << endl; + if (rank == MASTER_NODE) cout << "Reading zone " << myZone << " from native SU2 ASCII mesh." << endl; foundZone = true; break; } From 15b62fa40e7873b634de94607abbfe3ea63a6ccf Mon Sep 17 00:00:00 2001 From: TobiKattmann Date: Mon, 31 Jan 2022 15:51:47 +0100 Subject: [PATCH 14/15] Adapt a reg test to contain INTEGRATED_HEATFLUX. Used a 3D cht case and applied it in the solid zone. Residual stay exactly the same. This, to my experience is only the case because the surface is a plane rectangle. For e.g. a round shape the small mismatch in exact circle circumference and the discrete appriximation by the mesh is enough to alter the residuals (and final temperature) slighthly. The Residual change in this case for the Temperature is due to the error that was in the mesh (see Testcases #91) --- .../streamwise_periodic/chtPinArray_3d/configSolid.cfg | 4 +++- TestCases/parallel_regression.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configSolid.cfg b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configSolid.cfg index 6f1a22914445..885f594d0c2b 100644 --- a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configSolid.cfg +++ b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configSolid.cfg @@ -25,7 +25,9 @@ THERMAL_CONDUCTIVITY_CONSTANT= 200 % MARKER_SYM= ( solid_sym_sides) % -MARKER_HEATFLUX= ( solid_bottom_heater, 5e5, \ +% 5e5[W/m^2]@solid_bottom_heat * 3.59172[m^2]@solid_bottom_heater = 17.9586 [W] +INTEGRATED_HEATFLUX= YES +MARKER_HEATFLUX= ( solid_bottom_heater, 17.9586, \ solid_block_inlet, 0.0, \ solid_block_outlet, 0.0, \ solid_pin1_inlet, 0.0, \ diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index ca1a8b3f48db..46b5dc098bf2 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1428,7 +1428,7 @@ def main(): sp_pinArray_3d_cht_mf_hf_tp.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_3d" sp_pinArray_3d_cht_mf_hf_tp.cfg_file = "configMaster.cfg" sp_pinArray_3d_cht_mf_hf_tp.test_iter = 30 - sp_pinArray_3d_cht_mf_hf_tp.test_vals = [0.511984, -3.063453, -0.451962, -0.008477, 214.707868, 365.670000] #last 7 lines + sp_pinArray_3d_cht_mf_hf_tp.test_vals = [0.511984, -0.894867, -0.451962, -0.008477, 214.707868, 365.670000] #last 7 lines sp_pinArray_3d_cht_mf_hf_tp.su2_exec = "mpirun -n 2 SU2_CFD" sp_pinArray_3d_cht_mf_hf_tp.timeout = 1600 sp_pinArray_3d_cht_mf_hf_tp.tol = 0.00001 From 6546dfbf1e798f10130d3c353292a84b4e1ebe73 Mon Sep 17 00:00:00 2001 From: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> Date: Mon, 31 Jan 2022 16:31:52 +0100 Subject: [PATCH 15/15] Apply suggestions from code review --- Common/include/geometry/CGeometry.hpp | 6 +++--- .../streamwise_periodic/chtPinArray_3d/configSolid.cfg | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Common/include/geometry/CGeometry.hpp b/Common/include/geometry/CGeometry.hpp index e63ed63869ce..cbd4170f0dbe 100644 --- a/Common/include/geometry/CGeometry.hpp +++ b/Common/include/geometry/CGeometry.hpp @@ -199,7 +199,7 @@ class CGeometry { unsigned long *nElem_Bound{nullptr}; /*!< \brief Number of elements of the boundary. */ string *Tag_to_Marker{nullptr}; /*!< \brief Names of boundary markers. */ vector bound_is_straight; /*!< \brief Bool if boundary-marker is straight(2D)/plane(3D) for each local marker. */ - vector SurfaceAreaCfgFile; /*!< \brief Total Surface area for all markers. */ + vector SurfaceAreaCfgFile; /*!< \brief Total Surface area for all markers. */ /*--- Partitioning-specific variables ---*/ @@ -917,8 +917,8 @@ class CGeometry { */ void ComputeSurfaceAreaCfgFile(const CConfig *config); - /*! Get global Surface Area to a local marker - * \brief Adapt Heatflux value for integrated heatflux. + /*! + * \brief Get global Surface Area to a local marker. * \param[in] config - Definition of the particular problem. * \param[in] val_marker - Local surface marker. * \return Global Surface Area to the local marker diff --git a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configSolid.cfg b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configSolid.cfg index 885f594d0c2b..731429e16e23 100644 --- a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configSolid.cfg +++ b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configSolid.cfg @@ -25,7 +25,7 @@ THERMAL_CONDUCTIVITY_CONSTANT= 200 % MARKER_SYM= ( solid_sym_sides) % -% 5e5[W/m^2]@solid_bottom_heat * 3.59172[m^2]@solid_bottom_heater = 17.9586 [W] +% 5e5[W/m^2]@solid_bottom_heat * 3.59172e-5[m^2]@solid_bottom_heater = 17.9586 [W] INTEGRATED_HEATFLUX= YES MARKER_HEATFLUX= ( solid_bottom_heater, 17.9586, \ solid_block_inlet, 0.0, \