Skip to content

๐ŸŽˆ Ideal gas

JavaScriptThree.js

Source


Maxwell-Boltzmann velocity distributions for vโ†’\overrightarrow{v}

Section titled โ€œMaxwell-Boltzmann velocity distributions for vโ†’\overrightarrow{v}vโ€

The velocity distribution for f(vโ†’),dnvโ†’f(\overrightarrow{v}) , d^n\overrightarrow{v} is given by

f(vโ†’)d3vโ†’=(m2ฯ€kBT)3/2expโก(โˆ’mv22kBT)d3vโ†’f(\overrightarrow{v}) d^3\overrightarrow{v} = \left(\frac{m}{2 \pi k_B T}\right)^{3/2} \exp\Big(-\frac{m v^2}{2 k_B T}\Big) d^3\overrightarrow{v} f(vโ†’)d2vโ†’=(m2ฯ€kBT)expโก(โˆ’mv22kBT)d2vโ†’f(\overrightarrow{v}) d^2\overrightarrow{v} = \left(\frac{m}{2 \pi k_B T}\right) \exp\Big(-\frac{m v^2}{2 k_B T}\Big) d^2\overrightarrow{v}
  • We have v2=vx2+vy2+vz2v^2 = v_x^2 + v_y^2 + v_z^2 in 3 dimensions and v2=vx2+vy2v^2 = v_x^2 + v_y^2 in 2 dimensions.
  • Normalisation because the integral volume dnvโ†’d^n\overrightarrow{v} depends on the dimension.

Maxwell-Boltzmann velocity distributions for โˆฅvโ†’โˆฅ\|\overrightarrow{v}\|

Section titled โ€œMaxwell-Boltzmann velocity distributions for โˆฅvโ†’โˆฅ\|\overrightarrow{v}\|โˆฅvโˆฅโ€

In the graphs we reduce to a radial distribution, so we take the โ€œsurface of the cirkel/sphereโ€:

dnvโ†’=vnโˆ’1dv,dฮฉnd^n\overrightarrow{v} = v^{n-1} dv , d\Omega_n

where dฮฉnd\Omega_n denotes the angular part. This amounts to an additional factor vv for 2D, v2v^2 for 3D.

f(v)dv=4ฯ€(m2ฯ€kBT)3/2v2expโก(โˆ’mv22kBT)dvf(v) dv = 4\pi \left(\frac{m}{2 \pi k_B T}\right)^{3/2} v^2 \exp\Big(-\frac{m v^2}{2 k_B T}\Big) dv f(v)dv=mkBT,v,expโก(โˆ’mv22kBT)dvf(v) dv = \frac{m}{k_B T} , v , \exp\Big(-\frac{m v^2}{2 k_B T}\Big) dv
  • Factor vnโˆ’1v^{n-1} originates from the velocities with the same speeds (surface of a cirkel/sphere).
  • This is what is used in the code, e.g. value = (v / T) * exp(-v*v / (2 * T)) in 2D.