[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Super fast E-Tesla5 in "C"
Hi All,
I have spent about 20 hours this weekend working on E-TESLA5. Mostly
figuring out C commands and such. Both the BASIC and C versions are now
very clean. The C version can now take arrays of any size until your
computer explodes ;-)) I have run 1000 x 1000 awhile and it works fine.
The C version has much more accurate internal calculations so the numbers
between the two versions varies slightly. MathCad6e can display the 1
million point grid fine, given time. Excel is useless for giant arrays
like that. It is cool watching MathCad display the grid. You can see
little tides and waves, like fractals, as it is drawing the plot.
Typically, grids of 100 to 200 give very good results and are very fast.
Amazingly, the C version (5.430) is 440 times faster than the old 5.11
BASIC version thanks to everyone's help!!
The program has the toroid/sphere inputs reworded and you now input the
toroid cord diameter instead of the radius which caused a lot of confusion.
The BASIC version is now fixed at accuracy level 5 (grid size 120).
The only real thing left affecting the program's accuracy is the secondary
voltage distribution. The powerful C version confirmed my suspicions that
the errors I do see are caused by inaccuracies in that distribution.
However, it also confirms my fear that the distribution is far more complex
than I suspected. But, the program can probably figure that out too in
some future version. Much thought will have to go into that. It gets into
the affects of nearby objects on the inductance and capacitance of
different sections of the secondary in space...
Much as this program does not relay on lumped or T-line theory to find the
coil's Fo frequency, I think the voltage distribution along the secondary
does not need to either! =:-O At this level of precision, it is an
inductor in a complex space with near by objects and only the laws of
physics and Maxwells equations will solve the mess. Fortunately, the
program has all the tools needed, I just have to figure out the theory to
program it...
I hope this version will stay stable for at least a day this time ;-))
http://users.better-dot-org/tfritz/site/programs/E-TESLA5.ZIP
Again, many thanks to Sarah for writing the C version and inspiring me to
get back into "C". The modern versions are much better than when I played
with C years ago. Of course, it is also much easier when someone else
writes it too ;-))
Cheers,
Terry
>Hi All,
>
> E-Tesla5 now has a "C" version!! Many thanks to Sarah for doing the
>conversion!! I have done a tiny bit of C programming but I could have never
>figured it all out... It is over SEVEN times faster than the fastest BASIC
>version and can do very large 300 x 300 arrays ;-)) On my computer at array
>size 120, the program does 20000 passes in 49 seconds even though it has
>very high accuracy internal numerics!!
>
>The array size of 120 is eqivalent to the old accuracy level 5,
>96 is 4, 72 is 3, ...
>
>The program now simply runs until zero error is reached or you <CNTRL-C> it.
>
>The C version and source along with the BASIC version and source are at:
>
>http://users.better-dot-org/tfritz/site/programs/E-TESLA5.ZIP
>
>I did a test case at the 300 level that took about 25 minutes to run (6.3
>billion point calculations!) that calculated 0.3% off from the actual
>measurement. I also did a neat mathcad graphic of it at:
>
>http://users.better-dot-org/tfritz/CET5.gif
>
>I just took the accuracy thing out of the BASIC version since it is so fast
>now and people were having trouble with the lower accuracies. I also added
>a strike rail input so you can model those too.
>
>Again, many thanks to Sarah for going to all this great work!!!
>
>Cheers,
>
> Terry
>