Compare commits

...

2 commits

2 changed files with 8 additions and 5 deletions

View file

@ -103,6 +103,7 @@ MODULE moduleMesh1DRad
SUBROUTINE initEdge1DRad(self, n, p, ps)
USE moduleSpecies, only:nSpecies
USE moduleErrors
use moduleConstParam, only: pi4
IMPLICIT NONE
CLASS(meshEdge1DRad), INTENT(out):: self
@ -121,7 +122,7 @@ MODULE moduleMesh1DRad
self%r = r1(1)
self%surface = 1.D0
self%surface = pi4 * self%r**2
self%normal = (/ 1.D0, 0.D0, 0.D0 /)

View file

@ -159,7 +159,7 @@ submodule(moduleMesh) boundaryEM
! Inverse of non-dimensional capacitance
self%invC = 1.0d0 / (capacitance / (eps_0 * L_ref))
self%charge = self%potential / self%invC
self%charge = 0.0d0
self%update => updateFloating
@ -200,7 +200,7 @@ submodule(moduleMesh) boundaryEM
class(meshEdge), pointer:: edge
real(8), allocatable:: mom_nodes(:)
class(meshNode), pointer:: node
real(8):: mom_center, edgeDensityCurrent
real(8):: mom_center, edgeDensityCurrent, chargeTau
select type(self)
type is(boundaryEMFloating)
@ -230,12 +230,14 @@ submodule(moduleMesh) boundaryEM
end do
chargeTau = edgeDensityCurrent * edge%surface * tauMin
! Accumulate charge of speceis on surface
self%charge = self%charge + edgeDensityCurrent * edge%surface * tauMin
self%charge = self%charge + chargeTau
end do
self%potential = self%charge * self%invC
self%potential = self%potential + chargeTau * self%invC
end select