Adjusted initial condition, dimensions of output, and output file header

This commit is contained in:
Jorge Gonzalez 2026-04-08 20:17:49 +02:00
commit a1f94c1e4d

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 = 0.0d0
self%charge = self%potential / self%invC
self%update => updateFloating
@ -222,6 +222,9 @@ submodule(moduleMesh) boundaryEM
end do
mom_center = edge%gatherF(edge%centerXi(), edge%nNodes, mom_nodes)
! Only account for charge exiting the surface
mom_center = max(mom_center, 0.0d0)
edgeDensityCurrent = edgeDensityCurrent + qSpecies(s) * mom_center
@ -242,7 +245,7 @@ submodule(moduleMesh) boundaryEM
subroutine writeFloating(self, fileID)
use moduleOutput, only: fmtColReal
use moduleConstParam, only: qe
use moduleRefParam, only: Volt_ref
use moduleRefParam, only: Volt_ref, v_ref, n_ref, L_ref, ti_ref
implicit none
class(boundaryEMGeneric), intent(inout):: self
@ -251,8 +254,8 @@ submodule(moduleMesh) boundaryEM
write(fileID, '(A)') self%name
select type(self)
type is(boundaryEMFloating)
write(fileID, '(A,",",A)') 'Total charge', 'Potential (V)'
write(fileID, '('//fmtColReal//','//fmtColReal//')') self%charge * qe, self%potential * Volt_ref
write(fileID, '(A,",",A)') 'Total charge (C)', 'Potential (V)'
write(fileID, '(*('//fmtColReal//'))') self%charge*qe*v_ref*n_ref*L_ref**2*ti_ref, self%potential * Volt_ref
end select