diff --git a/src/modules/mesh/1DCart/moduleMesh1DCart.f90 b/src/modules/mesh/1DCart/moduleMesh1DCart.f90 index f400ab0..bbc72e2 100644 --- a/src/modules/mesh/1DCart/moduleMesh1DCart.f90 +++ b/src/modules/mesh/1DCart/moduleMesh1DCart.f90 @@ -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 /) diff --git a/src/modules/mesh/1DRad/moduleMesh1DRad.f90 b/src/modules/mesh/1DRad/moduleMesh1DRad.f90 index fd617bd..e260900 100644 --- a/src/modules/mesh/1DRad/moduleMesh1DRad.f90 +++ b/src/modules/mesh/1DRad/moduleMesh1DRad.f90 @@ -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 /) diff --git a/src/modules/moduleInject.f90 b/src/modules/moduleInject.f90 index 5b96be2..b4e0ed2 100644 --- a/src/modules/moduleInject.f90 +++ b/src/modules/moduleInject.f90 @@ -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