Electromagnets, Generators and Motors