simple particle simulators

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

Moderators: tonybarry, MSimon

ohiovr
Posts: 409
Joined: Mon Mar 02, 2009 6:36 pm
Contact:

simple particle simulators

Postby ohiovr » Fri Nov 14, 2014 12:21 am

Hey everyone,

I've found several interesting particle simulators that run in applets. Its a major PITA to use java applets, I've resorted to using a virtual box. Woe is desktop java. Even a java made web browser for windows wouldn't load java applets.

Is there a desktop simulator you can recommend? I don't mind shelling out some money for one either.

hanelyp
Posts: 2255
Joined: Fri Oct 26, 2007 8:50 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: simple particle simulators

Postby hanelyp » Fri Nov 14, 2014 12:51 am

Best I've found so far is XOOPIC. Expect difficulties running it in windoze, and more difficulties with the scanty documentation.

I've given thought to writing a better simulator. One idea I have takes model source code and compiles it to an executable with exactly the features specified. A bit slower to start a model (minutes), but could execute faster than other methods (hours).
The daylight is uncomfortably bright for eyes so long in the dark.

ohiovr
Posts: 409
Joined: Mon Mar 02, 2009 6:36 pm
Contact:

Re: simple particle simulators

Postby ohiovr » Fri Nov 14, 2014 1:53 pm


ohiovr
Posts: 409
Joined: Mon Mar 02, 2009 6:36 pm
Contact:

Re: simple particle simulators

Postby ohiovr » Fri Nov 14, 2014 9:05 pm


hanelyp
Posts: 2255
Joined: Fri Oct 26, 2007 8:50 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: simple particle simulators

Postby hanelyp » Sat Nov 15, 2014 5:43 am

I was thinking C/C++ for the code. Given the speed demands almost anything else is second fiddle. XOOPIC runs microseconds of simulation time/day when particle counts get up where you need them for a good high beta simulation, and I'm hoping to run faster without sacrifice of simulation quality. I'm also looking at putting the physics solver in one thread and diagnostic displays and user interface in a separate asynchronous thread.

The physics package in Unity is probably well suited to games, but I doubt it can handle particle physics efficiently.

There's a possible technique of computing electromagnetic fields based on local particles and fields propagating from cell to cell. Likely tricky to get right, but potential orders of magnitude improvement in speed over other options. I need to bone up on Maxwell's equations for this.
The daylight is uncomfortably bright for eyes so long in the dark.

ohiovr
Posts: 409
Joined: Mon Mar 02, 2009 6:36 pm
Contact:

Re: simple particle simulators

Postby ohiovr » Sat Nov 15, 2014 6:29 pm

Actually if you want to get fancy, use CUDA

prestonbarrows
Posts: 78
Joined: Sat Aug 03, 2013 4:41 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: simple particle simulators

Postby prestonbarrows » Sat Nov 15, 2014 10:34 pm

is the classic on the theory of particle-based plasma codes. It outlines the algorithms and gives some coded examples. Be warned that it is dated, but the essentials are there if you are fluent in a more modern coding language.

What you are talking about is known as 'particle in cell'. These are commonly made as home-brew solutions to specific problems but there are few commercially available general purpose codes available. One is V-sim from Tech-X. It is in the range of a few grand per year per processor for a license though.

Reactor codes are generally MHD, not particle, based these days since that is more geared to things like tokamaks.

You will need to run with something low level like C and/or leverage parallel GPU processing to do anything useful in 3D in a reasonable time.

hanelyp
Posts: 2255
Joined: Fri Oct 26, 2007 8:50 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: simple particle simulators

Postby hanelyp » Sun Nov 16, 2014 4:59 am

The price described for V-sim is outside my budget.

MHD would be attractive if the situation I wanted to simulate had a short mean free path. For long mean free paths, such as in a polywell, I'm not seeing how that method fits.

