!Implementation for 1D solver for charged particles. Added a 1D case for
testing. Still, no formal test has been performed so issues may appear.
This commit is contained in:
parent
7859a73274
commit
d69b59143d
14 changed files with 3229 additions and 403 deletions
|
|
@ -72,6 +72,9 @@ MODULE moduleSolver
|
|||
CASE('2DCylCharged')
|
||||
self%pushParticle => pushCylCharged
|
||||
|
||||
CASE('1DCartCharged')
|
||||
self%pushParticle => push1DCharged
|
||||
|
||||
CASE DEFAULT
|
||||
CALL criticalError('Solver ' // pusherType // ' not found','readCase')
|
||||
|
||||
|
|
@ -227,6 +230,33 @@ MODULE moduleSolver
|
|||
|
||||
END SUBROUTINE pushCylCharged
|
||||
|
||||
!Push charged particles in 1D cartesian coordinates
|
||||
PURE SUBROUTINE push1DCharged(part)
|
||||
USE moduleSPecies
|
||||
USE moduleEM
|
||||
IMPLICIT NONE
|
||||
|
||||
TYPE(particle), INTENT(inout):: part
|
||||
TYPE(particle):: part_temp
|
||||
REAL(8):: tauSp
|
||||
REAL(8):: qmEFt(1:3)
|
||||
|
||||
part_temp = part
|
||||
!Time step for particle species
|
||||
tauSp = tau(part_temp%sp)
|
||||
!Get the electric field at particle position
|
||||
qmEFt = part_temp%qm*gatherElecField(part_temp)*tauSp
|
||||
|
||||
!x
|
||||
part_temp%v(1) = part%v(1) + qmEFt(1)
|
||||
part_temp%r(1) = part%r(1) + part_temp%v(1)*tauSp
|
||||
|
||||
part_temp%n_in = .FALSE.
|
||||
|
||||
part = part_temp
|
||||
|
||||
END SUBROUTINE push1DCharged
|
||||
|
||||
!Do the collisions in all the cells
|
||||
SUBROUTINE doCollisions()
|
||||
USE moduleMesh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue