[Prev][Next][Index][Thread]
Ed H's Nifty Program (was: Magnifier system)
Ed;
Thanks loads for sharing that QuickBasic program. It was fun to look
through, because I've been doing some things in the same area. I don't
know wether or not you realize it (perhaps you do, but were just being
modest) but your program is very close to being able to model an entire
Tesla Coil, rather than just a structure similar to a secondary.
It appears that the mutual inductance matrix should be able to hold
both primary and secondary inductance segments, and you'd need to
evaluate your loop equations in two bunches, rather than one, since the
primary and secondary aren't physically connected. Speaking of loop
equations, I think that the equation:
f(k) = dt * (q(k%-1) * oc(k%) - i(k%) * r(k%) - q(k%) * oc(k%))
might instead possibly need to be:
f(k) = dt * (q(k%-1) * oc(k%-1) - i(k%) * r(k%) - q(k%) * oc(k%))
If so, the difference might be negligible for any realistic data, but
let me know what you think.
I suspect that a slightly more thorough treatment would also include
a capacitance matrix that describes capacitances between the nodes and
(especially) each node and the last node, which represents the discharge
terminal. I think that this would again involve only a slight change
to your code, in the line where you evaluate dq(k%), and the inclusion
of the matrix itself. I guess you'd also need to save the voltage matrix
from the previous iteration, so you could get dv/dt to get the current
through the new capacitors. Since you already have the voltages at the
nodes, you're pretty much already there.
The really neat thing about this is that you've managed to capture the
core of the analysis in just a couple hundred lines of code. I think
that's something to brag about!
I haven't gotten to this point in my code yet, having started somewhat
in the opposite direction, trying to evaluate the various capacitances
from the system geometry. (A very interesting problem, but an easy place
to get bogged down. Still, getting closer.) But I expect I'll be looking
at your code again when/if I ever get to solving the part you've done and
shared with us. (I say "if" becase I spend all day + evenings & weekends
producing production code of other sorts at work, and then I come home
and do more, just for fun... The work is sporadic at best. It'll be a
lot more fun matching the model to real data, I think.)
In any case, I was really happy to see what you had to share. If my
ideas about modifying it seem even the least bit plausible, I'd be
really interested in chatting more with you about your program. Thanks
again & take care.
Wes B.
*****************************************************************************
* wesb-at-spectra-dot-net *
*****************************************************************************