su2code/SU2

Doubting that the UnitNormal vector in Symmetry Boundary Condition of CFVMFlowSolverBase is incorrect

Closed this issue · 1 comments

Describe the bug
I am reading the source code of SU2 V7.3.1, and I find the UnitNormal vector computed in BC_Sym_Plane(...) is different with other BCs such as Far Field, Inlet and so on, so I think the UnitNormal in BC_Sym_Plane is doubtful.

At line 1135 in "SU2_CFD/include/solvers/CFVMFlowSolverBase.inl", the Normal vector has been negated for outward convention. While at line 1141, the UnitNormal vector is computed as:

UnitNormal [iDim]= -Normal[iDim] / Area,

where the UnitNormal vector is actually negated again, though the Normal vector is negated once and outward. And then this double-negated UnitNormal vector is employed to the whole computation of Symmetry BC, which will induce error to the "ProjVelocity_i (line 1209)" as well as "V_reflected (1217)" vector. In other BCs, the UnitNormal vector is negated only once.

Therefore, I doubt that the above expression should remove the minus sign.

Desktop (please complete the following information):

  • SU2 Version: [v7.3.1]

My guess is that the direction of the unit normal and unit tangent are not relevant, because we always use them for things like (v.n)n and so the sign cancels. But please go ahead and test with the opposite sign.