Skip to content

Commit 7d38d8c

Browse files
committed
more outputs for debugging
1 parent 7af71d6 commit 7d38d8c

File tree

5 files changed

+80
-2
lines changed

5 files changed

+80
-2
lines changed

SU2_CFD/include/numerics/CNumerics.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ class CNumerics {
190190

191191
bool bounded_scalar = false; /*!< \brief Flag for bounded scalar problem */
192192

193-
su2double DiffCoeff_kw[2]; /*!< \brief Storage for diffusion coefficient*/
193+
su2double DiffCoeff_kw[6]; /*!< \brief Storage for diffusion coefficient*/
194194

195195
public:
196196
/*!

SU2_CFD/include/variables/CTurbVariable.hpp

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,27 @@ class CTurbVariable : public CScalarVariable {
4545
VectorType intermittency; /*!< \brief Value of the intermittency for the trans. model. */
4646
VectorType DC_TKE; /*!< \brief TKE Diffusion Coefficient. */
4747
VectorType DC_Omega; /*!< \brief Omega Diffusion Coefficient. */
48+
VectorType DC_OmegaT1;
49+
VectorType DC_OmegaT2;
50+
VectorType DC_OmegaT3;
51+
VectorType DC_Omega_kc;
52+
VectorType DC_Omega_so2i;
53+
VectorType DC_Omega_Coi;
54+
VectorType DC_Omega_Coj;
55+
VectorType DC_Omega_F1i;
56+
VectorType DC_Omega_F1j;
57+
VectorType DC_Omega_so2j;
58+
VectorType DC_Omega_mui;
59+
VectorType DC_Omega_muj;
60+
VectorType DC_Omega_muti;
61+
VectorType DC_Omega_mutj;
62+
VectorType DC_Omega_rhoi;
63+
VectorType DC_Omega_rhoj;
64+
VectorType DC_Omega_ki;
65+
VectorType DC_Omega_kj;
66+
VectorType DC_Omega_wi;
67+
VectorType DC_Omega_wj;
68+
4869
/*!
4970
* \brief Constructor of the class.
5071
* \param[in] npoint - Number of points/nodes/vertices in the domain.
@@ -109,6 +130,10 @@ class CTurbVariable : public CScalarVariable {
109130
inline void SetDiffCoeff_kw(unsigned long iPoint, su2double* val_DC_kw) {
110131
DC_TKE(iPoint) = val_DC_kw[0];
111132
DC_Omega(iPoint) = val_DC_kw[1];
133+
DC_OmegaT1(iPoint) = val_DC_kw[2];
134+
DC_OmegaT2(iPoint) = val_DC_kw[3];
135+
DC_OmegaT3(iPoint) = val_DC_kw[4];
136+
DC_Omega_kc(iPoint) = val_DC_kw[5];
112137
}
113138

114139
/*!
@@ -118,13 +143,46 @@ class CTurbVariable : public CScalarVariable {
118143
inline su2double GetTKE_DC(unsigned long iPoint) const final {
119144
return DC_TKE(iPoint);
120145
}
146+
121147
/*!
122148
* \brief Get the diffusion coefficient value of omega.
123149
* \param[in] iPoint - Point index.
124150
*/
125151
inline su2double GetOmega_DC(unsigned long iPoint) const final {
126152
return DC_Omega(iPoint);
127153
}
154+
155+
/*!
156+
* \brief Get omega diffusion coefficient Term 1.
157+
* \param[in] iPoint - Point index.
158+
*/
159+
inline su2double GetOmega_DCT1(unsigned long iPoint) const final {
160+
return DC_OmegaT1(iPoint);
161+
}
162+
163+
/*!
164+
* \brief Get omega diffusion coefficient Term 2.
165+
* \param[in] iPoint - Point index.
166+
*/
167+
inline su2double GetOmega_DCT2(unsigned long iPoint) const final {
168+
return DC_OmegaT2(iPoint);
169+
}
170+
171+
/*!
172+
* \brief Get omega diffusion coefficient Term 3.
173+
* \param[in] iPoint - Point index.
174+
*/
175+
inline su2double GetOmega_DCT3(unsigned long iPoint) const final {
176+
return DC_OmegaT3(iPoint);
177+
}
178+
179+
/*!
180+
* \brief Get the clip value kc used in omega diffusion coeffient.
181+
* \param[in] iPoint - Point index.
182+
*/
183+
inline su2double GetOmega_DC_kc(unsigned long iPoint) const final {
184+
return DC_Omega_kc(iPoint);
185+
}
128186

129187
/*!
130188
* \brief Register eddy viscosity (muT) as Input or Output of an AD recording.

SU2_CFD/include/variables/CVariable.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,6 +1672,10 @@ class CVariable {
16721672
inline virtual void SetDiffCoeff_kw(unsigned long iPoint, su2double* val_DiffCoeff) const { }
16731673
inline virtual su2double GetTKE_DC(unsigned long iPoint) const {return 0.0; }
16741674
inline virtual su2double GetOmega_DC(unsigned long iPoint) const {return 0.0; }
1675+
inline virtual su2double GetOmega_DCT1(unsigned long iPoint) const {return 0.0; }
1676+
inline virtual su2double GetOmega_DCT2(unsigned long iPoint) const {return 0.0; }
1677+
inline virtual su2double GetOmega_DCT3(unsigned long iPoint) const {return 0.0; }
1678+
inline virtual su2double GetOmega_DC_kc(unsigned long iPoint) const {return 0.0; }
16751679

16761680
/*!
16771681
* \brief Get the value of the eddy viscosity.

SU2_CFD/src/output/CFlowOutput.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,13 @@ void CFlowOutput::SetVolumeOutputFieldsScalarSolution(const CConfig* config){
12571257
AddVolumeOutput("TKE", "Turb_Kin_Energy", "SOLUTION", "Turbulent kinetic energy");
12581258
AddVolumeOutput("DISSIPATION", "Omega", "SOLUTION", "Rate of dissipation");
12591259
AddVolumeOutput("DIFF_COEFF_TKE", "TKE_Diff_Coeff", "SOLUTION", "Diffusion Coefficient for TKE equation");
1260-
AddVolumeOutput("DIFF_COEFF_Omega", "Omega_Diff_Coeff", "SOLUTION", "Diffusion Coefficient for Omega equation");
1260+
AddVolumeOutput("DIFF_COEFF_Omega", "Omega_Diff_Coeff", "SOLUTION", "Toal Diffusion Coefficient for Omega equation");
1261+
AddVolumeOutput("DIFF_COEFF_OmegaT1", "w_DiffCoeff_T1", "SOLUTION", "Term 1 in Diffusion Coefficient for Omega equation");
1262+
AddVolumeOutput("DIFF_COEFF_OmegaT2", "w_DiffCoeff_T2", "SOLUTION", "Term 2 in Diffusion Coefficient for Omega equation");
1263+
AddVolumeOutput("DIFF_COEFF_OmegaT3", "w_DiffCoeff_T3", "SOLUTION", "Term 3 in Diffusion Coefficient for Omega equation");
1264+
AddVolumeOutput("DIFF_COEFF_Omegakc", "w_DiffCoeff_kc", "SOLUTION", "kc value in Diffusion Coefficient for Omega equation");
1265+
AddVolumeOutput("CDkw", "CDkw", "SOLUTION", "Cross-Diffusion term");
1266+
AddVolumeOutput("F1", "F1", "SOLUTION", "F1 blending function");
12611267
break;
12621268

12631269
case TURB_FAMILY::NONE:
@@ -1540,6 +1546,12 @@ void CFlowOutput::LoadVolumeDataScalar(const CConfig* config, const CSolver* con
15401546
SetVolumeOutputValue("DISSIPATION", iPoint, Node_Turb->GetSolution(iPoint, 1));
15411547
SetVolumeOutputValue("DIFF_COEFF_TKE", iPoint, Node_Turb->GetTKE_DC(iPoint));
15421548
SetVolumeOutputValue("DIFF_COEFF_Omega", iPoint, Node_Turb->GetOmega_DC(iPoint));
1549+
SetVolumeOutputValue("CDkw", iPoint, Node_Turb->GetCrossDiff(iPoint));
1550+
SetVolumeOutputValue("F1", iPoint, Node_Turb->GetF1blending(iPoint));
1551+
SetVolumeOutputValue("DIFF_COEFF_OmegaT1", iPoint, Node_Turb->GetOmega_DCT1(iPoint));
1552+
SetVolumeOutputValue("DIFF_COEFF_OmegaT2", iPoint, Node_Turb->GetOmega_DCT2(iPoint));
1553+
SetVolumeOutputValue("DIFF_COEFF_OmegaT3", iPoint, Node_Turb->GetOmega_DCT3(iPoint));
1554+
SetVolumeOutputValue("DIFF_COEFF_Omegakc", iPoint, Node_Turb->GetOmega_DC_kc(iPoint));
15431555
SetVolumeOutputValue("RES_TKE", iPoint, turb_solver->LinSysRes(iPoint, 0));
15441556
SetVolumeOutputValue("RES_DISSIPATION", iPoint, turb_solver->LinSysRes(iPoint, 1));
15451557
if (limiter) {

SU2_CFD/src/variables/CTurbVariable.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ CTurbVariable::CTurbVariable(unsigned long npoint, unsigned long ndim, unsigned
3838
if (TurbModelFamily(config->GetKind_Turb_Model()) == TURB_FAMILY::KW) {
3939
DC_TKE.resize(nPoint) = su2double(1.0);
4040
DC_Omega.resize(nPoint) = su2double(1.0);
41+
DC_OmegaT1.resize(nPoint) = su2double(1.0);
42+
DC_OmegaT2.resize(nPoint) = su2double(1.0);
43+
DC_OmegaT3.resize(nPoint) = su2double(1.0);
44+
DC_Omega_kc.resize(nPoint) = su2double(1.0);
4145
}
4246
}
4347

0 commit comments

Comments
 (0)