thread for segments files and parameters for simulation runs

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

Moderators: tonybarry, MSimon

rcain
Posts: 992
Joined: Mon Apr 14, 2008 2:43 pm
Contact:

Post by rcain »

ah, thanks HappyJack - i just noticed that 'rsqrt' - our posts crossed (you are too fast :) )

interesting, didnt know that about the GPU maths implementation.

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

Post by happyjack27 »

i found an explanation of the fast inverse square root algorithm. i think this is what the hardware does On a gpgpu (though i dont know how many iterations of newtons method are used):

on wikipedia
and a tutorial

notice the algorithm is commonly (but incorrecly) attributed to legendary programmer john carmack. (and if that's the first time you've heard of carmack and are asking "legendary, why?", chew on this: besides pioneering numerous state of the art 3d rendering algorithms and technologies, he recently wrote a state-of-the-art 3d-graphics engine that runs at 60 frames a second ON AN IPHONE. 'nough said.

http://www.youtube.com/watch?v=52hMWMWKAMk

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

Post by happyjack27 »

and in fact i don't think floating point division is implemented natively on an nvidia gpu, either. i believe it's done by multiplying by the reciprocal. (reciprocal being implemented natively.)

and both reciprocal and rsqrt have 1/4 the bandwidth of a floating point multiplication. so in the code you'll see i trade a division or reciprocal for a multiplication where ever possible. little tweaks like this may be small but they add up. and i'm an optimizer at heart. when you're writing deliberately for a particular architecture (what one might call a "hard-core" programmer, pun intended) there's a lot more to writing top-notch code than just copying down some formulas. you really have to consider every aspect of the hardware, and esp. the memory architecture and instruction scheduling. this goes back to the compsci programmer vs physicist programmer debate. though i wish i were both.

rcain
Posts: 992
Joined: Mon Apr 14, 2008 2:43 pm
Contact:

Post by rcain »

John D. Carmack of Doom and Quake fame - legendary indeed. MIP-Meister.

Many years since I went near assembly code - GPU's weren't invented. Interesting how Clifford Algebra's have come full circle, from what I understand they lie at the heart of most good GPU's now, with lots of fast lookup tables and are increasingly being taught to science undergrads as the paradigm of choice.

Surprised not to see more exotic hardware dedicated to it earlier really.

krenshala
Posts: 914
Joined: Wed Jul 16, 2008 4:20 pm
Location: Austin, TX, NorAm, Sol III

Post by krenshala »

happyjack27 wrote:
rcain wrote: could magfields/Lorentz sufaces be neatly represented by simply swapping 'points' for coloured 'arrows' i wonder? else project it out as a new phase space?
that would certainly be "neat", but it is much "simpler" to say than do. as for phase space projection, the easiest way would be separate x,y,and z components, but that probably wouldn't be very visually intuitive. so if i were to do that i'd lean towards the considerably more difficult vector approach. (though lines rather than arrows)
For a phase-space view, couldn't you display the mag-field vector using RGB coloring of a point instead of drawing an XYZ pointing vector? You'd need a "color sphere" in the corner or something to give a reference on direction for a particular color, but it should be relatively intuitive once looked at (at least, it would be for me, so take that "intuitive" part with a decent dose of salt ;)).

krenshala
Posts: 914
Joined: Wed Jul 16, 2008 4:20 pm
Location: Austin, TX, NorAm, Sol III

Post by krenshala »

rcain wrote:John D. Carmack of Doom and Quake fame - legendary indeed. MIP-Meister.

Many years since I went near assembly code - GPU's weren't invented. Interesting how Clifford Algebra's have come full circle, from what I understand they lie at the heart of most good GPU's now, with lots of fast lookup tables and are increasingly being taught to science undergrads as the paradigm of choice.

Surprised not to see more exotic hardware dedicated to it earlier really.
Dont' forget to add Founder of Armadillo Aerospace, a major contestant in the recent X-Prize and Lunar-Lander Challenge events.

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

Post by happyjack27 »

krenshala wrote: For a phase-space view, couldn't you display the mag-field vector using RGB coloring of a point instead of drawing an XYZ pointing vector? You'd need a "color sphere" in the corner or something to give a reference on direction for a particular color, but it should be relatively intuitive once looked at (at least, it would be for me, so take that "intuitive" part with a decent dose of salt ;)).
that's not the difficulty. drawing a line is easy enough. it's allocating the memory for the new vector space and getting it through the convoluted class heirarchy and then from cuda to opengl.

but i have an idea. i'm thinking i might separate the acceleration accumulator vector into two separate accumulator vectors, one for lorentz force accelerating and another for coloumb force acceleration. then i can add some new force views to the phase space views: lorentz total, lorentz radial, lorentz axial, and the same for coloumb. not as informative as a vector field, but to look for a wiffleball all we're really looking for is a point outside the center where the radial lorentz force passes through zero. and that would certainly be clear with this view. and this way i won't have to pass a whole 'nother vector space to opengl or modify the rendering code.

what do they say about mathematicians? "a good mathematician is a lazy one." perhaps the same holds true for programmers.

krenshala
Posts: 914
Joined: Wed Jul 16, 2008 4:20 pm
Location: Austin, TX, NorAm, Sol III

Post by krenshala »

happyjack27 wrote:what do they say about mathematicians? "a good mathematician is a lazy one." perhaps the same holds true for programmers.
I've heard (and believe) that a good programmer is willing to spend 30 days to write code that saves 30 seconds ... over and over and over again. ;)

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

Post by happyjack27 »

rjaypeters wrote:"Inverse" WB-6 AKA Octahedron 1m central radius:
it has 2 misconnected coil segments (had a pair of x and y coords swapped) and one coil facing the wrong way. pretty, though:

http://www.youtube.com/watch?v=mFWdva-nhEc

i fixed it though. this is at 0.15m radius, about 7 tesla. i start the plasma density low, then i push it a little.

seems to recognize the geometry, but the cusps look a more even. you can't tell if the corner of face cusps are longer. i think this would make a better wb for exactly that reason: the cusps would all plug at the same time and rate, so i think that would be more stable. uploading now.

EDIT: uploaded:

http://www.youtube.com/watch?v=UUKEUXvMmHs
Last edited by happyjack27 on Tue Dec 14, 2010 1:40 am, edited 1 time in total.

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

Post by happyjack27 »

i'll make an exception to my submissions temporarily closed rule: i would love to see hanelp's. if someone does that, i'll sim it.

or a doedec.

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

Post by happyjack27 »

interestingly, when you remove a pair of facing coils, the plasma thinks you removed all of the other coils instead (and presumably reversed the current direction)

http://www.youtube.com/watch?v=4NhkpG8BftI

(this was from validating the inverse wb-6 configuration)

for comparison, here are the facing coils that were removed by themselves.

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

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

Post by rjaypeters »

I think this is the hanelyp you mean:

Image Image

Oblique view to show octagonal character: Image

As you see I have a model, but I don't have a segment list. Perhaps hanelyp already has the list.

No dodecahedron model on the 1m radius.

I am perturbed by the errors I am making, I hope they don't cause too much trouble. :(
"Aqaba! By Land!" T. E. Lawrence

R. Peters

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

Post by happyjack27 »

rjaypeters wrote: I am perturbed by the errors I am making, I hope they don't cause too much trouble. :(
oh, they were small and fairly easy to fix. and anyways i've done it myself, i know how deceptively difficult it is to get just right.

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

Post by rjaypeters »

You didn't ask for it, but this might give an idea of what goes on. I picked the corners of the fillets as corners of the squares listed below. IIRC, these square coils miss the 1m radius sphere by 0.113m.

Quick and dirty hanelyp octahedron: Image

Code: Select all

//Quick & Dirty hanelyp Octahedron
// coil perimeter = 7.412m
//+x, +y, +z coil - down
4
0.103, 0.103, 1.456, 1.030, 1.030, 0.146
1.030, 1.030, 0.146, 1.956, 1.956, 1.456
1.956, 1.956, 1.456, 1.030, 1.030, 2.766
1.030, 1.030, 2.766, 0.103, 0.103, 1.456
//+x, -y, +z coil - up
4
0.103, -0.103, 1.456, 1.030, -1.030, 2.766
1.030, -1.030, 2.766, 1.956, -1.956, 1.456
1.956, -1.956, 1.456, 1.030, -1.030, 0.146
1.030, -1.030, 0.146, 0.103, -0.103, 1.456
//+x coil - clockwise
4 
1.133, -0.926, 0.0, 2.986, -0.926, 0.0
2.986, -0.926, 0.0, 2.986, 0.926, 0.0
2.986, 0.926, 0.0, 1.133, 0.927, 0.0
1.133, 0.927, 0.0, 1.133, -0.926, 0.0
//-y coil - counter-clockwise
4 
-0.926, -1.133, 0.0, 0.927, -1.133, 0.0
0.927, -1.133, 0.0, 0.926, -2.986, 0.0
0.926, -2.986, 0.0, -0.926, -2.986, 0.0
-0.926, -2.986, 0.0, -0.926, -1.133, 0.0
//-x, -y, +z coil - down
4
-0.103, -0.103, 1.456, -1.030, -1.030, 0.146
-1.030, -1.030, 0.146, -1.956, -1.956, 1.456
-1.956, -1.956, 1.456, -1.030, -1.030, 2.766
-1.030, -1.030, 2.766, -0.103, -0.103, 1.456
//-x coil - clockwise
4 
-1.133, -0.927, 0.0, -1.133, 0.926, 0.0
-1.133, 0.926, 0.0, -2.986, 0.926, 0.0
-2.986, 0.926, 0.0, -2.986, -0.926, 0.0
-2.986, -0.926, 0.0, -1.133, -0.927, 0.0
//-x, +y, +z coil - up
4
-0.103, 0.103, 1.456, -1.030, 1.030, 2.766
-1.030, 1.030, 2.766, -1.956, 1.956, 1.456
-1.956, 1.956, 1.456, -1.030, 1.030, 0.146
-1.030, 1.030, 0.146, -0.103, 0.103, 1.456
//+y coil - counter-clockwise
4
0.926, 1.133, 0.0, -0.926, 1.133, 0.0
-0.926, 1.133, 0.0, -0.926, 2.986, 0.0
-0.926, 2.986, 0.0, 0.926, 2.986, 0.0
0.926, 2.986, 0.0, 0.926, 1.133, 0.0
//+x, +y, -z coil - up
4
0.103, 0.103, -1.456, 1.030, 1.030, -0.146
1.030, 1.030, -0.146, 1.956, 1.956, -1.456
1.956, 1.956, -1.456, 1.030, 1.030, -2.766
1.030, 1.030, -2.766, 0.103, 0.103, -1.456
//+x, -y, -z coil - down
4
0.103, -0.103, -1.456, 1.030, -1.030, -2.766
1.030, -1.030, -2.766, 1.956, -1.956, -1.456
1.956, -1.956, -1.456, 1.030, -1.030, -0.146
1.030, -1.030, -0.146, 0.103, -0.103, -1.456
//-x, -y, -z coil - up
4
-0.103, -0.103, -1.456, -1.030, -1.030, -0.146
-1.030, -1.030, -0.146, -1.956, -1.956, -1.456
-1.956, -1.956, -1.456, -1.030, -1.030, -2.766
-1.030, -1.030, -2.766, -0.103, -0.103, -1.456
//-x, +y, -z coil - down
4
-0.103, 0.103, -1.456, -1.030, 1.030, -2.766
-1.030, 1.030, -2.766, -1.956, 1.956, -1.456
-1.956, 1.956, -1.456, -1.030, 1.030, -0.146
-1.030, 1.030, -0.146, -0.103, 0.103, -1.456
So, complete the hanelyp octahedron or dodecahedron next?
"Aqaba! By Land!" T. E. Lawrence

R. Peters

hanelyp
Posts: 2261
Joined: Fri Oct 26, 2007 8:50 pm

Post by hanelyp »

The image I posted for the "winged" octahedron was an eyeball design done direct in wings3D. I don't have a segment list suited for your modeling. rjaypeters appears to have captured the geometry. Just need to make sure current in the segments goes the right direction.

Post Reply