Ionization boundary condition fully tested.
Documentation updated properly. 3D Cartesian geometry also tested. Documentation updated properly. Added weighting probability in the injection of particles.
This commit is contained in:
parent
12e61731df
commit
2a843547b8
8 changed files with 128 additions and 24 deletions
|
|
@ -190,6 +190,7 @@ MODULE moduleMesh2DCyl
|
|||
r2 = self%n2%getCoordinates()
|
||||
self%z = (/r1(1), r2(1)/)
|
||||
self%r = (/r1(2), r2(2)/)
|
||||
self%weight = SUM(self%r)*5.D-1
|
||||
!Normal vector
|
||||
self%normal = (/ -(self%r(2)-self%r(1)), &
|
||||
self%z(2)-self%z(1) , &
|
||||
|
|
@ -247,14 +248,22 @@ MODULE moduleMesh2DCyl
|
|||
|
||||
CLASS(meshEdge2DCyl), INTENT(in):: self
|
||||
REAL(8):: rnd
|
||||
REAL(8):: dr, dz
|
||||
REAL(8):: r(1:3)
|
||||
REAL(8):: p1(1:2), p2(1:2)
|
||||
|
||||
rnd = random()
|
||||
dr = self%r(2) - self%r(1)
|
||||
dz = self%z(2) - self%z(1)
|
||||
IF (dr /= 0.D0) THEN
|
||||
r(2) = dr*DSQRT(rnd) + self%r(1)
|
||||
r(1) = dz * (r(2) - self%r(1))/dr + self%z(1)
|
||||
|
||||
ELSE
|
||||
r(2) = self%r(1)
|
||||
r(1) = dz * rnd + self%z(1)
|
||||
|
||||
END IF
|
||||
|
||||
p1 = (/self%z(1), self%r(1) /)
|
||||
p2 = (/self%z(2), self%r(2) /)
|
||||
r(1:2) = (1.D0 - rnd)*p1 + rnd*p2
|
||||
r(3) = 0.D0
|
||||
|
||||
END FUNCTION randPosEdge
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ MODULE moduleMesh
|
|||
CLASS(meshVol), POINTER:: e1 => NULL(), e2 => NULL()
|
||||
!Normal vector
|
||||
REAL(8):: normal(1:3)
|
||||
!Weight for random injection of particles
|
||||
REAL(8):: weight = 1.D0
|
||||
!Pointer to boundary element
|
||||
TYPE(boundaryCont), POINTER:: boundary
|
||||
!Array of functions for boundary conditions
|
||||
|
|
|
|||
|
|
@ -137,14 +137,15 @@ MODULE moduleMeshBoundary
|
|||
|
||||
!Create the new pair of particles
|
||||
DO p = 1, ionizationPair
|
||||
ALLOCATE(newElectron)
|
||||
ALLOCATE(newIon)
|
||||
|
||||
!Assign random velocity to the neutral
|
||||
v0(1) = bound%v0(1) + bound%vTh*randomMaxwellian()
|
||||
v0(2) = bound%v0(2) + bound%vTh*randomMaxwellian()
|
||||
v0(3) = bound%v0(3) + bound%vTh*randomMaxwellian()
|
||||
|
||||
!Allocates the new particles
|
||||
ALLOCATE(newElectron)
|
||||
ALLOCATE(newIon)
|
||||
|
||||
newElectron%sp = part%sp
|
||||
newIon%sp = bound%sp
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue