1import matplotlib.pyplot
as plt
5 V_0 = 25.*9.64852558 * 10**4
8 w_z = np.sqrt((2.*V_0)/(m*d*d))
9 return 20.*np.cos(w_z*t)
12 filename =
"output/simulate_single_particle/particle_0_r.txt"
14 with open(filename)
as f:
16 t = np.linspace(0, 50, len(lines))
17 r = np.array([list(map(float, line.strip().split(
",")))
for line
in lines])
19 plt.plot(t, r[:, 2], label=
"approximation")
20 plt.plot(t, z(t), label=
"analytical")
21 plt.xlabel(
r"time $(\mu s)$")
22 plt.ylabel(
r"z $(\mu m)$")
23 plt.title(
r"Movement of a single particle in the x direction")
29if __name__ ==
"__main__":