Flexoelectric polarization induced by inhomogeneous heating and implications for energy harvesting