particleswarm.h File Reference


Detailed Description

This is the header file for the particleswarm electromagnetic source, used for the self-consistent finite element time domain maxwell solver that models propagation of charged particles through accelerators.

Copyright by Benedikt Oswald, 2002-2007, all rights reserved.

Objective: defines class and its methods of a class, i.e. numproc in UG speak, for providing an electromagnetic current density source, based on the concept of charged particles that propagate through accelerator structures. The particles' location, velocity and momentum is used for computing equivalen electric current densities which are then fed into the right hand side of the curl-curl equaiton for the electric field.

Implementation Notes: the discretization of the curl-curl equation for the electric field uses a current density vector to excite and drive the electric field; the current density vector is integrated into the system via the right hand side; now, when we self-consistently solve the electric field curl-curl equation we compute the r.h.s current density vector from moving charged particles, e.g. electrons, protons etc.; a charged particle has a position and a momentum. The ensemble of all charged particles is managed by the IPPL library (copyright Andreas Adelmann); the IPPL library is also parallel using the MPI approach and knows every particle's location and momentum. Therefore, when we compute the r.h.s current density, typically at every implicit update step, we must query the IPPL using the following scheme, considering that the tetrahedral mesh is also distributed, i.e. partitioned, over the cluster's CPU's, given in pseudocode:

for(tet=first;tet<last;tet++) { for(particle=firstparticle;particle<lastparticle;particle++) { if(is particle in tet == true) { compute current density from this particle's location and momentum add this particle's current density to specific component of forcing vector } } }

Once the electric field at timestep (n+1) has been available, we need to evaluate the electric, E, and magnetic field, H, which is then fed to the IPPL for pushing the particles. In pseudocode this looks like:

for(particle=firstparticle;particle<lastparticle;particle++) { if(is particle in a tetrahedron on the specific CPU == true) { evaluate the electric and magnetic field at the position of the particle; feed E and H to the IPPL have the IPPL push the particles } }

This program sequence is implemented in the postprocess section of the particleswarm numproc.

Author:
Benedikt Oswald
Date:
2007 apr 04, benedikt oswald
Warning:
none
Attention:
none required
Bug:
this is a research code.
Todo:
it would be useful to import precomputed cavity fields.

#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <list>
#include "gm.h"
#include "shapes.h"
#include "ugstruct.h"
#include "misc.h"
#include "ugdevices.h"
#include "commands.h"
#include "cmdint.h"
#include "cmdline.h"
#include "general.h"
#include "np.h"
#include "assemble.h"
#include "whitney.h"
#include "tdwaveforms.h"
#include "aqhdSysParams.h"
#include "aqhdReleaseInfo.h"
#include "aqhdPhysicoMath.h"
#include "aqhdBaseTypes.h"
#include "auxiliary.h"

Go to the source code of this file.

Functions

INT InitParticleSwarmSource (void)


Function Documentation

INT InitParticleSwarmSource ( void   ) 

Function for initializing the particle swarm source within the UG framework at the very beginning


Generated on Fri Oct 26 14:04:29 2007 for acheron3d by  doxygen 1.4.7