AlmaBTE  1.3
A solver of the space- and time-dependent Boltzmann transport equation for phonons
bulk_properties.hpp
Go to the documentation of this file.
1 // Copyright 2015-2018 The ALMA Project Developers
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12 // implied. See the License for the specific language governing
13 // permissions and limitations under the License.
14 
15 #pragma once
16 
20 
21 #include <constants.hpp>
22 #include <structures.hpp>
23 #include <qpoint_grid.hpp>
24 
25 namespace alma {
32 inline double calc_cv(const alma::Crystal_structure& poscar,
33  const alma::Gamma_grid& grid,
34  double T) {
35  double nruter = 0.;
36  double nqpoints = grid.nqpoints;
37  double nmodes = grid.get_spectrum_at_q(0).omega.size();
38 
39  for (std::size_t iq = 0; iq < nqpoints; ++iq) {
40  auto& spectrum = grid.get_spectrum_at_q(iq);
41 
42  for (std::size_t im = 0; im < nmodes; ++im)
43  nruter += alma::bose_einstein_kernel(spectrum.omega(im), T);
44  }
45  nruter *= alma::constants::kB / nqpoints / poscar.V;
46  return nruter;
47 }
48 
49 
59 Eigen::MatrixXd calc_kappa(const alma::Crystal_structure& poscar,
60  const alma::Gamma_grid& grid,
61  const Eigen::Ref<const Eigen::ArrayXXd>& w,
62  double T);
63 
68 // free
74 Eigen::MatrixXd calc_kappa_sg(const alma::Crystal_structure& poscar,
75  const alma::Gamma_grid& grid,
76  double T);
77 
89 double calc_kappa_1d(const alma::Crystal_structure& poscar,
90  const alma::Gamma_grid& grid,
91  const Eigen::Ref<const Eigen::ArrayXXd>& w,
92  double T,
93  const Eigen::Ref<const Eigen::Vector3d>& direction);
94 } // namespace alma
const double V
Volume of the unit cell.
Definition: structures.hpp:60
Definition: analytic1d.hpp:26
Eigen::MatrixXd calc_kappa_sg(const alma::Crystal_structure &poscar, const alma::Gamma_grid &grid, double T)
Obtain the small-grain thermal conductivity tensor.
Definition: bulk_properties.cpp:59
Eigen::ArrayXd omega
Angular frequencies, in rad / ps.
Definition: dynamical_matrix.hpp:88
double calc_kappa_1d(const alma::Crystal_structure &poscar, const alma::Gamma_grid &grid, const Eigen::Ref< const Eigen::ArrayXXd > &w, double T, const Eigen::Ref< const Eigen::Vector3d > &direction)
Obtain the thermal conductivity along a particular direction in the relaxation time approximation...
Definition: bulk_properties.cpp:95
Classes and functions used to manipulate grids in reciprocal space.
double calc_cv(const alma::Crystal_structure &poscar, const alma::Gamma_grid &grid, double T)
Compute the specific heat at constant volume.
Definition: bulk_properties.hpp:32
const Spectrum_at_point & get_spectrum_at_q(int iq) const
Access the harmonic properties at a point in the grid.
Definition: qpoint_grid.hpp:120
Definitions of the basic data-handling classes in ALMA.
Objects of this class represent a regular grid with the Gamma point in one corner.
Definition: qpoint_grid.hpp:32
Hold information about a crystal structure.
Definition: structures.hpp:51
Physical, mathematical and miscellaneous constants used in alma.
const std::size_t nqpoints
Total number of q points in the grid.
Definition: qpoint_grid.hpp:41
double bose_einstein_kernel(double omega, double T)
Integration kernel for the specific heat, thermal conductivity and other integrals.
Definition: utilities.hpp:326