Rework of injection of particles with a special focus in 2DCyl to ensure an homogeneous distribution. #51

Merged
JorgeGonz merged 22 commits from issue/injection2DCyl into development 2024-07-11 18:51:43 +02:00
2 changed files with 1 additions and 2 deletions
Showing only changes of commit 6b5ac16e4b - Show all commits

Still working on it

No uniform density yet...
Jorge Gonzalez 2024-07-06 10:12:03 +02:00

View file

@ -235,7 +235,6 @@ MODULE moduleMesh2DCyl
p1 = (/self%z(1), self%r(1) /)
p2 = (/self%z(2), self%r(2) /)
r(1:2) = (1.D0 - rnd)*p1 + rnd*p2
r(2) = (self%r(2) + self%r(1)) * 0.5D0
r(3) = 0.D0
END FUNCTION randPosEdge

View file

@ -318,7 +318,7 @@ MODULE moduleInject
!Random position in edge
partInj(n)%r = randomEdge%randPos()
!Assign weight to particle.
partInj(n)%weight = self%species%weight * sqrt(partInj(n)%r(2) / (0.1D0*L_ref))
partInj(n)%weight = self%species%weight * sqrt(partInj(n)%r(2) / (0.1D0/L_ref))
!Volume associated to the edge:
IF (ASSOCIATED(randomEdge%e1)) THEN
partInj(n)%cell = randomEdge%e1%n