the Bose function. $D^r$ is obtained with the Dyson equation, $D^r = v + v \Pi^r D^r$, and $D^{>,<}$ is obtained by the corresponding Keldysh equation. Since we are in real space, we have used periodic boundary conditions in the $y$ direction perpendicular to the transport direction, and have set the diagonal $v_{ii} = 0$. Finally, the heat current is calculated according to the formula given in the main texts, Eq. (7). The electric current can also be calculated, using the lowest order expansion formula for the interacting Green’s function given in the next section, with the Meir-Wingreen formula for electric current.

Proof of the scalar photon Meir-Wingreen formula, Eq. (7)\[app-d\]
==================================================================

We give a derivation of the Meir-Wingreen formula for scalar photon in terms of the Meir-Wingreen formula for the electrons under the lowest order of expansion approximation [@paulsson2005; @lu2016]. We consider a two-layer setup with four leads, layer 1 with left and right lead, and layer 2 left and right lead. The energy current out the layer $\alpha$ is [@MeirWingreen; @lu-AIP-2015] $$\label{MWeq1}
I_\alpha = \int_{-\infty}^{+\infty} \frac{dE}{2\pi \hbar} E\, {\rm Tr} \bigl( G^> \Sigma_\alpha^< 
- G^< \Sigma_\alpha^> \bigr).$$ Here $G^>$ and $G^<$ are the full interacting greater and lesser 