% maxwell0.m(mm,tt,vv)
% Calculates Maxwell Boltzman distribution
% Milos Steinhart, 03. 09.2009
% mm molecular weight g/mol
% tt absolute temperature
% vv velocity m/s
function maxw=maxwell0(mm,tt,vv)
% mm=32e-3;         % oxygen
% tt=300;
% vv=10;
k_bol=1.38e-23;     % J/K    Boltzman constant
r_gas=8.314;        % J/mol/kg    Gas constant
mr=mm/r_gas/tt/2000;% molecular weight must be modified to kg/mol
vv2=vv.*vv;
maxw=4*pi*(mr/pi)^3/2.*vv2.*exp(-mr.*vv2);
%maxw=exp(-mr.*vv2)