The hardware I'd be running on has what was a high end CPU a couple years ago, but a low end video chip. My skills are better with C/C++ than GPU programming anyway.
The daylight is uncomfortably bright for eyes so long in the dark.

prestonbarrows
Posts: 78
Joined: Sat Aug 03, 2013 4:41 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: simple particle simulators

Postby prestonbarrows » Sun Nov 16, 2014 5:30 am


hanelyp
Posts: 2255
Joined: Fri Oct 26, 2007 8:50 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: simple particle simulators

Postby hanelyp » Sun Nov 16, 2014 8:31 pm

The daylight is uncomfortably bright for eyes so long in the dark.

ohiovr
Posts: 409
Joined: Mon Mar 02, 2009 6:36 pm
Contact:

Re: simple particle simulators

Postby ohiovr » Mon Nov 17, 2014 2:04 pm

I wonder if CUDA is easier to program [than OpenCL] seeing that developers put up with it's exclusivity.

asdfuogh
Posts: 77
Joined: Wed Jan 23, 2013 6:58 am
Location: California
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: simple particle simulators

Postby asdfuogh » Wed Dec 10, 2014 12:39 am

CUDA is easier to program in, but also, nvidia is relatively dominant in GPUs as well. If you wanted to run a meaningful PIC simulation of a Polywell, I would recommend against anything that didn't use Fortran or C/C++ because it either means they're using an insignificant amount of particles or low resolution meshes. Of course, that's not necessarily true if it's a 1D code, but other than that, it's probably not worth it.

If you're looking to learn something from this, I would recommend trying to write your own code, or finding a simple 1D (or 1 and 2 halves dimension, ie. x, vx, vy, vz) PIC code to modify. It is not easy to jump into a large code written by physicists because we're shitty programmers in the sense of readability.

ladajo
Posts: 6204
Joined: Thu Sep 17, 2009 11:18 pm
Location: North East Coast
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: simple particle simulators

Postby ladajo » Thu Dec 11, 2014 2:12 am

I don't think you can run a meaningful sim for a polywell.
How would you reconcile the magnetic fields against the electric fields at high beta and sufficient particle densities to mean anything useful?

That would need some pretty serious custom code and processing power that is beyond anything reasonable.
The development of atomic power, though it could confer unimaginable blessings on mankind, is something that is dreaded by the owners of coal mines and oil wells. (Hazlitt)
What I want to do is to look up C. . . . I call him the Forgotten Man. (Sumner)

asdfuogh
Posts: 77
Joined: Wed Jan 23, 2013 6:58 am
Location: California
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: simple particle simulators

Postby asdfuogh » Thu Dec 11, 2014 5:14 am

>I don't think you can run a meaningful sim for a polywell. How would you reconcile the magnetic fields against the electric fields at high beta and sufficient particle densities to mean anything useful? That would need some pretty serious custom code and processing power that is beyond anything reasonable.

OP probably can't do it on his own home computer very easily without making it less than meaningful, but I would say that the approach to simulating depends on what you want to simulate. With the wide range of plasma length scales and time scales, you really have to have an idea of what's important in order to simplify your simulation to the point where you can actually solve a tiny part of the problem. For example, if we can even hold a plasma in the polywell center for a good millisecond or so, maybe you want to start asking how important the electrostatic drift instabilities are to this type of plasma. Then you'd have to already assume some equilibrium of sorts (ie. b-field, densities, temperatures, what else?) before you can even hope to do that type of simulation.

Also, another important type of simulation would be the plasma-material interaction between the coils and the plasma, since you're sticking the damned rings and plasma pretty close to each other, that may be a source of impurities that can cause more instabilities or other unwanted effects. I don't know enough about this type of simulation, but you don't really use PIC codes for it, I think.

happyjack27
Posts: 1435
Joined: Wed Jul 14, 2010 5:27 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: simple particle simulators

Postby happyjack27 » Sun Dec 14, 2014 5:14 pm



[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Return to “Theory”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests