The short answer is to keep the any gap or windings away from extraneous conductors and ferrous metals. Use shielded inductors and keep the gap buried inside the core and the windings. Of course even highly shielded cores, like pot cores, will have small unintentional gaps where the core joins. And, in reality even ferrite doesn't keep all the field inside. But keeping the gap in the center leg of a pot core is about the best that can be done.
Once you get away from fully shielded cores, things more complicated. What you have going for you is the field itself. Magnetic energy is near field stuff. EM waves attenuate by \$\frac{1}{R}\$ away from their source. E fields fall off as \$\frac{1}{R^2}\$. Energy from a magnetic field falls off as \$\frac{1}{R^3}\$.
Here is an example (adapted from some work I did forever ago) of what magnetic field fringing near a gap looks like, and how it falls with distance in the free field region:
Figure shows a semi-infinite gap. Gap length is 1mm in y, span is infinite in all of z and negative x. Fringing area goes out 2.5 gap lengths where the field would be down by about 98%. So, of the three types of fields you won't have to be as far away to limit exposure to a magnetic field.
A Gap Rule of Thumb ... and Why You Can't Use It Blindly
A basic rule of thumb for gaps is that the fringing will extend normally away from the core by the amount of the gap length. Say you have a 1mm gap, then 1mm away from the gap and core, field strength will be down by 85 to 90% of what is in the gap.
Does that mean anything placed 1 gap length away would have low field in it? Nope. Here is what you don't have going for you. The magnetic field will always find the path of lowest reluctance (or highest permeability) available. If a ferromagnetic material is placed near the gap the field will be distorted from the free field case. Here is an example of what that looks like for ferromagnetic material about 2 gap lengths away from the gap:
Figure from: A. Keyhani, "Minimum Loss Design of a 100 kHz Inductor with Litz Wire", IAS Proceedings 1997.
You can see how the field lines are distorted by the ferro-magnetic material. This would put about 20% of the fringing region field into the external material to generate eddy current losses. So, you would probably want to have at least 5 gap lengths of separation between the gap and extraneous steel housing.
Some guidelines:
- If using spacing alone, have at least 5 gap lengths between gap and any ferromagnetic structures.
- Spacing also will apply to windings due to proximity effect losses. Additionally with windings, corona effects would be a concern with any external conductors.
- It is best not to use spacing alone. Use shielded cores and bury the gap in the core (center post), and under the winding (you will need to be mindful of eddy current losses in winding if that is too close to the gap).
- For shielding the best choice is center post gapped pot cores (although these often don't have the best winding cross sections). Almost as good are EE cores (and all their family like EP and LP), and toroids. The only thing about toroids is they are low perm material (for inductors), with a distributed gap, so will leak flux (more than a high perm material). Also for a toroid you want to make sure the winding is evenly distributed around the core.
- If using laminated cores (like cut cores), make sure the gap(s) are under the windings to minimize leakage.
Beyond spacing and standard shielded cores:
- Sometimes it is possible to wrap the whole inductor, core included, in a coaxial copper sheath to act as an external shorted turn. The idea is to allow field escaping the inductor structure to cause a current in the sheath that creates a field that cancels the fields outside the sheath.
- Air core stuff is really bad for shielding. The gap length implies the fields uncontained. You might consider a high perm flux keeper outside the winding, and a distributed gap material inside the winding to contain the fields.