Recombination process introduced. No photon creation yet.
This commit is contained in:
parent
9e0d1a7cc7
commit
a45df9de22
3 changed files with 342 additions and 4 deletions
|
|
@ -46,13 +46,20 @@ MODULE moduleCollisions
|
|||
REAL(8):: eThreshold !Minimum energy (non-dimensional units) required for ionization
|
||||
REAL(8):: deltaV !Change in velocity due to exchange of eThreshold
|
||||
CLASS(speciesCharged), POINTER:: electron !Pointer to species considerer as electrons
|
||||
REAL(8):: w_i = (1.D0+DSQRT(3.D0))/2.D0
|
||||
REAL(8):: w_j = (DSQRT(3.D0)-1.D0)/2.D0
|
||||
CONTAINS
|
||||
PROCEDURE, PASS:: collide => collideBinaryIonization
|
||||
|
||||
END TYPE collisionBinaryIonization
|
||||
|
||||
TYPE, EXTENDS(collisionBinary):: collisionBinaryRecombination
|
||||
REAL(8):: eBinding !binding energy of free electron in recombining ion
|
||||
REAL(8):: deltaV !Change in velocity due to energy exchange
|
||||
CLASS(speciesCharged), POINTER:: electron !Pointer to species considerer as electrons
|
||||
CONTAINS
|
||||
PROCEDURE, PASS:: collide => collideBinaryRecombination
|
||||
|
||||
END TYPE collisionBinaryRecombination
|
||||
|
||||
!Resonant charge-exchange
|
||||
TYPE, EXTENDS(collisionBinary):: collisionBinaryChargeExchange
|
||||
CONTAINS
|
||||
|
|
@ -313,9 +320,118 @@ MODULE moduleCollisions
|
|||
|
||||
END IF
|
||||
|
||||
|
||||
END SUBROUTINE collideBinaryIonization
|
||||
|
||||
!ELECTRON ION RESONANT RECOMBINATION
|
||||
!Inits electron ion recombination
|
||||
SUBROUTINE initBinaryRecombination(collision, crossSectionFilename, energyBinding, mass_i, mass_j, electron)
|
||||
USE moduleTable
|
||||
USE moduleRefParam
|
||||
USE moduleConstParam
|
||||
USE moduleSpecies
|
||||
USE moduleErrors
|
||||
IMPLICIT NONE
|
||||
|
||||
CLASS(collisionBinary), INTENT(out), ALLOCATABLE:: collision
|
||||
CHARACTER(:), ALLOCATABLE, INTENT(in):: crossSectionFilename
|
||||
REAL(8), INTENT(in):: energyBinding
|
||||
REAL(8), INTENT(in):: mass_i, mass_j
|
||||
CHARACTER(:), ALLOCATABLE, INTENT(in):: electron
|
||||
INTEGER:: electronIndex
|
||||
|
||||
ALLOCATE(collisionBinaryRecombination:: collision)
|
||||
|
||||
!Reads data from file
|
||||
CALL collision%crossSec%init(crossSectionFilename)
|
||||
|
||||
!Convert to no-dimensional units
|
||||
CALL collision%crossSec%convert(eV2J/(m_ref*v_ref**2), 1.D0/L_ref**2)
|
||||
|
||||
!Calculates reduced mass
|
||||
collision%rMass = (mass_i*mass_j)/(mass_i+mass_j)
|
||||
|
||||
!Specific parameters for ionization collision
|
||||
SELECT TYPE(collision)
|
||||
TYPE IS(collisionBinaryRecombination)
|
||||
!Assign the energy threshold
|
||||
!Input energy is in eV. Convert to J with ev2J and then to
|
||||
!non-dimensional units.
|
||||
collision%eBinding = energyBinding*eV2J/(m_ref*v_ref**2)
|
||||
electronIndex = speciesName2Index(electron)
|
||||
SELECT TYPE(sp => species(electronIndex)%obj)
|
||||
TYPE IS(speciesCharged)
|
||||
collision%electron => sp
|
||||
|
||||
CLASS DEFAULT
|
||||
CALL criticalError("Species " // sp%name // " chosen for ionization is not a charged species", 'initBinaryIonization')
|
||||
|
||||
END SELECT
|
||||
|
||||
END SELECT
|
||||
|
||||
END SUBROUTINE initBinaryRecombination
|
||||
|
||||
!Binary electron impact ionization process
|
||||
SUBROUTINE collideBinaryRecombination(self, sigmaVrelMax, sigmaVrelMaxNew, &
|
||||
part_i, part_j)
|
||||
USE moduleSpecies
|
||||
USE moduleErrors
|
||||
USE moduleList
|
||||
USE moduleRandom
|
||||
USE OMP_LIB
|
||||
IMPLICIT NONE
|
||||
|
||||
CLASS(collisionBinaryRecombination), INTENT(in):: self
|
||||
REAL(8), INTENT(in):: sigmaVrelMax
|
||||
REAL(8), INTENT(inout):: sigmaVrelMaxNew
|
||||
TYPE(particle), INTENT(inout), TARGET:: part_i, part_j
|
||||
TYPE(particle), POINTER:: electron, ion
|
||||
REAL(8):: vRel, eRel
|
||||
REAL(8):: sigmaVrel
|
||||
REAL(8), DIMENSION(1:3):: vp_i
|
||||
|
||||
!eRel (in units of [m][L]^2[t]^-2
|
||||
vRel = SUM(DABS(part_i%v-part_j%v)) !TODO make function of norm1
|
||||
eRel = self%rMass*vRel**2
|
||||
!Relative energy must be higher than threshold
|
||||
sigmaVrel = self%crossSec%get(eRel)*vRel
|
||||
sigmaVrelMaxNew = sigmaVrelMaxNew + sigmaVrel
|
||||
IF (sigmaVrelMaxNew/sigmaVrelMax > random()) THEN
|
||||
!Find which particle is the ionizing electron
|
||||
IF (part_i%sp == self%electron%sp) THEN
|
||||
electron => part_i
|
||||
ion => part_j
|
||||
|
||||
ELSEIF(part_j%sp == self%electron%sp) THEN
|
||||
electron => part_j
|
||||
ion => part_i
|
||||
|
||||
ELSE
|
||||
CALL criticalError("No matching between input particles and ionizing species", 'collideBinaryIonization')
|
||||
|
||||
END IF
|
||||
|
||||
!Excess energy
|
||||
!TODO: This energy should be transformed into photons
|
||||
vp_i = ion%v* (1.D0 - (vRel + self%deltaV)/NORM2(ion%v))
|
||||
|
||||
!Remove electron from simulation
|
||||
electron%n_in = .FALSE.
|
||||
|
||||
!Neutralize ion particle
|
||||
SELECT TYPE(sp => species(ion%sp)%obj)
|
||||
TYPE IS(speciesCharged)
|
||||
CALL sp%neutralize(ion)
|
||||
|
||||
CLASS DEFAULT
|
||||
CALL criticalError(sp%name // " is not a charge", 'collideBinaryRecombination')
|
||||
|
||||
END SELECT
|
||||
|
||||
END IF
|
||||
|
||||
END SUBROUTINE collideBinaryRecombination
|
||||
|
||||
!RESONANT CHARGE EXCHANGE
|
||||
!Inits resonant charge exchange
|
||||
SUBROUTINE initBinaryChargeExchange(collision, crossSectionFilename, mass_i, mass_j)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue