transfer work to desktop
This commit is contained in:
parent
19f8d1968c
commit
3c94a0c705
@ -9,6 +9,8 @@ import matplotlib.pyplot as plt
|
|||||||
import logging as log
|
import logging as log
|
||||||
from scipy import special as sp
|
from scipy import special as sp
|
||||||
|
|
||||||
|
import time
|
||||||
|
|
||||||
from src import physical_constants as cs
|
from src import physical_constants as cs
|
||||||
|
|
||||||
|
|
||||||
@ -127,6 +129,7 @@ class BCoil:
|
|||||||
:param raster_value: wire height/raster_value is distance between rastered points in one wire
|
:param raster_value: wire height/raster_value is distance between rastered points in one wire
|
||||||
:return: 2 dim array [[z1,R1], [z2,R2], ...]
|
:return: 2 dim array [[z1,R1], [z2,R2], ...]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
outer_raster = np.zeros((self.get_N(),2))
|
outer_raster = np.zeros((self.get_N(),2))
|
||||||
it = 0
|
it = 0
|
||||||
z_start = self.get_zmin() + self.get_tot_wire_height()/2 # (distance_coils/2 - windings * wire_height/2 + wire_height/2)*1e-3
|
z_start = self.get_zmin() + self.get_tot_wire_height()/2 # (distance_coils/2 - windings * wire_height/2 + wire_height/2)*1e-3
|
||||||
@ -146,8 +149,34 @@ class BCoil:
|
|||||||
|
|
||||||
outer_raster[it] = [z_pos, R_pos]
|
outer_raster[it] = [z_pos, R_pos]
|
||||||
it += 1
|
it += 1
|
||||||
|
|
||||||
return outer_raster
|
return outer_raster
|
||||||
|
|
||||||
|
def inner_raster(self, raster_value):
|
||||||
|
"""
|
||||||
|
Gives back inner raster for one wire around pos
|
||||||
|
Args:
|
||||||
|
pos: [z_pos, r_pos]
|
||||||
|
raster_value: if N produces a N x N raster for rectangular and cut out of this for round
|
||||||
|
|
||||||
|
Returns: array containing raster around [[z_pos_in_1,r_pos_in_1],...]
|
||||||
|
"""
|
||||||
|
if raster_value ==1:
|
||||||
|
return pos
|
||||||
|
|
||||||
|
inner_raster = np.zeros((raster_value**2,2))
|
||||||
|
it = 0
|
||||||
|
for xx_in in range(0, raster_value):
|
||||||
|
for zz_in in range(0, raster_value):
|
||||||
|
z_pos_in = - self.wire_height/2 + zz_in * self.wire_height/(raster_value-1)
|
||||||
|
r_pos_in = - self.wire_width/2 + xx_in * self.wire_width/(raster_value-1)
|
||||||
|
|
||||||
|
inner_raster[it] = [z_pos_in, r_pos_in]
|
||||||
|
it += 1
|
||||||
|
return inner_raster
|
||||||
|
|
||||||
|
def inner_raster_pos
|
||||||
|
|
||||||
|
|
||||||
def print_info(self):
|
def print_info(self):
|
||||||
print(" ")
|
print(" ")
|
||||||
@ -524,11 +553,13 @@ class BCoil:
|
|||||||
return cf.resistivity_copper(T) * self.get_wire_length() / self.get_wire_area()
|
return cf.resistivity_copper(T) * self.get_wire_length() / self.get_wire_area()
|
||||||
|
|
||||||
|
|
||||||
HH_Coil = BCoil(HH=1, distance=10, radius=10, layers=2, windings=2, wire_height=1, wire_width=1,
|
HH_Coil = BCoil(HH=1, distance=10, radius=10, layers=2, windings=2, wire_height=1.5, wire_width=2.5,
|
||||||
insulation_thickness=0.25, is_round=True, winding_offset= True)
|
insulation_thickness=0.25, is_round=False, winding_offset=False)
|
||||||
|
|
||||||
|
pos = [1,7]
|
||||||
|
print(HH_Coil.inner_raster(pos,10))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print(HH_Coil.winding_raster())
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user