DyLab_3D_MOT/Thesis_Plots/New_iterative_final_coil.py
2022-09-02 13:30:37 +02:00

62 lines
1.8 KiB
Python

# -*- coding: utf-8 -*-
"""
Created on Tue Sep 7 13:18:18 2021
@author: Joschka
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib
# matplotlib.use('Qt5Agg')
from src import coil_class as BC
# %%
scale = 1000
lim = 1
nr_points = (2 * lim) * scale + 1
x = np.linspace(-lim, lim, nr_points)
z = np.linspace(-lim, lim, nr_points)
# Wire_1 = [0.45, 0.514]
# Wire_1 = [0.475, 0.543]
# Wire_1 = [0.5, 0.568]
Wires = [[0.45, 0.514], [0.475, 0.543], [0.5, 0.568]]
for i in [0]:
Wire_1 = Wires[i]
print(f"Wire core = {Wire_1[0]} mm:")
print(" ")
for ll in [6, 8, 10]:
for ww in [7, 8, 9]:
print(f"layers = {ll}, windings = {ww}")
Coil_1 = BC.BCoil(HH=1, distance=54, radius=48, layers=ll, windings=ww, wire_height=Wire_1[0],
wire_width=Wire_1[0], insulation_thickness=(Wire_1[1] - Wire_1[0]) / 2, is_round=True,
winding_scheme=2)
# set radius plus distance
Coil_1.set_R_outer(49.5)
Coil_1.set_d_min(47.4)
# Coil_1.print_info()
print(f" Coil crossection area = {Coil_1.get_coil_width() * 1e3 * Coil_1.get_coil_height() * 1e3} mm2")
if (Coil_1.get_coil_width() * 1e3 * Coil_1.get_coil_height() * 1e3) < 16:
print("")
continue
#print(f" H = {Coil_1.get_coil_height() * 1e3}, W = {Coil_1.get_coil_width() * 1e3}")
I = 55 / Coil_1.get_N()
# I = 1
#print(f" Current needed for 13.8 G: I = {I} A")
# Coil_1.cooling(I, 22.5)
print(f" power = {Coil_1.power(I,22.5)}")
Coil_1.B_quality()
#print(f"B(0) = {Coil_1.max_field(I):.4f}")
print(" ")