From a1386b0b9c5e21158839ce4c56c7b5b6992f4860 Mon Sep 17 00:00:00 2001 From: JGonzalez Date: Fri, 13 Mar 2026 23:00:10 +0100 Subject: [PATCH] Steady state current doesn't seem to go to 0, but it still not perfect --- src/modules/mesh/moduleMesh@boundaryParticle.f90 | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/modules/mesh/moduleMesh@boundaryParticle.f90 b/src/modules/mesh/moduleMesh@boundaryParticle.f90 index 963116b..d5c4f62 100644 --- a/src/modules/mesh/moduleMesh@boundaryParticle.f90 +++ b/src/modules/mesh/moduleMesh@boundaryParticle.f90 @@ -479,7 +479,7 @@ submodule(moduleMesh) boundaryParticle type is(boundaryQuasiNeutrality) write(fileID, '(A,",",A)') '"Edge id"', '"alpha"' do e = 1, size(self%edges) - write(fileID, '('//fmtColInt//','//fmtReal//')') self%edges(e)%obj%n, self%alpha(self%edges(e)%obj%n) + write(fileID, '('//fmtColInt//','//fmtColReal//')') self%edges(e)%obj%n, self%alpha(self%edges(e)%obj%n) end do @@ -501,16 +501,12 @@ submodule(moduleMesh) boundaryParticle v_cut = 2.d0 * 40.d3/v_ref !This will be the drag velocity of the ions in the future - if (dot_product(part%v,-edge%normal) > v_cut) then - ! print *,part%v(1), v_cut - ! part%v = part%v + v_cut*edge%normal - part%v(1) = part%v(1) - v_cut - ! print *,part%v(1) - call genericReflection(edge, part) - ! print *,part%v(1) - ! print * + call genericReflection(edge, part) + + part%v(1) = part%v(1) + v_cut + + if (dot_product(part%v,edge%normal) <= 0.d0) then - else call genericTransparent(edge, part) end if