Rework of injection of particles with a special focus in 2DCyl to ensure an homogeneous distribution. #51
2 changed files with 1 additions and 2 deletions
Still working on it
No uniform density yet...
commit
6b5ac16e4b
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue