Numerical simulations of the Cosmic Battery in accretion flows around astrophysical black holes