An analytic solution for periodic thermally-driven flows over an infinite slope