A static model of chromospheric heating in solar flares