data visualization ideas for simulation.

Discuss how polywell fusion works; share theoretical questions and answers.

Moderators: tonybarry, MSimon

Post Reply
happyjack27
Posts: 1439
Joined: Wed Jul 14, 2010 5:27 pm

data visualization ideas for simulation.

Post by happyjack27 »

oh, man, have a got some ideas.

i was just going to make some 2-d overlay, you know, binning them all up. then i decided, why not show each individual particle, just swapping, say, it's z coordinate for its' potential energy, y for kinetic, x for distance from center. then you can even watch all the individual particles move about in 3-d phase space in real time!

then as i make more variables / graphs i can just add them as different modes for the main view.

i'm thinking that would be awesome. that's my plan now. main task is i have to switch out the particle renderer so it can use different sources for the x,y, and z coordinates. which means i might have to add a level of indirection and/or do some "re-wiring", so to speak. i'll also have to make it so you can adjust x,y, and z scales independently. but when it's done, i'm thinking it will be well worth it.

rjaypeters
Posts: 869
Joined: Fri Aug 20, 2010 2:04 pm
Location: Summerville SC, USA

Post by rjaypeters »

Holy cow! Just remember to eat, sleep, etc.
"Aqaba! By Land!" T. E. Lawrence

R. Peters

TallDave
Posts: 3140
Joined: Wed Jul 25, 2007 7:12 pm
Contact:

Post by TallDave »

Sounds fun! Good luck.
n*kBolt*Te = B**2/(2*mu0) and B^.25 loss scaling? Or not so much? Hopefully we'll know soon...

happyjack27
Posts: 1439
Joined: Wed Jul 14, 2010 5:27 pm

Post by happyjack27 »

i was looking around for a few examples to show how it's going to look (and to see how it's going to look for myself) i only found 2-d ones. mine will be in 3-d. this is real space evolution:

http://www.youtube.com/watch?v=yuiJ8Nl- ... re=related

and this is the phase space evolution of the same system:

http://www.youtube.com/watch?v=vKvi6H1fQhk

in my sim this will be in 3-d and you'll be able to switch between views with the flick of a switch.

happyjack27
Posts: 1439
Joined: Wed Jul 14, 2010 5:27 pm

Post by happyjack27 »

ion density is an important thing to measure, ofcourse, but in simulation it's a little trickier than most other things, because it's not purely a particle-based measure, but is based on space as well.

i've given it some thought, and i've decided that the way to go is to sort the particles by their distance from center, using maybe a gpu-based fast radix sort, such as the one that comes with nvidia's sdk. so then you get a list like this, ordered from closest to center to farthest:

particle number, distance from center
particle number, distance from center

then the per-particle density is estimated thusly:

since volume contained within spherical radius r is r^3, r1^3 - r0^3 gives the difference in volume contained at the two radii r1 and r0. if there are exactly n particles between those two radii, then the density is n / volume =

(number of real ions that each virtual ion represents) / [(radius of next further ion)^3 - (radius of next closer ion)^3]

to soften it up you can go e.g. 2 in and 2 out instead of just 1 in and 1 out, effectively making it a moving average.

with density estimates, you can get density^2 and multiply that by the cross section (a function of kinetic energy) to get the fusion rate at that radius. and that'll be linear to the power gain. multiply that by the volume at that radius [(radius of next further ion)^3 - (radius of next closer ion)^3] and you get total fusions per second at that radius.

then "the area under the curve", as they say, is the total fusion rate for the entire system. multiply that by energy per fusion and the power conversion efficiency and you get gross power gain. then all you've got to do is subtract your power losses and you get your net energy production per second.

so that'll make for a great and very important visualization. i'm not there yet, though. like i said, it's a little trickier. i've got to add the sort routine and all that, something which i didn't have to do for any other view.

happyjack27
Posts: 1439
Joined: Wed Jul 14, 2010 5:27 pm

Post by happyjack27 »

i just had a minor epiphany. by deferring lost particle recycling i can implement particle loss diagnostics as a "particle filter", thus you can see anything about a lost particle that you can about a live particle. for the one time-step before it gets recycled, at least. meaning they'll show up as blips.

i suppose this calls for a little introduction about the visualization options added to what i'm calling a "major revision".

all these options are selectable via sliders:

1. "particle filters"
a) type: show only the ions, only the electrons, or both
a.2) status (just added): show only particles that have just hit a loss channel, or only particles that haven't.
b) z-slice (2 sliders): show only the particles with z position between z0 and z0+d.

2. "axis display modes" for each axis, there is a slider that selects what that axis represents:
a) radius^3 (the number of volume elements between this radius and the center - this was put in to get a sense of the density distribution)
b) radius^2 (just thrown in for contiguousness)
c) radius (distance from center, (duh))
d) the position of the particle on this axis (x,y,z, respectively)
e) the electric potential energy of the particle (magrid currently not included in this calc)
f) the kinetic energy of this particle (aka inertia/momentum)
g) the current electromagnetic force on this particle (acceleration / mass)
h) radial ke
i) axial ke (total ke minus radial ke)
j) radial force
k) axial force (total minus radial)
l) the current fusion cross section of this particle (assuming its a fuel ion) in barns

3) quantity scales
a) radius scale
b) potential energy scale
c) kinetic energy scale
d) force scale
e) cross section scale

so you'll be able to watch any combination of any of that stuff evolve in sim time.

ions and electrons will have opposite potential energy, axial kinetic energy, and axial force, as they have opposite charge so their reaction to electric and magnetic fields is opposite. their radial ke and radial force will be signed with whether they're going (or accelerating, respectively) towards or away from the center. total ke and total force are absolute magnitudes.

crossing my fingers that it renders this time.

happyjack27
Posts: 1439
Joined: Wed Jul 14, 2010 5:27 pm

Post by happyjack27 »

it works!

video uploading now. it seems my video editing software trial period has expired. oh well.

you will see in the video my cycling through the various display modes, keeping x and y axis at the default, cycling only the z axis.

the plasma density in this run is pretty low relative to a real life run.

the "bumping" you see at the beginning is just particle recycling. when it starts out it's rather pulse like, because all the lost particles get lost at about the same time.

in chronological order, listed with their "mode number" (see z-mode on the sliders on the left):

0-normal
1-potential energy
2-kinetic energy
3-force
4-radial kinetic energy
5-radial force
6-axial kinetic energy
7-axial force
8-fusion cross section

i'll post the link here when it's done uploading.

happyjack27
Posts: 1439
Joined: Wed Jul 14, 2010 5:27 pm

Post by happyjack27 »


BenTC
Posts: 410
Joined: Tue Jun 09, 2009 4:54 am

Post by BenTC »

happyjack27 wrote:it seems my video editing software trial period has expired.
Perhaps...
http://www.osalt.com/final-cut-pro
http://www.osalt.com/camtasia
http://en.wikipedia.org/wiki/Comparison ... g_software (sort by list price)
In theory there is no difference between theory and practice, but in practice there is.

Post Reply