Penning Trap Simulation Simulate particle behavior inside a Penning Trap

Loading...
Searching...
No Matches
PenningTrap.cpp
Go to the documentation of this file.
1
24#include "PenningTrap.hpp"
25
26 PenningTrap::PenningTrap(double B_0, double V_0, double d)
27{
28
29}
30
31 void PenningTrap::add_particle(Particle particle)
32{
33
34}
35
36arma::vec PenningTrap::external_E_field(arma::vec r)
37{
38
39}
40
41arma::vec PenningTrap::external_B_field(arma::vec r)
42{
43
44}
45
46arma::vec PenningTrap::force_on_particle(int i, int j)
47{
48
49}
50
51arma::vec PenningTrap::total_force_external(int i)
52{
53
54}
55
56arma::vec PenningTrap::total_force_particles(int i)
57{
58
59}
60
61arma::vec PenningTrap::total_force(int i)
62{
63
64}
65
66 void PenningTrap::evolve_RK4(double dt)
67{
68
69}
70
71 void PenningTrap::evolve_forward_euler(double dt)
72{
73
74}
PenningTrap.hpp
A class for simulating a Penning trap.
Particle
A class that holds attributes of a particle.
Definition: Particle.hpp:19
PenningTrap::total_force_external
arma::vec total_force_external(int i)
Calculate the total external force on a particle.
Definition: PenningTrap.cpp:51
PenningTrap::total_force_particles
arma::vec total_force_particles(int i)
Calculate the total force on a particle from other particles.
Definition: PenningTrap.cpp:56
PenningTrap::external_B_field
arma::vec external_B_field(arma::vec r)
Calculate B at point r.
Definition: PenningTrap.cpp:41
PenningTrap::force_on_particle
arma::vec force_on_particle(int i, int j)
Calculate the force between 2 particles.
Definition: PenningTrap.cpp:46
PenningTrap::evolve_forward_euler
void evolve_forward_euler(double dt)
Go forward one timestep using the forward Euler method.
Definition: PenningTrap.cpp:71
PenningTrap::add_particle
void add_particle(Particle particle)
Add a particle to the system.
Definition: PenningTrap.cpp:31
PenningTrap::PenningTrap
PenningTrap(double B_0=T, double V_0=25.*V/1000., double d=500.)
Set B_0, V_0 and d.
Definition: PenningTrap.cpp:26
PenningTrap::total_force
arma::vec total_force(int i)
calculate the total force on a particle.
Definition: PenningTrap.cpp:61
PenningTrap::external_E_field
arma::vec external_E_field(arma::vec r)
Calculate E at point r.
Definition: PenningTrap.cpp:36
PenningTrap::evolve_RK4
void evolve_RK4(double dt)
Go forward one timestep using the RK4 method.
Definition: PenningTrap.cpp:66