Effect of solar proton events on the middle atmosphere during the past two solar cycles as computed using a two‐dimensional model