Try to impose a reflection with drag
This commit is contained in:
parent
8ae558f3c8
commit
4aa6e5aab2
1 changed files with 12 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue