Merge IEPC2025 #54
1 changed files with 7 additions and 1 deletions
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.
commit
dff9a87f0d
|
|
@ -377,8 +377,14 @@ MODULE moduleInject
|
|||
!Assign particle type
|
||||
partInj(n)%species => self%species
|
||||
|
||||
if (all(self%n == 0.D0)) then
|
||||
direction = randomEdge%normal
|
||||
|
||||
else
|
||||
direction = self%n
|
||||
|
||||
end if
|
||||
|
||||
partInj(n)%v = 0.D0
|
||||
|
||||
partInj(n)%v = self%vMod*direction + (/ self%v(1)%obj%randomVel(), &
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue