PenningTrap(3)

NAME
PenningTrap - A class that simulates a Penning trap.

SYNOPSIS

#include <PenningTrap.hpp>

  Public Member Functions
PenningTrap (double B_0=T, double V_0=25.*V/1000., double d=500.)
Set B_0, V_0 and d.
void add_particle (Particle particle)
Add a particle to the system.
arma::vec external_E_field (arma::vec r)
Calculate E at point r.
arma::vec external_B_field (arma::vec r)
Calculate B at point r.
arma::vec force_on_particle (int i, int j)
Calculate the force between 2 particles.
arma::vec total_force_external (int i)
Calculate the total external force on a particle.
arma::vec total_force_particles (int i)
Calculate the total force on a particle from other particles.
arma::vec total_force (int i)
calculate the total force on a particle.
void evolve_RK4 (double dt)
Go forward one timestep using the RK4 method.
void evolve_forward_euler (double dt)
Go forward one timestep using the forward Euler method.
arma::vec get_particle (int i)
double get_d ()

  Private Attributes
double B_0
Magnetic field strength.
double V_0
Applied potential.
double d
Characteristic dimension.
std::vector< Particle > particles
The particles in the Penning trap.

Detailed Description

A class that simulates a Penning trap. This class simulates a Penning trap. It can take in a number of particles and simulate how they would behave inside a Penning trap.

Definition at line 29 of file PenningTrap.hpp.

Constructor & Destructor Documentation

  PenningTrap::PenningTrap (double B_0 = T, double V_0 = 25.*V/1000., double d = 500.)

Set B_0, V_0 and d.

Definition at line 20 of file PenningTrap.cpp.

Member Function Documentation

  void PenningTrap::add_particle (Particle particle)

Add a particle to the system.

Definition at line 27 of file PenningTrap.cpp.

  void PenningTrap::evolve_forward_euler (double dt)

Go forward one timestep using the forward Euler method.

Definition at line 167 of file PenningTrap.cpp.

  void PenningTrap::evolve_RK4 (double dt)

Go forward one timestep using the RK4 method.

Definition at line 104 of file PenningTrap.cpp.

  arma::vec PenningTrap::external_B_field (arma::vec r)

Calculate B at point r.

Definition at line 43 of file PenningTrap.cpp.

  arma::vec PenningTrap::external_E_field (arma::vec r)

Calculate E at point r.

Definition at line 32 of file PenningTrap.cpp.

  arma::vec PenningTrap::force_on_particle (int i, int j)

Calculate the force between 2 particles. Calculate the force exhibited on particle p_i from particle p_j.

Definition at line 50 of file PenningTrap.cpp.

  double PenningTrap::get_d ()

Definition at line 188 of file PenningTrap.cpp.

  arma::vec PenningTrap::get_particle (int i)

Definition at line 183 of file PenningTrap.cpp.

  arma::vec PenningTrap::total_force (int i)

calculate the total force on a particle.

Definition at line 99 of file PenningTrap.cpp.

  arma::vec PenningTrap::total_force_external (int i)

Calculate the total external force on a particle. Calculate the total amount of force that E and B exhibits on particle p_i.

Definition at line 65 of file PenningTrap.cpp.

  arma::vec PenningTrap::total_force_particles (int i)

Calculate the total force on a particle from other particles.

Definition at line 80 of file PenningTrap.cpp.

Member Data Documentation

  double PenningTrap::B_0 [private]

Magnetic field strength.

Definition at line 31 of file PenningTrap.hpp.

  double PenningTrap::d [private]

Characteristic dimension.

Definition at line 33 of file PenningTrap.hpp.

  std::vector<Particle> PenningTrap::particles [private]

The particles in the Penning trap.

Definition at line 34 of file PenningTrap.hpp.

  double PenningTrap::V_0 [private]

Applied potential.

Definition at line 32 of file PenningTrap.hpp.

Author

Generated automatically by Doxygen for Penning Trap Simulation from the source code.