-
Notifications
You must be signed in to change notification settings - Fork 918
Compressible CHT fixes #839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5bd51a6
7866c0f
14d83c8
cd45b2f
f479d75
d8e0acc
57eeebb
1ee0fb0
604fcd0
1d31b8e
b0e22d6
a889f5d
409485b
fd9cbe6
2487090
48ec551
e6f78b8
2bd22d0
42d15f8
03db443
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,19 +53,17 @@ void CConjugateHeatInterface::GetDonor_Variable(CSolver *donor_solution, CGeomet | |
|
|
||
| /*--- Check whether the current zone is a solid zone or a fluid zone ---*/ | ||
|
|
||
| bool flow = ((donor_config->GetKind_Solver() == NAVIER_STOKES) | ||
| bool compressible_flow = ((donor_config->GetKind_Solver() == NAVIER_STOKES) | ||
| || (donor_config->GetKind_Solver() == RANS) | ||
| || (donor_config->GetKind_Solver() == DISC_ADJ_NAVIER_STOKES) | ||
| || (donor_config->GetKind_Solver() == DISC_ADJ_RANS) | ||
| || (donor_config->GetKind_Solver() == INC_NAVIER_STOKES) | ||
| || (donor_config->GetKind_Solver() == DISC_ADJ_RANS)); | ||
| bool incompressible_flow = ((donor_config->GetKind_Solver() == INC_NAVIER_STOKES) | ||
| || (donor_config->GetKind_Solver() == INC_RANS) | ||
| || (donor_config->GetKind_Solver() == DISC_ADJ_INC_NAVIER_STOKES) | ||
| || (donor_config->GetKind_Solver() == DISC_ADJ_INC_RANS)); | ||
|
|
||
| bool compressible_flow = (donor_config->GetKind_Regime() == COMPRESSIBLE) && flow; | ||
| bool incompressible_flow = (donor_config->GetEnergy_Equation()) && flow; | ||
| bool heat_equation = (donor_config->GetKind_Solver() == HEAT_EQUATION_FVM | ||
| || donor_config->GetKind_Solver() == DISC_ADJ_HEAT); | ||
| || (donor_config->GetKind_Solver() == DISC_ADJ_INC_RANS) | ||
| && (donor_config->GetEnergy_Equation())); | ||
|
Comment on lines
+60
to
+64
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @oleburghardt you ticked the "no new compiler warnings" box, but there is a warning for this logic and it does look a bit suspicious.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks Pedro, I'll check 👍 |
||
| bool heat_equation = (donor_config->GetKind_Solver() == HEAT_EQUATION_FVM | ||
| || donor_config->GetKind_Solver() == DISC_ADJ_HEAT); | ||
|
|
||
| Coord = donor_geometry->node[Point_Donor]->GetCoord(); | ||
|
|
||
|
|
@@ -130,7 +128,8 @@ void CConjugateHeatInterface::GetDonor_Variable(CSolver *donor_solution, CGeomet | |
| thermal_conductivityND = Cp*(laminar_viscosity/Prandtl_Lam); | ||
| heat_flux_density = thermal_conductivityND*dTdn; | ||
|
|
||
| if (donor_config->GetCHT_Robin()) { | ||
| if ((donor_config->GetKind_CHT_Coupling() == DIRECT_TEMPERATURE_ROBIN_HEATFLUX) || | ||
| (donor_config->GetKind_CHT_Coupling() == AVERAGED_TEMPERATURE_ROBIN_HEATFLUX)) { | ||
|
|
||
| thermal_conductivity = thermal_conductivityND*donor_config->GetViscosity_Ref(); | ||
| conductivity_over_dist = thermal_conductivity/dist; | ||
|
|
@@ -143,7 +142,8 @@ void CConjugateHeatInterface::GetDonor_Variable(CSolver *donor_solution, CGeomet | |
| thermal_conductivityND = donor_solution->GetNodes()->GetThermalConductivity(iPoint); | ||
| heat_flux_density = thermal_conductivityND*dTdn; | ||
|
|
||
| if (donor_config->GetCHT_Robin()) { | ||
| if ((donor_config->GetKind_CHT_Coupling() == DIRECT_TEMPERATURE_ROBIN_HEATFLUX) || | ||
| (donor_config->GetKind_CHT_Coupling() == AVERAGED_TEMPERATURE_ROBIN_HEATFLUX)) { | ||
|
|
||
| switch (donor_config->GetKind_ConductivityModel()) { | ||
|
|
||
|
|
@@ -167,7 +167,9 @@ void CConjugateHeatInterface::GetDonor_Variable(CSolver *donor_solution, CGeomet | |
| thermal_diffusivity = donor_config->GetThermalDiffusivity_Solid(); | ||
| heat_flux_density = thermal_diffusivity*dTdn; | ||
|
|
||
| if (donor_config->GetCHT_Robin()) { | ||
| if ((donor_config->GetKind_CHT_Coupling() == DIRECT_TEMPERATURE_ROBIN_HEATFLUX) || | ||
| (donor_config->GetKind_CHT_Coupling() == AVERAGED_TEMPERATURE_ROBIN_HEATFLUX)) { | ||
|
|
||
| rho_cp_solid = donor_config->GetSpecific_Heat_Cp()*donor_config->GetDensity_Solid(); | ||
| conductivity_over_dist = thermal_diffusivity*rho_cp_solid/dist; | ||
| } | ||
|
|
@@ -180,7 +182,8 @@ void CConjugateHeatInterface::GetDonor_Variable(CSolver *donor_solution, CGeomet | |
|
|
||
| /*--- We only need these for the Robin BC option ---*/ | ||
|
|
||
| if (donor_config->GetCHT_Robin()) { | ||
| if ((donor_config->GetKind_CHT_Coupling() == DIRECT_TEMPERATURE_ROBIN_HEATFLUX) || | ||
| (donor_config->GetKind_CHT_Coupling() == AVERAGED_TEMPERATURE_ROBIN_HEATFLUX)) { | ||
|
|
||
| Donor_Variable[2] = conductivity_over_dist; | ||
| Donor_Variable[3] = Tnormal*donor_config->GetTemperature_Ref(); | ||
|
|
@@ -201,7 +204,8 @@ void CConjugateHeatInterface::SetTarget_Variable(CSolver *target_solution, CGeom | |
| target_solution->SetConjugateHeatVariable(Marker_Target, Vertex_Target, 1, | ||
| target_config->GetRelaxation_Factor_CHT(), Target_Variable[1]); | ||
|
|
||
| if (target_config->GetCHT_Robin()) { | ||
| if ((target_config->GetKind_CHT_Coupling() == DIRECT_TEMPERATURE_ROBIN_HEATFLUX) || | ||
| (target_config->GetKind_CHT_Coupling() == AVERAGED_TEMPERATURE_ROBIN_HEATFLUX)) { | ||
|
|
||
| target_solution->SetConjugateHeatVariable(Marker_Target, Vertex_Target, 2, | ||
| target_config->GetRelaxation_Factor_CHT(), Target_Variable[2]); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.