Short-time Asymptotics of the Heat Kernel on Bounded Domain with Piecewise Smooth Boundary Conditions and Its Applications to an Ideal Gas