Implementation of charge exchange and structure for ionization
processes.
This commit is contained in:
parent
baf25c1157
commit
35936ea918
9 changed files with 1604 additions and 29 deletions
|
|
@ -11,11 +11,18 @@ MODULE moduleSpecies
|
|||
END TYPE speciesGeneric
|
||||
|
||||
TYPE, EXTENDS(speciesGeneric):: speciesNeutral
|
||||
CLASS(speciesGeneric), POINTER:: ion => NULL()
|
||||
CONTAINS
|
||||
PROCEDURE, PASS:: ionize => ionizeNeutral
|
||||
|
||||
END TYPE speciesNeutral
|
||||
|
||||
TYPE, EXTENDS(speciesGeneric):: speciesCharged
|
||||
REAL(8):: q=0.D0, qm=0.D0
|
||||
CLASS(speciesGeneric), POINTER:: ion => NULL(), neutral => NULL()
|
||||
CONTAINS
|
||||
PROCEDURE, PASS:: ionize => ionizeCharged
|
||||
PROCEDURE, PASS:: neutralize => neutralizeCharged
|
||||
|
||||
END TYPE speciesCharged
|
||||
|
||||
|
|
@ -25,7 +32,7 @@ MODULE moduleSpecies
|
|||
END TYPE
|
||||
|
||||
INTEGER:: nSpecies
|
||||
TYPE(speciesCont), ALLOCATABLE:: species(:)
|
||||
TYPE(speciesCont), ALLOCATABLE, TARGET:: species(:)
|
||||
|
||||
TYPE particle
|
||||
REAL(8):: r(1:3) !Position
|
||||
|
|
@ -68,4 +75,59 @@ MODULE moduleSpecies
|
|||
|
||||
END FUNCTION speciesName2Index
|
||||
|
||||
!Change particle type to corresponding ion (neutral species)
|
||||
SUBROUTINE ionizeNeutral(self, part)
|
||||
USE moduleErrors
|
||||
IMPLICIT NONE
|
||||
|
||||
CLASS(speciesNeutral), INTENT(IN):: self
|
||||
TYPE(particle), INTENT(inout):: part
|
||||
|
||||
IF (ASSOCIATED(self%ion)) THEN
|
||||
part%sp = self%ion%sp
|
||||
|
||||
ELSE
|
||||
CALL criticalError('No ion defined for species' // self%name, 'ionizeNeutral')
|
||||
|
||||
END IF
|
||||
|
||||
END SUBROUTINE ionizeNeutral
|
||||
|
||||
!Change particle type to corresponding ion (charged species)
|
||||
SUBROUTINE ionizeCharged(self, part)
|
||||
USE moduleErrors
|
||||
IMPLICIT NONE
|
||||
|
||||
CLASS(speciesCharged), INTENT(IN):: self
|
||||
TYPE(particle), INTENT(inout):: part
|
||||
|
||||
IF (ASSOCIATED(self%ion)) THEN
|
||||
part%sp = self%ion%sp
|
||||
|
||||
ELSE
|
||||
CALL criticalError('No ion defined for species' // self%name, 'ionizeCharged')
|
||||
|
||||
END IF
|
||||
|
||||
END SUBROUTINE ionizeCharged
|
||||
|
||||
!Change particle type to corresponding neutral
|
||||
SUBROUTINE neutralizeCharged(self, part)
|
||||
USE moduleErrors
|
||||
IMPLICIT NONE
|
||||
|
||||
CLASS(speciesCharged), INTENT(in):: self
|
||||
TYPE(particle), INTENT(inout):: part
|
||||
|
||||
IF (ASSOCIATED(self%neutral)) THEN
|
||||
part%sp = self%neutral%sp
|
||||
|
||||
ELSE
|
||||
CALL criticalError('No neutral defined for species' // self%name, 'neutralizeCharged')
|
||||
|
||||
END IF
|
||||
|
||||
END SUBROUTINE neutralizeCharged
|
||||
|
||||
END MODULE moduleSpecies
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue