For the latest version please check http://www.qsl.net/in3otd/

coilgen generates input files for FastHenry (ftp://rle-vlsi.mit.edu)
for simulating coil structures. It can be used, for example, to calculate 
the inductance of a variometer under different positions of the coils.

The coil geometry is read from the configuration file 'coilgenrc':
This text file contains a row for every coil in the system; everything 
after a '#' character is ignored. 
The format of coil description lines is:
diameter length #turns wire_diameter centre_x centre_y centre_z

For example, my main variometer is composed of two concentrical coils; the
bigger one has 62 turns of 48.5 cm diameter and is 26.5 cm long, while the
smaller has 57 turns of 33.0 cm diameter and is 24.0 cm long. Wire diameter 
is 2 mm for both coils.
The 'coilgenrc' for this configuration is:

0.485 0.265 62 2e-03 0.0 0.0 0.0
0.33 0.24 57 2e-03 0.0 0.0 0.0

Note that coils centers are at the origin, but this is not important, 
as long as the relative position is correct...


coilgen accepts also some command line parameters; usage is:

coilgen [options] [outfile]

where 'options' can be:
  -d n: use 'n' segments per turn (default is 16)
  -h  : print usage help
  -v  : print version information

Simulation frequency is fixed to 0.1592 Hz, so the resulting
impedance value is numerically equal to the inductance.
If 'outfile' is not specified, output goes to stdout; the output can
be piped directly to fasthenry, like:

coilgen | fasthenry


For the above command the resulting output from FastHenry is:

Running FastHenry 3.0 (29Sep96)
  Date: Mon Sep 24 22:02:39 2001
  Host: pc
Solution technique: ITERATIVE
Matrix vector product method: MULTIPOLE
  Order of expansion: 2
Preconditioner: ON
Error tolerance: 0.001
No input file given.  Reading from stdin...
Title:
* File generated by coilgen, Mon Sep 24 22:02:39 2001

all lengths multiplied by 0.001 to convert to meters
Total number of filaments before multipole refine: 1902
Total number of filaments after multipole refine: 3804

Multipole Summary
  Expansion order: 2
  Number of partitioning levels: 3
  Total number of filaments: 3804
Percentage of multiplies done by multipole: 100%
Scanning graph to find fundamental circuits...
Number of Groundplanes : 0 
Number of filaments:       3804
Number of segments:        3804
Number of nodes:           3806
Number of meshes:             2
          ----from tree:                   2 
          ----from planes: (before holes)  0 
Number of conductors:         2   (rows of matrix in Zc.mat) 
Number of columns:            2   (columns of matrix in Zc.mat) 
Number of real nodes:      3806
filling M...
filling R and L...
Total Memory allocated: 34262 kilobytes
Frequency = 0.1592
Forming sparse matrix preconditioner..
conductor 0 from node n992
Calling gmres...
1 2 
conductor 1 from node n0
Calling gmres...
1 2 

All impedance matrices dumped to file Zc.mat

Times:  Read geometry   2.57
        Multipole setup 82.95
        Scanning graph  0.02
        Form A M and Z  0.14
        form M'ZM       0
        Form precond    0.14
        GMRES time      15.79
   Total:               101.61


And the FastHenry output file 'Zc.mat' is:

Row 2:  n992  to  n1903
Row 1:  n0  to  n991
Impedance matrix for frequency = 0.1592 2 x 2
      0.408091   +0.00182523j   1.03128e-19   +0.00069845j 
 -1.67805e-19  +0.000698737j      0.255256   +0.00088569j 

So the first coil has an inductance of 1.826 mH, the second 886 uH and
the mutual inductance between the two is 699 uH.


If you have any questions, suggestions or bug reports, please contact
me at in3otd@qsl.net.

                                 Claudio



Local Variables:
mode:indented-text
mode:auto-fill
End: