The dimension of the pill-box window for D band Traveling Wave Tubes(TWT) is so small that its influence on every process parameter is very sensitive. The sapphire pill-box window is analyzed and simulated by using CST software according to its process parameters, including inner radius, thickness of the metallization layer in the sapphire window,thickness of the solder layer and the height of the cylinder waveguide. The optimized value of bandwidth is about 10 GHz. The Voltage Standing Wave Ratio(VSWR) is below 1.2 from 133 GHz to 144 GHz. The simulation model of the pill-box window structure added in the folded waveguide slow wave structure is calculated. The obtained VSWR result is below 1.4,which meets the design requirements of D band traveling wave tube.