Correction due to angle
Moving forward to a complete model for SEE. Now the yield has a correction for the incident angle on the surface (still to check if this is correct) Velocity distribution is still a dummy one.
This commit is contained in:
parent
cc3e28e5e7
commit
e1009a21df
3 changed files with 89 additions and 52 deletions
|
|
@ -30,6 +30,8 @@ MODULE moduleTable
|
||||||
READ(id, '(A)', iostat = stat) dummy
|
READ(id, '(A)', iostat = stat) dummy
|
||||||
!If EOF or error, exit file
|
!If EOF or error, exit file
|
||||||
IF (stat /= 0) EXIT
|
IF (stat /= 0) EXIT
|
||||||
|
!If empty line, exit file
|
||||||
|
IF (dummy == "") EXIT
|
||||||
!Skip comment
|
!Skip comment
|
||||||
IF (INDEX(dummy,'#') /= 0) CYCLE
|
IF (INDEX(dummy,'#') /= 0) CYCLE
|
||||||
!Add row
|
!Add row
|
||||||
|
|
@ -55,6 +57,7 @@ MODULE moduleTable
|
||||||
!TODO: Make this a function
|
!TODO: Make this a function
|
||||||
IF (INDEX(dummy,'#') /= 0) CYCLE
|
IF (INDEX(dummy,'#') /= 0) CYCLE
|
||||||
IF (stat /= 0) EXIT
|
IF (stat /= 0) EXIT
|
||||||
|
IF (dummy == "") EXIT
|
||||||
!Add data
|
!Add data
|
||||||
!TODO: substitute with extracting information from dummy
|
!TODO: substitute with extracting information from dummy
|
||||||
BACKSPACE(id)
|
BACKSPACE(id)
|
||||||
|
|
|
||||||
|
|
@ -212,19 +212,24 @@ MODULE moduleMeshBoundary
|
||||||
|
|
||||||
END SUBROUTINE symmetryAxis
|
END SUBROUTINE symmetryAxis
|
||||||
|
|
||||||
|
!Secondary emission of electrons by impacting particle.
|
||||||
SUBROUTINE secondaryEmission(edge, part)
|
SUBROUTINE secondaryEmission(edge, part)
|
||||||
USE moduleSpecies
|
USE moduleSpecies
|
||||||
USE moduleRandom
|
USE moduleRandom
|
||||||
|
USE moduleConstParam
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
|
|
||||||
CLASS(meshEdge), INTENT(inout):: edge
|
CLASS(meshEdge), INTENT(inout):: edge
|
||||||
CLASS(particle), INTENT(inout):: part
|
CLASS(particle), INTENT(inout):: part
|
||||||
REAL(8):: vRel, eRel
|
REAL(8):: vRel, eRel
|
||||||
|
REAL(8), DIMENSION(1:3):: rElectron, XiElectron!Position of new electrons (impacting particle)
|
||||||
|
REAL(8), DIMENSION(1:3):: rIncident !Vector from imapcting particle position to particle position
|
||||||
|
REAL(8):: theta !incident angle
|
||||||
REAL(8):: yield
|
REAL(8):: yield
|
||||||
|
REAL(8):: energy !incident energy corrected by threshold and
|
||||||
INTEGER:: nNewElectrons
|
INTEGER:: nNewElectrons
|
||||||
REAL(8), ALLOCATABLE:: weight(:)
|
REAL(8), ALLOCATABLE:: weight(:)
|
||||||
INTEGER:: p
|
INTEGER:: p
|
||||||
REAL(8), DIMENSION(1:3):: rElectron, XiElectron!Position of new electrons
|
|
||||||
INTEGER:: cell
|
INTEGER:: cell
|
||||||
TYPE(particle), POINTER:: secondaryElectron
|
TYPE(particle), POINTER:: secondaryElectron
|
||||||
|
|
||||||
|
|
@ -235,9 +240,27 @@ MODULE moduleMeshBoundary
|
||||||
!Convert to relative energy
|
!Convert to relative energy
|
||||||
eRel = part%species%m*vRel**2*5.D-1
|
eRel = part%species%m*vRel**2*5.D-1
|
||||||
|
|
||||||
!Get number of secondary electrons macro-particles
|
!If energy is abound threshold calculate secondary electrons
|
||||||
yield = part%weight*bound%yield%get(eRel)
|
IF (eRel >= bound%energyThreshold) THEN
|
||||||
|
|
||||||
|
!position of impacting ion
|
||||||
|
rElectron = edge%intersection(part%r)
|
||||||
|
XiElectron = mesh%cells(part%cell)%obj%phy2log(rElectron)
|
||||||
|
|
||||||
|
!Calculate incident angle
|
||||||
|
rIncident = part%r - rElectron
|
||||||
|
theta = ACOS(DOT_PRODUCT(rIncident, edge%normal) / (NORM2(rIncident) * NORM2(edge%normal)))
|
||||||
|
|
||||||
|
!Calculate incident energy
|
||||||
|
energy = (eRel - bound%energyThreshold) * PI2 / (PI2 + theta**2) + bound%energyThreshold
|
||||||
|
|
||||||
|
!Get number of secondary electrons particles
|
||||||
|
yield = part%weight*bound%yield%get(eRel) * (1.D0 * theta**2 / PI2) !Check equation!
|
||||||
|
|
||||||
|
!Convert the number to macro-particles
|
||||||
nNewElectrons = FLOOR(yield / bound%electron%weight)
|
nNewElectrons = FLOOR(yield / bound%electron%weight)
|
||||||
|
|
||||||
|
!If the weight of new macro-particles is below the yield, correct adding a particle
|
||||||
IF (REAL(nNewElectrons) * bound%electron%weight < yield) THEN
|
IF (REAL(nNewElectrons) * bound%electron%weight < yield) THEN
|
||||||
nNewElectrons = nNewElectrons + 1
|
nNewElectrons = nNewElectrons + 1
|
||||||
ALLOCATE(weight(1:nNewElectrons))
|
ALLOCATE(weight(1:nNewElectrons))
|
||||||
|
|
@ -250,10 +273,6 @@ MODULE moduleMeshBoundary
|
||||||
|
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
!position of impacting ion
|
|
||||||
rElectron = edge%intersection(part%r)
|
|
||||||
XiElectron = mesh%cells(part%cell)%obj%phy2log(rElectron)
|
|
||||||
|
|
||||||
!New cell of origin
|
!New cell of origin
|
||||||
IF (ASSOCIATED(edge%e1)) THEN
|
IF (ASSOCIATED(edge%e1)) THEN
|
||||||
cell = edge%e1%n
|
cell = edge%e1%n
|
||||||
|
|
@ -263,6 +282,7 @@ MODULE moduleMeshBoundary
|
||||||
|
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
|
!Create the new electron macro-particles
|
||||||
DO p = 1, nNewElectrons
|
DO p = 1, nNewElectrons
|
||||||
!Create new macro-particle
|
!Create new macro-particle
|
||||||
ALLOCATE(secondaryElectron)
|
ALLOCATE(secondaryElectron)
|
||||||
|
|
@ -293,6 +313,8 @@ MODULE moduleMeshBoundary
|
||||||
|
|
||||||
END DO
|
END DO
|
||||||
|
|
||||||
|
END IF
|
||||||
|
|
||||||
!Absorb impacting particle
|
!Absorb impacting particle
|
||||||
CALL absorption(edge, part)
|
CALL absorption(edge, part)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ MODULE moduleBoundary
|
||||||
!Yield as a function of ion energy
|
!Yield as a function of ion energy
|
||||||
TYPE(table1D):: yield
|
TYPE(table1D):: yield
|
||||||
CLASS(speciesGeneric), POINTER:: electron !Electron species for secondary emission
|
CLASS(speciesGeneric), POINTER:: electron !Electron species for secondary emission
|
||||||
|
REAL(8):: energyThreshold
|
||||||
CONTAINS
|
CONTAINS
|
||||||
|
|
||||||
END TYPE boundarySEE
|
END TYPE boundarySEE
|
||||||
|
|
@ -155,6 +156,7 @@ MODULE moduleBoundary
|
||||||
CLASS(boundaryGeneric), ALLOCATABLE, INTENT(out):: boundary
|
CLASS(boundaryGeneric), ALLOCATABLE, INTENT(out):: boundary
|
||||||
CHARACTER(:), ALLOCATABLE, INTENT(in):: tableFile
|
CHARACTER(:), ALLOCATABLE, INTENT(in):: tableFile
|
||||||
INTEGER:: speciesID
|
INTEGER:: speciesID
|
||||||
|
INTEGER:: i
|
||||||
|
|
||||||
ALLOCATE(boundarySEE:: boundary)
|
ALLOCATE(boundarySEE:: boundary)
|
||||||
SELECT TYPE(boundary)
|
SELECT TYPE(boundary)
|
||||||
|
|
@ -162,6 +164,16 @@ MODULE moduleBoundary
|
||||||
CALL boundary%yield%init(tableFile)
|
CALL boundary%yield%init(tableFile)
|
||||||
CALL boundary%yield%convert(eV2J/(m_ref*v_ref**2), 1.D0)
|
CALL boundary%yield%convert(eV2J/(m_ref*v_ref**2), 1.D0)
|
||||||
boundary%electron => species(speciesID)%obj
|
boundary%electron => species(speciesID)%obj
|
||||||
|
!Search for the threshold energy in the table
|
||||||
|
DO i = 1, SIZE(boundary%yield%f)
|
||||||
|
IF (boundary%yield%f(i) > 0.D0) THEN
|
||||||
|
boundary%energyThreshold = boundary%yield%x(i)
|
||||||
|
|
||||||
|
EXIT
|
||||||
|
|
||||||
|
END IF
|
||||||
|
|
||||||
|
END DO
|
||||||
|
|
||||||
END SELECT
|
END SELECT
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue