Compared with traditional radiotherapy, flash therapy requires higher beam energy and radiation dose provided by medical accelerator. In order to meet the requirements of FLASHRT, a $\pi/2$ standing wave accelerator with an axial coupling double-period structure with an output energy of 18MeV is designed. The cavity frequency and electromagnetic field distribution were simulated by 3D electromagnetic simulation software, and the beam dynamics studies was calculated by Parmela. The simulation results show that the beam output energy is higher than 18MeV, the current intensity reaches 0.37A, and the capture rate reaches 46%.