Thermal Conductivity

Compute phonon linewidth and thermal conductivity of the system with third order phonon interaction coefficients.

The code is recently developed and heavily relies on its Fortran counterpart for intense calculations. At the meantime, the new version of the tetrahedron finder Tetrahedra is developed along with it to improve processing speed. And the class AnharmInterp is developed to handle interaction coefficients. New object oriented constants and graph based unit_conversion system is also developed to enhance their flexibility and usability.

The algorithm involved has been heavily optimized, but some clean-up is necessary to improve the code readability, and also to get rid of some redundant and unused stuff.

The equations about phonon linewidth and the RTA approach to the thermal conductivity are described in paper Phys. Rev. B 91, 094306 (2015), that of thermal conductivity through LBTE approach in Phys. Rev. Lett. 110, 265506 (2013).

Examples:

To instantiate the object:

cd = Conductivity(
    struct="../../data/poscar",
    grid="11 11 11",
    pgn="C1",
    phi2="../../data/order2/phi2_444.pkl",
    phi3="../../data/order3/phi3_222.pkl",
    epsilon="../../data/epsilon.yml",
    q_direction="1 0 0",
    )

Then the phonon linewidth of a given q-point can be computed, at a series of temperatures:

temps = np.linspace(0, 1000, 101)
cd.gamma_tetra_at_phonon(q=q, temperature=temps, phonon_cutoff=0.001, units="THz")

or all the grid points:

cd.gamma_tetra_grid(temperature=temps, units="THz")

or the thermal conductivity:

cd.thermal_conductivity_RTA(temperature=temps, units="THz") # Relaxation time approaximation
cd.thermal_conductivity_LBTE(temperature=temps, units="THz") # Linearized Boltzmann transport equation

Container for the phonon interaction data

All the relative coefficients of phonon interactions can be accessed using AnharmInterp class.

ai = AnharmInterp( # Instantiate with second order phonons
    struct="../../data/poscar",
    grid="11 11 11",
    pgn="C1",
    phi2="../../data/order2/phi2_444.pkl",
    epsilon="../../data/epsilon.yml",
    q_direction="1 0 0",
    )
ai.add_phin( # Add in 3rd order coefficients
    phin="../../data/order3/phi3_222.pkl",
    order=3,
    )

Then dynamic tensors, phonons, group velocities, derivatives of dynamic matrices with respect to q-point, and heat capacities can be calculated.

ai.get_phonons(kpts, return_eigenvectors=False, units="THz")
ai.getDqN("1/2 0 0; 1/2 0 0", order=3)
ai.group_velocity(
    kpts,
    fd=False, # Take the analytic derivative of dynamic matrix (finite difference option is available)
    units="THz",
    )
ai.analytic_derivative_dynamic_matrix(kpts)
ai.fd_derivative_dynamic_matrix(
    kpts,
    amplitute=1.0E-5,
    )
ai.heat_capacity( # Returns values in the units of eV/K
    kpts,
    temperature=temps,
    )