This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

OpenBTE: a Solver for ab-initio Phonon Transport in Multidimensional Structures

Giuseppe Romano Massachusetts Institute of Technology, 77 Massachusetts Avenue, Cambridge, Massachusetts 02139, USA
Abstract

Controlling heat flow at the nanoscales is pivotal to several applications, including thermal energy harvesting and heat management. However, engineering nanostructures is challenging because phonon-boundary interaction, not contemplated by Fourier’s law, must be taken into account. Nondiffusive models, such as the Boltzmann transport equation (BTE), have been successfully employed to capture size effects in complex structures; however, their widespread has been hindered by the limited offer of open-source solvers in this space. We fill this void by introducing OpenBTE, an efficient solver for the steady-state phonon BTE in multidimensional structures. This tool is interfaced to first-principles calculations, thus it unlocks the calculations of thermal-related properties with no fitting-parameters. As an example, we employ OpenBTE to compute the temperature and flux maps, as well as the mode-resolved, effective thermal conductivity of Si membranes with infinite and finite thickness. By unlocking fast nanoscale heat transport simulations, OpenBTE may help accelerate the design of nanomaterials for thermal energy applications.

keywords:
Thermal transport, nanostructures
journal: Computer Physics Communications

PROGRAM SUMMARY

Program Title: OpenBTE
Developer’s repository link: https://github.com/romanodev/openbte.git
Licensing provisions: MIT
Programming language: Python
Nature of problem: Ab-initio calculation of thermal transport properties, including temperature and heat flux maps, as well as the effective thermal conductivity of multidimensional nanostructures.
Solution method: We implement the space-dependent, ab-initio Boltzmann transport equation (BTE) for phonons. The first-principles calculation of phonon group velocities, frequencies and scattering times, is delegated to external packages to which OpenBTE is interfaced. The current implementation focuses on a flavor of the BTE that interpolates phonon populations onto their vectorial mean-free-paths, allowing for fast and accurate thermal transport simulations.
Additional comments: Vectorization via NUMPY and parallelization (including with shared memory) with MPI4Py.

1 Introduction

The increasing accuracy of first-principles calculations of heat transport, along with the growing availability of computing resources, has enabled the systematic prediction of lattice thermal conductivity in semiconductors and two-dimensional (2D) materials [1, 2, 3]. If key theoretical developments have solidified our understanding of phonon dynamics at the nanoscales, the fast progress of this field has been unarguably aided by the release of open-source packages. For example, ShengBTE [4] implements the iterative solution of the Boltzmann transport equation (BTE) [5], with force constants computed by first-principles [6, 7]. The tool can be primarily used for either bulk materials or nanowires [8]. Later iterations include  AlmaBTE [9], which, among several improvements, features a Monte Carlo solver for superlattices, and FourPhonons [10, 11], a tool that, as the name suggests, can handle four-phonon scattering. Another notable package is Phono3Py [12], where the BTE is solved both within the relaxation time approximation (RTA) and including the full scattering operator [13]. Albeit not strictly required, these tools are mostly used in tandem with super-cell approaches. When a density functional perturbation theory (DFPT) is available for a given material, it is often convenient to compute directly the Fourier-transformed force constants, without resorting to supercells; a prominent package in this space is d3q [14], implemented on top of QUANTUM ESPRESSO [15]. This software also includes the possibility of simulating thin films [16] and coherence effects [17]. In a similar effort, the recently released Kaldo[18] combines the Green-Kubo model and the BTE to take into account material disorder [19].

While the dissemination of these software manifests the increasing excitement around phonon related applications, their focus is primarily on bulk materials or simple geometries. In fact, most phonon dynamics simulations in complex geometries are currently performed by MonteCarlo solvers [20, 21], with a recent implementation provided by MCBTE [22]. Thus, an open-source tool that solves space-dependent heat transport deterministically, i.e. in the same spirit as in bulk calculations, is still pending. We fill this gap by introducing OpenBTE, a solver for the first-principles, multidimensional phonon BTE. Key capabilities include the calculation of the temperature and heat flux maps, as well as the mode-resolve effective thermal conductivity. Ab-initio harmonic and anharmonic properties are delegated to external software. While flexible and straightforward to expand, OpenBTE currently implements the anisotropic-mean-free-path BTE (aMFP-BTE) [23], a method based on the interpolation of the phonon populations onto the vectorial MFP space. This method has shown a 50x speed up with respect to the mode-resolve BTE for thick Si membranes, while not compromising on the accuracy. Furthermore, it scales with constant time with respect to the number of phonon branches, therefore enabling fast simulations of size effects in complex-unit-cell materials, such as bismuth telluride.

The paper is organized as follows. First, we review the model and the assumptions therein, then we provide details on the implemented algorithm and the software’s main modules. An example of a porous Si membrane will follow, and final remarks conclude the paper. We also provides technical implementation details in the appendices. Enabling fast simulations of heat transport in nanostructures, OpenBTE sets out to accelerate the development of thermal-related applications, such as thermal management and thermoelectrics. OpenBTE is released under the GPL-3.0 license and currently hosted on GitHub [24].

2 Model

The steady-state, linearized phonon BTE in the temperature formulation reads [23]

Cμ𝐯μΔTμ(𝐫)=νWμνΔTν(𝐫),-C_{\mu}\mathbf{v}_{\mu}\cdot\nabla\Delta T_{\mu}(\mathbf{r})=\sum_{\nu}W_{\mu\nu}\Delta T_{\nu}(\mathbf{r}), (1)

where μ,ν\mu,\nu collectively indicate phonon branch and wave vector, running up to NpN_{p} and NqN_{q}, respectively. The unknowns ΔTμ(𝐫)\Delta T_{\mu}(\mathbf{r}) are the phonon pseudo-temperatures (referred to hereafter simply as temperatures), connected to the deviational non-equilibrium phonon population via ΔTμ(𝐫)=Δnμ(𝐫)ωμCμ1\Delta T_{\mu}(\mathbf{r})=\Delta n_{\mu}(\mathbf{r})\hbar\omega_{\mu}C_{\mu}^{-1}. The mode-specific heat capacity is Cμ=kB(ημ/sinhημ)2C_{\mu}=k_{B}\left(\eta_{\mu}/\sinh{\eta_{\mu}}\right)^{2}, with ημ=ωμ/kB/T/2\eta_{\mu}=\hbar\omega_{\mu}/k_{B}/T/2. The terms ωμ\hbar\omega_{\mu} and 𝐯μ\mathbf{v}_{\mu} are the phonon frequencies and the group velocities, respectively. In this formulation, the thermal flux is given by 𝐉(𝐫)=(Nq𝒱)1μΔTμ(𝐫)𝐒μ\mathbf{J}(\mathbf{r})=\left(N_{q}\mathcal{V}\right)^{-1}\sum_{\mu}\Delta T_{\mu}(\mathbf{r})\mathbf{S}_{\mu}, where 𝒱\mathcal{V} is the volume of the unit cell, and 𝐒μ=Cμ𝐯μ\mathbf{S}_{\mu}=C_{\mu}\mathbf{v}_{\mu}. The term WμνW_{\mu\nu} is the energy form of the scattering operator [25]. While we plan to make available the implementation of Eq. 1, currently only the relaxation-time-approximation (RTA) is supported; within the RTA, the RHS of Eq. 1 becomes Cμ/τμ[ΔTμ(𝐫)ΔT(𝐫)]C_{\mu}/\tau_{\mu}\left[\Delta T_{\mu}(\mathbf{r})-\Delta T(\mathbf{r})\right], leading to

𝐯μΔTμ(𝐫)=ΔTμ(𝐫)ΔT(𝐫)τμ,-\mathbf{v}_{\mu}\cdot\nabla\Delta T_{\mu}(\mathbf{r})=\frac{\Delta T_{\mu}(\mathbf{r})-\Delta T(\mathbf{r})}{\tau_{\mu}}, (2)

where τμ\tau_{\mu} is the relaxation time, and ΔT(𝐫)\Delta T(\mathbf{r}) is the pseudo lattice temperature; this term is evaluated so that energy conservation is satisfied, i.e. 𝐉(𝐫)=0\nabla\cdot\mathbf{J}(\mathbf{r})=0, yielding ΔT(𝐫)=[νCν/τν]1μCμ/τμΔTμ(𝐫)\Delta T(\mathbf{r})=\left[\sum_{\nu}C_{\nu}/\tau_{\nu}\right]^{-1}\sum_{\mu}C_{\mu}/\tau_{\mu}\Delta T_{\mu}(\mathbf{r}) [26].

The simulation domain is a cuboid of size LxL_{x}, LyL_{y} and LzL_{z} with periodic boundary conditions applied throughout by default. A difference of temperature ΔText\Delta T_{\mathrm{ext}} is also enforced along a chosen Cartesian axis. At the walls of the pores, energy conservation leads to νΔTν𝐒μ𝐧^=0\sum_{\nu}\Delta T_{\nu}\mathbf{S}_{\mu}\cdot\mathbf{\hat{n}}=0, which can be split into incoming and outgoing flux, i.e. μΔTμReLu(𝐒μ𝐧^)=μΔTμReLu(𝐒μ𝐧^)\sum_{\mu}\Delta T_{\mu}\mathrm{ReLu}(\mathbf{S}_{\mu}\cdot\mathbf{\hat{n}})=-\sum_{\mu}\Delta T_{\mu}\mathrm{ReLu}(-\mathbf{S}_{\mu}\cdot\mathbf{\hat{n}}); note that we define ReLu(x)=xΘ(x)\mathrm{ReLu}(x)=x\Theta(x), with Θ(x)\Theta(x) being the Heaviside function. The boundary condition is imposed to phonons leaving the surface; generally, we have ΔTμ=νRμνΔTν+\Delta T_{\mu}^{-}=\sum_{\nu}R_{\mu\nu}\Delta T_{\nu}^{+}, where - (++) are for outgoing (incoming) phonons, and RμνR_{\mu\nu} is a mode-resolved bouncing matrix. However, currently only a simplified model is available, with which we assume that phonons thermalize to a single temperature [20]; this choice corresponds to Rμν=[kReLu(𝐒k𝐧^)]1ReLu(𝐒μ𝐧^)R_{\mu\nu}=\left[\sum_{k}\mathrm{ReLu}(\mathbf{S}_{k}\cdot\mathbf{\hat{n}})\right]^{-1}\mathrm{ReLu}(\mathbf{S}_{\mu}\cdot\mathbf{\hat{n}}). Lastly, the effective thermal conductivity, assuming we have imposed the temperature gradient along xx, reads

κeff=LxΔTextμAd𝐒A𝐉μ𝐧^.\kappa^{\mathrm{eff}}=-\frac{L_{x}}{\Delta T_{\mathrm{ext}}}\sum_{\mu}\int_{A}\frac{d\mathbf{S}}{A}\mathbf{J}_{\mu}\cdot\mathbf{\hat{n}}. (3)

Equation 2, when solved iteratively, requires inverting as many linear systems as the number of phonons modes, an endeavour that may easily become prohibitive. To ameliorate the computational effort, we instead implement the recently introduced anisotropic-MFP-BTE (aMFP-BTE), a model based on interpolating the phonon temperatures onto the vectorial MFP space [23]. In practice, instead of solving Eq. 2 NpNqN_{p}N_{q} times at each iteration, we solve it for a set of vectorial MFPs, 𝐅ml\mathbf{F}_{ml}, located on a spherical grid. The indices mm and ll label the MFP Λm\Lambda_{m} (up to NΛN_{\Lambda}) and phonon directions 𝐬^l\mathbf{\hat{s}}_{l} (up to NΩN_{\Omega}), respectively. As NΛNΩ<<NpNqN_{\Lambda}N_{\Omega}<<N_{p}N_{q}, while not compromising on accuracy, this scheme results in a much faster runtime with respect to the case with mode-resolved resolution, i.e. no interpolation.

3 Implementation

As derived in A, the discretization of aMFP-BTE model in real and momentum space yields the following iterative linear system

𝐀ml𝚫𝐓ml(n)=ml𝐒mlml𝚫𝐓ml(n1)+𝐏ml,\displaystyle\mathbf{A}_{ml}\mathbf{\Delta T}_{ml}^{(n)}=\sum_{m^{\prime}l^{\prime}}\mathbf{S}_{ml}^{m^{\prime}l^{\prime}}\mathbf{\Delta T}_{m^{\prime}l^{\prime}}^{(n-1)}+\mathbf{P}_{ml}, (4)

where 𝐀ml\mathbf{A}_{ml} is the stiffness matrix for a given MFP and direction, 𝐒mlml\mathbf{S}_{ml}^{m^{\prime}l^{\prime}} is associated to the lattice temperature and adiabatic boundary conditions, and 𝐏ml\mathbf{P}_{ml} represents the perturbation. Once Eq. 4 converges, the effective thermal conductivity is computed as κeff=κbal/2+ml𝐊mlT𝚫𝐓ml\kappa_{\mathrm{eff}}=\kappa_{\mathrm{bal}}/2+\sum_{ml}\mathbf{K}_{ml}^{T}\cdot\mathbf{\Delta T}_{ml}, where κbal\kappa_{\mathrm{bal}} is the ballistic thermal conductivity, and 𝐊ml\mathbf{K}_{ml} is associated to the thermal flux.

The first guess to Eq. 4 is given by the standard heat conduction equation. While it is straightforward to discretize the diffusive equation in orthogonal grids, it becomes convoluted for unstructured meshes. In OpenBTE, we use the approach described in [27], where the non-orthogonal contribution of the flux is treated explicitly, i.e. it depends on previous solutions. The resulting system, analogously to Eq. 4, is an iterative linear system,

𝐀𝚫𝐓(n)=𝐒𝚫𝐓(n1)+𝐏,\mathbf{A}\mathbf{\Delta T}^{(n)}=\mathbf{S}\mathbf{\Delta T}^{(n-1)}+\mathbf{P}, (5)

where 𝐒\mathbf{S} arises from the non-orthogonality of the mesh. Note that 𝐒mlml\mathbf{S}_{ml}^{m^{\prime}l^{\prime}} in Eq. 4 and 𝐒\mathbf{S} in Eq. 5 are not related. The same applies with the terms sharing the same basename in these two equations. The derivation of Eq. 5 is given in B.

Equation 4 entails, for each iteration nn, the inversion of NΛNΩN_{\Lambda}N_{\Omega} matrices, whose size is the number of volumes in the computational domain. To enhance the computational efficiency, three distinct strategies have been put in place. First, by noting that the stiffness matrix does not depend on nn, we are able to compute LU factorizations for the first iteration, and reuse them until convergence. Another major speed up is achieved by vectorizing the assembly of the stiffness matrices, while also exploiting their sparsity. Lastly, for each nn, Eq. 4 consists of a set of independent problems, thus it can be trivially parallelized [28]; to this end, we assign a set of phonon directions to each core (Ωc\Omega_{c}), while the indices mm run serially. The implementations of these three methods rely on SCIPY, NUMPY [29] and MPI4PY [30], respectively.

When vectorization and parallelization are both used, we may save memory by noting that, as shown in A, the stiffness matrices have the form 𝐀ml=𝐈+Λm𝐀l\mathbf{A}_{ml}=\mathbf{I}+\Lambda_{m}\mathbf{A}_{l}; thus vectorization can be done only for 𝐀l\mathbf{A}_{l}, while 𝐀ml\mathbf{A}_{ml} is assembled on the fly right before LU factorization. Similar arguments hold for 𝐏ml\mathbf{P}_{ml} and 𝐒mlml\mathbf{S}_{ml}^{m^{\prime}l^{\prime}}. The overall methodology is summerized in Algorithm 1, where, for readability, only 𝐀ml\mathbf{A}_{ml} has been expanded upon.

Algorithm 1 Workflow for thermal conductivity calculations. The term Ωc\Omega_{c} is the set of solid angles assigned to core cc.
1:𝚫𝐓ml(0)\mathbf{\Delta T}_{ml}^{(0)}\leftarrow Fourier’s law.
2:while error >1e3>1e^{-3} do
3:     κeff,(n+1)=κbal/2\kappa^{\mathrm{eff},(n+1)}=\kappa_{\mathrm{bal}}/2
4:     for l in {Ωc}\{\Omega_{c}\} do
5:         for m = 1:NΛN_{\Lambda} do
6:              𝐁=ml𝐒mlml𝚫𝐓ml(n1)+𝐏ml\mathbf{B}=\sum_{m^{\prime}l^{\prime}}\mathbf{S}_{ml}^{m^{\prime}l^{\prime}}\mathbf{\Delta T}_{m^{\prime}l^{\prime}}^{(n-1)}+\mathbf{P}_{ml}
7:              𝚫𝐓ml(n)(𝐈+Λm𝐀l)𝚫𝐓ml(n)=𝐁\mathbf{\Delta T}_{ml}^{(n)}\leftarrow\left(\mathbf{I}+\Lambda_{m}\mathbf{A}_{l}\right)\mathbf{\Delta T}_{ml}^{(n)}=\mathbf{B}
8:              κeff,(n+1)+=𝐊mlT𝚫𝐓ml\kappa^{\mathrm{eff},(n+1)}+=\mathbf{K}_{ml}^{T}\cdot\mathbf{\Delta T}_{ml}
9:         end for
10:     end for
11:     error |(κeff,(n+1)κeff,(n))|/κeff,(n+1)\leftarrow|(\kappa^{\mathrm{eff},(n+1)}-\kappa^{\mathrm{eff},(n)})|/\kappa^{\mathrm{eff},(n+1)}
12:     nn+1n\leftarrow n+1
13:end while

4 Workflow

The easiest way to run OpenBTE is to use it as a module in Python. A sketch for the workflow is illustrated in Fig. 1. The core module is Solver, which runs both the heat conduction equation as a first guess to Eq. 4 and all subsequent iterations, outlined in Algorithm 1. Before invoking it, though, it is necessary to define the material’s internal boundaries using the Geometry module, and bulk-related data via the Material module. The latter is the interface to external packages. Once the simulation is finalized, results can be plotted using the Plot module. Note that OpenBTE follows a pure functional approach, where data is simply stored as dictionaries. Each module is expanded upon in the next sections.

Refer to caption\cprotect
Figure 1: The software architecture of OpenBTE!. The key components are the Material!, Geometry!, Solver! and Plot! modules. Currently, the code is interfaced to AlmaBTE! and Phono3Py!, which computes first-principles data. Mesh generation is delegated to GMSH!, and output maps can be visualized with Paraview!.

5 Material

The Material module converts mode-resolved bulk data, CμC_{\mu}, τμ\tau_{\mu} and 𝐯μ\mathbf{v}_{\mu}, into the spherically-resolved quantities 𝐆ml\mathbf{G}_{ml} and CmlC_{ml}. The input files, rta.npz, are created by postprocessing data obtained by external packages. Currently, OpenBTE provides interfaces to AlmbaBTE [9] and Phono3Py [12]. A small set of precomputed rta.npz is also provided. The file created by Material is stored into material.npz and ready to be used by Solver. Depending on the geometry, this module has two models:

  • 1.

    rta3D: this model must be used for geometries with lz>0l_{z}>0. In this case, the angular interpolation of 𝐅μ\mathbf{F}_{\mu} is performed in both polar and azimuthal angles.

  • 2.

    rta2DSym: when lzl_{z} is not specified, the actual simulation domain is 2D, and this model must be used. Note that when the base material is 3D, using this option is equivalent to considering an infinite thickness. In fact, in this case, the mode-resolved 𝐅μ\mathbf{F}_{\mu} are mapped into 𝐅tk=Λtcos(ϕk)\mathbf{F}_{tk}=\Lambda_{t}\cos(\phi_{k}), where Λt\Lambda_{t} implicitly includes the MFP and the azimuthal angle, and ϕk\phi_{k} is the polar angle on the x-y plane [23].

The model as well as the discretization grid can be chosen with

from openbte import Material
\parMaterial(filename=’rta_Si_300’,model=’rta2DSym’,n_phi=48)

where, by default, the material file is taken from the database, whose entries are updated online. In this case, we choose to discretize the polar angle into 48 slices.

6 Geometry module

The Geometry module allows the user to build an arbitrarily patterned nanomaterial. It interfaces with GMSH [31] to create an unstructured Delaney mesh, and creates the file geometry.npz. While we plan to handle user-provided meshes, OpenBTE currently supports 2D membranes with finite and infinite thickness. The size of the unit cell is specified by lx and ly, while the thickness is defined by lz. The direction of the applied gradient is indicated with direction (default is x). Periodic boundary conditions are applied along all directions; however, adiabatic surfaces can be imposed along specific directions with Periodic=[True,False,True], where each component declares whether a surface is periodic. Currently, there are two geometry models, as expanded upon in the next sections.

6.1 Lattice model

This model aids the creation of 2D periodic porous materials with pores having either predefined shapes or custom ones. In analogy to crystals, a porous material is defined as a set of unit vectors, which in our case are 𝐚1=lx𝐱^\mathbf{a}_{1}=l_{x}\mathbf{\hat{x}} and 𝐚2=ly𝐲^\mathbf{a}_{2}=l_{y}\mathbf{\hat{y}}, and a base. The latter is a list of x-y pairs, each of them being one pore. Here is an example with a single pore in the origin

from openbte import Geometry
\parGeometry(model=’lattice’,base=[[0,0]],shape=’circle’)

In the example above, we chose a simple shape, a circle; however, it is possible also to supply a user-defined shape using shape=custom. In such a case, the keyword shape_functions must be provided, optionally along with shape_options. For example, as shown in Fig. 2a-b and c, we can define a structure having two pores, each of them described by the same custom shape.

6.2 Custom model

Using the option model=custom, it is possible to define an arbitrary patterning by providing a list of polygons, with the periodicity being automatically guaranteed. This option significantly widens up the number of possible geometries at the expense of more input by the user. In spirit of subtractive manufacturing, each polygon can be seen as a region where the material is carved out. An example of custom model is depicted in Fig.2-d.

Refer to caption
\cprotect
Figure 2: a) An example of structure using the keyword-value pair shape=custom! for the lattice! model of the Geometry! module. b) the unit cell comprising two pores at designed positions. Note that when a pore crosses a boundary it gets repeated. c) singe-pore view of material. The coordinates of the shape are defined via the shape_function! option. d) An example of custom! shape obtained by carving out the base material with user-defined polygons.

7 Plot Module

Simulations results can be plotted via the Plot module. Currently, the following features are implemented:

  • 1.

    vtu: the temperature and flux maps are stored in a vtu file and ready to be opened by Paraview [32].

  • 2.

    maps: the maps are shown as web-ready, interactive structures.

  • 3.

    kappa_mode: this model computes the mode-resolved thermal conductivity from Eq 21, and stores in a file.

  • 4.

    line: this option, which currently is implemented only for 2D systems, allows for line plots, using linear interpolation.

8 Thermal transport in porous Si

Refer to caption
(a)
Refer to caption
(b)
Refer to caption
(c)
Refer to caption
(d)
Figure 3: a) Thermal transport reduction when using Fourier’s law, for regular circular pores and for a user-define shape; the Eucken-Maxwell model is also plotted. In the inset, the magnitude of the thermal map for the user-defined structure. The porosity is 0.1 and LL = 50 nm. b) a cut of the temperature maps, computed from both the BTE and Fourier’s law, along the xx-axis. c) The effective thermal conductivity, κeff\kappa^{\mathrm{eff}}, of the user-defined structure with thickness tt = 10 nm, and for different porosities. In the inset, the case with porosities = 0.1 and 0.17 are shown. d) The mode-resolved thermal conductivity, κμeff\kappa^{\mathrm{eff}}_{\mu}, versus the MFP, |Fμ,x||F_{\mu,x}|, for the cases tt = 10 nm and t=t=\infty.

In some cases, it is convenient to use Fourier’s law to estimate macroscopic geometric effects. In this first part, we thus aim to assess the reliability of the diffusive solver, implemented in OpenBTE. To this end, we consider a membrane with circular pores and infinite thickness, for which κfourier/κbulk=r\kappa_{\mathrm{fourier}}/\kappa_{\mathrm{bulk}}=r can be evaluated analytically. In fact, in this case, the thermal transport suppression is given by the Eucken-Maxwell model r=(1ϕ)/(1+ϕ)r=(1-\phi)/(1+\phi) [33], ϕ\phi being the porosity. In Fig. LABEL:fig1a, we compare this model with the results from OpenBTE for different porosities, obtaining excellent agreement (<1%<1\%). We note that by using the option only_fourier=True it is possible to run only the Fourier’s model. Next, we compute rr for a more complicated structure, comprising two concatenated sub-lattices of pores with different user-provided shapes; this structure is generated using the shape=custom option from the lattice model, a two-pore base, and different options for each pore. As shown in Fig. LABEL:fig1a, we obtain a much larger heat transport suppression due to the longest path heat must travel through the material.

Let us now compute κeff\kappa^{\mathrm{eff}} using the BTE, encoded in Eq. 4. For the chosen porosity of 0.10.1 and LL = 50nm, we obtain  17.4 Wm-1K-1, well below the corresponding macroscopic value 99.4 Wm-1K-1. In Fig. LABEL:fig1b, we plot a cut of the temperature maps, both for the BTE and Fourier cases, along the xx-axis. As expected, they have different trends, the BTE one being flatter due to ballistic transport. When a finite thickness is added, phonon undergo stronger suppression; in fact, for thickness tt=10 nm and porosity 0.1, we obtain κeff=8.9\kappa^{\mathrm{eff}}=8.9 W m-1K-1, roughly a half of the value with t=t=\infty. In Fig. LABEL:fig1c, κeff\kappa^{\mathrm{eff}} for different porosities is plotted. From the insets, we note that, as the porosity becomes larger, the heat flux peaks around the phonon bottleneck, e.g. the areas between the pores. Lastly, the mode-resolved thermal conductivities for tt = 10 nm and \infty are plotted in Fig. LABEL:fig1d; analogously to Ref. [23], we can appreciate the stronger suppression for large MFPs for the case with finite thickness.

9 Conclusion

We have presented OpenBTE, a software for computing deterministically space-dependent heat transport in 2D and 3D structures. The efficient and modern implementation of the underlying algorithms enable accurate simulations both in the cloud and on common laptops, thus democratizing this type of simulations. Future work includes going beyond the RTA of the BTE and adding transient dynamics. GPU support and differentiability are also on the roadmap. Furthermore, we plan to develop a hybrid Fourier/BTE solver, which has the potential to dramatically reduce runtimes for the cases with 3D structures. Filling an important gap in the current offer of publicly available phonon transport solvers, OpenBTE sets out to guide experiments on nanoscale heat transport and facilitate high-throughput prediction of thermal properties of nanostructures.

10 Acknowledgments

Research was partially supported by the Solid-State SolarThermal Energy Conversion Center (S3TEC), an Energy Frontier Research Center funded by the U.S. Department of Energy (DOE), Office of Science, Basic Energy Sciences (BES), under Award No. DESC0001. The author thanks all the early users, who helped improving OpenBTE.

Appendix A The aMFP-BTE

OpenBTE employs the upwind finite-volume discretization of Eq. 2, where the flux outgoing from volume ii contributes to the diagonal of the stiffness matrix at row ii [27]. A sketch depicting incoming and outgoing flux is illustrated in Fig. 4a. The discretized mode-resolved BTE reads [23]

jμ[δccδμμ+Aijμ+Bμμjδij+Dμδij]ΔTjμ=Piμ,\sum_{j\mu^{\prime}}\left[\delta_{cc^{\prime}}\delta_{\mu\mu^{\prime}}+A_{ij\mu^{\prime}}+B_{\mu\mu^{\prime}j}\delta_{ij}+D_{\mu^{\prime}}\delta_{ij}\right]\Delta T_{j\mu^{\prime}}=P_{i\mu}, (6)

where

Aijμ\displaystyle A_{ij\mu} =\displaystyle= kReLu(𝐅μ𝐑ik)δijReLu(𝐅μ𝐑ik)δjk,\displaystyle\sum_{k}\mathrm{ReLu}(\mathbf{F}_{\mu}\cdot\mathbf{R}_{ik})\delta_{ij}-\mathrm{ReLu}(-\mathbf{F}_{\mu}\cdot\mathbf{R}_{ik})\delta_{jk}, (7)
Bμμj\displaystyle B_{\mu\mu^{\prime}j} =\displaystyle= sReLu(𝐅μ𝐧^s)gsiReLu(𝐒ν𝐧^s)kReLu(𝐒k𝐧^s),\displaystyle-\sum_{s}\mathrm{ReLu}(-\mathbf{F}_{\mu}\cdot\mathbf{\hat{n}}_{s})g_{si}\frac{\mathrm{ReLu}(\mathbf{S}_{\nu}\cdot\mathbf{\hat{n}}_{s})}{\sum_{k}\mathrm{ReLu}(\mathbf{S}_{k}\cdot\mathbf{\hat{n}}_{s})}, (8)

arise flux discretization and adiabatic boundary conditions, respectively. The term Dμ=Cμ/τμ[kCk/τk]1D_{\mu}=C_{\mu}/\tau_{\mu}\left[\sum_{k}C_{k}/\tau_{k}\right]^{-1} contributes to the lattice pseudo-temperature; lastly, the perturbation is

Piμ=jReLu(𝐅μ𝐑ijP)ΔText.P_{i\mu}=-\sum_{j}\mathrm{ReLu}(-\mathbf{F}_{\mu}\cdot\mathbf{R}_{ij}^{P})\Delta T_{\mathrm{ext}}. (9)

The terms 𝐑ij\mathbf{R}_{ij}, 𝐑ijP\mathbf{R}_{ij}^{P} and gscg_{sc} define the mesh, and are given by

