Maxwell-Boltzmann distribution

maxwell-boltzmann-001.pngmaxwell-boltzmann-002.png

Edit and compile if you like:

% Author: Izaak Neutelings (March, 2017)
\documentclass[border=3pt,tikz]{standalone} %[dvipsnames]
\usepackage{amsmath} % for \dfrac
\usepackage{siunitx,physics}
\usepackage{tikz}
\tikzset{>=latex} % for LaTeX arrow head
\usepackage{pgfplots} % for the axis environment
%\usepackage[outline]{contour} % halo around text
%\contourlength{1.2pt}
\usepackage{xcolor}
\colorlet{mygreen}{green!60!black}
\colorlet{myblue}{blue!70!black}
\colorlet{myred}{red!70!black}
\tikzstyle{rline}=[myred,thick]
\tikzstyle{bline}=[myblue,thick]
\tikzstyle{gline}=[mygreen,thick]
\pgfplotsset{compat=1.13} % TikZ coordinates <-> axes coordinates
%\pgfplotsset{compat=1.17}
\colorlet{mydarkblue}{blue!30!black}
\def\N{50}
% H2: 4u/2k = 4*1.66*10^(-27)/(2*1.38*10^(-23)) = 0.00024
% O2: 32u/2k = 32*1.66*10^(-27)/(2*1.38*10^(-23)) = 0.00192
% 4/sqrt(pi)
%\def\k{0.00024}
\pgfmathdeclarefunction{maxwell}{2}{%
\pgfmathparse{4/sqrt(pi)*(\k/#2)^(3/2)*(#1^2)*exp(-\k*(#1^2)/#2)}%
}
\def\maxwell#1#2{4/sqrt(pi)*(\k/#2)^(3/2)*((\xscale*#1)^2)*exp(-((\xscale*#1)^2)*(\k/#2))}
%\def\vmax#1{sqrt(#1/\k)/\xscale}
\def\tick#1#2{\draw[thick] (#1) ++ (#2:0.03*\ymax) --++ (#2-180:0.06*\ymax)}
\begin{document}
% MAXWELL-BOLTZMANN different temperatures
\begin{tikzpicture}
\def\xmax{6.0}
\def\ymax{4.0}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Click to download: maxwell-boltzmann.texmaxwell-boltzmann.pdf
Open in Overleaf: maxwell-boltzmann.tex

Leave a Reply

Your email address will not be published.