Skip to content

Commit 0070949

Browse files
authored
Merge pull request #1226 from su2code/feature_heatcoeff_BC
Heat Transfer boundary condition
2 parents adf8fbd + 1ef7dcf commit 0070949

59 files changed

Lines changed: 622 additions & 312 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/regression.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ jobs:
8787
- name: Run Tests in Container
8888
uses: docker://su2code/test-su2:20200303
8989
with:
90+
# -t <Tutorials-branch> -c <Testcases-branch>
9091
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
9192
unit_tests:
9293
runs-on: ubuntu-latest

Common/include/CConfig.hpp

Lines changed: 109 additions & 117 deletions
Large diffs are not rendered by default.

Common/include/option_structure.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,8 @@ enum BC_TYPE {
10861086
ENGINE_EXHAUST = 22, /*!< \brief Boundary nacelle exhaust. */
10871087
RIEMANN_BOUNDARY= 24, /*!< \brief Riemann Boundary definition. */
10881088
ISOTHERMAL = 25, /*!< \brief No slip isothermal wall boundary condition. */
1089-
HEAT_FLUX = 26, /*!< \brief No slip constant heat flux wall boundary condition. */
1089+
HEAT_FLUX = 26, /*!< \brief No slip constant heat flux wall boundary condition. */
1090+
HEAT_TRANSFER = 27, /*!< \brief No slip heat transfer boundary condition. */
10901091
ACTDISK_INLET = 32, /*!< \brief Actuator disk inlet boundary definition. */
10911092
ACTDISK_OUTLET = 33, /*!< \brief Actuator disk outlet boundary definition. */
10921093
CLAMPED_BOUNDARY = 34, /*!< \brief Clamped Boundary definition. */

Common/src/CConfig.cpp

Lines changed: 107 additions & 60 deletions
Large diffs are not rendered by default.

SU2_CFD/include/solvers/CIncNSSolver.hpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
class CIncNSSolver final : public CIncEulerSolver {
3939

4040
/*!
41-
* \brief Generic implementation of the isothermal and heatflux walls.
41+
* \brief Generic implementation of the isothermal, heatflux and heat-transfer/convection walls.
4242
*/
4343
void BC_Wall_Generic(const CGeometry *geometry,
4444
const CConfig *config,
@@ -157,6 +157,16 @@ class CIncNSSolver final : public CIncEulerSolver {
157157
CConfig *config,
158158
unsigned short val_marker) override;
159159

160+
/*!
161+
* \brief Impose a heat flux by prescribing a heat transfer coefficient and a temperature at infinity.
162+
* \param[in] geometry - Geometrical definition of the problem.
163+
* \param[in] config - Definition of the particular problem.
164+
* \param[in] val_marker - Surface marker where the boundary condition is applied.
165+
*/
166+
void BC_HeatTransfer_Wall(const CGeometry *geometry,
167+
const CConfig *config,
168+
const unsigned short val_marker) override;
169+
160170
/*!
161171
* \brief Impose the (received) conjugate heat variables.
162172
* \param[in] geometry - Geometrical definition of the problem.

SU2_CFD/include/solvers/CNSSolver.hpp

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class CNSSolver final : public CEulerSolver {
6565
*/
6666
void AddDynamicGridResidualContribution(unsigned long iPoint,
6767
unsigned long Point_Normal,
68-
CGeometry* geometry,
68+
const CGeometry* geometry,
6969
const su2double* UnitNormal,
7070
su2double Area,
7171
const su2double* GridVel,
@@ -96,6 +96,14 @@ class CNSSolver final : public CEulerSolver {
9696
unsigned short val_marker,
9797
bool cht_mode = false);
9898

99+
/*!
100+
* \brief Generic implementation of the heatflux and heat-transfer/convection walls.
101+
*/
102+
void BC_HeatFlux_Wall_Generic(const CGeometry *geometry,
103+
const CConfig *config,
104+
unsigned short val_marker,
105+
unsigned short kind_boundary);
106+
99107
/*!
100108
* \brief Compute the viscous contribution for a particular edge.
101109
* \param[in] iEdge - Edge for which the flux and Jacobians are to be computed.
@@ -185,6 +193,16 @@ class CNSSolver final : public CEulerSolver {
185193
CConfig *config,
186194
unsigned short val_marker) override;
187195

196+
/*!
197+
* \brief Impose a heat flux by prescribing a heat transfer coefficient and a temperature at infinity.
198+
* \param[in] geometry - Geometrical definition of the problem.
199+
* \param[in] config - Definition of the particular problem.
200+
* \param[in] val_marker - Surface marker where the boundary condition is applied.
201+
*/
202+
void BC_HeatTransfer_Wall(const CGeometry *geometry,
203+
const CConfig *config,
204+
const unsigned short val_marker) override;
205+
188206
/*!
189207
* \brief Impose the Navier-Stokes boundary condition (strong).
190208
* \param[in] geometry - Geometrical definition of the problem.

SU2_CFD/include/solvers/CSolver.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,16 @@ class CSolver {
10611061
CConfig *config,
10621062
unsigned short val_marker) { }
10631063

1064+
/*!
1065+
* \brief Impose a heat flux by prescribing a heat transfer coefficient and a temperature at infinity.
1066+
* \param[in] geometry - Geometrical definition of the problem.
1067+
* \param[in] config - Definition of the particular problem.
1068+
* \param[in] val_marker - Surface marker where the boundary condition is applied.
1069+
*/
1070+
inline virtual void BC_HeatTransfer_Wall(const CGeometry *geometry,
1071+
const CConfig *config,
1072+
const unsigned short val_marker) { }
1073+
10641074
/*!
10651075
* \brief A virtual member.
10661076
* \param[in] geometry - Geometrical definition of the problem.

SU2_CFD/src/fluid/CFluidModel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ void CFluidModel::SetThermalConductivityModel(const CConfig* config) {
5959
case CONDUCTIVITYMODEL::CONSTANT:
6060
if (config->GetKind_ConductivityModel_Turb() == CONDUCTIVITYMODEL_TURB::CONSTANT_PRANDTL) {
6161
ThermalConductivity = unique_ptr<CConstantConductivityRANS>(
62-
new CConstantConductivityRANS(config->GetKt_ConstantND(), config->GetPrandtl_Turb()));
62+
new CConstantConductivityRANS(config->GetThermal_Conductivity_ConstantND(), config->GetPrandtl_Turb()));
6363
} else {
64-
ThermalConductivity = unique_ptr<CConstantConductivity>(new CConstantConductivity(config->GetKt_ConstantND()));
64+
ThermalConductivity = unique_ptr<CConstantConductivity>(new CConstantConductivity(config->GetThermal_Conductivity_ConstantND()));
6565
}
6666
break;
6767
case CONDUCTIVITYMODEL::CONSTANT_PRANDTL:

SU2_CFD/src/integration/CIntegration.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ void CIntegration::Space_Integration(CGeometry *geometry,
153153
case HEAT_FLUX:
154154
solver_container[MainSolver]->BC_HeatFlux_Wall(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker);
155155
break;
156+
case HEAT_TRANSFER:
157+
solver_container[MainSolver]->BC_HeatTransfer_Wall(geometry, config, iMarker);
158+
break;
156159
case CUSTOM_BOUNDARY:
157160
solver_container[MainSolver]->BC_Custom(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker);
158161
break;

SU2_CFD/src/interfaces/cht/CConjugateHeatInterface.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,14 @@ void CConjugateHeatInterface::GetDonor_Variable(CSolver *donor_solution, CGeomet
124124

125125
/*--- Heat solver stand-alone case ---*/
126126

127-
const su2double thermal_diffusivity = donor_config->GetThermalDiffusivity_Solid();
127+
const su2double thermal_diffusivity = donor_config->GetThermalDiffusivity();
128128
heat_flux_density = thermal_diffusivity*dTdn;
129129

130+
130131
if ((donor_config->GetKind_CHT_Coupling() == CHT_COUPLING::DIRECT_TEMPERATURE_ROBIN_HEATFLUX) ||
131132
(donor_config->GetKind_CHT_Coupling() == CHT_COUPLING::AVERAGED_TEMPERATURE_ROBIN_HEATFLUX)) {
132133

133-
const su2double rho_cp_solid = donor_config->GetSpecific_Heat_Cp()*donor_config->GetDensity_Solid();
134+
const su2double rho_cp_solid = donor_config->GetSpecific_Heat_Cp()*donor_config->GetMaterialDensity(0);
134135
conductivity_over_dist = thermal_diffusivity*rho_cp_solid/dist;
135136
}
136137
}

0 commit comments

Comments
 (0)