@@ -6456,8 +6456,8 @@ void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
64566456 unsigned short iDim;
64576457 unsigned long iVertex, iPoint;
64586458 su2double P_Total, T_Total, Velocity[MAXNDIM], Velocity2, H_Total, Temperature, Riemann,
6459- Pressure, Density, Energy, * Flow_Dir, Mach2, SoundSpeed2, SoundSpeed_Total2, Vel_Mag,
6460- alpha, aa, bb, cc, dd, Area, UnitNormal[MAXNDIM], Normal[MAXNDIM] = { 0.0 } ;
6459+ Pressure, Density, Energy, Flow_Dir[MAXNDIM] , Mach2, SoundSpeed2, SoundSpeed_Total2, Vel_Mag,
6460+ alpha, aa, bb, cc, dd, Area, UnitNormal[MAXNDIM], Normal[MAXNDIM];
64616461 su2double *V_inlet, *V_domain;
64626462
64636463 const bool implicit = (config->GetKind_TimeIntScheme () == EULER_IMPLICIT);
@@ -6510,13 +6510,17 @@ void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
65106510
65116511 /* --- Total properties have been specified at the inlet. ---*/
65126512
6513- case INLET_TYPE::TOTAL_CONDITIONS:
6513+ case INLET_TYPE::TOTAL_CONDITIONS: {
65146514
65156515 /* --- Retrieve the specified total conditions for this inlet. ---*/
65166516
65176517 P_Total = Inlet_Ptotal[val_marker][iVertex];
65186518 T_Total = Inlet_Ttotal[val_marker][iVertex];
6519- Flow_Dir = Inlet_FlowDir[val_marker][iVertex];
6519+ const su2double* dir = Inlet_FlowDir[val_marker][iVertex];
6520+ const su2double mag = GeometryToolbox::Norm (nDim, dir);
6521+ for (iDim = 0 ; iDim < nDim; iDim++) {
6522+ Flow_Dir[iDim] = dir[iDim] / mag;
6523+ }
65206524
65216525 /* --- Non-dim. the inputs if necessary. ---*/
65226526
@@ -6614,16 +6618,20 @@ void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
66146618 V_inlet[nDim+3 ] = Energy + Pressure/Density;
66156619
66166620 break ;
6621+ }
6622+ /* --- Mass flow has been specified at the inlet. ---*/
66176623
6618- /* --- Mass flow has been specified at the inlet. ---*/
6619-
6620- case INLET_TYPE::MASS_FLOW:
6624+ case INLET_TYPE::MASS_FLOW: {
66216625
66226626 /* --- Retrieve the specified mass flow for the inlet. ---*/
66236627
66246628 Density = Inlet_Ttotal[val_marker][iVertex];
66256629 Vel_Mag = Inlet_Ptotal[val_marker][iVertex];
6626- Flow_Dir = Inlet_FlowDir[val_marker][iVertex];
6630+ const su2double* dir = Inlet_FlowDir[val_marker][iVertex];
6631+ const su2double mag = GeometryToolbox::Norm (nDim, dir);
6632+ for (iDim = 0 ; iDim < nDim; iDim++) {
6633+ Flow_Dir[iDim] = dir[iDim] / mag;
6634+ }
66276635
66286636 /* --- Non-dim. the inputs if necessary. ---*/
66296637
@@ -6672,7 +6680,7 @@ void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
66726680 V_inlet[nDim+3 ] = Energy + Pressure/Density;
66736681
66746682 break ;
6675-
6683+ }
66766684 default :
66776685 SU2_MPI::Error (" Unsupported INLET_TYPE." , CURRENT_FUNCTION);
66786686 break ;
0 commit comments