Gas Pressure on a Wall

Convolution operator. Adapted from


Edit and compile if you like:

% Exercise illustration: Compute the pressure of an ideal gas in three dimensions upon a wall at $x = 0$ that attracts molecules at large distance and repels them at smaller distance. Let the force be given by the potential $U(x) = -A \, e^{-\alpha x} + B \, e^{-2 \alpha x}$, with $A,B > 0$.

\documentclass[tikz,border={0 1}]{standalone}



  % Axes
  \draw[->] (\xmin,0) -- (\xmax+0.2,0) node[right] {$x$};
  \draw[->] (0,\ymin) -- (0,\ymax) node[above] {$U(x)$};

  % Potential
  \def\U{-\A*e^(-\a*\x) + \B*e^(-2*\a*\x)}
  \draw[domain=\wall:\xmax,smooth,samples=100,blue] plot ({\x},{\U}) node [below left] {$\frac{1}{\alpha} \approx \ell$};
  \draw[domain=\wall:\xmax,smooth,samples=100,orange] plot ({\x},{\U}) node [above left] {$\frac{1}{\alpha} \ll \ell$};

  % Wall
  \draw[pattern=north east lines] (0,0) rectangle (\wall,\ymax-0.2);


Click to download: wall.tex
Open in Overleaf: wall.tex
This file is available on and on GitHub and is MIT licensed.
See more on the author page of Janosh Riebesell..

Leave a Reply

Your email address will not be published.