Navigation

Main Page
Download
Support
Installation
Tutorial
Examples
Reference Manual
   Version 1.0.6dev
      Class Index
      File List
   Version 1.0.6
   Version 1.0.5new_solver
   Version 1.0.5dev
   Version 1.0.5b
   Version 1.0.4dev
   Version 1.0.4
Publications


Hosted by Get Ion Beam Simulator at SourceForge.net. Fast, secure and Free Open Source software downloads

Particle point class for cylindrical coordinates. More...

#include <particles.hpp>

Inheritance diagram for ParticlePCyl:
ParticlePBase

Public Member Functions

 ParticlePCyl ()
 Default constuctor. More...
 
 ParticlePCyl (double t, double x, double vx, double r, double vr, double w)
 Constructor for cylindrical particle point. More...
 
 ParticlePCyl (std::istream &s)
 Constructor for loading particle point from a file. More...
 
void clear ()
 Clear point to zero. More...
 
Vec3D location () const
 Returns the location of particle point in Vec3D. More...
 
Vec3D velocity () const
 Returns the velocity of particle point in Vec3D. More...
 
double speed ()
 Returns speed of particle. More...
 
double & operator[] (int i)
 Operator for pointing to coordinate data. More...
 
const double & operator[] (int i) const
 Operator for pointing to coordinate data. More...
 
double & operator() (int i)
 Operator for pointing to coordinate data. More...
 
const double & operator() (int i) const
 Operator for pointing to coordinate data. More...
 
ParticlePCyl operator+ (const ParticlePCyl &pp) const
 
ParticlePCyl operator- (const ParticlePCyl &pp) const
 
ParticlePCyl operator* (double x) const
 
void save (std::ostream &s) const
 Saves data to stream. More...
 

Static Public Member Functions

static geom_mode_e geom_mode ()
 Returns geometry mode. More...
 
static size_t dim ()
 Returns number of dimensions for geometry. More...
 
static size_t size ()
 Returns number of coordinates used for particle point. More...
 
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. More...
 
static int trajectory_intersections_at_plane (std::vector< ParticlePCyl > &intsc, int crd, double val, const ParticlePCyl &x1, const ParticlePCyl &x2, int extrapolate=0)
 Return the number of trajectory intersections with plane crd = val on the trajectory from x1 to x2. Intersection points are appended to vector intsc. More...
 
static const std::string IQ_unit ()
 Return string representation for unit of current. More...
 

Friends

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

Detailed Description

Particle point class for cylindrical coordinates.

A collection of particle coordinates (t,x,vx,r,vr,w) to describe time, location and velocity in cylindrical coordinates Here $ w = \frac{d\theta}{dt} $.

Constructor & Destructor Documentation

◆ ParticlePCyl() [1/3]

ParticlePCyl::ParticlePCyl ( )
inline

Default constuctor.

◆ ParticlePCyl() [2/3]

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

Constructor for cylindrical particle point.

◆ ParticlePCyl() [3/3]

ParticlePCyl::ParticlePCyl ( std::istream &  s)
inline

Constructor for loading particle point from a file.

Member Function Documentation

◆ clear()

void ParticlePCyl::clear ( void  )
inline

Clear point to zero.

◆ dim()

static size_t ParticlePCyl::dim ( void  )
inlinestatic

Returns number of dimensions for geometry.

◆ geom_mode()

static geom_mode_e ParticlePCyl::geom_mode ( void  )
inlinestatic

Returns geometry mode.

◆ get_derivatives()

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} $.

◆ IQ_unit()

static const std::string ParticlePCyl::IQ_unit ( )
inlinestatic

Return string representation for unit of current.

Returns "A".

◆ location()

Vec3D ParticlePCyl::location ( ) const
inline

Returns the location of particle point in Vec3D.

◆ operator()() [1/2]

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

Operator for pointing to coordinate data.

◆ operator()() [2/2]

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

Operator for pointing to coordinate data.

◆ operator[]() [1/2]

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

Operator for pointing to coordinate data.

◆ operator[]() [2/2]

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

Operator for pointing to coordinate data.

◆ save()

void ParticlePCyl::save ( std::ostream &  s) const
inline

Saves data to stream.

◆ size()

static size_t ParticlePCyl::size ( void  )
inlinestatic

Returns number of coordinates used for particle point.

◆ speed()

double ParticlePCyl::speed ( )
inline

Returns speed of particle.

◆ trajectory_intersections_at_plane()

int ParticlePCyl::trajectory_intersections_at_plane ( std::vector< ParticlePCyl > &  intsc,
int  crd,
double  val,
const ParticlePCyl x1,
const ParticlePCyl x2,
int  extrapolate = 0 
)
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.

◆ velocity()

Vec3D ParticlePCyl::velocity ( ) const
inline

Returns the velocity of particle point in Vec3D.


The documentation for this class was generated from the following files:


Reference manual for Ion Beam Simulator 1.0.6dev
Generated by Doxygen 1.9.1 on Thu Sep 11 2025 09:37:24.