Phase transitions

Phase transitions: phases of matter, PV diagrams, isotherms (ideal gas law & van der Waals), critical temperature, Maxwell’s construction, latent heat (converting ice into steam).
For more related figures, please see the Thermodynamics category.

phase_transitions-001.pngphase_transitions-002.pngphase_transitions-003.pngphase_transitions-004.pngphase_transitions-005.pngphase_transitions-006.pngphase_transitions-007.png

Edit and compile if you like:

% Author: Izaak Neutelings (June, 2018)
\documentclass[border=3pt,tikz]{standalone}
\usepackage{ifthen}
\usepackage{siunitx}
\usepackage{tikz}
\usetikzlibrary{hobby} % for ..
\usetikzlibrary{arrows.meta} % to control arrow size
\tikzset{>={Latex[length=4,width=4]}} % for LaTeX arrow head
\usetikzlibrary{calc,intersections,decorations.markings}
\usepackage{siunitx}
\usepackage{xcolor} % for colored text
\colorlet{mylightblue}{blue!20}
\colorlet{myblue}{blue!50!black}
\colorlet{mydarkblue}{blue!30!black}
\colorlet{mylightred}{red!10}
\colorlet{myred}{red!50!black}
\colorlet{mydarkred}{red!60!black}
\colorlet{mydarkgreen}{green!30!black}
%\tikzstyle{midarr}=[decoration={markings,mark=at position 0.5 with {\arrow{stealth}}},postaction={decorate}]
\tikzset{
midarr/.style={decoration={markings,mark=at position #1 with {\arrow{stealth}}},postaction={decorate}},
midarr/.default=0.5
}
\def\tick#1#2{\draw[thick] (#1) ++ (#2:0.03*\ymax) --++ (#2-180:0.06*\ymax)}
\begin{document}
% PHASE TRANSITIONS
\begin{tikzpicture}[arrow/.style={->,thick,mydarkblue,shorten <=2,shorten >=2},
box/.style={thick,rounded corners=4,inner xsep=6,inner ysep=3}]
\message{Phase transitions^^J}
\node[blue!10!white,draw=mydarkblue,fill=blue!50!gray!80!black,box] (S) at (-2.4,0) {\strut solid};
\node[blue!10!white,draw=mydarkblue,fill=blue!80!white,box] (L) at (2.4,0) {\strut liquid};
\node[blue!20!black,draw=mydarkblue,fill=blue!20!white,box] (G) at (0,2) {\strut gas};
\draw[arrow,->] (S.8) -- (L.173) node[above,midway,scale=0.9] {melt};
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Click to download: phase_transitions.texphase_transitions.pdf
Open in Overleaf: phase_transitions.tex

5 Replies to “Phase transitions”

  1. Hello,

    in the heating curve plot, I saw the following:

    \coordinate (Ex) at ($(EI-O)$); % x evaporation
    \coordinate (Ey) at ($(E-IO)$); % y evaporation

    I couldn’t find in the documentation what the EI-O and the E-IO do to the coordinates. Would you be able to explain briefly? I studied the output, but could not make sense of what the question is doing.

    Thank you,

    J.

    1. Hi,

      It is explained in Section 13.3 in the manual, have a look here:
      https://tikz.dev/tikz-coordinates#tikz-lib-calc

      Maybe it’s more clear from this simple example:

      \documentclass[border=3pt,tikz]{standalone}
      \tikzset{>=latex} % for LaTeX arrow head
      \usepackage{xcolor}
      \colorlet{mygreen}{green!80!black}
      \begin{document}
      % PROJECT COORDINATES
      \begin{tikzpicture}[scale=0.8]
      \draw[black!40,step=0.5] (0,0) grid (4,3);
      \draw[->,thick] (0,0) -- (4.5,0); % x axis
      \draw[->,thick] (0,0) -- (0,3.5); % y axis
      \fill[black] (0,0) coordinate(O) circle(2pt) node[below left] {$O$};
      \fill[mygreen] (3,2) coordinate(R) circle(2pt) node[above right] {$R$};
      \fill[blue] (R|-O) coordinate(X) circle(2pt) node[below] {$X$}; % project on horizontal line through O
      \fill[red] (R-|O) coordinate(Y) circle(2pt) node[left] {$Y$}; % project on vertical line through O
      \draw[->,thick,mygreen] (R) -- (X);
      \draw[->,thick,red] (R) -- (Y);
      \end{tikzpicture}
      % PROJECT LINES
      \begin{tikzpicture}[scale=0.8]
      \draw[black!40,step=0.5] (0,0) grid (4,3);
      \draw[->,thick] (0,0) -- (4.5,0); % x axis
      \draw[->,thick] (0,0) -- (0,3.5); % y axis
      \fill[black] (0,0) coordinate(O) circle(2pt) node[below left] {$O$};
      \fill[mygreen] (3,2) coordinate(A) circle(2pt) node[above right] {$A$};
      \fill[blue] (1,1) coordinate(B) circle(2pt) node[above right] {$B$};
      \draw[->,thick,mygreen] (A) -| (B); % horizontal, then vertical
      \draw[->,thick,blue] (A) |- (B); % vertical, then horizontal
      \end{tikzpicture}
      \end{document}
      הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      Basically (R|-O) projects the (R) coordinate onto a horizontal line line through (O), while (R|-O) projects (R) onto a vertical line line through (O). I do not think the dollar signs are actually needed in this case (they are syntax for the calc library to operate on coordinates, like subtraction, addition, scaling, interpolation, etc.).

      In the second example, you see that you can also use |- and -| to draw a line with a 90° angle between two coordinates: -| is “horizontal, then vertical”, |- is “vertical, then horizontal”.

      Cheers,

      Izaak

  2. Hi everyone,

    Could someone assist me with creating a T-V thermodynamic diagram using TikZ? I would like the diagram to include the following elements:

    Isocoric Lines (constant volume lines)
    Isobaric Lines (constant pressure lines)
    Shaded regions to represent the liquid phase, saturated phase, and vapor phase.
    I can provide a reference image for clarity if needed.

    Thank you for your help!

    Best regards,

Leave a Reply

Your email address will not be published.