Merge, but I have to recover the outflow boundary condition
This commit is contained in:
commit
6828f1ef96
554 changed files with 1714358 additions and 41895 deletions
|
|
@ -1,6 +1,7 @@
|
|||
OBJS = moduleCompTime.o moduleCaseParam.o moduleConstParam.o \
|
||||
moduleErrors.o moduleMath.o moduleParallel.o \
|
||||
moduleRandom.o moduleRefParam.o moduleTable.o
|
||||
moduleRandom.o moduleRefParam.o moduleTable.o \
|
||||
velocityDistribution.o
|
||||
|
||||
all: $(OBJS)
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ MODULE moduleConstParam
|
|||
REAL(8), PARAMETER:: PI8 = 8.D0*PI !8*pi
|
||||
REAL(8), PARAMETER:: sccm2atomPerS = 4.5D17 !sccm to atom s^-1
|
||||
REAL(8), PARAMETER:: qe = 1.60217662D-19 !Elementary charge
|
||||
real(8), parameter:: me = 9.1093837d-31 !electron mass
|
||||
REAL(8), PARAMETER:: kb = 1.38064852D-23 !Boltzmann constants SI
|
||||
REAL(8), PARAMETER:: eV2J = qe !Electron volt to Joule conversion
|
||||
REAL(8), PARAMETER:: eps_0 = 8.8542D-12 !Epsilon_0
|
||||
|
|
|
|||
88
src/modules/common/velocityDistribution.f90
Normal file
88
src/modules/common/velocityDistribution.f90
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
! Functions that return a random velocity based on the distribution function
|
||||
module velocityDistribution
|
||||
use moduleRandom
|
||||
!Generic type for velocity distribution function
|
||||
type, abstract:: velDistGeneric
|
||||
contains
|
||||
!Returns random velocity from distribution function
|
||||
procedure(randomVel_interface), deferred, pass:: randomVel
|
||||
|
||||
end type velDistGeneric
|
||||
|
||||
abstract interface
|
||||
function randomVel_interface(self) result(v)
|
||||
import velDistGeneric
|
||||
|
||||
class(velDistGeneric), intent(in):: self
|
||||
real(8):: v
|
||||
|
||||
end function randomVel_interface
|
||||
|
||||
end interface
|
||||
|
||||
!Container for velocity distributions
|
||||
type:: velDistCont
|
||||
class(velDistGeneric), allocatable:: obj
|
||||
|
||||
end type velDistCont
|
||||
|
||||
!Maxwellian distribution function
|
||||
type, extends(velDistGeneric):: velDistMaxwellian
|
||||
real(8):: vTh !Thermal Velocity
|
||||
contains
|
||||
procedure, pass:: randomVel => randomVelMaxwellian
|
||||
|
||||
end type velDistMaxwellian
|
||||
|
||||
type, extends(velDistGeneric):: velDistHalfMaxwellian
|
||||
real(8):: vTh !Thermal Velocity
|
||||
contains
|
||||
procedure, pass:: randomVel => randomVelHalfMaxwellian
|
||||
|
||||
end type velDistHalfMaxwellian
|
||||
|
||||
!Dirac's delta distribution function
|
||||
type, extends(velDistGeneric):: velDistDelta
|
||||
contains
|
||||
procedure, pass:: randomVel => randomVelDelta
|
||||
|
||||
end type velDistDelta
|
||||
|
||||
contains
|
||||
!Random velocity from Maxwellian distribution
|
||||
function randomVelMaxwellian(self) result (v)
|
||||
use moduleRandom
|
||||
implicit none
|
||||
|
||||
class(velDistMaxwellian), intent(in):: self
|
||||
real(8):: v
|
||||
v = 0.D0
|
||||
|
||||
v = self%vTh*randomMaxwellian()/sqrt(2.d0)
|
||||
|
||||
end function randomVelMaxwellian
|
||||
|
||||
!Random velocity from Half Maxwellian distribution
|
||||
function randomVelHalfMaxwellian(self) result (v)
|
||||
implicit none
|
||||
|
||||
class(velDistHalfMaxwellian), intent(in):: self
|
||||
real(8):: v
|
||||
v = 0.D0
|
||||
|
||||
v = self%vTh*randomHalfMaxwellian()
|
||||
|
||||
end function randomVelHalfMaxwellian
|
||||
|
||||
!Random velocity from Dirac's delta distribution
|
||||
PURE function randomVelDelta(self) result(v)
|
||||
implicit none
|
||||
|
||||
class(velDistDelta), intent(in):: self
|
||||
real(8):: v
|
||||
|
||||
v = 0.D0
|
||||
|
||||
end function randomVelDelta
|
||||
|
||||
end module velocityDistribution
|
||||
Loading…
Add table
Add a link
Reference in a new issue