[Getdp] PIC Particle-in-cell algorithm

Jacques Kools jacques.kools at insilicio.com
Mon Nov 13 14:31:34 CET 2006



Here are a few thoughts/recommendations on the subject: 


1° You cannot do a complete PIC simulation in GetDP, as there is ( to the
best of my knowledge ), no infrastructure to actually track and sort
individual particles.


2° However, part of the Particle in cell algorithm uses an electromagnetic
solver, where you use the charge and current densities as input to calculate
electric and magnetic fields.

     For this part, you can obviously use a solver in a stand-alone
executable , such as GetDP or any other EM solver for that matter.

      The way to do this, is the following :

           You make sure that the getdp executable ( getdp.exe in
windows-based systems) is in the same directory as your own solver

>From your own solver, you write the charge and current densities in a file
that GetDP can understand

Your solver calls getdp by a statement like (assuming you write in C++)

                  system("./getdp.exe -blahblahblah");

            Your solver reads the files created by getdp


      The advantage is obviously that this is very easy to implement, and
you’ll probably end up with a less buggy design than if you where to write
everything from scratch. 

      The disadvantage is that you have to write and read files on your hard
disk in order to communicate data between the two solvers. That can be
unacceptably slow, depending on your application. If you want to run
iteratively and call getdp hundreds or thousands of times, as you would in a
classical particle in cell simulation, it is clearly problematic.


3° I think the above scheme is quite generally applicable for usage of GetDP
in concert with other solvers. With respect to the performance part, I have
a suggestion/request towards the GetDP team: 


    It would be nice if we would have a different entry point into getdp ,
in the form of an object that can be instantiated from another program. For
example, a class  GetDPSolver that has members such as 

    void loadMesh( const mesh & mymesh) to pass an object containing a  mesh
directly, for example as a  libmesh mesh object
(http://libmesh.sourceforge.net/). That would allow to get rid of all the
reading      and writing on the disk.



All the best,


Jacques Kools,

In Silicio SAS

Aix en Provence, France

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/getdp/attachments/20061113/4b4e1763/attachment.html>

More information about the getdp mailing list