Ionization boundary ready to testing.

Fixed an issue in which some particles in the corner were interacting
with the axis boundary. Now the axis acts as a reflective boundary in
case a particle is wrongly assigned to it.
This commit is contained in:
Jorge Gonzalez 2021-03-23 16:43:11 +01:00
commit 12e61731df
3 changed files with 36 additions and 17 deletions

View file

@ -35,9 +35,10 @@ MODULE moduleBoundary
!Ionization boundary
TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryIonization
REAL(8):: m0, n0, v0(1:3), T0 !Properties of background neutrals.
REAL(8):: m0, n0, v0(1:3), vTh !Properties of background neutrals.
INTEGER:: sp !Ion species
TYPE(table1D):: crossSection
REAL(8):: effectiveTime
REAL(8):: eThreshold
REAL(8):: deltaV
@ -99,7 +100,7 @@ MODULE moduleBoundary
END SUBROUTINE initWallTemperature
SUBROUTINE initIonization(boundary, m0, n0, v0, T0, speciesID, crossSection, eThreshold)
SUBROUTINE initIonization(boundary, me, m0, n0, v0, T0, speciesID, effTime, crossSection, eThreshold)
USE moduleRefParam
USE moduleSpecies
USE moduleCaseParam
@ -107,8 +108,10 @@ MODULE moduleBoundary
IMPLICIT NONE
CLASS(boundaryGeneric), ALLOCATABLE, INTENT(out):: boundary
REAL(8), INTENT(in):: m0, n0, v0(1:3), T0
REAL(8), INTENT(in):: me !Electron mass
REAL(8), INTENT(in):: m0, n0, v0(1:3), T0 !Neutral properties
INTEGER:: speciesID
REAL(8):: effTime
CHARACTER(:), ALLOCATABLE, INTENT(in):: crossSection
REAL(8), INTENT(in):: eThreshold
@ -117,13 +120,15 @@ MODULE moduleBoundary
SELECT TYPE(boundary)
TYPE IS(boundaryIonization)
boundary%m0 = m0 / m_ref
boundary%n0 = n0
boundary%n0 = n0 * Vol_ref
boundary%v0 = v0 / v_ref
boundary%T0 = T0 / T_ref
boundary%vTh = DSQRT(kb*T0/m0)/v_ref
boundary%sp = speciesID
boundary%effectiveTime = effTime / ti_ref
CALL boundary%crossSection%init(crossSection)
CALL boundary%crossSection%convert(eV2J/(m_ref*v_ref**2), 1.D0/L_ref**2)
boundary%eThreshold = eThreshold*eV2J/(m_ref*v_ref**2)
boundary%deltaV = DSQRT(boundary%eThreshold/me)
END SELECT