A simple calc tool for particle speeds vs volts, mass, other

Well, it appears there's no really good way to do this here. This will contain various bits of code used to support the fusor, which presently includes everything from embedded 8 bit uP code to stuff to run under Linux in some HLL (often perl) to interface-specific stuff for commercial hardware, sysadmin tips and setups, and running on whatever machines I have in the tree here. So any one piece might fit some other category too, but...there's no pigeon-holing even computer science without losing the app-specific stuff and inter-relations of it all in a specific usage.
Forum rules
Code sharing for fusor data aq and control software

A simple calc tool for particle speeds vs volts, mass, other

Postby Doug Coulter » Sat Sep 23, 2017 1:51 pm

I wanted this to get a better feel for the conditions inside the fusor. Am I dealing with a polarized plasma? Debye shielding? Various instabilities (usually named after some scientist also), unknown effects due to the fact that we have both long mean free path (molecular flow, atomic billiards) and viscous flow (fluid kind of behavior) in the same tank at the same time - this is really not-explored turf.
In the case of "dense thermalized plasma" all the books about how plasma works in NASA thrusters and tokomaks probably apply....
In the case of billiards and not-too-high charge density, we probably have more CERN-like behavior, and moving from ground to 50kv probably puts around 50kev on something, with a speed dependent on it's mass mainly.
Well then. This should be the same Newtonian math I got in 10th grade high school...Nothing but electrons here is even close to relativistic.
Well, systems of units have changed since...and the doggone physics guys assume you "just know" that they're using abvolts or whatever so they can write neat equations without using c or pi or what-the-heck-ever and they look smarter than you - without managing to convey how to do it. Hey, verifying this math for dropping an apple from shoulder height is super easy - you know it's not a microsecond or a month by inspection. With charged particles in an applied field (making the assumption that they themselves aren't making a major part of said field) - not so much, accelerations are fearsome compared to our normal 32 ft/sec/sec (ok, I could go metric on that but...that's my point here)

Perl being my tool of choice for quickies, with Gtk for any GUI, I wrote some code that gives speed if you know volts and particle, or volts if you know speed and particle for the top half, and if you know particle and time to distance, the field gradient and the total field - in human being kinda units. Which was a fairly major PITA, even physics for dummies used a totally ridiculous drag race example (if you race, as I did - you don't have an "average" G force - it's a lot higher at the start than at the fast end). And all mixed units with my books from the 40's through the 60's, but an organic chemist making a good video for whatever reason did it all in modern units and made that second half easy (after only a day fishing around on google) The first half I did from Fredrick Terman's radio engineer's handbook from '43 and used his math and units for since it worked and I could back-check it via knowing transit time limits in vacuum tubes of the era (sigh, old age had to have something going for it, eh?).

I used a perl trick to put the Gtk3 XML right in the perl file so I could slurp it up in one big string and hand it over to Gtk3, making my life a little simpler than having to have two files around (to edit in Glade, you just copy that part to a file and edit the file and copy back). To run this code you need perl >= 5.20 (just about any linux is fine there) and Gtk3.pm which can be a right hassle to get installed, as it pulls in more things than cpanm easily handles (some crap about introspection). Usually takes a couple tries and reading the build errors to figure out what to get manually using synaptic and so forth...I never wrote that down as once I did it, I was tired and never needed it again anyway (bad Doug!).

Running, it looks like this:
Screenshot at 2017-09-19 18-54-21.png
Put in some knowns and click to get the missing one for most combinations.



So here's the goodie:
speedvolt.zip
Source code, perl and GTK
(3.8 KiB) Downloaded 335 times


As usual, this is best viewed with something that syntax highlighting that works decently on perl (I use sublime text or gedit), and anything I thought questionable has a @@@ in the comment on that line of code.
Posting as just me, not as the forum owner. Everything I say is "in my opinion" and YMMV -- which should go for everyone without saying.
User avatar
Doug Coulter
 
Posts: 3515
Joined: Wed Jul 14, 2010 7:05 pm
Location: Floyd county, VA, USA

Return to Fusor support

Who is online

Users browsing this forum: No registered users and 1 guest

cron