𝐑ij\displaystyle\mathbf{R}_{ij} =\displaystyle= {1VcAij𝐧^ij,if i and j are neighbors0,otherwise,\displaystyle\begin{cases}\frac{1}{V_{c}}A_{ij}\mathbf{\hat{n}}_{ij},&\text{if }i\text{ and }j\text{ are neighbors}\\ 0,&\text{otherwise},\end{cases} (10)
𝐑ijP\displaystyle\mathbf{R}_{ij}^{P} =\displaystyle= {1ViAij𝐧^ij,if i and j are periodic to each other0,otherwise.\displaystyle\begin{cases}\frac{1}{V_{i}}A_{ij}\mathbf{\hat{n}}_{ij},&\text{if }i\text{ and }j\text{ are periodic to each other}\\ 0,&\text{otherwise}.\end{cases} (11)
gsi\displaystyle g_{si} =\displaystyle= {1ViAs,if s is a side of i0,otherwise,\displaystyle\begin{cases}\frac{1}{V_{i}}A_{s},&\text{if }s\text{ is a side of }i\\ 0,&\text{otherwise},\end{cases} (12)

where AijA_{ij} is the area of the surface between the volumes ii and jj, and 𝐧^ij\mathbf{\hat{n}}_{ij} is its normal, pointing toward the volume jj. The term ViV_{i} is the volume of the element ii. We solve 6 iteratively,

j(δij+Aijμ)ΔTjμ(n)=Piμ+μ(Bμμi+Dμ)ΔTiμ(n1).\sum_{j}\left(\delta_{ij}+A_{ij\mu}\right)\Delta T_{j\mu}^{(n)}=P_{i\mu}+\sum_{\mu^{\prime}}\left(B_{\mu\mu^{\prime}i}+D_{\mu^{\prime}}\right)\Delta T_{i\mu^{\prime}}^{(n-1)}. (13)

Equation 13 requires solving as many linear systems as the number of phonons modes. To overcome this issue, OpenBTE implements the aMFP-BTE [23], where the phonon temperatures are interpolated over the vectorial MFPs, 𝐅μ=mlcmlμ𝐅ml\mathbf{F}_{\mu}=\sum_{ml}c_{ml}^{\mu}\mathbf{F}_{ml}; the chosen 𝐅ml=Λm𝐬^l\mathbf{F}_{ml}=\Lambda_{m}\mathbf{\hat{s}}_{l} are located uniformnly on a spherical grid. The labels mm and ll refer to MFP and solid angle, respectively. Analogously, the temperatures are 𝚫𝐓μ=mlcmlμ𝚫𝐓ml\mathbf{\Delta T}_{\mu}=\sum_{ml}c_{ml}^{\mu}\mathbf{\Delta T}_{ml}. In the aMFP-BTE formulation, Eq. 13 becomes

j(δij+ΛmAijl)ΔTjml(n)=ΛmPil+ml(ΛmBlmli+Dml)ΔTiml(n1),\sum_{j}\left(\delta_{ij}+\Lambda_{m}A_{ijl}\right)\Delta T_{jml}^{(n)}=\Lambda_{m}P_{il}+\sum_{m^{\prime}l^{\prime}}\left(\Lambda_{m}B_{lm^{\prime}l^{\prime}i}+D_{m^{\prime}l^{\prime}}\right)\Delta T_{im^{\prime}l^{\prime}}^{(n-1)}, (14)

where

Aijl\displaystyle A_{ij^{\prime}l} =\displaystyle= kReLu(𝐬^l𝐑ik)δijReLu(𝐬^l𝐑ik)δjk,\displaystyle\sum_{k}\mathrm{ReLu}(\mathbf{\hat{s}}_{l}\cdot\mathbf{R}_{ik})\delta_{ij}-\mathrm{ReLu}(-\mathbf{\hat{s}}_{l}\cdot\mathbf{R}_{ik})\delta_{jk}, (15)
Blmlj\displaystyle B_{lm^{\prime}l^{\prime}j} =\displaystyle= sReLu(𝐬^l𝐧^s)gsiReLu(𝐒ml𝐧^s)m′′l′′ReLu(𝐒m′′l′′𝐧^s).\displaystyle-\sum_{s}\mathrm{ReLu}(-\mathbf{\hat{s}}_{l}\cdot\mathbf{\hat{n}}_{s})g_{si}\frac{\mathrm{ReLu}(\mathbf{S}_{m^{\prime}l^{\prime}}\cdot\mathbf{\hat{n}}_{s})}{\sum_{m^{\prime\prime}l^{\prime\prime}}\mathrm{ReLu}(\mathbf{S}_{m^{\prime\prime}l^{\prime\prime}}\cdot\mathbf{\hat{n}}_{s})}. (16)

The term PilP_{il} is the perturbation, given by

Pil=jReLu(𝐬^l𝐑ijP)ΔText.P_{il}=-\sum_{j}\mathrm{ReLu}(-\mathbf{\hat{s}}_{l}\cdot\mathbf{R}_{ij}^{P})\Delta T_{\mathrm{ext}}. (17)

The quantities Dml=μcmlμDμD_{ml}=\sum_{\mu}c_{ml}^{\mu}D_{\mu} and 𝐒ml=μcmlμ𝐒μ\mathbf{S}_{ml}=\sum_{\mu}c_{ml}^{\mu}\mathbf{S}_{\mu} contributes to the lattice temperature and thermal flux, respectively. Finally, after defining Simlml=ΛmBlmli+DmlS_{iml}^{m^{\prime}l^{\prime}}=\Lambda_{m}B_{lm^{\prime}l^{\prime}i}+D_{m^{\prime}l^{\prime}} in Eq. 14, we obtain Eq. 4. To compute the effective thermal conductivity from Eq. 3, we need to integrate over the hot contact and the momentum space. According to the upwind scheme, the volume from which we pick the temperature depends on whether the flux is outgoing from or incoming to such volume; accordingly, Eq. 3 translates into

κeff=\displaystyle\kappa_{\mathrm{eff}}= \displaystyle- LAΔTextijml[ΔTcmlReLu(𝐒ml𝐑ijK)\displaystyle\frac{L}{A\Delta T_{\mathrm{ext}}}\sum_{ijml}\big{[}\Delta T_{cml}\mathrm{ReLu}(\mathbf{S}_{ml}\cdot\mathbf{R}^{K}_{ij})- (18)
\displaystyle- (ΔTiml+ΔText)ReLu(𝐒ml𝐑ijK)]=\displaystyle\left(\Delta T_{iml}+\Delta T_{\mathrm{ext}}\right)\mathrm{ReLu}(-\mathbf{S}_{ml}\cdot\mathbf{R}^{K}_{ij})\big{]}=
=\displaystyle= κbal2+ml𝐊mlT𝚫𝐓ml\displaystyle\frac{\kappa_{\mathrm{bal}}}{2}+\sum_{ml}\mathbf{K}_{ml}^{T}\mathbf{\Delta T}_{ml}

where κbal=Lml𝐆ml𝐧^ext\kappa_{\mathrm{bal}}=L\sum_{ml}\mathbf{G}_{ml}\cdot\mathbf{\hat{n}_{\mathrm{ext}}} is the ballistic thermal conductivity, 𝐧^ext\mathbf{\hat{n}}_{\mathrm{ext}} being the direction of the applied temperature gradient; the matrices 𝐊ml\mathbf{K}_{ml} are

Kiml=LAΔTextj𝐒ml𝐑ijK,K_{iml}=\frac{L}{A\Delta T_{\mathrm{ext}}}\sum_{j}\mathbf{S}_{ml}\cdot\mathbf{R}^{K}_{ij}, (19)

where we use ReLu(x)ReLu(x)=x\mathrm{ReLu}(x)-\mathrm{ReLu}(-x)=x, and

𝐑ijK\displaystyle\mathbf{R}_{ij}^{K} =\displaystyle= {Aij𝐧^ij,if i and j share a hot contact’s side0,otherwise.\displaystyle\begin{cases}A_{ij}\mathbf{\hat{n}}_{ij},&\text{if }i\text{ and }j\text{ share a hot contact's side}\\ 0,&\text{otherwise}.\end{cases} (20)
Refer to caption
Figure 4: a) A scheme for two adjacent elements. In this case, the vectorial MFP 𝐅μ\mathbf{F}_{\mu} points inward the element ii, thus it contributes to the off-diagonal part of the stiffness matrix of the BTE model. b) Local reference system, 𝐞^ξ𝐞^η\mathbf{\hat{e}}_{\xi}-\mathbf{\hat{e}}_{\eta}, used to derive the non-orthogonal contribution to the heat flux for the heat-conduction equation.

Lastly, it is also possible to compute the “mode-resolved” thermal conductivity, given by

κμeff=κbal2+ml𝐊μTcμml𝚫𝐓ml,\kappa^{\mathrm{eff}}_{\mu}=\frac{\kappa_{\mathrm{bal}}}{2}+\sum_{ml}\mathbf{K}_{\mu}^{T}c_{\mu}^{ml}\mathbf{\Delta T}_{ml}, (21)

where cμmlc_{\mu}^{ml} maps 𝐅ml\mathbf{F}_{ml} to 𝐅μ\mathbf{F}_{\mu}, and

Kiμ=LAΔTextj𝐒μ𝐑ijK.K_{i\mu}=\frac{L}{A\Delta T_{\mathrm{ext}}}\sum_{j}\mathbf{S}_{\mu}\cdot\mathbf{R}^{K}_{ij}. (22)

Appendix B Heat conduction equation

The first guess to Eq. 4 is given by the standard diffusive equation κΔT(𝐫)=0\nabla\kappa\nabla\Delta T(\mathbf{r})=0, with κ\kappa being the bulk thermal conductivity tensor. In a finite-volume fashion, we integrate over the control volume Ωc\Omega_{c}

ΩcjκijΔT(𝐫)xjn^i=0,\int_{\partial\Omega_{c}}\sum_{j}\kappa_{ij}\frac{\partial\Delta T(\mathbf{r})}{\partial x_{j}}\hat{n}_{i}=0, (23)

where we used Gauss’ law. Eq. 23 is then transformed into a sum of integrals over individual faces of the volume, i.e.

j𝐠ij𝐒ij=0\sum_{j}\mathbf{g}_{ij}\cdot\mathbf{S}_{ij}=0 (24)

where Sij=βκαβRij,αS_{ij}=\sum_{\beta}\kappa_{\alpha\beta}R_{ij,\alpha} and 𝐠ij\mathbf{g}_{ij} is the gradient evaluated at the face between the volume ii and jj (which hereafter will be referred to as ss). For orthogonal grids, flux discretization simply leads to T=(ΔTjΔTi)𝐝𝐢𝐣|𝐝𝐢𝐣|2\nabla T=\left(\Delta T_{j}-\Delta T_{i}\right)\mathbf{d_{ij}}|\mathbf{d_{ij}}|^{-2}, where 𝐝ij\mathbf{d}_{ij} is the distance between the centroids of the two adjacent volumes. However, for unstructured mesh, a non-orthogonal contribution must be added. In OpenBTE, we follow the approach described by Murthy [27], described as follows. With no loss of generality, we consider a 2D case. As shown in Fig. 4b, we introduce a reference system based on the vectors 𝐞η\mathbf{e}_{\eta} and 𝐞ξ\mathbf{e}_{\xi}. The former is aligned with 𝐝ij\mathbf{d}_{ij} and latter is parallel to the face. In this new system, the gradient transforms as

ΔT𝐱=𝒥(𝐱,𝐞)ΔT𝐞,\frac{\partial\Delta T}{\partial\mathbf{x}}=\mathcal{J}(\mathbf{x},\mathbf{e})\frac{\partial\Delta T}{\partial\mathbf{e}}, (25)

with 𝒥\mathcal{J} being the Jacobian. Here we will not elaborate on its structure but will only provide the final formula for the temperature gradient [27]

𝐠ij=𝐧^ij𝐧^ij𝐞^ξ[ΔTeξ|s𝐞^ξ𝐞^ηΔTeη|s].\mathbf{g}_{ij}=\frac{\mathbf{\hat{n}}_{ij}}{\mathbf{\hat{n}}_{ij}\cdot\mathbf{\hat{e}}_{\xi}}\left[\frac{\partial\Delta T}{\partial e_{\xi}}\bigg{|}_{s}-\mathbf{\hat{e}}_{\xi}\cdot\mathbf{\hat{e}}_{\eta}\frac{\partial\Delta T}{\partial e_{\eta}}\bigg{|}_{s}\right]. (26)

The gradient along 𝐞ξ\mathbf{e}_{\xi} at the face ss is simply

ΔTeξ|s=ΔTjΔTiRijP|𝐝𝐢𝐣|,\frac{\partial\Delta T}{\partial e_{\xi}}\bigg{|}_{s}=\frac{\Delta T_{j}-\Delta T_{i}-R_{ij}^{P}}{|\mathbf{d_{ij}}|}, (27)

where

RijP\displaystyle R_{ij}^{P} =\displaystyle= {ΔText,if ihot and jcold and they share a sideΔText,if icold and jhot and they share a side0otherwise\displaystyle\begin{cases}-\Delta T_{\mathrm{ext}},&\text{if }i\in\mathrm{hot}\text{ and }j\in\mathrm{cold}\text{ and they share a side}\\ \Delta T_{\mathrm{ext}},&\text{if }i\in\mathrm{cold}\text{ and }j\in\mathrm{hot}\text{ and they share a side}\\ 0&\text{otherwise}\end{cases} (28)

Using Eq. 27, we rewrite Eq. 26 as

𝐠ij=𝐧^ij𝐧^ij𝐝ij[ΔTjΔTiRijP]+𝐅ij,\mathbf{g}_{ij}=\frac{\mathbf{\hat{n}}_{ij}}{\mathbf{\hat{n}}_{ij}\cdot\mathbf{d}_{ij}}\left[\Delta T_{j}-\Delta T_{i}-R_{ij}^{P}\right]+\mathbf{F}_{ij}, (29)

where 𝐅ij\mathbf{F}_{ij} is called “secondary flux.” In contrast, Eq. 27 is termed “primary flux.” The secondary flux is treated explicitly, i.e. using precomputed temperatures. To avoid unambiguities in the 3D case, we compute 𝐅\mathbf{F} as the difference between the total flux and the primary flux, i.e.

𝐅ij=𝐠ij𝐧^ij𝐧^ij𝐝ij(𝐠ij𝐝ij).\mathbf{F}_{ij}=\mathbf{g}_{ij}-\frac{\mathbf{\hat{n}}_{ij}}{\mathbf{\hat{n}}_{ij}\cdot\mathbf{d}_{ij}}\left(\mathbf{g}_{ij}\cdot\mathbf{d}_{ij}\right). (30)

Combining Eqs. 30-29, and explicitly indicating the iteration index, we have

𝐠ij(n)=𝐠ij(n1)+𝐧^ij𝐧^ij𝐝ij[(ΔTj(n)ΔTi(n))𝐠ij(n1)𝐝ij].\mathbf{g}_{ij}^{(n)}=\mathbf{g}_{ij}^{(n-1)}+\frac{\mathbf{\hat{n}}_{ij}}{\mathbf{\hat{n}}_{ij}\cdot\mathbf{d}_{ij}}\left[\left(\Delta T_{j}^{(n)}-\Delta T_{i}^{(n)}\right)-\mathbf{g}_{ij}^{(n-1)}\cdot\mathbf{d}_{ij}\right]. (31)

In light of these results, Eq. 24 translates into the following linear system

𝐀𝚫𝐓=𝐁+𝐏,\mathbf{A}\mathbf{\Delta T}=\mathbf{B}+\mathbf{P}, (32)

with stiffness matrix and right hand side

Aij\displaystyle A_{ij} =\displaystyle= 𝐒ij𝐧ij𝐧^ij𝐝ijδijk𝐒ik𝐧ik𝐧^ij𝐝ik,\displaystyle\mathbf{S}_{ij}\cdot\frac{\mathbf{n}_{ij}}{\mathbf{\hat{n}}_{ij}\cdot\mathbf{d}_{ij}}-\delta_{ij}\sum_{k}\mathbf{S}_{ik}\cdot\frac{\mathbf{n}_{ik}}{\mathbf{\hat{n}}_{ij}\cdot\mathbf{d}_{ik}},
Bi\displaystyle B_{i} =\displaystyle= j𝐠ij(𝐝ij(𝐧^ij𝐒ij)𝐧^ij𝐝ij𝐒ij).\displaystyle\sum_{j}\mathbf{g}_{ij}\cdot\left(\frac{\mathbf{d}_{ij}(\mathbf{\hat{n}}_{ij}\cdot\mathbf{S}_{ij})}{\mathbf{\hat{n}}_{ij}\cdot\mathbf{d}_{ij}}-\mathbf{S}_{ij}\right). (33)

The perturbation term is given by

Pi=j𝐒ijP𝐧ij𝐧^ij𝐝ij,P_{i}=\sum_{j}\mathbf{S}_{ij}^{P}\cdot\frac{\mathbf{n}_{ij}}{\mathbf{\hat{n}}_{ij}\cdot\mathbf{d}_{ij}}, (34)

where 𝐒ijP=𝐒ijRijP\mathbf{S}_{ij}^{P}=\mathbf{S}_{ij}R_{ij}^{P}. The gradients 𝐠ij\mathbf{g}_{ij}, appearing in Eq. B, depend on precomputed temperatures. Their calculation if performed by interpolating the gradients from the elements ii and jj, i.e.

𝐠ij=ωij𝐠i+(1ωij)𝐠j,\mathbf{g}_{ij}=\omega_{ij}\mathbf{g}_{i}+\left(1-\omega_{ij}\right)\mathbf{g}_{j}, (35)

where

𝐠i=ΔT𝐱|i,\mathbf{g}_{i}=\frac{\partial\Delta T}{\partial\mathbf{x}}\bigg{|}_{i}, (36)

and ωij\omega_{ij} is the distance between the centroid of the element ii and the intersection between 𝐝ij\mathbf{d}_{ij} and the face ss. The gradient at the element’s centroid is evaluated assuming local linear variation of ΔT\Delta T around the element ii, resulting in as many linear equations as the neighbours of ii,

ΔTi+𝐠i𝐝ij=ΔTj+RijP,\Delta T_{i}+\mathbf{g}_{i}\cdot\mathbf{d}_{ij}=\Delta T_{j}+R_{ij}^{P}, (37)

which, in matrix form, become

𝐌i𝐠i=𝐐i.\mathbf{M}_{i}\mathbf{g}_{i}=\mathbf{Q}_{i}. (38)

Equation 38 is a linear system to be solved for each element. Since 𝐌i\mathbf{M}_{i} has more rows (number of neighbors) that columns (dimensions), we solve it using the least square method, i.e.

𝐠i=(𝐌iT𝐌i)1𝐌iT𝐐i.\mathbf{g}_{i}=\left(\mathbf{M}_{i}^{T}\mathbf{M}_{i}\right)^{-1}\mathbf{M}_{i}^{T}\mathbf{Q}_{i}. (39)

Combining Eqs. 39-B and-32, we may formalize the heat conduction equation in unstructured grids as the following iterative linear system

𝐀𝚫𝐓(n)=𝐒𝚫𝐓(n1)+𝐏,\mathbf{A}\mathbf{\Delta T}^{(n)}=\mathbf{S}\mathbf{\Delta T}^{(n-1)}+\mathbf{P}, (40)

as reported in the main text. Lastly, after Eq. 40 is solved, κfourier\kappa_{\mathrm{fourier}} is computed by

κfourier=LΔTextAshot𝐠ij𝐒ij.\kappa_{\mathrm{fourier}}=-\frac{L}{\Delta T_{\mathrm{ext}}A}\sum_{s\in\mathrm{hot}}\mathbf{g}_{ij}\cdot\mathbf{S}_{ij}. (41)

References