Compare commits

..

No commits in common. "a1f94c1e4d8ae8d39aef9bec308d3d4f785415a4" and "f35d6138087d80a0d627e2519f874e5671f08e28" have entirely different histories.

2 changed files with 5 additions and 9 deletions

View file

@ -629,8 +629,7 @@ make
\item \textbf{floating}: The potential is adjusted over time to maintain a zero current on the surface, \textit{i. e.}, the surface is \textit{floating}. \item \textbf{floating}: The potential is adjusted over time to maintain a zero current on the surface, \textit{i. e.}, the surface is \textit{floating}.
\textbf{potential}: Real. \textbf{potential}: Real.
Initial potential of the surface. Potential for Dirichlet boundary condition.
The initial charge value for the simulation will be calculated by the potential times the capacitance.
\textbf{capacitance}: Real. \textbf{capacitance}: Real.
Capacitance of the surface in Farads. Capacitance of the surface in Farads.

View file

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