# How does the shape of the coil relate to the magnetic field around it?

I want to know if the shape of the coil affects the path of the magnetic fields around it. The two different shapes that I have are Helical coil and a spiral coil (in a plane).

Yes, the shape of the coil affects the shape of the field.

The most general answer to your question is that each tiny increment of wire produces a circular field around itself, and the overall field around the coil (or any length of wire of any shape) is the sum (integral) of all of those incremental fields. This is not a simple problem to solve in the general case, but we can make some general statements.

In a coil, the current in adjacent turns is going to have the same magnitude, and produce essentially the same field. This means that the space directly between the turns will have zero net field, since the contributions from the wires on either side of that space have opposite signs and cancel each other out.

This means that the strongest field will be found along the surface formed by the overall colleciton of turns. For a helical coil, this would be on the inside and outside surfaces of the cylinder formed by the turns, and for a planar (spiral) coil, this would be on either side of the plane.

Take a look at a solenoid: -

Picture taken from here. This site also furnished the following diagram about the fundamental law surrounding flux density, the Biot Savart law: -

This allows you to piecemeal calculate the sum of all the currents in the small pieces of wire to get a picture of what the flux density is at any one point in space. For simple shapes like solenoids and spirals it is possible to derive formulas because of the uniformity of the coil shape such as this: -

Which in this case simplifies greatly because the angle =90 ° for all points along the path and the distance to the field point is constant. The integral becomes

Simple idea and a pig to apply to anything that isn't geometric. I've done it for rectangular loops of wire (as used in metal detection systems on food/pharmaceutical product lines - it took a few hours but the results were good at predicting the flux density anywhere inside the rectangle.