ADS

Computation of the velocity distribution of particles for the system andcomparison with the Maxwell velocity distribution .

 

Computation of the velocity distribution of particles for the system andcomparison with the Maxwell velocity
distribution .
Program:
clf;clc
k=1.38e-23
N=6.023e23
T=[400:200:800]'
volume= linspace(0,3500,40)'
name= input("Enter the name of gas:","string") ;
M=input("Enter the molar mass(g/mole)"+string(name)+":");
m=M/(N*1000);
function y=MB(volume, T)
y=(4*%pi*(volume^2))*((m/2*%pi*k*T)^(3/2))*(exp(- (m*(volume^2))/(2*k*T)))
endfunction
y=feval(volume,T,MB)
plot2d(volume,y,[-1,-6, -3])
legend(string(T)+"k",opt='ul')
xlabel("velocity(m/s)","font_size",3)
ylabel("distribution function","font_size",3)
title("MB velocity distribution of " +string(name),"font_size",3);
xgrid
disp(["T(k)","v_mp","v_av","v_rms"])
for i = 1:length(T)
[p,j] = max(y(:,i))
v_mp = volume(j);
v_av = round((sum(volume.*(y(:,i))))/(sum(y(:,i))))
v_rms = round(sqrt((sum(volume^2.*(y(:,i))))/(sum(y(:,i)))))
disp([T(i),v_mp,v_av,v_rms])
end
output:
Enter the name of gas:Nitrogen
Enter the molar mass(g/mole)Nitrogen:14
"T(k)" "v_mp" "v_av" "v_rms"
400. 717.94872 778. 844.
600. 807.69231 952. 1034.
800. 987.17949 1100. 1194.








একটি মন্তব্য পোস্ট করুন

0 মন্তব্যসমূহ