The rate of convergence of the virial series in confined systems