Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions SU2_CFD/src/solvers/CTransLMSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ void CTransLMSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai
const su2double vel_u = flowNodes->GetVelocity(iPoint, 0);
const su2double vel_v = flowNodes->GetVelocity(iPoint, 1);
const su2double vel_w = (nDim ==3) ? flowNodes->GetVelocity(iPoint, 2) : 0.0;
const su2double VelocityMag = sqrt(vel_u*vel_u + vel_v*vel_v + vel_w*vel_w);
const su2double VelocityMag = max(sqrt(pow(vel_u, 2) + pow(vel_v, 2) + pow(vel_w, 2)), EPS);
su2double omega = 0.0;
su2double k = 0.0;
if(TurbFamily == TURB_FAMILY::KW){
Expand Down Expand Up @@ -253,8 +253,8 @@ void CTransLMSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai
su2double Intermittency_Sep = 2.0*max(0.0, Re_v/(3.235*Corr_Rec)-1.0)*f_reattach;
Intermittency_Sep = min(Intermittency_Sep,2.0)*f_theta;
Intermittency_Sep = min(max(0.0, Intermittency_Sep), 2.0);
nodes -> SetIntermittencySep(iPoint, Intermittency_Sep);
nodes -> SetIntermittencyEff(iPoint, Intermittency_Sep);
nodes->SetIntermittencySep(iPoint, Intermittency_Sep);
nodes->SetIntermittencyEff(iPoint, Intermittency_Sep);

}
END_SU2_OMP_FOR
Expand Down Expand Up @@ -282,7 +282,6 @@ void CTransLMSolver::Source_Residual(CGeometry *geometry, CSolver **solver_conta
const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT);

auto* flowNodes = su2staticcast_p<CFlowVariable*>(solver_container[FLOW_SOL]->GetNodes());
//auto* turbNodes = su2staticcast_p<CFlowVariable*>(solver_container[TURB_SOL]->GetNodes());
CVariable* turbNodes = solver_container[TURB_SOL]->GetNodes();

/*--- Pick one numerics object per thread. ---*/
Expand Down Expand Up @@ -547,8 +546,8 @@ void CTransLMSolver::LoadRestart(CGeometry** geometry, CSolver*** solver, CConfi

const auto index = counter * Restart_Vars[1] + skipVars;
for (auto iVar = 0u; iVar < nVar; iVar++) nodes->SetSolution(iPoint_Local, iVar, Restart_Data[index + iVar]);
nodes ->SetIntermittencySep(iPoint_Local, Restart_Data[index + 2]);
nodes ->SetIntermittencyEff(iPoint_Local, Restart_Data[index + 3]);
nodes->SetIntermittencySep(iPoint_Local, Restart_Data[index + 2]);
nodes->SetIntermittencyEff(iPoint_Local, Restart_Data[index + 3]);

/*--- Increment the overall counter for how many points have been loaded. ---*/
counter++;
Expand Down
2 changes: 1 addition & 1 deletion SU2_CFD/src/solvers/CTurbSSTSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai
}
shearStress = sqrt(shearStress);

const su2double FrictionVelocity = sqrt(shearStress/flowNodes->GetDensity(iPoint));
const su2double FrictionVelocity = max(sqrt(shearStress/flowNodes->GetDensity(iPoint)), EPS);
const su2double wall_dist = geometry->vertex[iMarker][iVertex]->GetNearestNeighborDistance();

const su2double Derivative = flowNodes->GetLaminarViscosity(jPoint) * pow(nodes->GetSolution(jPoint, 0), 0.673) / wall_dist;
Expand Down