# -*- coding: utf-8 -*-
"""
Created on Fri Aug 27 15:14:48 2021

@author: Joschka
"""
from src import physical_constants as cs
import numpy as np

m = 2.69e-25
k = 2*0.2097*9.9*cs.mu_B

omega = np.sqrt(k/m)
f = omega/(2*np.pi)

T = 1/f
T_exp = T/4
#print(T_exp)


start_z = 1e-6
d_t = 1e-3
def force(z):
    return 2*0.248*z*9.9*cs.mu_B
z = start_z
v = 0
for t in np.arange(0,T_exp,d_t):
    v = v + force(z)/m * d_t
    #print(v)
    z = z + v * d_t
print(z)
print(omega)
print(omega*1000e-3)
print(700*20e-3*2*np.pi)