Three-dimensional simulation of polytropic accretion discs