Radiation loss and mechanical heating in the solar chromosphere