Fixed an issue with normal vector not being norm unit, which was causing

reflected particle velocities to increase.
This commit is contained in:
Jorge Gonzalez 2021-03-11 12:56:15 +01:00
commit ff0c09242d
5 changed files with 6 additions and 0 deletions

View file

@ -159,6 +159,7 @@ MODULE moduleMesh3DCart
self%normal = (/ (self%y(2)-self%y(1))*(self%z(3)-self%z(1)) - (self%z(2)-self%z(1))*(self%y(3)-self%y(1)), &
(self%x(2)-self%x(1))*(self%z(3)-self%z(1)) - (self%z(2)-self%z(1))*(self%x(3)-self%x(1)), &
(self%x(2)-self%x(1))*(self%y(3)-self%y(1)) - (self%z(2)-self%z(1))*(self%y(3)-self%y(1)) /)
self%normal = self%normal/NORM2(self%normal)
!Boundary index
self%boundary => boundary(bt)