!	Flux due to a point source in an infinite non-multiplying 
!	moderator medium.
!	phi(r)=S*exp(-r/L)/4*Pi*D*r
!	Program saves output to file:output1
!	This output file can be exported to a plotting routine, eg. Excell
!	M. Ragheb, NPRE 402 - ME 405, Nuclear Power Engineering
!
	program flux
	real :: Pi = 3.14159
!	source strength	
	real :: S = 10.0E+10
!	diffusion coefficient	
	real :: D = 0.84
!	diffusion length	
	real :: L = 59.0
	integer :: steps=10
	real phi(100), r(100)
	write(*,*) S,D,L
!	Open output file
	open(10,file='output4')
!	Calculate ratio phi(r)
	do i =  1, steps
		r(i) = i
		phi(i) = (S*exp(-r(i)/L))/(4.0*Pi*D*r(i))
!	Write results on output file
		write(10,*) r(i), phi(i)
!	Display results on screen
		write(*,*) r(i), phi(i)
!		pause
	end do
	end





