diff --git a/src/modules/mesh/moduleMeshBoundary.f90 b/src/modules/mesh/moduleMeshBoundary.f90 index eaa2d52..7fc7798 100644 --- a/src/modules/mesh/moduleMeshBoundary.f90 +++ b/src/modules/mesh/moduleMeshBoundary.f90 @@ -225,23 +225,26 @@ MODULE moduleMeshBoundary class(meshEdge), intent(inout):: edge class(particle), intent(inout):: part + real(8):: v_cut + + v_cut = 2.d0 * 40.d3/v_ref !This will be the drag velocity of the ions in the future select type(bound => edge%boundary%bTypes(part%species%n)%obj) type is(boundaryOutflowAdaptive) + 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 reflection(edge, part) + ! print *,part%v(1) + ! print * - ! if (random() < 0.844d0) then - call reflection(edge, part) - part%v = part%v + 40e3/v_ref - if (dot_product(part%v, edge%normal) <= 0.d0) then + else call transparent(edge, part) end if - ! else - ! call transparent(edge, part) - - ! end if - end select end subroutine outflowAdaptive