You will write three functions that give the magnetic field of a wire and of a coil. They use the Biot-Savart law.
The idea. A long wire has . A wire of any length has . A coil of turns has on its axis. Use SI units: metres, amperes and tesla.
Your tasks.
field_long_wire, return the field of a very long wire at a distance d from it.field_short_wire, return the field of a straight wire at a point d away on the line that cuts it at right angles in the middle. The wire has a half length half. Use the two end angles, which are equal.field_on_axis, return the field on the axis of a coil of N turns, at a distance x from its centre. With x = 0 this is the field at the centre.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…