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 ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
2.9 Step 9: Output <strong>of</strong> results ()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/ncasesfaexrr=dsqrt((faexp2s-faexpa*faexpa)/ncases)faexpa=faexpa*1.6E-10/areafaexrr=faexrr*1.6E-10/areafexpsa=fexpss/ncasesfexps2s=fexps2s/ncasesfexerr=dsqrt((fexps2s-fexpsa*fexpsa)/ncases)fexpsa=fexpsa*1.6E-10/areafexerr=fexerr*1.6E-10/areaif (faexpa.gt.0.0) thenbsfa=fexpsa/faexpabsferr=bsfa*dsqrt((faexrr/faexpa)**2.+(fexerr/fexpsa)**2.)write(6,310) faexpa,faexrr,fexpsa,fexerr,bsfa,bsferr9