Page 5 of 6

Posted: Fri Nov 19, 2010 1:00 pm
by rjaypeters
Happyjack27,

Beautiful work!

What time is shown in the videos? I imagine the particle movement in reality would be faster than we can perceive, and I don't expect any simulation to run in real-time.

Posted: Fri Nov 19, 2010 1:27 pm
by BenTC

Posted: Fri Nov 19, 2010 2:11 pm
by happyjack27
icarus wrote:happyjack:

I assume you have already made sure that a test case single charge around a wire has the correct gyro-radius?
Similarly a test charge moves away from a charged wire with correct acceleration?

Best to validate the building blocks before constructing larger scale simulations in my experience.
not really practical to run a single charge on this thing. and i wouldn't know what current densities to put in or how to measure it. i have all the constants in, so it should be right.

i have some improvements to make to it still. like voltage sliders and particle sources. i'll get to those first.

Posted: Fri Nov 19, 2010 2:14 pm
by happyjack27
rjaypeters wrote:Happyjack27,

Beautiful work!

What time is shown in the videos? I imagine the particle movement in reality would be faster than we can perceive, and I don't expect any simulation to run in real-time.
1 frame = 1.0/(speed of light squared * elementary charge (in coloumbs) * 2000) seconds. it seemed reasonable, and it looks reasonable.

the electron timescales and ion time scales are so different (do to their different masses). i have to set the timestep based on electron time scales so the ions move really slow.

Posted: Fri Nov 19, 2010 2:19 pm
by rjaypeters
BenTC,

Thanks, very cool.

Happyjack27,

Got it, thank you!

Posted: Fri Nov 19, 2010 4:17 pm
by icarus
happyjack:
not really practical to run a single charge on this thing. and i wouldn't know what current densities to put in or how to measure it. i have all the constants in, so it should be right.
So how do you know what you are calculating is what you think you are calculating, beyond "it looks cool so it must be right" ...?

Kind of of intrigued what you expect to get out of this, beyond interesting looking animations.

Posted: Fri Nov 19, 2010 4:52 pm
by happyjack27
icarus wrote:happyjack:
not really practical to run a single charge on this thing. and i wouldn't know what current densities to put in or how to measure it. i have all the constants in, so it should be right.
So how do you know what you are calculating is what you think you are calculating, beyond "it looks cool so it must be right" ...?

Kind of of intrigued what you expect to get out of this, beyond interesting looking animations.
because from looking at it i can tell that the geometry is right. and from code -- the fact that i put in the right mathematical constants -- i know that the scale is right.

(furthermore, even if the scale is wrong, the simulation is still correct. it's just a simulation of say 45 volts instead of 2 volts. and you know how we fix that? we multiply our voltage density parameter by 2/45.)

if anyone wants to give me some configurations, including voltage and current densities, and what the results should be, i can run them and post a video. though currently there's no way to put a yardstick on there.

oh, and what i expect to get out of it: an accurate picture (quite literally "picture") of plasma flow in different configurations.

Posted: Fri Nov 19, 2010 9:52 pm
by Randy
BenTC wrote:Just for reference...
http://www.falstad.com/mathphysics.html
This guy gives you the source code to his applets too - fantastic!

Thanks for the great link Ben.

~Randy

Posted: Sat Nov 20, 2010 4:24 am
by happyjack27
just two more tests, facing coils, same polarity:

http://www.youtube.com/watch?v=5J3SFF1811U

the coherent axial flow leads to radial oscillation and ultimately instability. not a good sign for tokamaks.

now if the coils are opposite polarity, thus giving you facing magnetic fields:

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

Posted: Sat Nov 20, 2010 4:34 am
by Aero
happyjack27 -
Is there any way to show the trace of a small number of particles? Something a little more definitive than my keen eye and short term memory? I'd like to see something spiraling around magnetic field lines. If we could see the Lamar radius, then we could tell what the separation of the coils should be, according to guesstimates, anyhow.l

Posted: Sat Nov 20, 2010 4:51 am
by icarus
happyjack:
oh, and what i expect to get out of it: an accurate picture (quite literally "picture") of plasma flow in different configurations.
I hate to rain on your parade because it seems you are enthusiastic and maybe even doing some good work but without even a basic attempt at validating your simulations they are worthless as theoretical tools.

i) because the equations went into the code 'correctly' means nothing, it is the behaviour of the output (i.e. that it models the physics) is what is important.

ii) how do you know numerical errors in particle position are not accumulating over time? (Google 'numerical error correction methods', it is a large branch of numerical scientific computing)

iii) I gave you the two most basic configurations that the behaviour is well-known for and calculable from an analytic solution; a) a single charged particle near a straight wire with current and b) a single charged particle near charged line

If you can't verify your model is behaving correctly for these two most simple cases in iii) you will never be sure what it is doing for 2, 3 or n bodies. It maybe a pain to do but if you don't do these two basic tests with verifiable output you may as well take these simulations to the "General" thread because it is not theory but just animations you are doing. Just the facts jack. Hope that helps.

Posted: Sat Nov 20, 2010 1:15 pm
by happyjack27
icarus, i just told you that i already verified the model is behaving correctly.
particles move away/towards charges proportional to their charge, inverse to their mass, and inverse to the distance squared. likewise, they move in relation to b fields in the correct orientation and relative speed. the only question is scaling by a constant, and being off by a factor of a constant does not make the model incorrect. (and i have all the constants in there anyways, so the scale is correct, unless somehow multiplication is broken.)

Posted: Sat Nov 20, 2010 3:38 pm
by happyjack27
i tell you what, icarus: the code is open-source. make me a ruler and i'll measure you some gyroradi. it's something i'd like to do, actually, just difficult to implement, and not really neccessary for what i'm simulating right now. better yet make the magrid show up. just a matter of drawing some lines in OpenGL. do that and i will definitely measure you some gyroradii.

http://sourceforge.net/projects/em-nbody/

Posted: Sat Nov 20, 2010 7:55 pm
by icarus
happyjack;
i tell you what, icarus: the code is open-source. make me a ruler and i'll measure you some gyroradi.
Ah, no, it doesn't work like that. It is your code, you are claiming it is correct, it is up to you to prove that it is doing what you claim it is doing ... maybe you can co-opt someone else into doing the crappy leg work that would make this a truly worthwhile piece of science.

Pretty animations by the way.

Posted: Sat Nov 20, 2010 8:41 pm
by Aero
I use a program called "Screen Calipers" from Iconico.com to measure the screen. A reduced feature trial version is available but it won't let you measure vertical. Measures in screen pixels, so you need to identify an on-screen reference length. Screen measurements in length units are sort of useless anyway, IMO. The trial version is still useful though. See details here:

http://www.iconico.com/caliper/