DyLab_3D_MOT/Coil_geometry/AHH/00_Simple_testing.py
2021-11-04 19:23:34 +01:00

45 lines
1.1 KiB
Python

# -*- coding: utf-8 -*-
"""
Created on Tue Aug 31 09:28:25 2021
@author: Joschka
"""
import matplotlib.pyplot as plt
import numpy as np
from src import B_field_calculation as bf
from src import coil_class as BC
from IPython import get_ipython
get_ipython().run_line_magic('matplotlib', 'qt')
#get_ipython().run_line_magic('matplotlib', 'inline')
print(10/2.7)
x = np.linspace(-10, 10, 3001)
z = np.linspace(-10, 10, 3001)
print(3001//2)
HH_Coil = BC.BCoil(HH = 1, distance = 54 ,radius = 48 , layers = 4, windings = 4, wire_height = 1, wire_width = 1,windings_spacing=0.25, layers_spacing = 0.25)
percentage = 0.05
absolut = 5
diff = percentage*0.01*5+ absolut *1e-3
print(diff)
Bz1, Bx = HH_Coil.B_field(5, x, z)
Bz2, Bx = HH_Coil.B_field(5 + diff, x, z)
print(Bz2[1500]-Bz1[1500])
print(" ")
percentage = 0 #.02
absolut = 2
diff = percentage*0.01*5+ absolut *1e-3
print(diff)
Bz2, Bx = HH_Coil.B_field(5 + diff, x, z)
print(Bz2[1500]-Bz1[1500])
print((Bz2[1500]-Bz1[1500])/Bz2[1500])
#Power = cs.rho_copper_20 *wire_length* I_current**2 /(self.get_wire_area())