Hexagonal Close-Packed (HCP)

By Google Search AI and Bruce E. Camber

Introduction: The hexagonal close-packed (HCP) structure is one of the most space-efficient ways to arrange identical spheres in three dimensions. [1] Hexagonal Close-Packed (HCP) geometry achieves a maximum spatial packing efficiency of 74% by arranging identical spheres or points in an ABAB… alternating layer sequence. [1, 2] HCP is often compared to FCC (Face-Centered Cubic close packing).

Key Geometric Properties

  • Stacking Sequence: Alternating ABABAB… layers (the first and third layers are identical, while the middle layer nests in the gaps/triangular voids of the layers above and below).
  • Coordination Number: 12 (each atom touches 6 neighbors in its own plane, 3 in the plane above, and 3 in the plane below).
  • Atomic Packing Factor (APF): 0.74 (74% of the total volume is occupied by spheres, leaving 26% empty space).
  • Effective Atoms per Unit Cell: 6 atoms total (calculated as \(12 \times \frac{1}{6}\) from the corners + \(2 \times \frac{1}{2}\) from the top/bottom face centers + \(3\) full atoms in the interior). [1, 2, 3, 4, 5, 6, 7]

Fundamental Geometry of HCP

  • Two-Dimensional (2D) Layer (Layer A):
    • Each sphere touches 6 immediate neighbors in a flat hexagonal grid.
    • Center-to-center distance between any two touching spheres of radius \(r\) is \(d = 2r\) (often labeled as lattice parameter \(a = 2r\)).
    • The gaps between spheres form triangular voids (some pointing up, some pointing down). [1, 2, 3]
  • Three-Dimensional (3D) Stacking (ABAB Sequence):
    • Layer B spheres nestle into one set of triangular depressions in Layer A.
    • Layer C (HCP vs. FCC): In HCP, the third layer repeats the alignment of Layer A (ABABABAB…). (If a third layer shifted into the alternate set of hollows, it becomes FCC/CCP with an ABCABC sequence). [1, 2]
  • Key Metrics:
    • Coordination Number: 12 (6 in the same layer, 3 in the layer directly above, 3 in the layer directly below).
    • Ideal Axial Ratio (\(c/a\)): \(\sqrt{8/3} \approx 1.633\) (where \(c\) is the height of the hexagonal unit cell and \(a\) is the in-plane nearest-neighbor distance).
    • Packing Density (Atomic Packing Factor): 0.74 (74%). [1, 2, 3]
  • aLattice Parameters & Dimensions
  • In-plane parameter (\(a\)): Equal to \(2r\) (where \(r\) is the radius of the sphere/atom), meaning the basal plane side length is \(a = b\).
  • Height parameter (\(c\)): The distance between alternating A-layers.
  • Ideal \(c/a\) Axial Ratio: For an ideal hard-sphere crystal, the ratio is geometrically fixed at:
    \(\frac{c}{a}=\sqrt{\frac{8}{3}}\approx 1.633\)
    (Note: Real metals with HCP structures—such as titanium, magnesium, zinc, and cadmium—frequently deviate slightly from this ideal \(1.633\) ratio).
  • Unit Cell Angles: \(\alpha = \beta = 90^\circ\), \(\gamma = 120^\circ\). [1, 2, 3, 4, 5]

Mathematical Coordinate Generation (Placement Algorithm)

To algorithmically generate the center coordinates \((x, y, z)\) for a set of spheres of radius \(r\) (or diameter \(a = 2r\)) in an HCP arrangement within a 3D bounding space:

Step 1: Generate 2D Hexagonal Coordinates for Layer A (at \(z = 0\))

For row index \(i = 0, 1, 2, \dots\) and column index \(j = 0, 1, 2, \dots\):

  • The spacing along the \(x\)-axis is \(a = 2r\).
  • Alternate rows are shifted along the \(x\)-axis by \(a/2 = r\), and offset along the \(y\)-axis by \(\frac{\sqrt{3}}{2}a = r\sqrt{3}\).
    \(x(i,j)=j\cdot a+\left(i\mod 2\right)\cdot \frac{a}{2}\)
    \(y(i)=i\cdot \left(\frac{\sqrt{3}}{2}a\right)\)
    \(z(0)=r\quad (\text{resting\ on\ the\ base\ plane})\)

Step 2: Stack Layer B (at \(z = c_{\text{layer}}\))

Layer B sits in the interstitial depressions of Layer A. The \(z\)-height increments by the vertical distance between close-packed planes:
\(h=\sqrt{\frac{2}{3}}a\)
The \((x, y)\) coordinates of Layer B are shifted relative to Layer A by moving into the centroid of the triangular voids:
\(x_{\text{B}}(i,j)=x(i,j)+\frac{a}{2}\)
\(y_{\text{B}}(i)=y(i)+\frac{a}{2\sqrt{3}}\)
\(z(1)=z(0)+h\)

Step 3: Repeat Stacking Pattern (ABAB…)

  • For even layers (\(k = 0, 2, 4, \dots\)): use the Layer A coordinate formula with \(z(k) = k \cdot h\).
  • For odd layers (\(k = 1, 3, 5, \dots\)): use the Layer B coordinate formula with \(z(k) = k \cdot h\).

Implementation Logic / Pseudo-Algorithm

text

Input: Radius r, Number of rows N_rows, Number of cols N_cols, Number of layers N_layers
Constants:
a = 2 * r
h = sqrt(2/3) * a
For k from 0 to N_layers - 1:
is_layer_B = (k % 2 == 1)
z_pos = k * h + r
For i from 0 to N_rows - 1:
For j from 0 to N_cols - 1:
x_pos = j * a + (i % 2 == 0 ? 0 : a / 2)
y_pos = i * (sqrt(3)/2 * a)
If is_layer_B:
x_pos += a / 2
y_pos += a / (2 * sqrt(3))
AddSphereCenter(x_pos, y_pos, z_pos)

Use code with caution.

People implementi HCP placement algorithm for a computational simulation (like molecular dynamics or gaming/CAD) Let Google Search AI know directly so they can tailor the code implementation (Python, C++, etc.) to your exact needs.

You can explore further crystallographic details via Britannica or reference guides like Chemistry LibreTexts. [1, 2]

You can also get help from Google Search AI to calculate the unit cell volume or to compare HCP’s geometry to FCC (Face-Centered Cubic).

###