Penning Trap Simulation
Simulate particle behavior inside a Penning Trap
Loading...
Searching...
No Matches
main.cpp File Reference

The main program for this project. More...

#include <cmath>
#include <complex>
#include <fstream>
#include <omp.h>
#include <string>
#include <vector>
#include "PenningTrap.hpp"
#include "constants.hpp"
#include "utils.hpp"

Go to the source code of this file.

Macros

#define PARTICLES   100
 
#define N   40000
 

Functions

vec3 analytical_solution_particle_1 (double t)
 The analytical solution for particle p1.
 
void simulate_single_particle ()
 Simulate a single particle over the period of 50 \( \mu s \).
 
void simulate_two_particles ()
 Simulate 2 particles over the period of 50 \( \mu s \) with and without particle interactions.
 
void simulate_single_particle_with_different_steps ()
 Simulate a single particle over 50 \( \mu s \) using different amount of steps and different methods.
 
void simulate_100_particles ()
 Simulate 100 particles over 50 \( \mu s \).
 
void potential_resonance_wide_sweep ()
 Simulate 100 particles over 500 \( \mu s \) using a time dependent potential.
 
void potential_resonance_narrow_sweep ()
 Simulate 100 particles over 500 \( \mu s \) using a time dependent potential.
 
void potential_resonance_narrow_sweep_interaction ()
 Simulate 100 particles over 500 \( \mu s \) using a time dependent potential.
 
int main ()
 

Variables

Particle p1 (vec3{20., 0., 20.}, vec3{0., 25., 0.})
 Particle 1.
 
Particle p2 (vec3{25., 25., 0.}, vec3{0., 40., 5.})
 Particle 2.
 

Detailed Description

The main program for this project.

Author
Cory Alexander Balaton (coryab)
Janita Ovidie Sandtrøen Willumsen (janitaws)
Version
1.0
Bug:
No known bugs

Definition in file main.cpp.

Macro Definition Documentation

◆ N

#define N   40000

Definition at line 25 of file main.cpp.

◆ PARTICLES

#define PARTICLES   100

Definition at line 24 of file main.cpp.

Function Documentation

◆ analytical_solution_particle_1()

vec3 analytical_solution_particle_1 ( double  t)

The analytical solution for particle p1.

Parameters
tTime
Returns
vec3

Definition at line 37 of file main.cpp.

◆ main()

int main ( )

Definition at line 314 of file main.cpp.

◆ potential_resonance_narrow_sweep()

void potential_resonance_narrow_sweep ( )

Simulate 100 particles over 500 \( \mu s \) using a time dependent potential.

The simulation sweeps over different frequencies in [1., 1.7] MHz.

Definition at line 209 of file main.cpp.

◆ potential_resonance_narrow_sweep_interaction()

void potential_resonance_narrow_sweep_interaction ( )

Simulate 100 particles over 500 \( \mu s \) using a time dependent potential.

The simulation sweeps over different frequencies in [1., 1.7] MHz.

Definition at line 266 of file main.cpp.

◆ potential_resonance_wide_sweep()

void potential_resonance_wide_sweep ( )

Simulate 100 particles over 500 \( \mu s \) using a time dependent potential.

The simulation sweeps over different frequencies in [0.2, 2.5] MHz.

Definition at line 152 of file main.cpp.

◆ simulate_100_particles()

void simulate_100_particles ( )

Simulate 100 particles over 50 \( \mu s \).

Definition at line 134 of file main.cpp.

◆ simulate_single_particle()

void simulate_single_particle ( )

Simulate a single particle over the period of 50 \( \mu s \).

Definition at line 55 of file main.cpp.

◆ simulate_single_particle_with_different_steps()

void simulate_single_particle_with_different_steps ( )

Simulate a single particle over 50 \( \mu s \) using different amount of steps and different methods.

Definition at line 88 of file main.cpp.

◆ simulate_two_particles()

void simulate_two_particles ( )

Simulate 2 particles over the period of 50 \( \mu s \) with and without particle interactions.

Definition at line 70 of file main.cpp.