Relationship between current and magnetic fields