# -*- 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 mu = 9.9* cs.mu_B/8 Grad_Bz = cs.m_Dy_164 * 9.81/(8*mu) print("For levitation:") print(f"dBz/dz = {Grad_Bz*1e4*1e-2:.4f} G/cm") print("") T = 1e-6 dt = 10e-3 sigma = np.sqrt(cs.k_B*T/cs.m_Dy_164) * dt dz = 2 * sigma print(f"cloud size: {sigma*1e3:.3f} mm") #dz = 250e-6 Grad_Bz = 2 * dz * cs.m_Dy_164/(dt**2 * mu) print(" ") print("For Stern-Gerlach separation:") print(f"dBz/dz = {Grad_Bz*1e4*1e-2:.4f} G/cm") print(" ") def cloud_pos(mF, dt = 10e-3): a = mF*mu*Grad_Bz/cs.m_Dy_164 - 9.81 s = 0.5 * a *dt**2 return s a8 = -8*mu*Grad_Bz/cs.m_Dy_164 - 9.81 a8_neg = 8*mu*Grad_Bz/cs.m_Dy_164 - 9.81 a7 = -7*mu*Grad_Bz/cs.m_Dy_164 - 9.81 s8 = 0.5 * a8 * dt**2 s8_neg = 0.5 * a8_neg * dt**2 s7 = 0.5 * a7 * dt**2 for mF in np.arange(-8,9,1): print(f"for mF = {mF}: pos = {cloud_pos(mF) * 1e3} mm") print(f"Total fall for m8 for acceleration due to magnetic field in same direction than gravity = {s8 * 1e3}mm") print(f"Total lift for m8 for acceleration due to magnetic field in other direction than gravity = {s8_neg * 1e3}mm") print(f"Fall without magnetic field = {-0.5 * 9.81 * dt**2 *1e3} mm") print(f"s7 = {s7 * 1e3}mm") print(f"diff = {(s8 - s7) * 1e3} mm")