This patch: Kneechord patch against gnucap v0.31 provides the option to use the Kneechord strategy which improves numerical stability in nonlinear components (particularly saturated inductors). NB: This patch ONLY installs the function call into the inductor model. It is a simple additional change to install this into other models.
This patch: Phi patch against gnucap v0.31 provides additional probes for inductors: PHI() and FLUX() which both do the same thing and return the flux-linkage of the coil.
WARNING: The above patches are mostly for historical interest, gnucap v0.34 already includes the PHI and FLUX probes as standard and includes the kneechord strategy as an experimental feature on all two terminal devices (you need to edit the Makefile -- add inverse.cc to the list of source files, add inverse.o to the list of object files and add -DKNEECHORD to the CFLAGS). Hopefully the kneechord will become standard in a future release, you can still switch it off using the new "STRAGEGY" option. It is probably confusing having a "METHOD" option and a "STRATEGY" option which sound vaguely related but really are quite different, people will just have to get used to it.
Eagle gives you an interpreted programming language that is a bit like Java, with "String" as a native type and the ability to access all the CAD system data structures in an object oriented manner. It's quite a handy thing to have because you can easily export CAD data in whatever format you like and you can extend the basic editor with your own funky commands.
Naturally, I want to output to gnucap. I would have written the entire thing in the Eagle CAD language but when it comes to the wire, perl is much more powerful. Most significantly, perl has hash tables as a native type and while I could write a hash table for Eagle CAD, it didn't seem worth the effort. Thus I have a two-phase process. A very simple program runs in Eagle CAD and outputs the circuit topology (Eagle's internal topology is net-oriented so this first phase is net-oriented) then a more complex perl program runs as the second phase and converts this into a SPICE netlist (which is device-oriented).
You still need to define any subcircuit models for the chips that you use but that isn't too difficult because gnucap allows ".<" lines that will allow a top-level simulation file to bring in subcircuit models from one group of files and the main netlist from another file and then declare simulation commands. This all works quite nicely, the one thing that does need tweaking is the mapping between CAD device pins and model device pins. I've put that mapping into a special function in the perl program, eventually it should be modularised but by writing the mapping in perl (rather than a data file) you have both high speed and great flexibility.
The non-convergence in gnucap is a constant source of annoyance especially when it gives so little explanation as to why or what has gone wrong.