The shape of a solenoid is specified by its inner and outer radius, and its length. The center of the solenoid is at the point specified by the coordinates positionX, positionY, and positionZ. The number of turns is specified by winding which can be specified or calculated from the wireDiameter. Fields on the axis of the solenoid are found using an analytic form. Off axis, however, the field is found by decomposing the solenoid into loops and summing the loop fields. The finesse of this decomposition is set by the resolution box, e.g.,
resolution 2mm
The resolution should be chosen wisely; too large a value will give unrealistic fields, too small may make the calculation unbearably slow. If the resolution is zero or omitted, then it is assumed to be equal to the wire diameter. If both are zero then the solenoid degenerates into a filamentary current loop. It is possible to specify a near-axis or paraxial calculation by giving a nonzero value to paraxialR. Closer to the axis of the solenoid than paraxial, an expansion is used which can be very much faster than summing over loops. Similarly to a loop, the number of angular steps used to draw the solenoid is given by the nphi command, and a partial range of phi can be drawn.
To make a pancake solenoid, simply put length=0. To make a thin solenoid, put innerRadius=outerRadius. A thin pancake solenoid is equivalent to a current loop.