Problem Statement: The Maxwell-Boltzmann distribution function describes the distribution of the speed of gaseous molecules.
m 1.5 m*v2
f(T,v)=4p*(------) *exp(- -----)*v2
2p*k*T 2*k*T
where
v = Speed (m/sec)
m = Mass of molecule = 32 g/mole for oxygen
k = Boltzmann (gas) constant = 8.319 Joule/mole-K
T = Temperature (K)
Solution:
Solution:
Solution:
óv
F(v) = ô f(T,V)dV
õ0
Modify the last FORTRAN program to numerically integrate
the Boltzmann distribution function with the trapezoidal rule.
(Rather than simply printing out the values of the Boltzmann
distribution function, as was done in the last problem, we sum
them up in a DO-loop in this problem. Thus, this problem
incrementally builds on the last one.) What is the effect
of the step size? Do small step sizes give better results?
Solution:
Effect of the step size is studied by running the program with the following conditions:
Molecular mass (Dalton): 32.
Temperatuer (K): 273.
Velocity (m/sec): 500.
------------------------
step size Integral
------------------------
500. 4.532006E-01 (step size is too corse)
200. 5.266181E-01
100. 6.775070E-01
10. 6.821138E-01
2. 6.821581E-01 (The answer, accurate to 4 significant digits,
1. 6.821594E-01 is probably 6.822.)
0.5 6.821603E-01
0.1 6.820492E-01
0.01 6.819008E-01
0.001 6.799245E-01
0.0001 6.953111E-01
0.00001 7.211619E-01 (took forever to compute)
------------------------
The answer, accurate to 4 significant digits, is probably 6.822.
One would typically change the step size, or equivalently the
number of steps, and study whether a change in the step size
leads to a significantly different solution. This is a
brute-force way of roughly estimating the accuracy of the result.
It is important to realize that finer step sizes chews up more
computation time and can actually leads to worse results because
of round up error.
TRAPZ (f, xlo, xhi, nstep)
where TRAPZ returns the integral of f
f = the function to be integrated (input).
f is a function of one variable (i.e., f(x)). f should be
declared as an external function in the calling program.
xlo = lower integration limit (input).
xhi = upper integration limit (input).
nstep = number of integration steps (input).
óxhi
TRAPZ = ô f(x)*dx
õxlo
TRAPZ should be able to handle almost any reasonably behaved
function. Test your integration subprogram by calling the TRAPZ
integration routine to calculate the integral of a few simple
functions (e.g., f(x)=x, f(x)=sin(x), etc.) (Do not submit the
programs you use to test your TRAPZ; submit only the integral of
the Boltzmann distribution function.) After you are convinced
that your integration subprogram TRAPZ is acting properly, apply
it to calculate the cumulative Boltzmann function from the last
homework assignment. (This is another practice in writing a
subprogram. You should now have two functions besides the main
program: a function TRAPZ which tells the computer how to
integrate numerically and a function that specifies the
integrand.)
Solution:
Solution:
ó¥
v_ave(T) = ô v*f(T,v)dv
õ0
where f(T,v) is the Boltzmann distribution function given in
earlier homework assignments. (This problem lets you practice
writing a function, which can be modified slightly for the next
problem. Specifically, you should start with an integrand
function v*f and integrate it from 0 to ¥.)
Solution:
Background. In reaction kinetics, we sometimes want to find the temperature at which the system has enough energy to undergo reaction. Energy and speed are related by: energy=mass*speed^2/2. This is a problem in solving a problem of the general form "f(x)=0". Specifically, the function "f=0" here is "v_mean(T) - given_mean_speed = 0", and the independent variable "x" in this problem is the temperature T.
Solution:
Problem Statement:
óc
F(T,c) = ô f(T,v) dv
õ0
integral (from 0 to c) f(T,v) dv (if you don't see the integral symbol above)
Write a program to define the function F.
E = m*v2/2Find the temperature at which 10% of the oxygen molecules have energy higher than 10kJ/mole.
ó¥
vave(T) = ô v*f(T,v) dv
õ0
integral (from 0 to infinity) v*f(T,v) dv (if you don't see the integral symbol above)
Solution:
|