We investigated the response of the solar atmosphere to non-thermal electron beam heating using the radiative transfer and hydrodynamics modelling code RADYN. The temporal evolution of the parameters that describe the non-thermal electron energy distribution were derived from hard X-ray observations of a particular flare, and we compared the modelled and observed parameters. The evolution of the non-thermal electron beam parameters during the X1.5 solar flare on 2011 March 9 were obtained from analysis of RHESSI X-ray spectra. The RADYN flare model was allowed to evolve for 110 seconds, after which the electron beam heating was ended, and was then allowed to continue evolving for a further 300s. The modelled flare parameters were compared to the observed parameters determined from extreme-ultraviolet spectroscopy. The model produced a hotter and denser flare loop than that observed and also cooled more rapidly, suggesting that additional energy input in the decay phase of the flare is required. In the explosive evaporation phase a region of high-density cool material propagated upward through the corona. This material underwent a rapid increase in temperature as it was unable to radiate away all of the energy deposited across it by the non-thermal electron beam and via thermal conduction. A narrow and high-density ($n_{e} \le 10^{15}$ cm$^{-3}$) region at the base of the flare transition region was the source of optical line emission in the model atmosphere. The collision-stopping depth of electrons was calculated throughout the evolution of the flare, and it was found that the compression of the lower atmosphere may permit electrons to penetrate farther into a flaring atmosphere compared to a quiet Sun atmosphere.