principia_materia.phonon_id.conductivity module

class principia_materia.phonon_id.conductivity.Conductivity(structure, mesh, pg, tol=1e-06)

Bases: object

Calculate thermal conductivity

gamma_tetra(qpoint, temperature, frequencies, phonon_units='THz', units='THz', phonon_cutoff=None, tol=1e-06, high_temp_limit=False)

Use the tetrahedron method to calculate the imaginary self energy (ISE).

This version is mostly implemented in fortran.

Parameters:
  • qpoint (array of float or Fraction, shape(3, ); or coordinate_parse compatible format) – The Q-vector to calculate ISE.

  • temperature (float of array of float, shape(ntemp, )) – The temperature(s) to calculate ISE.

  • frequencies (array of float, shape(nbin, )) – The frequencies to evaluate ISE at.

  • phonon_units (str, default "THz", optional) – The unit of phonon frequencies.

  • units (str, default "THz", optional) – The unit of ISE.

  • phonon_cutoff (None or float, default None, optional) – The phonon cutoff frequencies, all frequencies below cutoff are replaced with the value of cutoff. If omitted, the value of tol is used.

  • tol (float, default 1.0E-6, optional) – The error tolerence.

Returns:

gammas – The ISE of given q at all given temperatures at each frequencies.

Return type:

array of float, shape(ntemp, nbin, self.structure.norbitals)

gamma_tetra_at_phonon(qpoint, temperature, phonon_units='THz', units='THz', tol=1e-06, phonon_cutoff=None, high_temp_limit=False)

Calculate imaginary self energy at the phonon frequencies at the given q.

Parameters:
  • qpoint (array of float or Fraction, shape(3, ); or coordinate_parse compatible format) – The Q-vector to calculate ISE.

  • temperature (float of array of float, shape(ntemp, )) – The temperature(s) to calculate ISE.

  • phonon_units (str, default "THz", optional) – The unit of phonon frequencies.

  • units (str, default "THz", optional) – The unit of ISE.

  • phonon_cutoff (None or float, default None, optional) – The phonon cutoff frequencies, all frequencies below cutoff are replaced with the value of cutoff. If omitted, the value of tol is used.

  • tol (float, default 1.0E-6, optional) – The error tolerence.

Returns:

gammas – The ISE of given q at all given temperatures.

Return type:

array of float, shape(ntemp, self.structure.norbitals)

gamma_tetra_grid(temperature, frequencies=None, grid_qvecs=None, phonon_units='THz', units='THz', debug=False, phonon_cutoff=None, tol=1e-06, return_phonon=False, return_eigenvectors=False)

Use the tetrahedron method to calculate the imaginary self energy.

This version is set to take advantage of the grid and calculate ISE of the grid.

Parameters:
  • temperature (float of array of float, shape(ntemp, )) – The temperature(s) to calculate ISE.

  • frequencies (array of float, shape(nbin, )) – The frequencies to evaluate ISE at.

  • grid_qves (array of float or Fraction, shape(3, ) or shape(N, 3); or coordinate_parse compatible format) – A subset of Q-vectors on the grid the calculate ISE at.

  • phonon_units (str, default "THz", optional) – The unit of phonon frequencies.

  • units (str, default "THz", optional) – The unit of ISE.

  • debug (bool, default False, optional) – A debug flag.

  • phonon_cutoff (None or float, default None, optional) – The phonon cutoff frequencies, all frequencies below cutoff are replaced with the value of cutoff. If omitted, the value of tol is used.

  • tol (float, default 1.0E-6, optional) – The error tolerence.

  • return_phonon (bool, defult False, optional) – Whether to return phonon frequencies.

  • return_eigenvectors (bool, default False, optional) – Whether to return phonon eigenvectors.

Returns:

  • gammas (array of float) – (if frequencies is None: shape(N, ntemp, self.structure.norbitals))

    The ISE of given q at all given temperatures.

    (if frequencies is not None: shape(N, ntemp, nbin, self.structure.norbitals))

    The ISE of given q at all given temperatures at each frequencies.

  • phonon_frequencies (array of float, shape(N, self.structure.norbitals)) – (if return_phonon == True)

    The phonon frequencies of Q_vectors on the grid. If grid_qvecs is not None, the phonon frequencies of the grid_qvecs will be returned.

  • eigenvectors (array of complex, shape(N, self.structure.norbitals, self.structure.norbitals)) – (if return_eigenvectors == True)

    The phonon eigenvectors of Q_vectors on the grid. If grid_qvecs is not None, the phonon eigenvectors of the grid_qvecs will be returned.

has_Phi_order(orders)
scattering_rate_boundary(temperature, boundary, qpoints=None, phonon_cutoff=None, tol=0.0001)
set_Phi(Phi, order, tol=1e-05)
set_dipole(epsilon, q_direction=None)
thermal_conductivity_LBTE(temperature, phonon_cutoff=None, debug=False, tol=1e-06)

The implementation follows paper by Chaput, Phys. Rev. Lett. 110, 265506 (2013). It is basically identical to the paper by Fugallo, et al. Phys. Rev. B 88, 045430 (2013), apart from the latter opting to use an iterative approach instead of solving it directly.

Returns:

kappa

Return type:

array of float, shape(len(qpoints), ntemp, norbitals, 3, 3)

thermal_conductivity_RTA(temperature, qpoints=None, phonon_cutoff=None, tol=1e-06)
Returns:

  • mode_kappa (array of float, shape(ntemp, len(qpoints), norbitals, 3, 3))

  • kappa (array of float, shape(ntemp, 3, 3))

two_phonon_dos(q, temperature, frequencies=None, include_phonons=False, units='THz', phonon_cutoff=None, tol=1e-06)

Two-phonon density of states.

Parameters:
  • q (array of float or Fraction, shape(3, ); or coordinate_parse compatible format) – The Q-vector to calculate ISE.

  • temperature (float of array of float, shape(ntemp, )) – The temperature(s).

  • frequencies (array of float, shape(nbin, )) – The frequencies to evaluate two-phonon DOS at.

  • include_phonons (bool, optinoal, default to False) – Whether or not include the product of phonon frequencies in the coefficients.

  • phonon_cutoff (None or float, default None, optional) – The phonon cutoff frequencies, all frequencies below cutoff are replaced with the value of cutoff. If omitted, the value of tol is used. This would also cutoff all imaginary phonons.

  • tol (float, default 1.0E-6, optional) – The error tolerence.

Returns:

two_phonon_dos – Two-phonon density of states of the phonon q, in 2 parts.

Return type:

array of float, shape(2, ntemp, len(frequencies))

principia_materia.phonon_id.conductivity.bedist(freq, temperature, freq_units='THz', tol=0.0001)

Bose-Einstein distribution

Parameters:
  • freq (float of array of float, shape(N, )) – The frequencies to evaluate Bose-Einstein distribution.

  • freq_units (str, default "THz") – The unit of frequencies.

  • temperature (float or array of float, shape(ntemp, )) – Temperature(s) in unit of K.

  • tol (float) – The tolerence for low temperature limit.

Returns:

bedist – The Bose-Einstein distribution

Return type:

float or array of float, shape(ntemp, N)

principia_materia.phonon_id.conductivity.reciprocal(arr, tol=1e-06, fill_zero=0.0)