Skip to content

Commit bf16c20

Browse files
authored
Merge pull request #1985 from su2code/fix_transition_outputs
Fix order of transition volume outputs
2 parents 0df264d + 4e69e2e commit bf16c20

5 files changed

Lines changed: 35 additions & 19 deletions

File tree

SU2_CFD/include/output/CFlowOutput.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,20 +115,20 @@ class CFlowOutput : public CFVMOutput{
115115
* \note The order of fields in restart files is fixed. Therefore the split-up.
116116
* \param[in] config - Definition of the particular problem.
117117
*/
118-
void SetVolumeOutputFields_ScalarSolution(const CConfig* config);
118+
void SetVolumeOutputFieldsScalarSolution(const CConfig* config);
119119

120120
/*!
121121
* \brief Add scalar (turbulence/species) volume solution fields for a point (FVMComp, FVMInc, FVMNEMO).
122122
* \note The order of fields in restart files is fixed. Therefore the split-up.
123123
* \param[in] config - Definition of the particular problem.
124124
*/
125-
void SetVolumeOutputFields_ScalarResidual(const CConfig* config);
125+
void SetVolumeOutputFieldsScalarResidual(const CConfig* config);
126126

127127
/*!
128128
* \brief Add scalar (turbulence/species) volume limiter fields (and more) for a point (FVMComp, FVMInc, FVMNEMO).
129129
* \param[in] config - Definition of the particular problem.
130130
*/
131-
void SetVolumeOutputFields_ScalarLimiter(const CConfig* config);
131+
void SetVolumeOutputFieldsScalarMisc(const CConfig* config);
132132

133133
/*!
134134
* \brief Set all scalar (turbulence/species) volume field values for a point.

SU2_CFD/src/output/CFlowCompOutput.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ void CFlowCompOutput::SetVolumeOutputFields(CConfig *config){
222222
AddVolumeOutput("MOMENTUM-Z", "Momentum_z", "SOLUTION", "z-component of the momentum vector");
223223
AddVolumeOutput("ENERGY", "Energy", "SOLUTION", "Energy");
224224

225-
SetVolumeOutputFields_ScalarSolution(config);
225+
SetVolumeOutputFieldsScalarSolution(config);
226226

227227
// Grid velocity
228228
if (gridMovement){
@@ -258,7 +258,7 @@ void CFlowCompOutput::SetVolumeOutputFields(CConfig *config){
258258
AddVolumeOutput("RES_MOMENTUM-Z", "Residual_Momentum_z", "RESIDUAL", "Residual of the z-momentum component");
259259
AddVolumeOutput("RES_ENERGY", "Residual_Energy", "RESIDUAL", "Residual of the energy");
260260

261-
SetVolumeOutputFields_ScalarResidual(config);
261+
SetVolumeOutputFieldsScalarResidual(config);
262262

263263
if (config->GetKind_SlopeLimit_Flow() != LIMITER::NONE && config->GetKind_SlopeLimit_Flow() != LIMITER::VAN_ALBADA_EDGE) {
264264
AddVolumeOutput("LIMITER_VELOCITY-X", "Limiter_Velocity_x", "LIMITER", "Limiter value of the x-velocity");
@@ -271,7 +271,7 @@ void CFlowCompOutput::SetVolumeOutputFields(CConfig *config){
271271
AddVolumeOutput("LIMITER_ENTHALPY", "Limiter_Enthalpy", "LIMITER", "Limiter value of the enthalpy");
272272
}
273273

274-
SetVolumeOutputFields_ScalarLimiter(config);
274+
SetVolumeOutputFieldsScalarMisc(config);
275275

276276
// Roe Low Dissipation
277277
if (config->GetKind_RoeLowDiss() != NO_ROELOWDISS) {

SU2_CFD/src/output/CFlowIncOutput.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ void CFlowIncOutput::SetVolumeOutputFields(CConfig *config){
298298
if (heat || weakly_coupled_heat)
299299
AddVolumeOutput("TEMPERATURE", "Temperature","SOLUTION", "Temperature");
300300

301-
SetVolumeOutputFields_ScalarSolution(config);
301+
SetVolumeOutputFieldsScalarSolution(config);
302302

303303
// Radiation variables
304304
if (config->AddRadiation())
@@ -344,7 +344,7 @@ void CFlowIncOutput::SetVolumeOutputFields(CConfig *config){
344344
if (config->GetEnergy_Equation())
345345
AddVolumeOutput("RES_TEMPERATURE", "Residual_Temperature", "RESIDUAL", "Residual of the temperature");
346346

347-
SetVolumeOutputFields_ScalarResidual(config);
347+
SetVolumeOutputFieldsScalarResidual(config);
348348

349349
if (config->GetKind_SlopeLimit_Flow() != LIMITER::NONE && config->GetKind_SlopeLimit_Flow() != LIMITER::VAN_ALBADA_EDGE) {
350350
AddVolumeOutput("LIMITER_PRESSURE", "Limiter_Pressure", "LIMITER", "Limiter value of the pressure");
@@ -356,7 +356,7 @@ void CFlowIncOutput::SetVolumeOutputFields(CConfig *config){
356356
AddVolumeOutput("LIMITER_TEMPERATURE", "Limiter_Temperature", "LIMITER", "Limiter value of the temperature");
357357
}
358358

359-
SetVolumeOutputFields_ScalarLimiter(config);
359+
SetVolumeOutputFieldsScalarMisc(config);
360360

361361
// Streamwise Periodicity
362362
if(streamwisePeriodic) {

SU2_CFD/src/output/CFlowOutput.cpp

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,9 @@ void CFlowOutput::LoadHistoryData_Scalar(const CConfig* config, const CSolver* c
11301130
}
11311131
}
11321132

1133-
void CFlowOutput::SetVolumeOutputFields_ScalarSolution(const CConfig* config){
1133+
void CFlowOutput::SetVolumeOutputFieldsScalarSolution(const CConfig* config){
1134+
/*--- Only place outputs of the "SOLUTION" group here. ---*/
1135+
11341136
switch (TurbModelFamily(config->GetKind_Turb_Model())) {
11351137
case TURB_FAMILY::SA:
11361138
AddVolumeOutput("NU_TILDE", "Nu_Tilde", "SOLUTION", "Spalart-Allmaras variable");
@@ -1149,9 +1151,6 @@ void CFlowOutput::SetVolumeOutputFields_ScalarSolution(const CConfig* config){
11491151
case TURB_TRANS_MODEL::LM:
11501152
AddVolumeOutput("INTERMITTENCY", "LM_gamma", "SOLUTION", "LM intermittency");
11511153
AddVolumeOutput("RE_THETA_T", "LM_Re_t", "SOLUTION", "LM RE_THETA_T");
1152-
AddVolumeOutput("INTERMITTENCY_SEP", "LM_gamma_sep", "PRIMITIVE", "LM intermittency");
1153-
AddVolumeOutput("INTERMITTENCY_EFF", "LM_gamma_eff", "PRIMITIVE", "LM RE_THETA_T");
1154-
AddVolumeOutput("TURB_INDEX", "Turb_index", "PRIMITIVE", "Turbulence index");
11551154
break;
11561155

11571156
case TURB_TRANS_MODEL::NONE:
@@ -1165,7 +1164,9 @@ void CFlowOutput::SetVolumeOutputFields_ScalarSolution(const CConfig* config){
11651164
}
11661165
}
11671166

1168-
void CFlowOutput::SetVolumeOutputFields_ScalarResidual(const CConfig* config) {
1167+
void CFlowOutput::SetVolumeOutputFieldsScalarResidual(const CConfig* config) {
1168+
/*--- Only place outputs of the "RESIDUAL" group here. ---*/
1169+
11691170
switch (TurbModelFamily(config->GetKind_Turb_Model())){
11701171
case TURB_FAMILY::SA:
11711172
AddVolumeOutput("RES_NU_TILDE", "Residual_Nu_Tilde", "RESIDUAL", "Residual of the Spalart-Allmaras variable");
@@ -1193,12 +1194,13 @@ void CFlowOutput::SetVolumeOutputFields_ScalarResidual(const CConfig* config) {
11931194
if (config->GetKind_Species_Model() != SPECIES_MODEL::NONE) {
11941195
for (unsigned short iVar = 0; iVar < config->GetnSpecies(); iVar++){
11951196
AddVolumeOutput("RES_SPECIES_" + std::to_string(iVar), "Residual_Species_" + std::to_string(iVar), "RESIDUAL", "Residual of the transported species " + std::to_string(iVar));
1196-
AddVolumeOutput("DIFFUSIVITY_" + std::to_string(iVar), "Diffusivity_" + std::to_string(iVar), "PRIMITIVE", "Diffusivity of the transported species " + std::to_string(iVar));
11971197
}
11981198
}
11991199
}
12001200

1201-
void CFlowOutput::SetVolumeOutputFields_ScalarLimiter(const CConfig* config) {
1201+
void CFlowOutput::SetVolumeOutputFieldsScalarMisc(const CConfig* config) {
1202+
/*--- Place "PRIMITIVE", "LIMITER", and other groups here. ---*/
1203+
12021204
if (config->GetKind_SlopeLimit_Turb() != LIMITER::NONE) {
12031205
switch (TurbModelFamily(config->GetKind_Turb_Model())) {
12041206
case TURB_FAMILY::SA:
@@ -1220,6 +1222,20 @@ void CFlowOutput::SetVolumeOutputFields_ScalarLimiter(const CConfig* config) {
12201222
for (unsigned short iVar = 0; iVar < config->GetnSpecies(); iVar++)
12211223
AddVolumeOutput("LIMITER_SPECIES_" + std::to_string(iVar), "Limiter_Species_" + std::to_string(iVar), "LIMITER", "Limiter value of the transported species " + std::to_string(iVar));
12221224
}
1225+
for (unsigned short iVar = 0; iVar < config->GetnSpecies(); iVar++) {
1226+
AddVolumeOutput("DIFFUSIVITY_" + std::to_string(iVar), "Diffusivity_" + std::to_string(iVar), "PRIMITIVE", "Diffusivity of the transported species " + std::to_string(iVar));
1227+
}
1228+
}
1229+
1230+
switch (config->GetKind_Trans_Model()) {
1231+
case TURB_TRANS_MODEL::LM:
1232+
AddVolumeOutput("INTERMITTENCY_SEP", "LM_gamma_sep", "PRIMITIVE", "LM intermittency");
1233+
AddVolumeOutput("INTERMITTENCY_EFF", "LM_gamma_eff", "PRIMITIVE", "LM RE_THETA_T");
1234+
AddVolumeOutput("TURB_INDEX", "Turb_index", "PRIMITIVE", "Turbulence index");
1235+
break;
1236+
1237+
case TURB_TRANS_MODEL::NONE:
1238+
break;
12231239
}
12241240

12251241
if (config->GetKind_Turb_Model() != TURB_MODEL::NONE) {

SU2_CFD/src/output/CNEMOCompOutput.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ void CNEMOCompOutput::SetVolumeOutputFields(CConfig *config){
224224
AddVolumeOutput("ENERGY", "Energy", "SOLUTION", "Energy");
225225
AddVolumeOutput("ENERGY_VE", "Energy_ve", "SOLUTION", "Energy_ve");
226226

227-
SetVolumeOutputFields_ScalarSolution(config);
227+
SetVolumeOutputFieldsScalarSolution(config);
228228

229229
//Auxiliary variables for post-processment
230230
for(iSpecies = 0; iSpecies < nSpecies; iSpecies++)
@@ -271,7 +271,7 @@ void CNEMOCompOutput::SetVolumeOutputFields(CConfig *config){
271271
AddVolumeOutput("RES_ENERGY", "Residual_Energy", "RESIDUAL", "Residual of the energy");
272272
AddVolumeOutput("RES_ENERGY_VE", "Residual_Energy_ve", "RESIDUAL", "Residual of the energy_ve");
273273

274-
SetVolumeOutputFields_ScalarResidual(config);
274+
SetVolumeOutputFieldsScalarResidual(config);
275275

276276
if (config->GetKind_SlopeLimit_Flow() != LIMITER::NONE && config->GetKind_SlopeLimit_Flow() != LIMITER::VAN_ALBADA_EDGE) {
277277
// Limiter values
@@ -283,7 +283,7 @@ void CNEMOCompOutput::SetVolumeOutputFields(CConfig *config){
283283
AddVolumeOutput("LIMITER_ENERGY", "Limiter_Energy", "LIMITER", "Limiter value of the energy");
284284
}
285285

286-
SetVolumeOutputFields_ScalarLimiter(config);
286+
SetVolumeOutputFieldsScalarMisc(config);
287287

288288
AddCommonFVMOutputs(config);
289289

0 commit comments

Comments
 (0)