c----------------------------------------------------------------------- c Evaluate the Boltzmann distribution function c f(T,v)=4*pi*(xm/2/pi/xk/T)^1.5 * exp(-xm*v*v/2/xk/T)*v*v c Given c v = Speed (m/sec) c xm = Mass of molecule = 32 g/mole for oxygen c xk = Boltzmann (gas) constant = 8.319 Joule/mole-K c T = Temperature (K) c ---------------------------------------------------------------------- c Instructor: Nam Sun Wang c----------------------------------------------------------------------- c Some constants pi = 3.141593 xk = 8.319 ! Joule/mole-K c Print out a program header print *, 'Evaluate the Boltzmann distribution function' c Input the parameters print *, 'Enter molecular mass in Da (e.g., 32. for oxygen): ' read *, xm print *, 'Enter temperature in K (e.g., 273.): ' read *, T print *, 'Enter velocity in m/sec (e.g., 500.): ' read *, v c Change units to be consistent with the rest. xm = xm/1000. c Find the distribution function f = 4.*pi*(xm/2./pi/xk/T)**1.5 * exp(-xm*v*v/2./xk/T)*v*v c Output the result print *, ' ' print *, 'Boltzmann distribution function: f = ', f, ' sec/m' print *, 'Condition:' print *, ' Molecular mass (Dalton): ', xm*1000. print *, ' Temperatuer (K): ', T print *, ' Velocity (m/sec) ', v end