Implementation of different distribution functions for velocities.
Maxwellian and Diract Delta distributions have been implemented. The input for injection of particles should be rewritten to allow more clear input file.
This commit is contained in:
parent
af74205932
commit
37b0139b1f
37 changed files with 252 additions and 5497 deletions
|
|
@ -520,6 +520,8 @@ MODULE moduleInput
|
|||
|
||||
CALL inject(i)%init(i, v, normal, T, flow, units, sp, physicalSurface)
|
||||
|
||||
CALL readVelDistr(config, inject(i), object)
|
||||
|
||||
END DO
|
||||
|
||||
!Allocate array for injected particles
|
||||
|
|
@ -530,6 +532,52 @@ MODULE moduleInput
|
|||
|
||||
END SUBROUTINE readInject
|
||||
|
||||
!Reads the velocity distribution functions for each inject
|
||||
SUBROUTINE readVelDistr(config, inj, object)
|
||||
USE moduleErrors
|
||||
USE moduleInject
|
||||
USE moduleSpecies
|
||||
USE json_module
|
||||
IMPLICIT NONE
|
||||
|
||||
TYPE(json_file), INTENT(inout):: config
|
||||
TYPE(injectGeneric), INTENT(inout):: inj
|
||||
CHARACTER(:), ALLOCATABLE, INTENT(in):: object
|
||||
INTEGER:: i
|
||||
CHARACTER(2):: istring
|
||||
CHARACTER(:), ALLOCATABLE:: fvType
|
||||
LOGICAL:: found
|
||||
REAL(8):: v, T, m
|
||||
|
||||
!Reads species mass
|
||||
m = species(inj%sp)%obj%m
|
||||
!Reads distribution functions for velocity
|
||||
DO i = 1, 3
|
||||
WRITE(istring, '(i2)') i
|
||||
CALL config%get(object // '.velDist('// TRIM(istring) //')', fvType, found)
|
||||
IF (.NOT. found) CALL criticalError("No velocity distribution in direction " // istring // &
|
||||
" found for " // object, 'readVelDistr')
|
||||
|
||||
SELECT CASE(fvType)
|
||||
CASE ("Maxwellian")
|
||||
v = inj%vMod*inj%n(i)
|
||||
T = inj%T(i)
|
||||
CALL initVelDistMaxwellian(inj%v(i)%obj, v, t, m)
|
||||
|
||||
CASE ("Delta")
|
||||
v = inj%vMod*inj%n(i)
|
||||
CALL initVelDistDelta(inj%v(i)%obj, v)
|
||||
|
||||
CASE DEFAULT
|
||||
CALL criticalError("No velocity distribution type " // fvType // " defined", 'readVelDistr')
|
||||
|
||||
END SELECT
|
||||
|
||||
END DO
|
||||
|
||||
END SUBROUTINE readVelDistr
|
||||
|
||||
!Reads configuration for parallel run
|
||||
SUBROUTINE readParallel(config)
|
||||
USE moduleParallel
|
||||
USE moduleErrors
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue