# -*- coding: utf-8 -*-
"""
Created on Tue Sep  7 13:18:18 2021

@author: Joschka
"""

import matplotlib.pyplot as plt
import numpy as np

from src import coil_class as BC

from IPython import get_ipython
#get_ipython().run_line_magic('matplotlib', 'qt')

I = 1.25

Wire_1 = BC.BCoil(HH = 1, distance = 54, radius = 48, layers = 8, windings = 8, wire_height = 0.425, wire_width = 0.425, insulation_thickness= 0.09, is_round = True, winding_scheme= False)
Wire_1.set_R_outer(49.3)
Wire_1.set_d_min(49.8)
Wire_1.print_info()
print(Wire_1.get_coil_width() * 1e3 * Wire_1.get_coil_height() * 1e3)

Wire_1.cooling(I,22.5)

Wire_1.plot_raster(30)

Wire_2 = BC.BCoil(HH = 1, distance = 54, radius = 48, layers = 8, windings = 8, wire_height = 0.425, wire_width = 0.425, insulation_thickness= 0.09, is_round = False, winding_scheme= False)
Wire_2.set_R_outer(49.3)
Wire_2.set_d_min(49.8)
Wire_2.print_info()
print(Wire_2.get_coil_width() * 1e3 * Wire_2.get_coil_height() * 1e3)

Wire_2.cooling(I,22.5)

Wire_2.plot_raster(30)

Wire_2 = BC.BCoil(HH = 1, distance = 54, radius = 48, layers = 8, windings = 8, wire_height = 0.55, wire_width = 0.55, insulation_thickness= 0.09, is_round = True, winding_scheme= True)
Wire_2.set_R_outer(49.3)
Wire_2.set_d_min(49.8)
Wire_2.print_info()
print(Wire_2.get_coil_width() * 1e3 * Wire_2.get_coil_height() * 1e3)
Wire_2.cooling(I,22.5)

Wire_2.plot_raster(30)

I = 64/42 * 1.25
Wire_2 = BC.BCoil(HH = 1, distance = 54, radius = 48, layers = 6, windings = 7, wire_height = 0.55, wire_width = 0.55, insulation_thickness= 0.09, is_round = True, winding_scheme= True)
Wire_2.set_R_outer(49.3)
Wire_2.set_d_min(49.8)
Wire_2.print_info()
print(Wire_2.get_coil_width() * 1e3 * Wire_2.get_coil_height() * 1e3)
Wire_2.cooling(I,22.5)
print(I)

Wire_2.plot_raster(30)

