Physical model of diurnal heating in the vicinity of a two-dimensional ridge