Final implementation of ionization process by electron impact.

Possibility to input initial species distributions (density, velocity
    and temperature) via an input file for each species.

New moduleRandom includes function to generate random numbers in
different ways (still uses) the implicit RANDOM_NUMBER().
This commit is contained in:
Jorge Gonzalez 2020-12-26 22:45:55 +01:00
commit 9e0d1a7cc7
16 changed files with 363 additions and 86 deletions

View file

@ -70,7 +70,7 @@ MODULE moduleMesh
CONTAINS
PROCEDURE(initEdge_interface), DEFERRED, PASS:: init
PROCEDURE(getNodesEdge_interface), DEFERRED, PASS:: getNodes
PROCEDURE(randPos_interface), DEFERRED, PASS:: randPos
PROCEDURE(randPosEdge_interface), DEFERRED, PASS:: randPos
END TYPE meshEdge
@ -93,12 +93,12 @@ MODULE moduleMesh
END FUNCTION
FUNCTION randPos_interface(self) RESULT(r)
FUNCTION randPosEdge_interface(self) RESULT(r)
IMPORT:: meshEdge
CLASS(meshEdge), INTENT(in):: self
REAL(8):: r(1:3)
END FUNCTION randPos_interface
END FUNCTION randPosEdge_interface
END INTERFACE
@ -138,9 +138,10 @@ MODULE moduleMesh
REAL(8):: totalWeight = 0.D0
CONTAINS
PROCEDURE(initVol_interface), DEFERRED, PASS:: init
PROCEDURE(getNodesVol_interface), DEFERRED, PASS:: getNodes
PROCEDURE(randPosVol_interface), DEFERRED, PASS:: randPos
PROCEDURE(scatter_interface), DEFERRED, PASS:: scatter
PROCEDURE(gatherEF_interface), DEFERRED, PASS:: gatherEF
PROCEDURE(getNodesVol_interface), DEFERRED, PASS:: getNodes
PROCEDURE(elemF_interface), DEFERRED, PASS:: elemF
PROCEDURE, PASS:: findCell
PROCEDURE(phy2log_interface), DEFERRED, PASS:: phy2log
@ -215,6 +216,13 @@ MODULE moduleMesh
END FUNCTION inside_interface
FUNCTION randPosVol_interface(self) RESULT(r)
IMPORT:: meshVol
CLASS(meshVol), INTENT(in):: self
REAL(8):: r(1:3)
END FUNCTION randPosVol_interface
END INTERFACE
!Containers for volumes in the mesh
@ -376,13 +384,13 @@ MODULE moduleMesh
USE moduleSpecies
USE moduleList
use moduleRefParam
USE moduleRandom
IMPLICIT NONE
CLASS(meshVol), INTENT(inout):: self
INTEGER:: nPart !Number of particles inside the cell
REAL(8):: pMax !Maximum probability of collision
INTEGER:: rnd !random index
REAL(8):: rndReal
TYPE(particle), POINTER:: part_i, part_j
INTEGER:: n !collision
INTEGER:: ij, k
@ -403,11 +411,9 @@ MODULE moduleMesh
DO n = 1, self%nColl
!Select random numbers
CALL RANDOM_NUMBER(rndReal)
rnd = 1 + FLOOR(nPart*rndReal)
rnd = random(1, nPart)
part_i => partTemp(rnd)%part
CALL RANDOM_NUMBER(rndReal)
rnd = 1 + FLOOR(nPart*rndReal)
rnd = random(1, nPart)
part_j => partTemp(rnd)%part
ij = interactionIndex(part_i%sp, part_j%sp)
sigmaVrelMaxNew = 0.D0