christoffel
Sound velocities, from either end.
An elastic tensor and a set of force constants describe the same physics in the long-wavelength limit, and they are computed by completely different routes -- one from stresses under finite strain, the other from forces under finite displacement in a supercell. Where they must agree is the slope of the acoustic branches:
- From elasticity, the Christoffel equation
det|C_ijkl n_j n_l - rho v^2 delta_ik| = 0gives three velocities along a directionn. - From lattice dynamics,
omega(q) / |k|asq -> 0along the same direction gives the same three.
That makes this the sharpest available test of a force-constant calculation, and in particular of the two parts of it that are easy to get subtly wrong: the supercell bookkeeping and the multiplicity weights in the phase sum. Both show up as acoustic branches with the wrong slope, and nothing else about the calculation looks amiss when they do.
christoffel_velocities(c_voigt, density, direction)
The three acoustic velocities along a direction, from elastic constants.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
c_voigt
|
(6, 6) elastic constants in GPa |
required | |
density
|
kg/m^3 |
required | |
direction
|
(3,) propagation direction, normalised internally |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
(3,) velocities in m/s, ascending -- two quasi-transverse and one |
ndarray
|
quasi-longitudinal for a general direction |
Source code in chmpy/vib/christoffel.py
compare_with_elastic(constants, c_voigt, directions=None)
Acoustic velocities from force constants against those from elasticity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
constants
|
a |
required | |
c_voigt
|
(6, 6) elastic constants in GPa for the same structure |
required | |
directions
|
(M, 3) propagation directions, or None for a default set spanning axes, face diagonals and a body diagonal |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
a dict with |
dict
|
and |
Source code in chmpy/vib/christoffel.py
density(masses, cell)
Mass density in kg/m^3 from amu and a cell in Angstroms.
full_tensor(c_voigt)
The (3, 3, 3, 3) elastic tensor from a Voigt 6x6 matrix.
phonon_velocities(constants, direction, magnitude=0.0001)
The three acoustic velocities along a direction, from force constants.
Evaluated at a wavevector short enough to be in the linear regime, which
is what makes it comparable with christoffel_velocities. The acoustic
branches are the three modes with most weight on the uniform translations,
not the three lowest, which would be any imaginary optical modes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
constants
|
a |
required | |
direction
|
(3,) Cartesian propagation direction |
required | |
magnitude
|
float
|
length of the probe wavevector in inverse Angstroms |
0.0001
|
Returns:
| Type | Description |
|---|---|
ndarray
|
(3,) velocities in m/s, ascending |