In: Mechanical Engineering
From the expressions we derived for the kinetic theory of gases, it can be shown that the fraction of gas molecules having speeds in excess of a particular speed c is
f(c) = 1 + [2*alpha/sqrt(pi)] exp(-alpha2) - erf(alpha)
where alpha = c/cm , cm is the most probable speed and erf() is the error function. Consider now 1000 H2 atoms in thermal equilibrium at 0oC. Consider the range of speeds from 0 to 3,000 m/s divided into 100 m/s intervals.
(a) Usint the equation above, plot the number of molecules in each increment
(b) Also, on your plot, show cm, c bar (average speed), and crms (rms speed)
I used matlab to solve this problem:
Matlab Code:
clc;
clear;
format long %for more accuracy
R=8314; %universal gas
constant
M=1; %molecular mass of hydrogen
atom
c=0:100:3000; %velocity of atoms
0<c<3000
T=273; %temperature (K)
cm=sqrt(2*R*T/M) %most probable velocity
c_bar=sqrt(8*R*T/(pi*M)) %average velocity
c_rms=sqrt(3*R*T/M) %rms velocity
alpha=c./cm; %veloicty/most probable
velocity
N=1000; %number of atoms
t=length(c); %number of velocity ranges
old_fr=0; %old fraction
for i=t:-1:1 %loop is goinf from c=3000m/s to
c=0m/s
fr =
1+(2*alpha(i)/sqrt(pi))*exp(-alpha(i)^2)-erf(alpha(i)); %finding
fraction
new_fr=fr-old_fr; %actual fraction of atoms in
given range= calculated fraction of atoms - fraction of atom in
higher velocuty range
num_atom(i)=new_fr*N; %number of atom=
fraction*total number of atoms
old_fr=fr;
end
%plotting
plot (c,num_atom,'-*','color','r');
hold on
plot(cm,0,'o','color','g')
hold on
plot(c_bar,0,'+','color','b')
hold on
plot(c_rms,0,'<','color','y')
xlabel('Velocity of atom(m/s)','FontSize', 16); ylabel('Number of
atom','FontSize', 16);
title('Number of atoms in each velocity ranges ','FontSize',
20);
legend('number of atoms','most probable velocity','average
velocity','rms velocity');
grid on
PLot obtained:
Please comment if any doubt or errors are coming, i will help you ..