added check in vacuum_rt if plasma is not hit after reflection on the inner wall
This commit is contained in:
parent
82834fa63b
commit
824ff92f9a
10
src/gray.f
10
src/gray.f
@ -6351,7 +6351,6 @@ c rotation matrix from local to lab frame
|
||||
vv3=anv
|
||||
|
||||
evin=ext*vv1+eyt*vv2
|
||||
|
||||
c wave vector and electric field after reflection in lab frame
|
||||
anvrfl=anv-2.0d0*
|
||||
. (anv(1)*walln(1)+anv(2)*walln(2)+anv(3)*walln(3))*walln
|
||||
@ -6393,11 +6392,13 @@ c wave vector and electric field after reflection in lab frame
|
||||
subroutine vacuum_rt(xvstart,xvend,ivac)
|
||||
implicit none
|
||||
integer*4 ivac
|
||||
real*8 x00,y00,z00,r00
|
||||
real*8 st,rs,rrm,psinv,rwallm,pi,dst,psdbnd,dstvac,deltawall
|
||||
real*8 anv(3),xvstart(3),xvend(3),walln(3),y(6),dery(6)
|
||||
|
||||
common/rwallm/rwallm
|
||||
common/wrefl/walln
|
||||
common/mirr/x00,y00,z00
|
||||
common/anv/anv
|
||||
common/dsds/dst
|
||||
common/psival/psinv
|
||||
@ -6413,13 +6414,14 @@ c test on occurrence wall reflection
|
||||
. (anv(2)*xvstart(1)-anv(1)*xvstart(2))**2
|
||||
if (deltawall.le.0) ivac=-1
|
||||
|
||||
r00=sqrt(x00**2+y00**2)
|
||||
st=0.0d0
|
||||
do
|
||||
xvend=xvstart+st*anv
|
||||
rs=sqrt(xvend(1)**2+xvend(2)**2)
|
||||
if(ivac.eq.1) then
|
||||
rs=sqrt(xvend(1)**2+xvend(2)**2)
|
||||
rrm=rs/100.0d0
|
||||
if(rrm.le.rwallm) then
|
||||
if(rrm.le.rwallm.or.rs.ge.r00) then
|
||||
walln(1)=xvend(1)/rs
|
||||
walln(2)=xvend(2)/rs
|
||||
walln(3)=0.0d0
|
||||
@ -6434,7 +6436,7 @@ c test on occurrence wall reflection
|
||||
y(5)=anv(2)
|
||||
y(6)=anv(3)
|
||||
call fwork(y,dery)
|
||||
if(psinv.gt.0.0d0.and.psinv.lt.psdbnd) exit
|
||||
if((psinv.gt.0.0d0.and.psinv.lt.psdbnd).or.rs.ge.r00) exit
|
||||
end if
|
||||
st=st+dst
|
||||
end do
|
||||
|
Loading…
Reference in New Issue
Block a user