Skip to content

Commit 09323dd

Browse files
fixing outputs
1 parent 58e66ea commit 09323dd

File tree

5 files changed

+42
-23
lines changed

5 files changed

+42
-23
lines changed

SU2_CFD/include/output/CFlowIncOutput.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class CFlowIncOutput final: public CFlowOutput {
4040
private:
4141
TURB_MODEL turb_model; /*!< \brief The kind of turbulence model*/
4242
bool heat; /*!< \brief Boolean indicating whether have a heat problem*/
43-
bool multicomponent; /*!< \brief Boolean indicating whether have a multicomponent problem*/
4443
bool weakly_coupled_heat; /*!< \brief Boolean indicating whether have a weakly coupled heat equation*/
4544
bool flamelet; /*!< \brief Boolean indicating whether we solve the flamelet equations */
4645
unsigned short streamwisePeriodic; /*!< \brief Boolean indicating whether it is a streamwise periodic simulation. */

SU2_CFD/src/numerics/flow/convection/fds.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,6 @@ CNumerics::ResidualType<> CUpwFDSInc_Flow::ComputeResidual(const CConfig *config
160160
MeandRhodh = -MeanDensity / (MeanTemperature * MeanCp);
161161
dRhodh_i = -DensityInc_i / (Temperature_i * Cp_i);
162162
dRhodh_j = -DensityInc_j / (Temperature_j * Cp_j);
163-
MeanCp = 1.0;
164-
Cp_i = 1.0;
165-
Cp_j = 1.0;
166163
}
167164

168165
/*--- Compute ProjFlux_i ---*/
@@ -262,8 +259,8 @@ CNumerics::ResidualType<> CUpwFDSInc_Flow::ComputeResidual(const CConfig *config
262259
Jacobian_i[iDim+1][iDim+1] -= 0.5*ProjVelocity*DensityInc_i;
263260
Jacobian_j[iDim+1][iDim+1] -= 0.5*ProjVelocity*DensityInc_j;
264261
}
265-
Jacobian_i[nDim+1][nDim+1] -= 0.5*ProjVelocity*DensityInc_i*Cp_i;
266-
Jacobian_j[nDim+1][nDim+1] -= 0.5*ProjVelocity*DensityInc_j*Cp_j;
262+
Jacobian_i[nDim+1][nDim+1] -= 0.5*ProjVelocity*DensityInc_i;
263+
Jacobian_j[nDim+1][nDim+1] -= 0.5*ProjVelocity*DensityInc_j;
267264
}
268265
}
269266
}

SU2_CFD/src/output/CAdjFlowIncOutput.cpp

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,12 @@ void CAdjFlowIncOutput::SetHistoryOutputFields(CConfig *config) {
111111
if (nDim == 3) {
112112
AddHistoryOutput("RMS_ADJ_VELOCITY-Z", "rms[A_W]", ScreenOutputFormat::FIXED, "RMS_RES", "Root-mean square residual of the adjoint Velocity z-component.", HistoryFieldType::RESIDUAL);
113113
}
114-
/// DESCRIPTION: Maximum residual of the temperature.
115-
if (heat || weakly_coupled_heat) {
114+
/// DESCRIPTION: Root-mean square residual of the adjoint temperature.
115+
if (weakly_coupled_heat) {
116+
AddHistoryOutput("RMS_ADJ_TEMPERATURE", "rms[A_T]", ScreenOutputFormat::FIXED, "RMS_RES", "Root-mean square residual of the adjoint temperature.", HistoryFieldType::RESIDUAL);
117+
}
118+
/// DESCRIPTION: Root-mean square residual of the adjoint enthalpy.
119+
if (heat) {
116120
AddHistoryOutput("RMS_ADJ_ENTHALPY", "rms[A_h]", ScreenOutputFormat::FIXED, "RMS_RES", "Root-mean square residual of the enthalpy.", HistoryFieldType::RESIDUAL);
117121
}
118122

@@ -139,8 +143,12 @@ void CAdjFlowIncOutput::SetHistoryOutputFields(CConfig *config) {
139143
if (nDim == 3) {
140144
AddHistoryOutput("MAX_ADJ_VELOCITY-Z", "max[A_RhoW]", ScreenOutputFormat::FIXED, "MAX_RES", "Maximum residual of the adjoint Velocity z-component", HistoryFieldType::RESIDUAL);
141145
}
142-
/// DESCRIPTION: Maximum residual of the temperature.
143-
if (heat || weakly_coupled_heat) {
146+
/// DESCRIPTION: Maximum residual of the adjoint temperature.
147+
if (weakly_coupled_heat) {
148+
AddHistoryOutput("MAX_ADJ_TEMPERATURE", "max[A_T]", ScreenOutputFormat::FIXED, "MAX_RES", "Maximum residual of the temperature.", HistoryFieldType::RESIDUAL);
149+
}
150+
/// DESCRIPTION: Maximum residual of the adjoint enthalpy.
151+
if (heat) {
144152
AddHistoryOutput("MAX_ADJ_ENTHALPY", "max[A_h]", ScreenOutputFormat::FIXED, "MAX_RES", "Maximum residual of the enthalpy.", HistoryFieldType::RESIDUAL);
145153
}
146154

@@ -158,10 +166,14 @@ void CAdjFlowIncOutput::SetHistoryOutputFields(CConfig *config) {
158166
if (nDim == 3) {
159167
AddHistoryOutput("BGS_ADJ_VELOCITY-Z", "bgs[A_RhoW]", ScreenOutputFormat::FIXED, "BGS_RES", "BGS residual of the adjoint Velocity z-component", HistoryFieldType::RESIDUAL);
160168
}
161-
/// DESCRIPTION: BGS residual of the temperature.
162-
if (heat || weakly_coupled_heat) {
169+
/// DESCRIPTION: BGS residual of the adjoint temperature.
170+
if (weakly_coupled_heat) {
163171
AddHistoryOutput("BGS_ADJ_TEMPERATURE", "bgs[A_T]", ScreenOutputFormat::FIXED, "BGS_RES", "BGS residual of the adjoint temperature.", HistoryFieldType::RESIDUAL);
164172
}
173+
/// DESCRIPTION: BGS residual of the adjoint enthalpy.
174+
if (heat) {
175+
AddHistoryOutput("BGS_ADJ_ENTHALPY", "bgs[A_h]", ScreenOutputFormat::FIXED, "BGS_RES", "BGS residual of the adjoint enthalpy.", HistoryFieldType::RESIDUAL);
176+
}
165177

166178
AddHistoryOutputFields_AdjScalarBGS_RES(config);
167179

SU2_CFD/src/output/CFlowIncOutput.cpp

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ void CFlowIncOutput::SetHistoryOutputFields(CConfig *config){
107107
AddHistoryOutput("RMS_VELOCITY-Y", "rms[V]", ScreenOutputFormat::FIXED, "RMS_RES", "Root-mean square residual of the velocity y-component.", HistoryFieldType::RESIDUAL);
108108
/// DESCRIPTION: Root-mean square residual of the velocity z-component.
109109
if (nDim == 3) AddHistoryOutput("RMS_VELOCITY-Z", "rms[W]", ScreenOutputFormat::FIXED, "RMS_RES", "Root-mean square residual of the velocity z-component.", HistoryFieldType::RESIDUAL);
110-
/// DESCRIPTION: Maximum residual of the temperature.
111-
if (heat || weakly_coupled_heat){
112-
AddHistoryOutput("RMS_ENTHALPY", "rms[h]", ScreenOutputFormat::FIXED, "RMS_RES", "Root-mean square residual of the enthalpy.", HistoryFieldType::RESIDUAL);
113-
}
110+
/// DESCRIPTION: Root-mean square residual of the temperature.
111+
if (weakly_coupled_heat) AddHistoryOutput("RMS_TEMPERATURE", "rms[T]", ScreenOutputFormat::FIXED, "RMS_RES", "Root-mean square residual of the temperature.", HistoryFieldType::RESIDUAL);
112+
/// DESCRIPTION: Root-mean square residual of the enthalpy.
113+
if (heat) AddHistoryOutput("RMS_ENTHALPY", "rms[h]", ScreenOutputFormat::FIXED, "RMS_RES", "Root-mean square residual of the enthalpy.", HistoryFieldType::RESIDUAL);
114114

115115
AddHistoryOutputFields_ScalarRMS_RES(config);
116116

@@ -129,7 +129,10 @@ void CFlowIncOutput::SetHistoryOutputFields(CConfig *config){
129129
if (nDim == 3)
130130
AddHistoryOutput("MAX_VELOCITY-Z", "max[W]", ScreenOutputFormat::FIXED, "MAX_RES", "Maximum residual of the velocity z-component.", HistoryFieldType::RESIDUAL);
131131
/// DESCRIPTION: Maximum residual of the temperature.
132-
if (heat || weakly_coupled_heat) {
132+
if (weakly_coupled_heat)
133+
AddHistoryOutput("MAX_TEMPERATURE", "max[T]", ScreenOutputFormat::FIXED, "MAX_RES", "Root-mean square residual of the temperature.", HistoryFieldType::RESIDUAL);
134+
/// DESCRIPTION: Maximum residual of the enthalpy.
135+
if (heat) {
133136
AddHistoryOutput("MAX_ENTHALPY", "max[h]", ScreenOutputFormat::FIXED, "MAX_RES", "Maximum residual of the enthalpy.", HistoryFieldType::RESIDUAL);
134137
}
135138

@@ -147,9 +150,12 @@ void CFlowIncOutput::SetHistoryOutputFields(CConfig *config){
147150
if (nDim == 3)
148151
AddHistoryOutput("BGS_VELOCITY-Z", "bgs[W]", ScreenOutputFormat::FIXED, "BGS_RES", "BGS residual of the velocity z-component.", HistoryFieldType::RESIDUAL);
149152
/// DESCRIPTION: Maximum residual of the temperature.
150-
if (heat || weakly_coupled_heat) {
151-
AddHistoryOutput("BGS_ENTHALPY", "bgs[h]", ScreenOutputFormat::FIXED, "BGS_RES", "BGS residual of the enthalpy.", HistoryFieldType::RESIDUAL);
152-
}
153+
if (weakly_coupled_heat)
154+
AddHistoryOutput("BGS_TEMPERATURE", "bgs[T]", ScreenOutputFormat::FIXED, "BGS_RES", "BGS residual of the temperature.", HistoryFieldType::RESIDUAL);
155+
/// DESCRIPTION: Maximum residual of the Enthalpy.
156+
if (heat)
157+
AddHistoryOutput("BGS_ENTHALPY", "bgs[h]", ScreenOutputFormat::FIXED, "BGS_RES", "BGS residual of the enthalpy.",
158+
HistoryFieldType::RESIDUAL);
153159

154160
AddHistoryOutputFields_ScalarBGS_RES(config);
155161

@@ -299,9 +305,8 @@ void CFlowIncOutput::SetVolumeOutputFields(CConfig *config){
299305
AddVolumeOutput("VELOCITY-Y", "Velocity_y", "SOLUTION", "y-component of the velocity vector");
300306
if (nDim == 3)
301307
AddVolumeOutput("VELOCITY-Z", "Velocity_z", "SOLUTION", "z-component of the velocity vector");
302-
if (heat || weakly_coupled_heat || flamelet){
303-
AddVolumeOutput("ENTHALPY", "Enthalpy", "SOLUTION", "Enthalpy");
304-
}
308+
if (weakly_coupled_heat) AddVolumeOutput("TEMPERATURE", "Temperature", "SOLUTION", "Temperature");
309+
if (heat || flamelet) AddVolumeOutput("ENTHALPY", "Enthalpy", "SOLUTION", "Enthalpy");
305310

306311
SetVolumeOutputFieldsScalarSolution(config);
307312

SU2_PY/SU2/io/historyMap.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@
148148
"HEADER": "bgs[A_T]",
149149
"TYPE": "RESIDUAL",
150150
},
151+
"BGS_ADJ_ENTHALPY": {
152+
"DESCRIPTION": "BGS residual of the adjoint " "enthalpy.",
153+
"GROUP": "BGS_RES",
154+
"HEADER": "bgs[A_h]",
155+
"TYPE": "RESIDUAL",
156+
},
151157
"BGS_ADJ_TKE": {
152158
"DESCRIPTION": "BGS residual of the adjoint kinetic energy.",
153159
"GROUP": "BGS_RES",

0 commit comments

Comments
 (0)