Page 1 of 1
data visualization ideas for simulation.
Posted: Fri Nov 26, 2010 9:03 pm
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.
Posted: Sat Nov 27, 2010 12:14 am
Holy cow! Just remember to eat, sleep, etc.
Posted: Sat Nov 27, 2010 12:19 am
Sounds fun! Good luck.
Posted: Sat Nov 27, 2010 4:20 pm
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:
in my sim this will be in 3-d and you'll be able to switch between views with the flick of a switch.
Posted: Mon Nov 29, 2010 7:42 pm
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.
Posted: Tue Nov 30, 2010 8:47 pm
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.
Posted: Tue Nov 30, 2010 10:51 pm
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):
4-radial kinetic energy
6-axial kinetic energy
8-fusion cross section
i'll post the link here when it's done uploading.
Posted: Tue Nov 30, 2010 11:31 pm
Posted: Wed Dec 01, 2010 2:41 pm