Implemenint injecting particles without direction

I was almost sure this was implemented in the past, but it was not working.

Now, if n = 0 or if n is not provided, particles are injected with the normal to the surface.
This commit is contained in:
Jorge Gonzalez 2025-08-08 19:27:27 +02:00
commit dff9a87f0d

View file

@ -377,8 +377,14 @@ MODULE moduleInject
!Assign particle type !Assign particle type
partInj(n)%species => self%species partInj(n)%species => self%species
if (all(self%n == 0.D0)) then
direction = randomEdge%normal
else
direction = self%n direction = self%n
end if
partInj(n)%v = 0.D0 partInj(n)%v = 0.D0
partInj(n)%v = self%vMod*direction + (/ self%v(1)%obj%randomVel(), & partInj(n)%v = self%vMod*direction + (/ self%v(1)%obj%randomVel(), &