撰寫者:韋心潔
----------------------------------------------------------------------------------------------------
pro maxwell_boltzmann
;the program is the equation of maxwell_boltzmann
;written by Ruth Wei
m=1.67e-27 ;the mass of electron
k=1.38e-23 ;boltzmann constant
N=1.e5 ;mole
T1=20000.
T2=30000.
T3=40000.
v=findgen(400)*200
Nv1=N*(m/(2.*!pi*k*T1)^(3./2.))*(4.*!pi*v^2.)*exp((-m*v^2.)/(2.*k*T1))
Nv2=N*(m/(2.*!pi*k*T2)^(3./2.))*(4.*!pi*v^2.)*exp((-m*v^2.)/(2.*k*T2))
Nv3=N*(m/(2.*!pi*k*T3)^(3./2.))*(4.*!pi*v^2.)*exp((-m*v^2.)/(2.*k*T3))
;set_plot,"ps"
;device,filename="C:\Documents and Settings\Ruth\�ୱ\maxwell_boltzmann.ps
meanings = ['T=20000 K', 'T=30000 K', 'T=40000 K']
lines = [1,3,4]
plot,v,Nv1, linestyle=1, thick=1, title="maxwell velocity",xtitle="m/s", ytitle="mole/(m/s)"
oplot,v,Nv2, linestyle=3, thick=3
oplot,v,Nv3, linestyle=4, thick=4
;LEGEND, linestyle=lines, meanings, /top, /right;, Columns=8 ;, linestyle=lines
;LEGEND, linestyle=lines, meanings, /top, /right;, Columns=8 ;, linestyle=lines
xyouts, 5.e4, 1.e14, '........ 20000K'
xyouts, 5.e4, 9e13, '_._._._.30000K'
xyouts, 5.e4, 8e13, '_..._...40000K'
;device,/close
print,'ok'
end
----------------------------------------------------------------------------------------------------
留言列表