ParticlePCyl Class Reference

Particle point class for cylindrical coordinates. More...

#include <particles.hpp>

Inheritance diagram for ParticlePCyl:

ParticlePBase List of all members.

Public Member Functions

 ParticlePCyl ()
 Default constuctor.
 ParticlePCyl (double t, double x, double vx, double r, double vr, double w)
 Constructor for cylindrical particle point.
Vec3D location () const
 Returns the location of particle point in Vec3D.
Vec3D velocity () const
 Returns the velocity of particle point in Vec3D.
double speed ()
 Returns speed of particle.
double & operator[] (int i)
 Operator for pointing to coordinate data.
const double & operator[] (int i) const
 Operator for pointing to coordinate data.
double & operator() (int i)
 Operator for pointing to coordinate data.
const double & operator() (int i) const
 Operator for pointing to coordinate data.
ParticlePCyl operator+ (const ParticlePCyl &pp) const
ParticlePCyl operator- (const ParticlePCyl &pp) const
ParticlePCyl operator * (double x) const

Static Public Member Functions

static geom_mode_e geom_mode ()
 Returns geometry mode.
static size_t dim ()
 Returns number of dimensions for geometry.
static size_t size ()
 Returns number of coordinates used for particle point.
static int get_derivatives (double t, const double *x, double *dxdt, void *data)
 Returns time derivatives dxdt of coordinates at time t and coordinates x = (x,vx,r,vr,w) for one particle.
static int trajectory_intersections_at_plane (std::vector< ParticlePCyl > &intsc, int crd, double val, const ParticlePCyl &x1, const ParticlePCyl &x2)
 Return the number of trajectory intersections with plane crd = val on the trajectory from x1 to x2. Intersection points are appended to vector intsc.

Friends

ParticlePCyl operator * (double x, const ParticlePCyl &pp)

Detailed Description

Particle point class for cylindrical coordinates.

A collection of particle coordinates (t,x,vx,y,vy,w) to describe time, location and velocity in cylindrical coordinates.


Constructor & Destructor Documentation

ParticlePCyl::ParticlePCyl (  )  [inline]

Default constuctor.

ParticlePCyl::ParticlePCyl ( double  t,
double  x,
double  vx,
double  r,
double  vr,
double  w 
) [inline]

Constructor for cylindrical particle point.


Member Function Documentation

static size_t ParticlePCyl::dim ( void   )  [inline, static]

Returns number of dimensions for geometry.

static geom_mode_e ParticlePCyl::geom_mode ( void   )  [inline, static]

Returns geometry mode.

static int ParticlePCyl::get_derivatives ( double  t,
const double *  x,
double *  dxdt,
void *  data 
) [static]

Returns time derivatives dxdt of coordinates at time t and coordinates x = (x,vx,r,vr,w) for one particle.

The calculation of particle trajectory is done by integrating the Lorentz equation in a form of a set of ordinary differential equations. In the case of cylindrical coordinates the set is:

\begin{eqnarray*} \frac{dx}{dt} &=& v_x \\ \frac{dr}{dt} &=& v_r \\ \frac{dv_x}{dt} &=& a_x = \frac{q}{m}(E_x + v_r B_{\theta} - v_\theta B_r) \\ \frac{dv_r}{dt} &=& a_r + r\left(\frac{d\theta}{dt}\right)^2 = \frac{q}{m}(E_y + v_{\theta} B_x - v_x B_{\theta}) + r \left(\frac{d\theta}{dt}\right)^2 \\ \frac{d^2\theta}{dt^2} &=& \frac{1}{r} \left(a_\theta-\frac{dr}{dt} \frac{d\theta}{dt}\right) = \frac{1}{r} \left(\frac{q}{m}(v_x B_r - v_r B_x)-2 \frac{dr}{dt} \frac{d\theta}{dt}\right), \end{eqnarray*}

where $ v_\theta = r \frac{d\theta}{dt} $.

Vec3D ParticlePCyl::location (  )  const [inline]

Returns the location of particle point in Vec3D.

ParticlePCyl ParticlePCyl::operator * ( double  x  )  const [inline]

const double& ParticlePCyl::operator() ( int  i  )  const [inline]

Operator for pointing to coordinate data.

double& ParticlePCyl::operator() ( int  i  )  [inline]

Operator for pointing to coordinate data.

ParticlePCyl ParticlePCyl::operator+ ( const ParticlePCyl pp  )  const [inline]

ParticlePCyl ParticlePCyl::operator- ( const ParticlePCyl pp  )  const [inline]

const double& ParticlePCyl::operator[] ( int  i  )  const [inline]

Operator for pointing to coordinate data.

double& ParticlePCyl::operator[] ( int  i  )  [inline]

Operator for pointing to coordinate data.

static size_t ParticlePCyl::size ( void   )  [inline, static]

Returns number of coordinates used for particle point.

double ParticlePCyl::speed (  )  [inline]

Returns speed of particle.

static int ParticlePCyl::trajectory_intersections_at_plane ( std::vector< ParticlePCyl > &  intsc,
int  crd,
double  val,
const ParticlePCyl x1,
const ParticlePCyl x2 
) [static]

Return the number of trajectory intersections with plane crd = val on the trajectory from x1 to x2. Intersection points are appended to vector intsc.

Vec3D ParticlePCyl::velocity (  )  const [inline]

Returns the velocity of particle point in Vec3D.


Friends And Related Function Documentation

ParticlePCyl operator * ( double  x,
const ParticlePCyl pp 
) [friend]


The documentation for this class was generated from the following file:
Generated on Thu Apr 21 13:39:59 2011 for IBSimu by  doxygen 1.4.7