Skip to content

Commit d5fc713

Browse files
authored
Merge branch 'develop' into sa_options
2 parents 5432af6 + 7a57336 commit d5fc713

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

SU2_CFD/src/solvers/CIncEulerSolver.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,10 +2199,17 @@ void CIncEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
21992199
Flow_Dir = Inlet_FlowDir[val_marker][iVertex];
22002200
Flow_Dir_Mag = GeometryToolbox::Norm(nDim, Flow_Dir);
22012201

2202-
/*--- Store the unit flow direction vector. ---*/
2202+
/*--- Store the unit flow direction vector.
2203+
If requested, use the local boundary normal (negative),
2204+
instead of the prescribed flow direction in the config. ---*/
22032205

2204-
for (iDim = 0; iDim < nDim; iDim++)
2205-
UnitFlowDir[iDim] = Flow_Dir[iDim]/Flow_Dir_Mag;
2206+
if (config->GetInc_Inlet_UseNormal()) {
2207+
for (iDim = 0; iDim < nDim; iDim++)
2208+
UnitFlowDir[iDim] = -Normal[iDim]/Area;
2209+
} else {
2210+
for (iDim = 0; iDim < nDim; iDim++)
2211+
UnitFlowDir[iDim] = Flow_Dir[iDim]/Flow_Dir_Mag;
2212+
}
22062213

22072214
/*--- Retrieve solution at this boundary node. ---*/
22082215

@@ -2278,14 +2285,6 @@ void CIncEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
22782285

22792286
Vel_Mag = sqrt((P_total - P_domain)/(0.5*nodes->GetDensity(iPoint)));
22802287

2281-
/*--- If requested, use the local boundary normal (negative),
2282-
instead of the prescribed flow direction in the config. ---*/
2283-
2284-
if (config->GetInc_Inlet_UseNormal()) {
2285-
for (iDim = 0; iDim < nDim; iDim++)
2286-
UnitFlowDir[iDim] = -Normal[iDim]/Area;
2287-
}
2288-
22892288
/*--- Compute the delta change in velocity in each direction. ---*/
22902289

22912290
for (iDim = 0; iDim < nDim; iDim++)

0 commit comments

Comments
 (0)