Numerical simulation based on the Euler equation and one-step reaction model is carried out to investigate the process of deflagration to detonation transition (DDT) occurring in a straight duct. The numerical method used includes a high resolution fifth-order weighted essentially nonoscillatory scheme for spatial discretization, coupled with a third order total variation diminishing Runge-Kutta time stepping method. In particular, effect of energy release on the DDT process is studied. The model parameters used are the heat release at q =50, 30, 25, 20, 15, 10 and 5, the specific heat ratio at 1.2, and the activation temperature at Ti =15, respectively. For all the cases, the initial energy in the spark is about the same compared to the detonation energy at the Chapman-Jouguet (CJ) state. It is found from the simulation that the DDT occurrence strongly depends on the magnitude of the energy release. The run-up distance of DDT occurrence decreases with the increase of the energy release for q =50~20, and increases with the increase of the energy release for q =50~20. It is concluded from the simulations that the interaction of the shock wave and the flame front is the main reason for leading to DDT.