% !TEX encoding = UTF-8 Unicode
% J.Roussel
% Ce document regroupe les codes TIKZ des figures utilisées pour le cours "Le gaz parfait" situé à la page http://femto-physique.fr/physique_statistique/phystat_C3.php
\documentclass[11pt]{article}
\input{styles_phystat}
\title{Figures TIKZ du cours "Le gaz parfait"}
\begin{document}
%------ FIG : Calcul de ztr ------
\begin{tikzpicture}[scale=1]
\begin{axis}[
grid=major,
axis lines=middle,% bottom,top
inner axis line style={=>},
xlabel={$n$},
ylabel={$y$},
ymin=0,
ymax=1.3,
xmin=0,
xmax=100,]
\addplot+[mark=none,ybar interval,fill=blue!20!white,domain=0:20,samples=20]{exp(-(x+1)*(x+1)/1000)};
\addlegendentry{$\sum_{n=1}^{20} \mathrm{e}^{-\alpha n^2}$}
\addplot+[mark=none,domain=0:100,samples=100]{exp(-x*x/1000)};
\addlegendentry{$\mathrm{e}^{-\alpha n^2}$}
\end{axis}
\end{tikzpicture}
% ---- Evolution de Cv_rot en fonction de la température lorsque l'on tient compte des niveaux de rotation.-
\begin{tikzpicture} [scale=0.8]
\begin{axis}[
title={$C_{\rm v,m}=f(T/\Theta_{\rm rot})$},
grid=major,
xlabel={$T/\Theta_{\rm rot}$},
ymin=1,
ymax=3,
xmin=0,
xmax=4,
ytick={1.5,2.5},
yticklabels={$3/2R$,$5/2R$},
]
\addplot+[mark=none,smooth] table[x=T,y=cv] {simu/Cv_rot.txt};
\end{axis}
\end{tikzpicture}
%Évolution de la capacité thermique du di-hydrogène deutéré ($\mathrm{HD}_{\rm gaz}$)
\begin{tikzpicture} [scale=1]
\begin{semilogxaxis}[
grid=major,
xlabel={$T$ en K},
ylabel={$C_{\rm v,m}$},
ymin=1,
ymax=4,
xmin=5,
xmax=11000,
ytick={1.5,2.5,3.5},
yticklabels={$3/2R$,$5/2R$,$7/2R$},
extra x ticks={20},
extra x tick label={$T_{\rm eb}$},
]
\addplot+[mark=none,smooth,] table[x=T,y=cv] {simu/GP_HD.txt};
\end{semilogxaxis}
\end{tikzpicture}
% Évolution du coefficient $\gamma$ du di-hydrogène deutéré ($\mathrm{HD}_{\rm gaz}$) avec la température.
\begin{tikzpicture} [scale=1]
\begin{semilogxaxis}[
axis lines=middle,% bottom,top
inner axis line style={=>},
width=10cm,
height=4cm,
grid=major,
xlabel={$T$ en K},
ylabel={$\gamma$},
ymin=1,
ymax=1.8,
xmin=5,
xmax=11000,
ytick={1.6667,1.4,1.286},
yticklabels={5/3,7/5,9/7},
extra x ticks={20},
extra x tick label={$T_{\rm eb}$},
]
\addplot+[mark=none,smooth,] table[x=T,y=gamma] {simu/GP_HD.txt};
\end{semilogxaxis}
\end{tikzpicture}
% Espace des états : chaque état atomique est représenté par un n\oe ud du réseau.
\begin{tikzpicture} [scale=1]
\pgfplotsset{tick label style={ font=\tiny}};% this modifies the ‘every tick label’ style
\begin{axis}[
view={115}{25},
width=240pt,
height=240pt,
grid=major,
z buffer=sort,
xmin=0,
xmax=11,
ymin=0,
ymax=11,
zmin=0,
zmax=13,
xlabel={$n_{x}$},
ylabel={$n_{y}$},
xtick={1,2,3,4,6,8},
ytick={1,2,3,4,6,8},
ztick={1,2,3,4,6,8,10},
zlabel={$n_{z}$}
]
\draw[->,thick] (axis cs:0,0,0)-- (axis cs:1,7,7)node[right]{1 $\mu$-\'etat};
\addplot3[only marks,mark=*,mark size=1,SkyBlue]table {simu/EspaceDesEtats.dat};
\addplot3+[black,mark=none,domain=0:100,samples=25,samples y=0, z buffer=none]({sqrt(x)}, {0}, {sqrt(100-x)});
\addplot3+[black,mark=none,domain=0:100,samples=25,samples y=0, z buffer=none](0,{sqrt(x)}, {sqrt(100-x)});
\addplot3+[black,mark=none,domain=0:100,samples=25,samples y=0, z buffer=none]({sqrt(x)}, {sqrt(100-x)},{0});
\draw[<-](axis cs:0,6,8)--(axis cs:0,5,10)node[above]{\footnotesize $n_{x}^{2}+n_{y}^{2}+n_{z}^{2}=C^{te}$};
\draw[black](axis cs:0,0,1)--(axis cs:1,0,1)--(axis cs:1,1,1)--(axis cs:0,1,1)--(axis cs:0,0,1)--(axis cs:0,0,0)--(axis cs:1,0,0)--(axis cs:1,1,0)--(axis cs:0,1,0)--(axis cs:0,0,0);
\draw[black](axis cs:1,0,1)--(axis cs:1,0,0);
\draw[black](axis cs:1,1,1)--(axis cs:1,1,0);
\draw[black](axis cs:0,1,1)--(axis cs:0,1,0);
\end{axis}
\end{tikzpicture}
% Distribution des vitesses dans un gaz. Lorsque la température est multipliée par quatre, la vitesse la plus probable est multipliée par deux.}
\begin{tikzpicture} [scale=1]
\begin{axis}[
% scale only axis,
%grid=major,
axis lines=middle,% bottom,top
inner axis line style={=>},
xlabel={$v$},
ylabel={$\frac{\mathrm{d}P}{\mathrm{d}v}$},
ymin=0,
ymax=1,
xmin=0,
xmax=5,
ytick=\empty,
xtick=\empty,
xtick={1,2},
xticklabels={$\tilde v_1$,$\tilde v_2$},
]
\addplot+[mark=none,domain=0:5,samples=25,smooth]{4/sqrt(3.14)*x*x*exp(-x*x)};
\addlegendentry{$T=T_1$};
\addplot+[mark=none,domain=0:5,samples=25,smooth]{0.5/sqrt(3.14)*x^2*exp(-(x/2)^2)};
\addlegendentry{$T=4T_1$};
\draw[dashed, gray] (axis cs:1,0)--(axis cs:1,0.83);
\draw[dashed, gray] (axis cs:2,0)--(axis cs:2,0.41);
\end{axis}
\end{tikzpicture}
% interprétation de la pression
\begin{tikzpicture} [scale=1]
\draw (0,2) node{gaz \qquad paroi};
\draw[ultra thick] (0,-2)--++(0,4);
\draw[ultra thick,color=blue!20!white] (0,-0.5)--++(0,1)node[color=black,midway,right]{d$S$};
\draw (0,-0.5)--++(-3,-1)--++(0,1)--++(3,1);
\draw[->](-2.5,-0.5)--++(2.5,{5/6})--++(-1.5,0.5);
\draw[vecteur](-2.5,-0.5)--++(0.6,0.2)node[midway,below]{$\overrightarrow{v}$};
\draw[thin,ball color=white] (-2.5,-0.5) circle(3pt);
\draw[->,shift={(0.5,-2)}] (0,0) -- (1,0) node[above=2pt] {$x$};
\draw[->,shift={(0.5,-2)}] (0,0) -- (0,1) node[below right] {$y$};
\draw[dashed,<->] (0,-0.75)--++(-3,-1)node[midway,fill=white]{\small $v\,\mathrm{d}t$};
\draw[dashed,<->] (-3,-1.75)--++(3,0)node[midway,fill=white]{\small $v_{x}\,\mathrm{d}t$};
\end{tikzpicture}
\end{document}