Numerical analysis of a.c. losses in superconductors