-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 B-SOL by  Matjaz.Vencelj@fmf.uni-lj.si

 Accurately calculates magnetic field density  of a straight solenoid
 at _any_ point outside or inside, given solenoid dimensions, current
 and number of wire turns. Should work on both S and G series.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Hey!

I've been looking for this for a while, finding none, wrote one. :)

BSOL.BIN is an HP directory containing programs SOL and HELP (and some
others you need not run). Download binary, 1.5k, pure user RPL.

SOL takes one argument of the form:
    { r, l, n, [x,y,z], I},
r and l being... (guess by yourself!), n is the number of wire turns,
[x,y,z] is a vector of eye coordinates (where the field density is
calculated) and I the current through the wire.

If you forget any of these, just run HELP.

The solenoid is placed with its _center_ at the coordinate system
origin, with the symm. axis aligned with the z axis of the coordinate
system.
The wire starts at lower base of the cylinder (negative z value) at the
point with max. x coordinate. The number of wire turns, n, can be
non-integer. If positive, the coil is right-oriented, otherwise - left.
The current (I) should be positive when running upwards (in the dir. of
z axis), negative otherwise.

The result is a vector of x, y, and z projections of Magnetic field
density vector.

Put in all data in SI units and you get the field density in VS/m^2.

Program uses `Biot-Savart' law and numerically integrates up to the
accuracy factor of 10^-3. Typical run-times are between one and three
minutes. Don't exaggerate with n, as it may get awfully slow. A few
dozen is about the maximum, since the compute time is about n/10 (in
minutes).

(If you need more, when observing near the solenoid, use n=20 or so
and multiply the final result with the right factor. If you are far away
with the eye coordinates, it doesn't matter, anyway.)


Please send comments or suggestions!

Yours,

  *  Matjaz Vencelj   *   matjaz.vencelj@fmf.uni-lj.si   *


