I'm dying with hay fever but I have to commit
I'm feeling awful but I have work in my desktop that I need to commit so I can work with my laptop while I'm at the IEPC 2022 in Boston.
This commit is contained in:
parent
cbb5fe0bf2
commit
23e2fe9bae
17 changed files with 313 additions and 140 deletions
|
|
@ -132,6 +132,15 @@ MODULE moduleInput
|
|||
CALL config%get(object // '.temperature', T_ref, found)
|
||||
IF (.NOT. found) CALL criticalError('Reference temperature not found','readReference')
|
||||
|
||||
!Derived parameters
|
||||
L_ref = DSQRT(kb*T_ref*eps_0/n_ref)/qe !reference length
|
||||
v_ref = DSQRT(kb*T_ref/m_ref) !reference velocity
|
||||
ti_ref = L_ref/v_ref !reference time
|
||||
Vol_ref = L_ref**3 !reference volume
|
||||
EF_ref = qe*n_ref*L_ref/eps_0 !reference electric field
|
||||
Volt_ref = EF_ref*L_ref !reference voltage
|
||||
B_ref = m_ref / (ti_ref * qe) !reference magnetic field
|
||||
|
||||
!If a reference cross section is given, it is used
|
||||
CALL config%get(object // '.sigmaVrel', sigmavRel_ref, found)
|
||||
|
||||
|
|
@ -147,15 +156,6 @@ MODULE moduleInput
|
|||
END IF
|
||||
|
||||
END IF
|
||||
|
||||
!Derived parameters
|
||||
L_ref = DSQRT(kb*T_ref*eps_0/n_ref)/qe !reference length
|
||||
v_ref = DSQRT(kb*T_ref/m_ref) !reference velocity
|
||||
ti_ref = L_ref/v_ref !reference time
|
||||
Vol_ref = L_ref**3 !reference volume
|
||||
EF_ref = qe*n_ref*L_ref/eps_0 !reference electric field
|
||||
Volt_ref = EF_ref*L_ref !reference voltage
|
||||
B_ref = m_ref / (ti_ref * qe) !reference magnetic field
|
||||
|
||||
END SUBROUTINE readReference
|
||||
|
||||
|
|
@ -417,15 +417,6 @@ MODULE moduleInput
|
|||
END IF
|
||||
partNew%n_in = .TRUE.
|
||||
partNew%weight = species(sp)%obj%weight
|
||||
!If charged species, add qm to particle
|
||||
SELECT TYPE(sp => species(sp)%obj)
|
||||
TYPE IS (speciesCharged)
|
||||
partNew%qm = sp%qm
|
||||
|
||||
CLASS DEFAULT
|
||||
partNew%qm = 0.D0
|
||||
|
||||
END SELECT
|
||||
|
||||
!Assign particle to temporal list of particles
|
||||
CALL partInitial%add(partNew)
|
||||
|
|
@ -642,11 +633,13 @@ MODULE moduleInput
|
|||
CHARACTER(:), ALLOCATABLE:: crossSecFilePath
|
||||
CHARACTER(:), ALLOCATABLE:: cType
|
||||
LOGICAL:: found
|
||||
INTEGER:: nInteractions, nCollisions
|
||||
INTEGER:: nPairs, nCollisions
|
||||
INTEGER:: i, k, ij
|
||||
INTEGER:: pt_i, pt_j
|
||||
REAL(8):: energyThreshold, energyBinding
|
||||
CHARACTER(:), ALLOCATABLE:: electron
|
||||
INTEGER:: e
|
||||
CLASS(meshVol), POINTER:: vol
|
||||
|
||||
!Firstly, checks if the object 'interactions' exists
|
||||
CALL config%info('interactions', found)
|
||||
|
|
@ -681,8 +674,8 @@ MODULE moduleInput
|
|||
!Inits lock for list of particles
|
||||
CALL OMP_INIT_LOCK(lockCollisions)
|
||||
|
||||
CALL config%info('interactions.collisions', found, n_children = nInteractions)
|
||||
DO i = 1, nInteractions
|
||||
CALL config%info('interactions.collisions', found, n_children = nPairs)
|
||||
DO i = 1, nPairs
|
||||
WRITE(iString, '(I2)') i
|
||||
object = 'interactions.collisions(' // TRIM(iString) // ')'
|
||||
CALL config%get(object // '.species_i', species_i, found)
|
||||
|
|
@ -691,6 +684,7 @@ MODULE moduleInput
|
|||
pt_j = speciesName2Index(species_j)
|
||||
CALL config%info(object // '.cTypes', found, n_children = nCollisions)
|
||||
ij = interactionIndex(pt_i,pt_j)
|
||||
|
||||
!Allocates the required number of collisions per each pair of species ij
|
||||
CALL interactionMatrix(ij)%init(nCollisions, pt_i, pt_j)
|
||||
|
||||
|
|
@ -732,7 +726,7 @@ MODULE moduleInput
|
|||
crossSecFilePath, energyBinding, electron)
|
||||
|
||||
CASE DEFAULT
|
||||
CALL criticalError('Collision type' // cType // 'not defined yet', 'readInteractions')
|
||||
CALL criticalError('Collision type' // cType // 'not defined', 'readInteractions')
|
||||
|
||||
END SELECT
|
||||
|
||||
|
|
@ -740,6 +734,26 @@ MODULE moduleInput
|
|||
|
||||
END DO
|
||||
|
||||
!Init the required arrays in each volume to account for MCC.
|
||||
DO e = 1, meshForMCC%numVols
|
||||
vol => meshForMCC%vols(e)%obj
|
||||
|
||||
!Allocate Maximum cross section per collision pair and assign the initial collision rate
|
||||
ALLOCATE(vol%sigmaVrelMax(1:nCollPairs))
|
||||
vol%sigmaVrelMax = sigmaVrel_ref/(L_ref**2 * v_ref)
|
||||
|
||||
IF (collOutput) THEN
|
||||
ALLOCATE(vol%tallyColl(1:nCollPairs))
|
||||
DO k = 1, nCollPairs
|
||||
ALLOCATE(vol%tallyColl(k)%tally(1:interactionmatrix(k)%amount))
|
||||
vol%tallyColl(k)%tally = 0
|
||||
|
||||
END DO
|
||||
|
||||
END IF
|
||||
|
||||
END DO
|
||||
|
||||
END IF
|
||||
|
||||
END IF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue