# Contradiction using amperes law to calculate magnetic field $B$

I am trying to study the influence on the magnetic field B generated by a solenoid in two different cases

• the solenoid is wound around an open iron core
• the solenoid is wound around a closed iron core

I am trying to use amperes law to give an estimation of the magnetic field in both cases, but I seem to arrive at a contradiction: acc to the calculation, the magnetic field with an open iron core would be bigger than that of a closed iron core. I am pretty sure this is wrong, because the flux lines in an open iron core need to travel a large distance through the air (which has low permeability), where as the flux lines in a closed iron core can travel through the highly permeable material all the time, and never need to travel in the air.

See the attached picture for my calculation. (I am assuming the coil diameter, wire diameter, number of windings, current and core material to be the same in both cases. The only difference is the iron core being open or closed)

What am I doing wrong here?

I think I now understand my biggest flaw. Amperes law is actually $$\oint H\cdot dl=n\cdot I$$

since $$H=\frac{B}{\mu}$$ this can be written as $$\oint \frac{B}{\mu}\cdot dl=n\cdot I$$

Lots of textbooks will now rewrite the law as $$\oint B\cdot dl=\mu \cdot n\cdot I$$ however, this can only be done if $$\mu$$ is constant (for example $$\mu_0$$, permeability of free space)

In the left case, the path travels partly through the iron core, and partly through the air. In other words, $$\mu$$ is not constant along the path, so amperes law can not be easily rewritten or simplified, it stays $$\oint H\cdot dl=n\cdot I$$, and so B can also not be easily calculated.

In the right case, the path travels all the way through the iron core, so in this case $$\oint H\cdot dl=n\cdot I$$ can be rewritten as $$\oint B\cdot dl=\mu_0 \cdot \mu_r \cdot n\cdot I$$ and now B can be calculated as done on the right side of the figure.

Observation 1. I believe the problem lies with the field outside. The only way you can neglect it is by saying the "cable" is very long in comparison to the piece where there is current. If you get close to the edge you will see the last term of the l.h.s. of Ampère's Law in case 1 is not zero. You can see that if you make the actual dimension the same as in the other case.

Observation 2. The other thing is the fact that the lines "extend" further is not tied to the strength of the field so directly, lines are a pictorial rep. Roughly if you distribute a field in a longer distance it is weaker and in a sense that is exactly what is happening. The same amount of current is producing a field on the whole square material in the second case, while producing a more concentrated field in the first case where the approximation holds, namely a region far from the edges.