Finite size effects on the quantum spin Hall state in HgTe quantum wells under two different types of boundary conditions