Clean-up!

Trying to reduce warnings and unused variables in the code. This should
not be in this branch.
This commit is contained in:
Jorge Gonzalez 2024-07-11 15:55:02 +02:00
commit bc8f205287
8 changed files with 23 additions and 22 deletions

View file

@ -151,28 +151,29 @@ MODULE moduleInject
! Information about species and flux
self%species => species(sp)%obj
tauInject = tau(self%species%n)
! Convert units
SELECT CASE(units)
CASE ("sccm")
!Standard cubic centimeter per minute
fluxPerStep = flow*sccm2atomPerS*tauInject*ti_ref
fluxPerStep = flow*sccm2atomPerS
CASE ("A")
!Current in Ampers
fluxPerStep = flow*tauInject*ti_ref/qe
fluxPerStep = flow/qe
CASE ("Am2")
!Input current in Ampers per square meter
fluxPerStep = flow*tauInject*ti_ref*self%surface*L_ref**2/qe
fluxPerStep = flow*self%surface*L_ref**2/qe
CASE ("part/s")
!Input current in Ampers
fluxPerStep = flow*tauInject*ti_ref
fluxPerStep = flow
CASE DEFAULT
CALL criticalError("No support for units: " // units, 'initInject')
END SELECT
fluxPerStep = fluxPerStep / self%surface
fluxPerStep = fluxPerStep * tauInject * ti_ref / self%surface
!Assign particles per edge
IF (particlesPerEdge > 0) THEN
@ -307,16 +308,13 @@ MODULE moduleInject
USE moduleMesh
USE moduleRandom
USE moduleErrors
USE moduleRefParam, ONLY: L_ref
IMPLICIT NONE
CLASS(injectGeneric), INTENT(in):: self
INTEGER:: randomX
INTEGER, SAVE:: nMin, nMax !Min and Max index in partInj array
INTEGER, SAVE:: nMin
INTEGER:: i, e
INTEGER:: n, sp
CLASS(meshEdge), POINTER:: randomEdge
INTEGER:: particlesPerEdge
REAL(8):: direction(1:3)
!Insert particles