13.07.2015 Views

Lecture Notes of Dose distribution calculation inside phantom with ...

Lecture Notes of Dose distribution calculation inside phantom with ...

Lecture Notes of Dose distribution calculation inside phantom with ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

! =======================if (iwatch .gt. 0) call swatch(-88,iwatch)! =======================!-----------------------------------------------------------------------! Step 9: Output-<strong>of</strong>-results!-----------------------------------------------------------------------! ---------------------! Write out the results! ---------------------write(6,260) ncount,ncases,totke260 FORMAT(/,' Ncount=',I10,' (actual cases run)',/,* ' Ncases=',I10,' (number <strong>of</strong> cases requested)',/,* ' TotKE =',G15.5,' (total KE (MeV) in run)')if (totke .le. 0.D0) thenwrite(6,270) totke,availke,ncount270 FORMAT(/,' Stopped in MAIN <strong>with</strong> TotKE=',G15.5,/,* ' AvailKE=',G15.5, /,' Ncount=',I10)stopend if!-----------------------------! Sampled source spectrum!-----------------------------write(1,280) sposi280 FORMAT(/' Absorbed energy <strong>inside</strong> <strong>phantom</strong> for 1.253MeV photon'/*' Source position ',F10.1,' cm from <strong>phantom</strong> surface'/*' Within 1cm x 1 cm area after 5 cm air')write(1,290) ncases, xhbeam, yhbeam290 FORMAT(1X,I8,' photons normally incident from front side'/*' Half width <strong>of</strong> beam is ',G15.5,'cm for X and ',G15.5,'cm for Y')! ---------------------------------------! Calculate average and its uncertainties! ---------------------------------------do k=1,kmaxdo j=1,jmaxdo i=1,imaxirl=1+i+(j-1)*imax+(k-1)*ijmaxamass=(xbound(i+1)-xbound(i))** (ybound(j+1)-ybound(j))** (zbound(k+1)-zbound(k))*rhor(irl)dose(i,j,k)=depeh(i,j,k)/ncasesdepeh2(i,j,k)=depeh2(i,j,k)/ncasesdoseun(i,j,k)=dsqrt((depeh2(i,j,k)-* dose(i,j,k)*dose(i,j,k))/ncases)dose(i,j,k)=dose(i,j,k)*1.602D-10/amassdoseun(i,j,k)=doseun(i,j,k)*1.602D-10/amassend doend doend do!----------------------------------------------! Print out the results <strong>of</strong> central <strong>phantom</strong>!----------------------------------------------i=imax/2+1j=jmax/2+1do kkk=2,kmax-1depths=zbound(kkk)depthl=zbound(kkk+1)irl=1+i+(j-1)*imax+(kkk-1)*ijmaxwrite(6,300) depths,depthl,(media(ii,med(irl)),ii=1,24),* rhor(irl),dose(i,j,kkk),doseun(i,j,kkk)300 FORMAT(' At ',F4.1,'--',F4.1,'cm (',24A1,',rho:',F8.4,')=',* G13.5,'+-',G13.5,'Gy/incident')end do!-------------------------------------------------! Calculate average exposure and its deviation!-------------------------------------------------area=(xbound(i+1)-xbound(i))*(ybound(j+1)-ybound(j))faexpa=faexps/ncasesfaexp2s=faexp2s/ncases55

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!