Skip to content

Commit 640533c

Browse files
committed
Fixed Grad_Vel for NEMO Solver
1 parent ee96bed commit 640533c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

SU2_CFD/include/solvers/CFVMFlowSolverBase.inl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1963,7 +1963,7 @@ void CFVMFlowSolverBase<V, FlowRegime>::Friction_Forces(const CGeometry* geometr
19631963

19641964
unsigned long iVertex, iPoint, iPointNormal;
19651965
unsigned short iMarker, iMarker_Monitoring, iDim, jDim;
1966-
unsigned short T_INDEX, TVE_INDEX;
1966+
unsigned short T_INDEX, TVE_INDEX, VEL_INDEX;
19671967
su2double Viscosity = 0.0, div_vel, WallDist[3] = {0.0}, Area, WallShearStress, TauNormal, RefTemp, RefVel2 = 0.0,
19681968
RefDensity = 0.0, GradTemperature, Density = 0.0, WallDistMod, FrictionVel, Mach2Vel, Mach_Motion,
19691969
UnitNormal[3] = {0.0}, TauElem[3] = {0.0}, TauTangent[3] = {0.0}, Tau[3][3] = {{0.0}}, Cp,
@@ -1995,6 +1995,7 @@ void CFVMFlowSolverBase<V, FlowRegime>::Friction_Forces(const CGeometry* geometr
19951995
unsigned short nSpecies = config->GetnSpecies();
19961996
T_INDEX = nSpecies;
19971997
TVE_INDEX = nSpecies+1;
1998+
VEL_INDEX = nSpecies+2;
19981999
}
19992000

20002001
/// TODO: Move these ifs to specialized functions.
@@ -2089,7 +2090,8 @@ void CFVMFlowSolverBase<V, FlowRegime>::Friction_Forces(const CGeometry* geometr
20892090

20902091
for (iDim = 0; iDim < nDim; iDim++) {
20912092
for (jDim = 0; jDim < nDim; jDim++) {
2092-
Grad_Vel[iDim][jDim] = nodes->GetGradient_Primitive(iPoint, iDim + 1, jDim);
2093+
if (!nemo) Grad_Vel[iDim][jDim] = nodes->GetGradient_Primitive(iPoint, iDim + 1, jDim);
2094+
else Grad_Vel[iDim][jDim] = nodes->GetGradient_Primitive(iPoint, iDim + VEL_INDEX, jDim);
20932095
}
20942096

20952097
/// TODO: Move the temperature index logic to a function.

0 commit comments

Comments
 (0)