Generators or electric motors in oil or gas winning field