Crystal Structure Simulator Back
Materials Science Simulator

Crystal Structure Simulator — SC / BCC / FCC / HCP / Diamond

Visualize unit cells and calculate packing fraction, coordination number and lattice constant for five crystal structures. Enter Miller indices to find interplanar spacing and Bragg diffraction angle.

Select Structure
Atomic radius r (Å)
Å
Results
Results
Lattice const. a (Å)
Atoms / unit cell Z
Packing fraction (%)
Coordination no.
2θ (°)
Bragg Condition (Cubic)
hkl:
X-ray wavelength λ (Å)
Å
Calculating...
Crystal
Packing
Theory & Key Formulas
$$2d\sin\theta = n\lambda$$

Cubic interplanar spacing: $d_{hkl}= a/\sqrt{h^2+k^2+l^2}$

What is Crystal Structure & X-ray Diffraction?

🙋
What exactly is a "packing fraction" that the simulator calculates? And why is it different for each structure?
🎓
Basically, it's the fraction of space inside the unit cell that's actually occupied by atoms. Think of it as how efficiently the atoms are stacked. In the simulator, when you change the atomic radius slider, you'll see the spheres grow or shrink, but the cell size adjusts to keep the atoms touching, which directly changes the calculated fraction.
🙋
Wait, really? So the FCC structure is the most "efficient" at 74%? What's happening in the voids of a BCC structure that makes it less packed?
🎓
Exactly. In practice, FCC and HCP are the two closest-packed arrangements. In BCC, the central atom is surrounded by 8 neighbors, but the geometry creates larger empty spaces along the cube diagonals. Try switching between FCC and BCC in the simulator—you can visually see the tighter packing in FCC compared to the more open center in BCC.
🙋
Okay, and the "hkl" and "d-spacing" part? How does that connect to the 3D model I'm looking at?
🎓
Great question. The Miller indices (hkl) describe a specific set of parallel planes cutting through the crystal lattice. The d-spacing is the distance between those planes. For instance, enter (1 1 0) for an FCC crystal. The simulator will highlight those planes and calculate the spacing. This is crucial for X-ray diffraction, which uses Bragg's Law to probe the crystal.

Physical Model & Key Equations

The packing fraction (or atomic packing factor) is the volume occupied by atoms in a unit cell divided by the total volume of the unit cell. For a structure with n atoms per cell, each of radius r:

$$APF = \frac{n \cdot \frac{4}{3}\pi r^3}{a^3}$$

Where a is the lattice constant. The relationship between a and r depends on the structure (e.g., in FCC, atoms touch along the face diagonal, so $a = 2\sqrt{2}r$).

To determine crystal structure experimentally, X-ray diffraction is used. Constructive interference occurs only when Bragg's Law is satisfied, linking the wavelength, plane spacing, and diffraction angle.

$$2d_{hkl}\sin\theta = n\lambda$$

For cubic crystals, the interplanar spacing d for planes (hkl) is calculated from the lattice constant a. This is the formula the simulator uses when you input hkl indices.

$$d_{hkl}= \frac{a}{\sqrt{h^2 + k^2 + l^2}}$$

Frequently Asked Questions

Please check whether the input value of the atomic radius is correct. For SC, the relationship a=2r must hold; for BCC, a=4r/√3; and for FCC, a=4r/√2. It is also important to ensure the units (e.g., Å) are consistent.
Please confirm that the Miller indices (hkl), the lattice constant a, and the X-ray wavelength λ are all entered. Additionally, the (000) plane, where h²+k²+l²=0, does not satisfy the diffraction condition and cannot be calculated. Please enter positive integers.
FCC is a face-centered cubic lattice with a coordination number of 12 and a packing fraction of about 74%. The diamond structure is based on FCC but has an additional 4 atoms placed inside, resulting in a coordination number of 4 and a lower packing fraction of about 34%. The relationship between the lattice constant and atomic radius also differs.
Yes, it is possible. Use the inverse of the relationship between a and r for each structure: for SC, r=a/2; for BCC, r=a√3/4; for FCC, r=a√2/4. However, note that this relationship assumes an ideal state where atoms are in closest contact.

Real-World Applications

Metallurgy & Material Selection: The packing fraction directly influences material properties. FCC metals like copper and aluminum are generally more ductile, which is desirable for forming wires and sheets. BCC metals like tungsten and room-temperature iron are often stronger but less ductile.

X-ray Crystallography: This is the primary method for determining the atomic structure of new materials. By measuring the angles (θ) where diffraction peaks occur (satisfying Bragg's Law), scientists can work backwards to find the d-spacings and ultimately solve the entire crystal structure.

Semiconductor Manufacturing: The diamond cubic structure, with its relatively low packing fraction of ~34%, is the crystal structure of silicon and germanium. The specific arrangement of atoms and the resulting voids are critical for how electrons move, forming the basis of all computer chips.

Alloy Design: Understanding where voids are in a crystal structure (like the octahedral and tetrahedral sites in FCC) is key for designing alloys. For instance, carbon atoms in steel fit into the interstitial sites of iron's BCC lattice, dramatically strengthening the material.

Common Misunderstandings and Points to Note

First, regarding the relationship between "atomic radius r" and "lattice constant a" when using this tool. When you adjust r in the simulator, a changes accordingly. However, this calculation assumes an ideal state where atoms are rigid spheres and are in close contact without gaps. In real materials, this relationship breaks down depending on the nature of the atomic bonding (metallic, covalent, etc.). For example, the "atomic radius" back-calculated from the actual lattice constant of iron (BCC) does not perfectly match the value obtained from this geometric formula $a = 4r / \sqrt{3}$. Keep in mind that the tool is an "ideal model" for understanding the basic principles.

Next, regarding the angle displayed as the "diffraction angle θ" in the Bragg condition calculation. This is the angle between the incident X-ray and the crystal planes (the Bragg angle). A common misunderstanding is confusing this with the "detector position (2θ)". In an actual X-ray diffractometer, the incident angle relative to the sample is θ, and the detector moves to a position of 2θ for measurement. If you set λ=0.154 nm (CuKα radiation), FCC a=0.3615 nm (Al), and hkl=(111) in the tool, it calculates θ≈19.3°. However, in an experimental protocol, you would set this angle as the sample tilt angle and search for the peak with the detector at approximately 38.6°.

Finally, the reason why the "packing fraction" of HCP (hexagonal close-packed structure) is nearly the same as that of FCC, at about 74%. Looking at the 3D models, the atomic arrangements seem completely different, right? The key point to understand here is that the state of "close packing" inherently has the same spatial packing efficiency. The only difference is the stacking sequence: FCC is ABCABC..., while HCP is ABAB... Global properties like packing fraction and coordination number (both 12) remain the same. Try rotating both structures in the tool and observe how the close-packed planes (the {111} planes for FCC, the basal plane for HCP) are connected; you'll get a tangible sense of this "difference in stacking".

How to Use

  1. Select a crystal structure (SC, BCC, FCC, HCP, or Diamond) from the dropdown to visualize its unit cell geometry and atomic arrangement.
  2. Adjust the atomic radius using rSlider (0.5–2.5 Å) to observe packing fraction changes; SC varies 0.52, BCC reaches 0.68, FCC achieves 0.74 maximum packing efficiency.
  3. Enter Miller indices (mh, mk, ml) for any plane—for example (1,1,0) in FCC—and the simulator calculates d-spacing using d = λ / (2 sin θ) for X-ray diffraction analysis.
  4. Use lambdaSlider to set wavelength (0.5–2.5 Å, typical for Cu Kα radiation at 1.54 Å) to simulate Bragg diffraction conditions.

Worked Example

FCC iron (γ-Fe, a = 3.65 Å, atomic radius 1.24 Å): Enter Miller indices (2,0,0) and lambda 1.54 Å. The d-spacing equals 1.825 Å. For (1,1,1) planes, d = 2.108 Å, producing the strong diffraction peak at 2θ ≈ 42.3° used in steel XRD quality control. Diamond (a = 3.57 Å) shows (1,1,1) spacing of 2.06 Å with packing fraction 0.34, illustrating low density despite hardness.

Practical Notes

  1. BCC structures (chromium, tungsten, steel ferrite) pack 68% of space; verify lattice parameter from indexed XRD patterns before materials selection for high-strength applications.
  2. HCP metals (magnesium, titanium, zinc) require c/a ratio input (typically 1.633 for ideal close-packing); non-ideal ratios shift (0002) and (1010) peak positions critically.
  3. Diamond cubic packing (0.34) explains why synthetic diamonds require extreme pressure synthesis; simulate defect planes by entering forbidden reflections to detect stacking faults in semiconductors.