Here are given the main steps to follow to calculate the thermal conductivity in the KCM using the output from phono3py.

Phono3py calculation

Download phono3py and follow the instructions given here to obtain the force constants for the desired material using VASP or Quantum Espresso.

In the next commands, if you use VASP use -c POSCAR, with Quantum Espresso use --pwscf -c incar.in

Once you have the FORCES_FC2, FORCES_FC3, and FORCE_SETS files execute

phono3py --dim="2 2 2" --sym-fc -c POSCAR

This will provide the harmonic and anharmonic force constants files fc2.hdf5 and fc3.hdf5.

--dim corresponds to the cell dimension used to obtain the force constants.

Next, execute your adapted command of this example:

phono3py --dim="2 2 2" --fc3 --fc2  --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" 
        -c POSCAR --mesh="20 20 20" --br --nu  --ts="300 400" --isotope 
        --mv="2.01e-4 2.01e-4" -o name

--fc3 and --fc2 is used to avoid new calculation of the force constants done in the previous step.

--pa is used to reduce to the primitive cell. This reduce the computational time. Here you have to introduce the primitive vectors as done in the example for the FCC diamond-like structure.

--br is used to fast calculation of the relaxation times.

--nu is used to split N and U processes. This tag is REQUIRED to run the KCM calculation .

--ts indicates the temperatures to run the calculations.

--isotope calculates the natural isotope concentration scattering.

--mv indicates the value of the isotope strength. If is not indicated is used natural isotope concentration. Notice that you have to indicate as many values as atoms you have in the primitive cell (if using --pa option) or in the conventional cell according to the POSCAR.

-o is used with an extra name to avoid overwirtting of the output file.

This calculation will provide a kappa-mxxx.hdf5, where xxx is the mesh indicated above.

KCM calculation

To run the KCM calculation you need to have installed phono3py.

Start by cloning the kcm folder including the KCM.py script and INPUT file by executing:

git clone https://github.com/physta/kcm_script

Copy the KCM.py and INCAR files in the same folder where you have kappa-mxxx.hdf5 and POSCAR or incar.in of the material you want to calculate the thermal conductivity. Find also a version KCM_py3.py written in python3 to be used with the last version of Phono3py.

Set the parameters of your calculation in the INPUT file according to the INPUT description.

To run the KCM calculation execute:

python KCM.py --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" POSCAR kappa-mxxx.hdf5

Use only --pa if it was also used in the previous phono3py calculation. Execute the Si-example with the previous script to test it.

By default the thermal conductivity and NL-length will be stored at K_T_size_component_mesh.dat .

If you use Quantum Espresso rewrite your incar.in according to the POSCAR format, which only requires the cell vectors and atomic positions, and run the KCM as:

python KCM.py --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" POSCAR kappa-mxxx.hdf5

INPUT file

An INPUT file is used by KCM.py to define specific parameters as temperatures or boundary effects.

The INPUT file also allows to specify the outputs you want to obtain from the calculations, as cumulative thermal conductivity or the thermal conductivity tensor.

A default output file (K_T_size_component_mesh.dat) of thermal conductivity and NL-parameters as function of temperature is provided. This file can be used as input for finite elements simulations removing the caption line (see FINITE ELEMENTS).

An example INPUT file is download together with KCM.py in order to easier the definition of parameters. Use it as reference. Respect the spaces between the tag and the value to avoid problems.

INPUT parameters

    TEMP= 100 200 300
    BOUNDARY= Y
    TYPE= W F
    L= 56e-9 0.03
    I_SF= 1.
    COMP= XX
    K_W= Y
    K_MFP= Y
    TAU_W= Y
    TAU_T= N
    STP= 100

See a brief explanation of each parameter:

  • TEMP. Specify the temperature on which calculations will be carried. Write ALL if you want to run the calculation on all the temperatures. The temperatures must correspond to those calculated in phono3py with the --ts option (see USER GUIDE-GENERAL).
  • BOUNDARY. Specify Y or N if you want or not include boundary scattering. This provide a broad approach to boundary effects. Better results are provided by the hydrodynamic KCM approach (see FINITE ELEMENTS).
  • TYPE. If considering boundary effects, indicate the type of sample: W for wire, F for film and R for rod.
  • L. Represents the length of the sample. For a wire L=diameter, for a film L=thickness, and for a rod L=√A, where A is the rod section. Specify different sizes if you want to run a calculation for more than one sample at the same time. Indicate as well the shape W, F, R in each case.

Some times is interesting to observe the effect of increase or decrease the effect of the impurity/mass defect on the thermal conductivity. To avoid the need of repeating the calculation of the thermal conductivity with new isotope concentration --mv, it has been included the option I_SF (Impurity Scaling Factor):

  • I_SF scales the the impurity/mass defect scattering relaxation time by the factor specified. Use a float value.

The next variables indicate the type of outputs:

  • COMP. By default is written the component XX of the thermal conductivity tensor. Specify YY, ZZ, XY, XZ or YZ for other components. Use only one component in each calculation.
  • K_W. Output file of frequency dependence thermal conductivity. Here are included the contribution of each mode as well as the accumulation function.
  • K_MFP. Output file of mean free path dependence thermal conductivity. Here are included the contribution of each mode as well as the accumulation function.
  • TAU_W. Output file of frequency dependence relaxation times. The mode velocity is also included to easier the MFP representation.
  • TAU_T. Output file of temperature dependence relaxation times. The mode velocity is also included to easier the MFP representation.
  • STP. Indicates the number of elements used in the binning of the frequency dependent output file. STP= 100 by default.

Tips for calculations

The calculations of thermal conductivity for different structures and materials may require specific parameters, constrains, etc., for the calculations of force constants and relaxation times.

Here are given some tips derived from self experiences to easier the calculations of thermal conductivity. If you have any suggestion please sent an email with the details and we will include your tips.

Calculation of force constants

For the calculation of force constants it is recommended to use a cubic conventional cell, as is better to produce a symmetric supercell for the calculation of the interatomic force constants.

General calculation of thermal conductivity

For KCM we recommend, if possible, to use primitive cell using --pa option. This provide better results and reduce the computational time.

The calculation of the thermal conductivity reducing to primitive cell using --pa option provides different results of those obtained with a conventional cell using the same grid sampling. As the size, and even the shape, of the first Brillouin Zone (1BZ) is different if it is used a primitive or conventional cell, the sampling of the 1BZ with the same mesh is not equivalent. This differences, tested on --lbte mode and KCM appears to be higher for instance in diamond than in silicon, where normal processes have a relevant effect on thermal transport.

img/anim.gif
Fig.1: Thermal conductivity of semiconductors with KCM in a 20x20x20 grid

For general calculations of thermal conductivity it is recommended at least a 20x20x20 gird (see Fig.1). For calculations of the NL-length it is recommended at least 40x40x40.

Thermal conductivity on 2D materials

The thermal conductivity from first principles of 2D materials, as graphene or MoS2, requires some considerations:

  • On the calculation of force constants it is required to use a large z component in order to avoid undesired interactions of the upper and lower sheet.
  • On the calculation of the thermal conductivity, the value of κ is normalized by the volume of the supercell, therefore, larger z component will reduce the thermal conductivity. To compare with experiments, the value of the thermal conductivity κ provided by first principles has to be rescaled multiplying by the z value used in the POSCAR and divided by the interlayer distance of the bulk material.
img/anim.gif