Common Hartmann wavefront sensor bases on planar reference wave which prevent it measure the aberration of spherical wave directly. When adjusting an optical system with a Hartmann wavefront sensor, the optical path should be collimated firstly. It will make the measurement more complicated and may bring new aberration. To solve the problem, a Hartmann wavefront sensor which bases on spherical reference wave is proposed. In this paper, we analyze the principles of the Hartmann wavefront sensor and verify its feasibility by numerical simulation. The simulation result shows that, on the condition of RMS=1λ(λ=0.6328μm), the relative RMS of the residual error of the reconstructed wavefront is under 8% when the detected wavefront is the 2~15th order Zernike aberration.