[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: hydraulic symbols and schematics



On Apr 8, 2010, at 2:35 AM, Florian Teply wrote:

> Umm, now that you mention Mathematica: Do you know of a way of feeding
> from gEDA to Open Source computer math packages like octave or scilab?
> Not that i'd currently feel a personal need of it, but i'm curious. Such
> information often came in handy when i expected it the least
> beforehand...

My mathematician son and I sat down at Ales' place with the gang for a code sprint last year and tried to do this with Sage. The snag we ran into is that although it's easy to export netlists to anything with gnetlist, handling models is trickier.

The way it works for Mathematica is that the mathematica back end for gnetlist translates attributes to Mathematica expressions in a fairly mindless way. The attribute:

model=opamp[bandwidth->bw]

attached to U1 turns into the Mathematica expression:

opamp[bandwidth->bw]["U1"]

It's then Mathematica's job to expand this into equations and concatenate them to the node equations. This is very easy and natural if you know Mathematica: it's designed to do this kind of manipulation. Making the Mathematica side responsible for models seems to be a good way to go; one advantage is that it's easy to add specialized models as needed for a particular analysis: just define them in your Mathematica code before importing the "netlist". My gEDAmath.m package defines helper functions for model construction, so models tend to be just a line or two of code.

But in Sage, at least, expanding functions into lists of equations doesn't appear to be easy or natural. The attempt pushes you into the ill-documented borderland between Python and Maxima. No doubt it's possible if you're an expert, but we failed at it.

I suppose another way to go would be to make gnetlist responsible for model expansion, but that would be less flexible, I think. 

Perhaps Sage isn't the right math system and another system would be better. If anyone can recommend a system and help with the programming on that side (especially in defining what the "netlist" should look like), the gnetlist side is something that's pretty easy for me.

John Doty              Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd@xxxxxxxxx




_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user