Skip to content

Stacking faults at finite temperature

mdapy.simulation.stacking_fault_free_energy(crystal, potential, direction, temperatures) gives the free energy of a stacking fault per area at each temperature: the difference of the free energies of the crystal with and without it, in one box of the size the crystal has at that temperature and pressure. The energy at rest is the business of stacking_fault_energy.

import numpy as np
from mdapy.build import build_crystal
from mdapy.calculators import LAMMPS
from mdapy.simulation import minimize, stacking_fault_free_energy

potential = LAMMPS(
    "pair_style eam/alloy\npair_coeff * * Cu_mishin1.eam.alloy Cu", elements=["Cu"]
)
a = 3.615
layers = minimize(
    build_crystal(
        "fcc",
        a,
        elements="Cu",
        orientation=[(1, 1, -2), (-1, 1, 0), (1, 1, 1)],
        repeat=(6, 10, 4),
    ),
    potential,
    cell="axes",  # keeps the plane normal to z, whatever the rounding of a potential
    max_stress=1e-3,
).system

result = stacking_fault_free_energy(
    layers,
    potential,
    [a * np.sqrt(6) / 6, 0, 0],  # 1/6 [11-2]
    [230, 460, 690, 920, 1150],
    repeats=8,
)
result.energy, result.error  # J/m²

The fault gets cheaper with the temperature:

from mdapy.visualization import plot

with plot.style():
    fig, ax = plot.figure("single")
    ax.errorbar(
        result.temperatures, 1e3 * result.energy, 1e3 * result.error, fmt="o", capsize=2
    )
    ax.set_xlabel("Temperature (K)")
    ax.set_ylabel(r"Stacking fault energy (mJ/m$^2$)")
    plot.save(fig, "images/stacking-fault-temperature", formats=("png",))

The stacking fault energy of copper with temperature

Copper with the EAM potential of Mishin et al., 1440 atoms and a plane of 684 Ų, 44 mJ/m² at rest. Up to about 500 K the free energy follows the harmonic part, drawn from the phonons of the two cells at the same volumes; above that it falls more slowly: 23 mJ/m² against -5 mJ/m² at 1150 K.

The wider the plane the smaller the error: the error of the free energy of all atoms grows with their square root, the free energy of the fault with the area. The error also grows towards the melting point, where 192 atoms of this copper gave ±33 mJ/m² at 1250 K against ±7 mJ/m² at 1040 K: look at error and dissipation. The crystal must keep its fault during the runs: a slip vector that leads to no minimum of the energy, as a partial in a potential with no stable stacking fault, slides back, and gives something lower than the energy at rest.

Name Type Default Unit Meaning
crystal System the crystal, relaxed, with an element column, periodic in every direction, with the plane of the fault normal to the Cartesian axis of axis, such as fcc with z along [111]
potential LAMMPS the interaction
direction (3,) float64 Å (3,) the slip vector in the plane, such as a/6 [11-2]
temperatures float64 or (T,) float64 K the temperatures
height float64 between the two layers nearest the middle the fault, as a fractional coordinate along the box vector of axis
axis int32 or str z the Cartesian axis normal to the fault
pressure float64 0 GPa the pressure
timestep float64 0.001 ps the time step
equilibration float64 10 ps the time of each equilibration
switching float64 50 ps the time of each switching between the crystal and the springs
repeats int32 4 independent free energies of each crystal at each temperature
max_force float64 1e-4 eV/Å convergence of the relaxation of the fault at each size of the box
max_steps int32 10000 the largest number of steps of each relaxation
seed int32 1 the seed of the random numbers
progress callable None called as progress(done, total) with the steps run
cancel CancelToken None stops the calculation, which raises Cancelled

Results

It returns a FaultFreeEnergyResult; arrays are read-only.

Attribute Type Unit Meaning
temperatures (T,) float64 K the temperatures
energy (T,) float64 J/m² the free energy of the fault per area
error (T,) float64 J/m² its standard error from the repeats; zero for one repeat
area float64 Ų the area of the fault at the first temperature
volume (T,) float64 ų the volume per atom of the crystal
dissipation (T,) float64 eV half the difference of the work there and back per atom, the largest over the runs

Definition

\[ \gamma(T) = \frac{F_\mathrm{fault}(T) - F_\mathrm{crystal}(T)}{A}, \]

where both free energies are those of free_energy for solids, of the same atoms in one box but for the box vector that the fault tilts. Classical atoms, as in molecular dynamics. With the phonons of the two cells, the harmonic part of this difference is cheaper and free of noise, but it gets worse with the temperature.

Errors

stacking_fault_free_energy raises InvalidParameter for invalid options, a plane not normal to the axis, a box not periodic in every direction, or if LAMMPS fails; MissingProperty for a crystal without an element column; Cancelled when cancelled.

Please cite

Frenkel and Ladd (1984) and Freitas et al. (2016) for the free energies; see also Zhang et al. (2018) on stacking faults at high temperature.