Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Solutions · 1. Bravais lattices, metric tensors and packing fractions

School of Engineering, Nazarbayev University

Worked solutions to the three exercises of Lecture 1. Each solution is computed here and checked with assert statements against an exact identity or an independent calculation. The first code cell sets up the notebook and runs Demonstration 1 of the lecture without showing its output, because some of the solutions use its variables.

Exercise 1

Problem. Verify for Ti and Mg HCP cells that dpyr=Δf G Δf⊤d_{\mathrm{pyr}} = \sqrt{\Delta\mathbf{f}\,\mathbf{G}\,\Delta\mathbf{f}^\top} with Δf=(13,23,12)\Delta\mathbf{f} = (\frac{1}{3}, \frac{2}{3}, \frac{1}{2}) matches element_crystal_summary(sym)['d_nn_A'] and a2/3+c2/4\sqrt{a^2/3 + c^2/4} to rounding error.


Exercise 1: Metric-Tensor Bond Length Verification in Non-Orthogonal HCP Coordinates
====================================================================================
Ti: d_metric = 2.89670234 A | d_analytic = 2.89670234 A | d_lib = 2.89670234 A
Mg: d_metric = 3.19711202 A | d_analytic = 3.19711202 A | d_lib = 3.19711202 A

Explanation. Expanding Δf G Δf⊤=19a2+49a2+2(13)(23)(−12a2)+14c2=13a2+14c2\Delta\mathbf{f}\,\mathbf{G}\,\Delta\mathbf{f}^\top = \frac{1}{9}a^2 + \frac{4}{9}a^2 + 2(\frac{1}{3})(\frac{2}{3})(-\frac{1}{2}a^2) + \frac{1}{4}c^2 = \frac{1}{3}a^2 + \frac{1}{4}c^2 shows how G12=−12a2G_{12} = -\frac{1}{2}a^2 automatically accounts for the 120∘120^\circ hexagonal basis angle without Cartesian projection.


Exercise 2

Problem. Demonstrate how transposing non-orthogonal HCP Ti basis vectors (A.T instead of A) corrupts metric_tensor lengths and angles, and verify ValueError guards on coplanar lattice vectors and negative lattice constants.


Exercise 2: Diagnostic Audit of Column-Stacked Basis Bug & Coplanar Lattice Guard
=================================================================================
Correct row-basis    lengths = [2.9508 2.9508 4.6855], angles = [ 90.  90. 120.]
Buggy column-stacked lengths = [3.2991 2.5555 4.6855], angles = [ 90.    90.   116.57]

Explanation. When A\mathbf{A} is not symmetric, A⊤A\mathbf{A}^\top\mathbf{A} computes dot products of Cartesian coordinate columns across the three vectors rather than dot products of the basis vectors themselves, which gives the wrong lengths [3.299,2.556,4.686] A˚[3.299, 2.556, 4.686]\ \mathrm{\AA} and the angle γ=116.57∘\gamma = 116.57^\circ instead of 120∘120^\circ.


Exercise 3

Problem. Implement interstitial_void_radius_ratio(structure, void_frac) via supercell nearest-atom distance and verify the 4 metallurgy ratios: FCC octahedral (2−1\sqrt{2}-1), FCC tetrahedral (3/2−1\sqrt{3/2}-1), BCC octahedral (2/3−12/\sqrt{3}-1), and BCC tetrahedral (5/3−1\sqrt{5/3}-1).


Exercise 3: Implement It Yourself — Octahedral & Tetrahedral Interstitial Void Ratios
=====================================================================================
FCC Octahedral   | r_void / R_host = 0.414214 vs exact = 0.414214
FCC Tetrahedral  | r_void / R_host = 0.224745 vs exact = 0.224745
BCC Octahedral   | r_void / R_host = 0.154701 vs exact = 0.154701
BCC Tetrahedral  | r_void / R_host = 0.290994 vs exact = 0.290994

Summary. Even though FCC is more densely packed overall than BCC (0.7405 vs. 0.6802), FCC concentrates its free volume into generous octahedral voids (rvoid/R=0.4142r_{\mathrm{void}}/R = 0.4142) whereas BCC disperses free volume into cramped octahedral (0.1547) and tetrahedral (0.2910) sites, explaining why FCC austenite dissolves up to 2.14 wt%2.14\ \mathrm{wt\%} carbon while BCC ferrite dissolves barely 0.022 wt%0.022\ \mathrm{wt\%}.