Simulation of current in a superconductor