-
Notifications
You must be signed in to change notification settings - Fork 0
/
SimulationParameters.h
143 lines (102 loc) · 3.01 KB
/
SimulationParameters.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#ifndef SIMULATIONPARAMETERS_H
#define SIMULATIONPARAMETERS_H
#include "Constants.h"
#include <vector>
#include <cmath>
#include <iostream>
#include "Eigen/Dense"
//using namespace consts;
// Physical parameters
typedef Eigen::Vector3d vec;
struct Physical {
// Frequency of the RF electrodes
double RF_omega;
// Phase of the RF electrodes
double RF_phi;
// Amplitude of the RF electrodes
double RF_amplitude;
// Laser detuning
double detuning;
// Laser intensity normalized [0 .. 10]
std::vector<double> saturation;
// Initial temperature
double T_init;
// Mass
double M;
// Charge over Mass
double qDivM;
// Taper angle, in degrees
double angle;
// Tangent of the angle
double tan_angle;
//Distance rods to trap center
double R0 = 1.0 * 0.001;
// x0 / tan(alpha) parameter, used for the determination of omega_rad
double zk;
//Voltage on the endcaps
//double Uz = 0.16;
//Center of trap along z axis
double z0 = 0.0;
// Frequency radial (average, in Hz)
double omega_rad0;
// Frequency axial (average, in Hz)
double omega_ax0;
// Detuning ratio for the second radial frequency, 1+eps
double omega_ratio;
// Vector of laser directions, automatically normalized
std::vector<vec> lasers;
// Noise intensity on the electrodes
double noise_amp;
void set_dependent_parameters(){
using namespace consts;
double rad_angle = angle / 180. * pi;
tan_angle = std::tan(rad_angle);
qDivM = consts::electronCharge / M;
zk = R0 / tan_angle;
//std::cerr << "Setting zk to: " << zk << std::endl;
}
Physical() {
using namespace consts;
RF_omega = 2 * pi * 22 * MHz;
RF_amplitude = 38;
angle = 10.0;
// Pulse (Frequency) radial (average, in Hz)
omega_rad0 = 2 * pi * 0.440 * MHz;
// Pulse (Frequency) axial (average, in Hz)
omega_ax0 = 2 * pi * 0.080 * MHz;
omega_ratio = 1.05;
// detuning of the laser in Hz
detuning = -consts::gamma/(2 * pi)/2;
// Mass of Calcium
M = MCa;
// saturation
saturation = { 0.5 };
// noise = 0
noise_amp = 0.0;
// laser addressing all three directions
lasers = { vec(1.0, 1.0, 1.0) };
// initial temperature
T_init = 0.005; // 5 mK
set_dependent_parameters();
}
};
// Simulation parameters
class Parameters {
public:
// Time step for the simulation
double dt;
double time_end;
int steps;
int print_every = 500;
double time_engine_start;
double laser_initial_off;
double laser_initial_on;
Parameters() {
using namespace consts;
// default 25 steps per micromotion oscillation
dt = 5e-10;
set_dependent_parameters();
}
void set_dependent_parameters();
};
#endif /* SIMULATIONPARAMETERS_H */