@@ -1023,29 +1023,26 @@ def draw_conductors(self, draw_top_down: bool = True):
10231023
10241024 i += 1
10251025
1026- # Insert Kapton insulation after each layer
1027- # self.insert_kapton_layer_vertical(x + winding.conductor_radius + self.insulation.cond_cond[num][num] , top_bound, bot_bound, left_bound, right_bound)
1028- # self.insert_kapton_layer_vertical(x_l, top_bound,
1029- # bot_bound, left_bound, right_bound)
1026+ # Insert insulation after each layer
10301027 mesh_to_conductor = min (self .mesh_data .c_conductor )
10311028 if rightward_movement :
1032- kapton_points = [
1029+ layer_insulation_points = [
10331030 [x_l + insulation_delta , top_bound , 0 , mesh_to_conductor ],
10341031 [x_l + self .insulation .thickness_of_insulation - insulation_delta , top_bound , 0 , mesh_to_conductor ],
10351032 [x_l + self .insulation .thickness_of_insulation - insulation_delta , bot_bound , 0 , mesh_to_conductor ],
10361033 [x_l + insulation_delta , bot_bound , 0 , mesh_to_conductor ]
10371034 ]
10381035 else :
1039- kapton_points = [
1036+ layer_insulation_points = [
10401037 [x_l - insulation_delta , top_bound , 0 , mesh_to_conductor ],
10411038 [x_l - self .insulation .thickness_of_insulation + insulation_delta , top_bound , 0 , mesh_to_conductor ],
10421039 [x_l - self .insulation .thickness_of_insulation + insulation_delta , bot_bound , 0 , mesh_to_conductor ],
10431040 [x_l - insulation_delta , bot_bound , 0 , mesh_to_conductor ]
10441041 ]
1045- # Add the points to the Kapton insulation data structure
1042+ # Add the points to the layer insulation data structure
10461043 #if self.insulation.thickness_of_insulation > 0 :
10471044 if self .insulation .draw_insulation_between_layers :
1048- self .p_iso_layer .append (kapton_points )
1045+ self .p_iso_layer .append (layer_insulation_points )
10491046 if not zigzag :
10501047 # Start the next column with the same starting point (consistent direction)
10511048 y = start_y
@@ -1101,25 +1098,24 @@ def draw_conductors(self, draw_top_down: bool = True):
11011098 else :
11021099 x += step_x - winding_insulation
11031100 i += 1
1104- # Insert Kapton insulation after each layer
1105- # self.insert_kapton_layer_horizontal(y, left_bound, right_bound)
1101+ # Insert layer insulation after each layer
11061102 if upward_movement :
1107- kapton_points = [
1103+ layer_insulation_points = [
11081104 [left_bound , y_l + insulation_delta , 0 , self .mesh_data .c_window ],
11091105 [left_bound , y_l + self .insulation .thickness_of_insulation - insulation_delta , 0 , self .mesh_data .c_window ],
11101106 [right_bound , y_l + self .insulation .thickness_of_insulation - insulation_delta , 0 , self .mesh_data .c_window ],
11111107 [right_bound , y_l + insulation_delta , 0 , self .mesh_data .c_window ]
11121108 ]
11131109 else :
1114- kapton_points = [
1110+ layer_insulation_points = [
11151111 [left_bound , y_l - insulation_delta , 0 , self .mesh_data .c_window ],
11161112 [left_bound , y_l - self .insulation .thickness_of_insulation + insulation_delta , 0 , self .mesh_data .c_window ],
11171113 [right_bound , y_l - self .insulation .thickness_of_insulation + insulation_delta , 0 , self .mesh_data .c_window ],
11181114 [right_bound , y_l - insulation_delta , 0 , self .mesh_data .c_window ]
11191115 ]
1120- # Add the points to the Kapton insulation data structure
1116+ # Add the points to the layer insulation data structure
11211117 if self .insulation .draw_insulation_between_layers :
1122- self .p_iso_layer .append (kapton_points )
1118+ self .p_iso_layer .append (layer_insulation_points )
11231119 if not zigzag :
11241120 # Start the next raw with the same starting point (consistent direction)
11251121 x = start_x
@@ -1232,14 +1228,14 @@ def draw_conductors(self, draw_top_down: bool = True):
12321228 else :
12331229 y += winding .conductor_radius * 2 + 2 * self .insulation .cond_cond [num ][num ] + winding_insulation
12341230 # from bottom to top
1235- kapton_points = [
1231+ layer_insulation_points = [
12361232 [start_x_layer + insulation_delta , top_bound , 0 , mesh_to_conductor ],
12371233 [start_x_layer + self .insulation .thickness_of_insulation - insulation_delta , top_bound , 0 , mesh_to_conductor ],
12381234 [start_x_layer + self .insulation .thickness_of_insulation - insulation_delta , bot_bound , 0 , mesh_to_conductor ],
12391235 [start_x_layer + insulation_delta , bot_bound , 0 , mesh_to_conductor ]
12401236 ]
12411237 if self .insulation .draw_insulation_between_layers :
1242- self .p_iso_layer .append (kapton_points )
1238+ self .p_iso_layer .append (layer_insulation_points )
12431239 x += 2 * np .cos (np .pi / 6 ) * (winding .conductor_radius + self .insulation .turn_ins [num ][num ] / 2 + self .insulation .thickness_of_insulation )
12441240 # x += np.cos(np.pi / 6) * (2 * winding.conductor_radius + 2 * self.insulation.cond_cond[num][num]) + self.insulation.thickness_of_insulation
12451241 start_x_layer += step_x_layer
@@ -1317,15 +1313,15 @@ def draw_conductors(self, draw_top_down: bool = True):
13171313 else :
13181314 x += winding .conductor_radius * 2 + 2 * self .insulation .turn_ins [num ][num ] + winding_insulation
13191315
1320- # Insert Kapton insulation after each layer
1321- kapton_points = [
1316+ # Insert layer insulation after each layer
1317+ layer_insulation_points = [
13221318 [left_bound , start_y_layer + insulation_delta , 0 , mesh_to_conductor ],
13231319 [left_bound , start_y_layer + self .insulation .thickness_of_insulation - insulation_delta , 0 , mesh_to_conductor ],
13241320 [right_bound , start_y_layer + self .insulation .thickness_of_insulation - insulation_delta , 0 , mesh_to_conductor ],
13251321 [right_bound , start_y_layer + insulation_delta , 0 , mesh_to_conductor ]
13261322 ]
13271323 if self .insulation .draw_insulation_between_layers :
1328- self .p_iso_layer .append (kapton_points )
1324+ self .p_iso_layer .append (layer_insulation_points )
13291325
13301326 y += 2 * np .cos (np .pi / 6 ) * (winding .conductor_radius + self .insulation .turn_ins [num ][num ] / 2 + self .insulation .thickness_of_insulation )
13311327 start_y_layer += step_y_layer
@@ -1949,52 +1945,6 @@ def draw_insulations(self):
19491945 print("No insulations for winding type {vww.winding_type.name}")
19501946 """
19511947
1952- def insert_kapton_layer_vertical (self , x_position , top_bound , bot_bound , left_bound , right_bound ):
1953- """
1954- Insert a vertical Kapton insulation layer between layers.
1955-
1956- :param x_position: x-coordinate where the Kapton layer is centered.
1957- :param top_bound: The top boundary of the window.
1958- :param bot_bound: The bottom boundary of the window.
1959- """
1960- kapton_thickness = self .insulation .thickness_of_insulation # Thickness of the Kapton insulation
1961- # define a delta insulation
1962- insulation_delta = self .mesh_data .c_window / self .insulation .max_aspect_ratio
1963- mesh_density_to_winding = min (self .mesh_data .c_conductor )
1964-
1965- # self.p_iso_layer= []
1966- # Define points for the vertical Kapton insulation rectangle
1967- kapton_points = [
1968- [x_position + insulation_delta , top_bound , 0 , self .mesh_data .c_window ],
1969- [x_position + kapton_thickness - insulation_delta , top_bound , 0 , self .mesh_data .c_window ],
1970- [x_position + kapton_thickness - insulation_delta , bot_bound , 0 , self .mesh_data .c_window ],
1971- [x_position + insulation_delta , bot_bound , 0 , self .mesh_data .c_window ]
1972- ]
1973-
1974- # Add the points to the Kapton insulation data structure
1975- self .p_iso_layer .append (kapton_points )
1976-
1977- def insert_kapton_layer_horizontal (self , y_position , left_bound , right_bound ):
1978- """
1979- Insert a horizontal Kapton insulation layer between layers.
1980-
1981- :param x_position: x-coordinate where the Kapton layer is centered.
1982- :param left_bound: The left boundary of the window.
1983- :param right_bound: The right boundary of the window.
1984- """
1985- kapton_thickness = self .insulation .thickness_of_insulation # Thickness of the Kapton insulation
1986-
1987- # Define points for the vertical Kapton insulation rectangle
1988- kapton_points = [
1989- [left_bound , y_position - kapton_thickness / 2 , 0 , self .mesh_data .c_window ],
1990- [left_bound , y_position + kapton_thickness / 2 , 0 , self .mesh_data .c_window ],
1991- [right_bound , y_position + kapton_thickness / 2 , 0 , self .mesh_data .c_window ],
1992- [right_bound , y_position - kapton_thickness / 2 , 0 , self .mesh_data .c_window ]
1993- ]
1994-
1995- # Add the points to the Kapton insulation data structure
1996- self .p_iso_layer .append (kapton_points )
1997-
19981948 def draw_insulation_conductor (self ):
19991949 """
20001950 Draw insulation around each conductor turn.
0 commit comments