Skip to content

Commit 7e57afe

Browse files
author
rois1995
committed
- Fixed some notation
- Remove unused variables
1 parent e260cc4 commit 7e57afe

File tree

9 files changed

+12
-20
lines changed

9 files changed

+12
-20
lines changed

SU2_CFD/include/numerics/turbulent/turb_sources.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,6 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
642642
/*--- Closure constants ---*/
643643
const su2double sigma_k_1, sigma_k_2, sigma_w_1, sigma_w_2, beta_1, beta_2, beta_star, a1, alfa_1, alfa_2;
644644
const su2double prod_lim_const;
645-
const su2double cTrans;
646645

647646
/*--- Ambient values for SST-SUST. ---*/
648647
const su2double kAmb, omegaAmb;
@@ -727,7 +726,6 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
727726
alfa_1(constants[8]),
728727
alfa_2(constants[9]),
729728
prod_lim_const(constants[10]),
730-
cTrans(1.25),
731729
kAmb(val_kine_Inf),
732730
omegaAmb(val_omega_Inf) {
733731
/*--- "Allocate" the Jacobian using the static buffer. ---*/
@@ -909,6 +907,9 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
909907

910908
Residual[0] += pk * Volume;
911909
Residual[1] += pw * Volume;
910+
911+
/*--- Add the dissipation terms to the residuals.---*/
912+
912913
Residual[0] -= dk * Volume;
913914
Residual[1] -= dw * Volume;
914915

@@ -931,5 +932,4 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
931932

932933
return ResidualType<>(Residual, Jacobian_i, nullptr);
933934
}
934-
935935
};

SU2_CFD/include/variables/CTurbSAVariable.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ class CTurbSAVariable final : public CTurbVariable {
4040

4141
private:
4242

43-
VectorType k, Omega; /*!< \brief SST variables as computed through SA solution. */
44-
4543
public:
4644
/*!
4745
* \brief Constructor of the class.

SU2_CFD/include/variables/CTurbSSTVariable.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ class CTurbSSTVariable final : public CTurbVariable {
4545
VectorType F2; /*!< \brief Menter blending function for blending of k-w and k-eps. */
4646
VectorType CDkw; /*!< \brief Cross-diffusion. */
4747
SST_ParsedOptions sstParsedOptions;
48-
4948
public:
5049
/*!
5150
* \brief Constructor of the class.
@@ -88,5 +87,4 @@ class CTurbSSTVariable final : public CTurbVariable {
8887
* \brief Get the value of the cross diffusion of tke and omega.
8988
*/
9089
inline su2double GetCrossDiff(unsigned long iPoint) const override { return CDkw(iPoint); }
91-
9290
};

SU2_CFD/include/variables/CTurbVariable.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@
3737
*/
3838
class CTurbVariable : public CScalarVariable {
3939
protected:
40-
VectorType muT; /*!< \brief Eddy viscosity. */
41-
VectorType DES_LengthScale;
40+
VectorType muT; /*!< \brief Eddy viscosity. */
41+
VectorType DES_LengthScale; /*!< \brief DES Length scale. */
4242

4343
public:
4444
static constexpr size_t MAXNVAR = 2;
4545
VectorType turb_index; /*!< \brief Value of the turbulence index for transition simulations. */
4646
VectorType intermittency; /*!< \brief Value of the intermittency for the transition model. */
47-
VectorType Vortex_Tilting;
47+
VectorType Vortex_Tilting; /*!< \brief Value of the vortex tilting measure for EDDES models. */
4848

4949
/*!
5050
* \brief Constructor of the class.

SU2_CFD/src/solvers/CSolver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ void CSolver::InitiatePeriodicComms(CGeometry *geometry,
363363

364364
auto *Diff = new su2double[nVar];
365365
auto *Und_Lapl = new su2double[nVar];
366-
auto *Vel_Lapl = new su2double[nDim];
367366
auto *Sol_Min = new su2double[nPrimVarGrad];
368367
auto *Sol_Max = new su2double[nPrimVarGrad];
369368
auto *rotPrim_i = new su2double[nPrimVar];
@@ -969,6 +968,7 @@ void CSolver::InitiatePeriodicComms(CGeometry *geometry,
969968
}
970969

971970
break;
971+
972972
default:
973973
SU2_MPI::Error("Unrecognized quantity for periodic communication.",
974974
CURRENT_FUNCTION);
@@ -986,7 +986,6 @@ void CSolver::InitiatePeriodicComms(CGeometry *geometry,
986986

987987
delete [] Diff;
988988
delete [] Und_Lapl;
989-
delete [] Vel_Lapl;
990989
delete [] Sol_Min;
991990
delete [] Sol_Max;
992991
delete [] rotPrim_i;
@@ -1291,6 +1290,7 @@ void CSolver::CompletePeriodicComms(CGeometry *geometry,
12911290
limiter(iPoint, iVar) = min(limiter(iPoint, iVar), bufDRecv[buf_offset+iVar]);
12921291

12931292
break;
1293+
12941294
default:
12951295

12961296
SU2_MPI::Error("Unrecognized quantity for periodic communication.",

SU2_CFD/src/solvers/CTurbSASolver.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,7 @@ void CTurbSASolver::Postprocessing(CGeometry *geometry, CSolver **solver_contain
235235
const su2double nu = mu/rho;
236236
const su2double nu_hat = nodes->GetSolution(iPoint,0);
237237
const su2double roughness = geometry->nodes->GetRoughnessHeight(iPoint);
238-
const su2double wallDistance = geometry->nodes->GetWall_Distance(iPoint);
239-
const su2double dist = wallDistance + rough_const * roughness;
238+
const su2double dist = geometry->nodes->GetWall_Distance(iPoint) + rough_const * roughness;
240239

241240
su2double Ji = nu_hat/nu;
242241
if (roughness > 1.0e-10)

SU2_CFD/src/solvers/CTurbSSTSolver.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai
278278
const su2double omega = nodes->GetSolution(iPoint,1);
279279

280280
const auto& eddy_visc_var = sstParsedOptions.version == SST_OPTIONS::V1994 ? VorticityMag : StrainMag;
281-
su2double muT = max(0.0, rho * a1 * kine / max(a1 * omega, eddy_visc_var * F2));
281+
const su2double muT = max(0.0, rho * a1 * kine / max(a1 * omega, eddy_visc_var * F2));
282282

283283
nodes->SetmuT(iPoint, muT);
284284

@@ -409,9 +409,11 @@ void CTurbSSTSolver::Source_Residual(CGeometry *geometry, CSolver **solver_conta
409409
}
410410

411411
/*--- Compute the source term ---*/
412+
412413
auto residual = numerics->ComputeResidual(config);
413414

414415
/*--- Store the intermittency ---*/
416+
415417
if (config->GetKind_Trans_Model() != TURB_TRANS_MODEL::NONE) {
416418
nodes->SetIntermittency(iPoint, numerics->GetIntermittencyEff());
417419
}

SU2_CFD/src/variables/CTurbSAVariable.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,4 @@ CTurbSAVariable::CTurbSAVariable(su2double val_nu_tilde, su2double val_muT, unsi
4545
Solution_time_n = Solution;
4646
Solution_time_n1 = Solution;
4747
}
48-
49-
50-
k.resize(nPoint) = su2double(0.0);
51-
Omega.resize(nPoint) = su2double(0.0);
5248
}

SU2_CFD/src/variables/CTurbSSTVariable.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ CTurbSSTVariable::CTurbSSTVariable(su2double kine, su2double omega, su2double mu
5151
CDkw.resize(nPoint) = su2double(0.0);
5252

5353
muT.resize(nPoint) = mut;
54-
5554
}
5655

5756
void CTurbSSTVariable::SetBlendingFunc(unsigned long iPoint, su2double val_viscosity,

0 commit comments

Comments
 (0)