Issue with injection of particles
I was having a lot of issues trying to get quasi-neutrality with the injection of electrons and ions. Main issue was a definition of the direction of injection. This should be fixed now (tested in 1D). Added a definition for Half-Maxwellian velocity distribution. WARNING: I'm still not happy at all about the definition of the direction of injection and the velocity definition to be in that direction so I might change it at some point (for example take into account the sign of each direction in the thermal part of the velocity)
This commit is contained in:
parent
ed6c2c46e4
commit
94a4864e6a
2 changed files with 49 additions and 20 deletions
|
|
@ -1222,7 +1222,6 @@ MODULE moduleInput
|
|||
CHARACTER(:), ALLOCATABLE:: name
|
||||
REAL(8):: v
|
||||
REAL(8), ALLOCATABLE:: T(:), normal(:)
|
||||
LOGICAL:: fixDirection
|
||||
REAL(8):: flow
|
||||
CHARACTER(:), ALLOCATABLE:: units
|
||||
INTEGER:: physicalSurface
|
||||
|
|
@ -1243,10 +1242,7 @@ MODULE moduleInput
|
|||
CALL config%get(object // '.v', v, found)
|
||||
CALL config%get(object // '.T', T, found)
|
||||
CALL config%get(object // '.n', normal, found)
|
||||
IF (found) THEN
|
||||
fixDirection = .TRUE.
|
||||
ELSE
|
||||
fixDirection = .FALSE.
|
||||
IF (.NOT. found) THEN
|
||||
ALLOCATE(normal(1:3))
|
||||
normal = 0.D0
|
||||
END IF
|
||||
|
|
@ -1254,7 +1250,7 @@ MODULE moduleInput
|
|||
CALL config%get(object // '.units', units, found)
|
||||
CALL config%get(object // '.physicalSurface', physicalSurface, found)
|
||||
|
||||
CALL inject(i)%init(i, v, normal, fixDirection, T, flow, units, sp, physicalSurface)
|
||||
CALL inject(i)%init(i, v, normal, T, flow, units, sp, physicalSurface)
|
||||
|
||||
CALL readVelDistr(config, inject(i), object)
|
||||
|
||||
|
|
@ -1333,6 +1329,10 @@ MODULE moduleInput
|
|||
T = inj%T(i)
|
||||
CALL initVelDistMaxwellian(inj%v(i)%obj, t, m)
|
||||
|
||||
CASE ("Half-Maxwellian")
|
||||
T = inj%T(i)
|
||||
CALL initVelDistHalfMaxwellian(inj%v(i)%obj, t, m)
|
||||
|
||||
CASE ("Delta")
|
||||
v = inj%vMod*inj%n(i)
|
||||
CALL initVelDistDelta(inj%v(i)%obj)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue