Issue with injecting current #53

Merged
JorgeGonz merged 2 commits from mergeDevleopment into development 2024-10-13 14:41:04 +02:00
3 changed files with 19 additions and 4 deletions

View file

@ -123,7 +123,7 @@ MODULE moduleMesh1DCart
self%x = r1(1)
self%surface = 1.D0 / L_ref**2
self%surface = 1.D0
self%normal = (/ 1.D0, 0.D0, 0.D0 /)

View file

@ -123,7 +123,7 @@ MODULE moduleMesh1DRad
self%r = r1(1)
self%surface = 1.D0 / L_ref**2
self%surface = 1.D0
self%normal = (/ 1.D0, 0.D0, 0.D0 /)

View file

@ -159,11 +159,26 @@ MODULE moduleInject
CASE ("A")
!Current in Ampers
fluxPerStep = flow/qe
SELECT TYPE(sp => self%species)
CLASS IS(speciesCharged)
fluxPerStep = flow/(qe*abs(sp%q))
CLASS DEFAULT
call criticalError('Attempted to assign a flux in "A" to a species without charge.', 'initInject')
END SELECT
CASE ("Am2")
!Input current in Ampers per square meter
fluxPerStep = flow*self%surface*L_ref**2/qe
SELECT TYPE(sp => self%species)
CLASS IS(speciesCharged)
fluxPerStep = flow*self%surface*L_ref**2/(qe*abs(sp%q))
CLASS DEFAULT
call criticalError('Attempted to assign a flux in "Am2" to a species without charge.', 'initInject')
END SELECT
CASE ("part/s")
!Input current in Ampers