On Tuesday 18 September 2007, Peter Clifton wrote: > Hi, > > I'm trying to use gnucap for simulating a machine - and am > attempting to produce an electrically analogous sub-circuit > circuit model to simulate the behaviour of a generator. > > I can get position and velocity (position is input from a > sinusoidal source), and this is differentiated with a > capacitor, and sensed with a CCVS. > > What I'm a little stuck on - is how I can use my arbitrary > positions and velocities (which exist as terminal voltages) > to feed an equation which determines the induced EMF on the > generator coils. > > There needs to be a sin( position ) term as part of this. > > I believe ng-spice allows you to define functions, but > couldn't "place" similar functionality in gnucap..
Spice has a "B" device that lets you define expressions. It is planned for gnucap, high priority, but not done. I have an expression evaluator. Need to merge it in. > Do I need to write my own model in C++? There is nothing as easy as the "B" device. Options available are 1. define as a poly, 2. use a table, 3. code a bm_ plugin in C++ (This really is easy. Tell me what you want and I will show you.) 4. A more elaborate behavioral model as a .model file, which becomes a plug-in. _______________________________________________ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user