34 lines
686 B
Python
34 lines
686 B
Python
import matplotlib.pyplot as plt
|
|
import numpy as np
|
|
import matplotlib
|
|
#matplotlib.use('Qt5Agg')
|
|
from src import coil_class as BC
|
|
|
|
# %%
|
|
|
|
z = np.linspace(-10,10,100)
|
|
x = np.linspace(-10,10,100)
|
|
I = 1
|
|
|
|
for i in range(0, 10):
|
|
AHH_Coil = BC.BCoil(HH = -1, distance=10+i, radius = 10, layers = 1, windings=1,
|
|
wire_height = 0.1, wire_width=0.1, insulation_thickness=0,
|
|
is_round = True)
|
|
|
|
|
|
|
|
|
|
Bz, Bx = AHH_Coil.B_field(I,z,z)
|
|
Bz_grad = BC.BCoil.grad(Bz,z)
|
|
Bx_grad = BC.BCoil.grad(Bx,x)
|
|
|
|
|
|
#plt.plot(z,Bz)
|
|
plt.plot(z, Bx_grad, label=f"d={10+i}mm")
|
|
plt.legend()
|
|
#plt.plot(z, Bz_curv)
|
|
#plt.plot(z, Bz_4)
|
|
|
|
|
|
plt.show()
|