« home

Ferroelectric Response

Creator: Stefan Bringuier

materials sciencesolid state physicsthermodynamicscetztikz

Schematic representation of ferroelectric response for BaTiO3 depicting the double-well free energy potential and polarization plots. The figure illustrates the movement of the Titanium atom within the crystal lattice as it shifts between two stable positions, corresponding to minima in the free energy curve. This Titanium displacement results in a large change in the material's polarization.


Ferroelectric Response

  Download

PNGPDF

  Code

  LaTeX

ferroelectric-response.tex (149 lines)

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepgfplotslibrary{groupplots}
\usetikzlibrary{fadings,shadings,calc}

% Shape rendering specs
\pgfdeclareradialshading{atomshade}{\pgfpoint{0cm}{0cm}}{%
    color(0cm)=(pgftransparent!0);
    color(0.2cm)=(pgftransparent!20);
    color(0.5cm)=(pgftransparent!50);
    color(0.7cm)=(pgftransparent!70);
    color(1cm)=(pgftransparent!100)%
}

\tikzset{
    atom/.style={circle, shading=atomshade, minimum size=0.4cm},
    bond/.style={
        line width=0.5mm,
        shading=axis,
        color=black, %Change to #1 to specify bond color
        shading angle=45
    }
}

% Define BaTiO3 (#221) unit cell projection
\newcommand{\DrawUnitCell}[1]{%
    \begin{tikzpicture}[scale=1.5]
    % Draw the unit cell
    \draw[thick] (0,0,0) -- (1,0,0) -- (1,1,0) -- (0,1,0) -- cycle; % Bottom face
    \draw[thick] (0,0,1) -- (1,0,1) -- (1,1,1) -- (0,1,1) -- cycle; % Top face
    \draw[thick] (0,0,0) -- (0,0,1);
    \draw[thick] (1,0,0) -- (1,0,1);
    \draw[thick] (1,1,0) -- (1,1,1);
    \draw[thick] (0,1,0) -- (0,1,1);

    % Draw lines connect Oxygen to Titanium
    \begin{scope}
        \ifnum \pdfstrcmp{#1}{0.5} < 0
            % Connect bottom 4 oxygens to Ti
            \draw[bond=red] (0,0.5,0.5) -- ($(0,0.5,0.5)!0.5!(0.5,#1,0.5)$);
            \draw[bond=gray] ($(0,0.5,0.5)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
            \draw[bond=red] (1,0.5,0.5) -- ($(1,0.5,0.5)!0.5!(0.5,#1,0.5)$);
            \draw[bond=gray] ($(1,0.5,0.5)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
            \draw[bond=red] (0.5,0,0.5) -- ($(0.5,0,0.5)!0.5!(0.5,#1,0.5)$);
            \draw[bond=gray] ($(0.5,0,0.5)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
            \draw[bond=red] (0.5,0.5,0) -- ($(0.5,0.5,0)!0.5!(0.5,#1,0.5)$);
            \draw[bond=gray] ($(0.5,0.5,0)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
            \draw[bond=red] (0.5,0.5,1) -- ($(0.5,0.5,1)!0.5!(0.5,#1,0.5)$);
            \draw[bond=gray] ($(0.5,0.5,1)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
        \else
            \ifnum \pdfstrcmp{#1}{0.5} > 0
                % Connect top 4 oxygens to Ti
                \draw[bond=red] (0,0.5,0.5) -- ($(0,0.5,0.5)!0.5!(0.5,#1,0.5)$);
                \draw[bond=gray] ($(0,0.5,0.5)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
                \draw[bond=red] (1,0.5,0.5) -- ($(1,0.5,0.5)!0.5!(0.5,#1,0.5)$);
                \draw[bond=gray] ($(1,0.5,0.5)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
                \draw[bond=red] (0.5,1,0.5) -- ($(0.5,1,0.5)!0.5!(0.5,#1,0.5)$);
                \draw[bond=gray] ($(0.5,1,0.5)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
                \draw[bond=red] (0.5,0.5,1) -- ($(0.5,0.5,1)!0.5!(0.5,#1,0.5)$);
                \draw[bond=gray] ($(0.5,0.5,1)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
            \else
                % Connect 8 oxygens to form octahedron
                \draw[bond=red] (0,0.5,0.5) -- (1,0.5,0.5);
                \draw[bond=red] (0.5,0,0.5) -- (0.5,1,0.5);
                \draw[bond=red] (0.5,0.5,0) -- (0.5,0.5,1);
            \fi
        \fi
    \end{scope}

    % Draw the Oxygen atoms (Red) (back perspective)
    \node[atom, anchor=center,ball color=red] at (0,0.5,0.5) {};
    \node[atom, anchor=center,ball color=red] at (0.5,0,0.5) {};
    \node[atom, anchor=center,ball color=red] at (0.5,0.5,0.0) {};

    % Draw the Barium atoms (Cyan)
    \node[atom, anchor=center,ball color=cyan] at (0,0,0) {};
    \node[atom, anchor=center,ball color=cyan] at (1,0,0) {};
    \node[atom, anchor=center,ball color=cyan] at (0,1,0) {};
    \node[atom, anchor=center,ball color=cyan] at (1,1,0) {};
    \node[atom, anchor=center,ball color=cyan] at (0,0,1) {};
    \node[atom, anchor=center,ball color=cyan] at (1,0,1) {};
    \node[atom, anchor=center,ball color=cyan] at (0,1,1) {};
    \node[atom, anchor=center,ball color=cyan] at (1,1,1) {};

    % Titanium atom (Gray)
    \node[atom, anchor=center,ball color=gray, minimum size=0.25cm] at (0.5,#1,0.5) {};

    % Draw the Oxygen atoms (red) (front perspective)
    \node[atom, anchor=center,ball color=red] at (0.5,1,0.5) {};
    \node[atom, anchor=center,ball color=red] at (1,0.5,0.5) {};
    \node[atom, anchor=center,ball color=red] at (0.5,0.5,1) {};

    \end{tikzpicture}%
}

\begin{document}
\begin{tikzpicture}[scale=0.8]
    % Define top and bottom plots
    \begin{groupplot}[
        group style={group size=1 by 2, vertical sep=0pt},
        width=10cm,
        height=6cm,
        xtick=\empty,
        ytick=\empty,
        axis lines*=box,
        enlargelimits=false,
        xmin=-2.5, xmax=2.5,
        axis line style={very thick},
    ]
        % Double-well free energy potential
        \nextgroupplot[
            ylabel={Free Energy},
            ylabel style={rotate=0},
            ymin=0, ymax=3.5,
            xlabel={}, % Remove x-axis label from top plot
            tick style={draw=none},
        ]
        \addplot[domain=-2.5:2.5, samples=100, very thick] {0.5*(\x^4-4*\x^2+4)};

        % Polarization vs. displacement
        \nextgroupplot[
            ylabel={Polarization},
            ylabel style={rotate=-90},
            ymin=-2.5, ymax=2.5,
            xlabel={Ti Displacement},
            xlabel shift={-10pt},
            xlabel near ticks,
            ylabel near ticks,
            xtick={-2.25, 2.25},
            xticklabels={negative, positive},
            tick style={draw=none},
        ]
        % Additional axes through origin
        \draw[black!50, thick] (axis cs:0,-2.475) -- (axis cs:0,2.475);
        \draw[black!50, thick] (axis cs:-2.49,0) -- (axis cs:2.49,0);

        % Polarization line
        \addplot[domain=-2.5:2.5, samples=2, blue, very thick] {\x};
    \end{groupplot}

    % Overlay the unit cells manually
    \node[anchor=center] at (1.75,3.5) {\scalebox{0.5}{\DrawUnitCell{0.3}}};
    \node[anchor=center] at (4.25,3.5) {\scalebox{0.5}{\DrawUnitCell{0.5}}};
    \node[anchor=center] at (6.75,3.5) {\scalebox{0.5}{\DrawUnitCell{0.7}}};
\end{tikzpicture}
\end{document}

  Typst

ferroelectric-response.typ (243 lines)

#import "@preview/cetz:0.3.4": canvas, draw
#import draw: rect, line, circle, content, hobby, scale, set-origin

#set page(width: auto, height: auto, margin: 8pt)

#canvas({
  let arrow-style = (mark: (end: "stealth", fill: black, scale: .75))
  let plot-height = 4
  let plot-width = 10
  let y-offset = 4.5

  // Helper to draw axes
  let draw-axes(origin, width, height) = {
    line(
      (origin.at(0) - 0.3, origin.at(1)),
      (origin.at(0) + width, origin.at(1)),
      ..arrow-style,
      name: "x-axis",
    )
    line(
      (origin.at(0), origin.at(1) - 0.3),
      (origin.at(0), origin.at(1) + height),
      ..arrow-style,
      name: "y-axis",
    )
  }

  // Top plot: Double-well potential
  let top-origin = (-5, y-offset)
  draw-axes(top-origin, plot-width, plot-height)

  // Draw double-well potential curve using hobby spline
  hobby(
    (top-origin.at(0) + .5, top-origin.at(1) + 4), // start high
    (top-origin.at(0) + 1.7, top-origin.at(1) + 0.4), // left minimum
    (top-origin.at(0) + 1.8, top-origin.at(1) + 0.3), // left minimum
    (top-origin.at(0) + 5, top-origin.at(1) + 1.5), // up to middle peak
    (top-origin.at(0) + 8.2, top-origin.at(1) + 0.3), // right minimum
    (top-origin.at(0) + 8.3, top-origin.at(1) + 0.4), // right minimum
    (top-origin.at(0) + 9.5, top-origin.at(1) + 4), // up high again
    omega: 0,
    name: "potential-curve",
    stroke: 1.5pt,
  )

  // Add "Free Energy" label
  content(
    "y-axis.mid",
    [Free Energy],
    angle: 90deg,
    anchor: "south",
    padding: (0, 0, 2pt),
  )

  // Bottom plot: Polarization vs. displacement
  let bottom-origin = (-5, 0)
  draw-axes(bottom-origin, plot-width, plot-height)

  // zero lines
  line(
    (bottom-origin.at(0), bottom-origin.at(1) + plot-height / 2),
    (bottom-origin.at(0) + plot-width, bottom-origin.at(1) + plot-height / 2),
    stroke: gray + 0.5pt,
  )
  line(
    (bottom-origin.at(0) + plot-width / 2, bottom-origin.at(1)),
    (bottom-origin.at(0) + plot-width / 2, bottom-origin.at(1) + plot-height),
    stroke: gray + 0.5pt,
  )

  // Add x-axis labels
  content(
    (bottom-origin.at(0), bottom-origin.at(1)),
    [negative],
    anchor: "north-west",
    padding: (4pt, 2pt, 0),
    name: "neg-label",
  )
  content(
    (bottom-origin.at(0) + 8.5, bottom-origin.at(1)),
    [positive],
    anchor: "north-west",
    padding: (4pt, 2pt, 0),
    name: "pos-label",
  )

  // Draw linear polarization line
  line(
    (bottom-origin.at(0), bottom-origin.at(1)),
    (bottom-origin.at(0) + plot-width, bottom-origin.at(1) + plot-height),
    stroke: blue + 1.5pt,
    name: "polarization-line",
  )

  // Add "Polarization" and "Ti Displacement" labels
  content(
    "y-axis.mid",
    [Polarization],
    angle: 90deg,
    anchor: "south",
    padding: 4pt,
  )
  content(
    "x-axis.mid",
    [Ti Displacement],
    anchor: "north",
    padding: (10pt, 0, 0),
  )

  // Helper function to draw BaTiO3 unit cell
  let atom(pos, radius: 0.20, fill: luma(50), ..args) = {
    circle(
      pos,
      radius: radius,
      stroke: none,
      fill: fill,
      ..args
    )
    circle(
      (),
      radius: radius,
      stroke: none,
      fill: gradient.radial(
        fill.lighten(75%), fill, fill.darken(15%),
        focal-center: (30%, 25%),
        focal-radius: 5%,
        center: (35%, 30%),
      ),
    )
  }
  let draw-unit-cell(center-x, center-y, ti-y, cell-name) = {
    let (x, y) = (center-x, center-y)
    let z-offset = -1.0 // Consistent offset for back face
    let cube-style = (stroke: 0.7pt)


    // Draw unit cell cube with consistent offsets
    rect(
      (x - 1, y - 1, 0),
      (x + 1, y + 1, 0),
      ..cube-style,
      name: cell-name + "-front",
    ) // Front face
    line(
      (x - 1, y - 1, 0),
      (x - 1, y - 1, z-offset),
      ..cube-style,
      name: cell-name + "-left",
    ) // Left edge
    line(
      (x + 1, y - 1, 0),
      (x + 1, y - 1, z-offset),
      ..cube-style,
      name: cell-name + "-right",
    ) // Right edge
    line(
      (x - 1, y - 1, z-offset),
      (x + 1, y - 1, z-offset),
      ..cube-style,
      name: cell-name + "-back",
    ) // Back edge
    line(
      (x - 1, y + 1, z-offset),
      (x + 1, y + 1, z-offset),
      ..cube-style,
      name: cell-name + "-top-back",
    ) // Top back edge
    line(
      (x - 1, y - 1, z-offset),
      (x - 1, y + 1, z-offset),
      ..cube-style,
      name: cell-name + "-left-back",
    ) // Left back edge
    line(
      (x + 1, y - 1, z-offset),
      (x + 1, y + 1, z-offset),
      ..cube-style,
      name: cell-name + "-right-back",
    ) // Right back edge
    line(
      (x + 1, y - -1),
      (x + 1, y - -1, z-offset),
      ..cube-style,
      name: cell-name + "top-right",
    ) // top right edge
    line(
      (x + -1, y - -1),
      (x + -1, y - -1, z-offset),
      ..cube-style,
      name: cell-name + "top-left",
    ) // top right edge

    // Define helper functions for each atom style
    let Ba-atom(pos, name) = atom(pos, fill: rgb("#00ffff"), name: cell-name + "-ba-" + name)
    let O-atom(pos, name) = atom( pos, fill: red, name: cell-name + "-o-" + name)
    let Ti-atom(pos) = atom( pos, fill: gray, name: cell-name + "-ti")
    let Ti-O-bond(end-pos, name) = line(
      ((x, y + ti-y, z-offset/2), 15%, end-pos),
      ((x, y + ti-y, z-offset/2), 85%, end-pos),
      stroke: 1pt,
      name: cell-name + "-bond-" + name,
    )

    // --- Back Plane (z = z-offset) ---
    Ba-atom((x - 1, y - 1, z-offset), "back-bl")
    Ba-atom((x + 1, y - 1, z-offset), "back-br")
    Ba-atom((x - 1, y + 1, z-offset), "back-tl")
    Ba-atom((x + 1, y + 1, z-offset), "back-tr")
    O-atom((x, y, z-offset), "back")
    Ti-O-bond((x, y, z-offset), "back")

    // --- Middle Plane (z = z-offset/2) ---
    if ti-y >= 0 {
      Ti-O-bond((x, y + 1, z-offset/2), "top")
    }
    if ti-y <= 0 {
      Ti-O-bond((x, y - 1, z-offset/2), "bottom")
    }
    Ti-O-bond((x - 1, y, z-offset/2), "left")
    Ti-O-bond((x + 1, y, z-offset/2), "right")
    O-atom((x, y + 1, z-offset/2), "top")
    O-atom((x, y - 1, z-offset/2), "bottom")
    O-atom((x - 1, y, z-offset/2), "left")
    O-atom((x + 1, y, z-offset/2), "right")
    Ti-atom((x, y + ti-y, z-offset/2))

    // --- Front Plane (z = 0) ---
    Ti-O-bond((x, y, 0), "front")
    Ba-atom((x - 1, y - 1, 0), "front-bl")
    Ba-atom((x + 1, y - 1, 0), "front-br")
    Ba-atom((x - 1, y + 1, 0), "front-tl")
    Ba-atom((x + 1, y + 1, 0), "front-tr")
    O-atom((x, y, 0), "front")
  }

  // Draw three unit cells with different Ti displacements
  scale(0.64)
  set-origin("potential-curve.mid")
  draw-unit-cell(-4.5, 2, -0.2, "cell1")
  draw-unit-cell(-0.5, 2, 0, "cell2")
  draw-unit-cell(3.5, 2, 0.2, "cell3")
})