Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 57 additions & 21 deletions process/io/plot_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6532,7 +6532,7 @@ def _pack_strands_rectangular_with_obstacles(
insulation_thickness + steel_thickness,
],
(turn_width - 2 * (insulation_thickness + steel_thickness)),
(turn_width - 2 * (insulation_thickness + steel_thickness)),
(turn_height - 2 * (insulation_thickness + steel_thickness)),
facecolor="none",
edgecolor="black",
linestyle="--",
Expand All @@ -6557,19 +6557,27 @@ def _pack_strands_rectangular_with_obstacles(
turn_height - 2 * (insulation_thickness + steel_thickness),
]

# Cable strand packing parameters
strand_diameter = mfile_data.data["dia_tf_turn_superconducting_cable"].get_scan(
scan
)
void_fraction = mfile_data.data["f_a_tf_turn_cable_space_extra_void"].get_scan(
scan
)

# Pack strands if significant void fraction
if void_fraction > 0.001:
_, _ = _pack_strands_rectangular_with_obstacles(
cable_bounds,
(
cable_space_bounds=cable_bounds,
pipe_center=(
turn_width / 2,
turn_height / 2,
),
he_pipe_diameter / 2,
strand_diameter,
void_fraction,
axis,
radius_tf_turn_cable_space_corners,
pipe_radius=he_pipe_diameter / 2,
strand_diameter=strand_diameter,
void_fraction=void_fraction,
axis=axis,
corner_radius=radius_tf_turn_cable_space_corners,
n_strands=mfile_data.data["n_tf_turn_superconducting_cables"].get_scan(
scan
),
Expand All @@ -6583,8 +6591,8 @@ def _pack_strands_rectangular_with_obstacles(

axis.minorticks_on()
axis.set_title("WP Turn Structure")
axis.set_xlabel("X [m]")
axis.set_ylabel("Y [m]")
axis.set_xlabel("r [m]")
axis.set_ylabel("x [m]")

# Add info about the steel casing surrounding the WP
textstr_turn_insulation = (
Expand Down Expand Up @@ -6614,7 +6622,7 @@ def _pack_strands_rectangular_with_obstacles(
)

axis.text(
0.55,
0.65,
0.9,
textstr_turn_steel,
fontsize=9,
Expand All @@ -6641,19 +6649,17 @@ def _pack_strands_rectangular_with_obstacles(
)
elif i_tf_turns_integer == 1:
textstr_turn_cable_space = (
(
f"$\\mathbf{{Cable \\ Space:}}$\n\n"
f"Cable space: \n{cable_space_width_radial:.3e} m radial width \n"
f"{cable_space_width_toroidal:.3e} m toroidal width \n"
f"Corner radius, $r$: {radius_tf_turn_cable_space_corners:.3e} m\n"
f"Cable area with no cooling channel or gaps: {a_tf_turn_cable_space_no_void:.3e} m$^2$\n"
f"Extra cable space area void fraction: {f_a_tf_turn_cable_space_extra_void}\n"
f"True cable space area: {a_tf_turn_cable_space_effective:.3e} m$^2$"
),
f"$\\mathbf{{Cable \\ Space:}}$\n\n"
f"Cable space: \n$\\Delta r$: {cable_space_width_radial:.3e} m \n"
f"$\\Delta x$: {cable_space_width_toroidal:.3e} m \n"
f"Corner radius, $r$: {radius_tf_turn_cable_space_corners:.3e} m\n"
f"Cable area with no cooling channel or gaps: {a_tf_turn_cable_space_no_void:.3e} m$^2$\n"
f"Extra cable space area void fraction: {f_a_tf_turn_cable_space_extra_void}\n"
f"True cable space area: {a_tf_turn_cable_space_effective:.3e} m$^2$"
)

axis.text(
0.5,
0.40,
0.7,
textstr_turn_cable_space,
fontsize=9,
Expand All @@ -6668,6 +6674,36 @@ def _pack_strands_rectangular_with_obstacles(
},
)

if i_tf_turns_integer == 0:
textstr_turn = (
f"$\\mathbf{{Turn:}}$\n\n"
f"$\\Delta r$: {turn_width:.3e} m\n"
f"$\\Delta x$: {turn_width:.3e} m"
)

if i_tf_turns_integer == 1:
textstr_turn = (
f"$\\mathbf{{Turn:}}$\n\n"
f"$\\Delta r$: {turn_width:.3e} m\n"
f"$\\Delta x$: {turn_height:.3e} m"
)

axis.text(
0.525,
0.9,
textstr_turn,
fontsize=9,
verticalalignment="top",
horizontalalignment="left",
transform=fig.transFigure,
bbox={
"boxstyle": "round",
"facecolor": "wheat",
"alpha": 1.0,
"linewidth": 2,
},
)

# Add info about the steel casing surrounding the WP
textstr_turn_cooling = (
f"$\\mathbf{{Cooling:}}$\n\n"
Expand Down