Skip to content

Commit 8a1f035

Browse files
committed
Refactor output functions in TF coil classes for improved clarity and organization
1 parent 0160628 commit 8a1f035

File tree

3 files changed

+350
-373
lines changed

3 files changed

+350
-373
lines changed

process/resistive_tf_coil.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import numba
44
import numpy as np
55

6+
from process import process_output as po
67
from process.fortran import (
78
build_variables,
89
constants,
@@ -678,7 +679,7 @@ def tf_res_heating(self) -> None:
678679
tfcoil_variables.p_tf_joints_resistive = 0.0e0
679680

680681
def output_tf_resistive_info(self):
681-
return
682+
po.oheadr(self.outfile, "Resisitve TF coil parameters")
682683

683684
@staticmethod
684685
@numba.njit(cache=True)

process/superconducting_tf_coil.py

Lines changed: 345 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2401,7 +2401,351 @@ def tf_averaged_turn_geom(
24012401
)
24022402

24032403
def output_tf_superconducting_info(self):
2404-
return
2404+
po.oheadr(self.outfile, "Superconducting TF coil parameters")
2405+
# Winding pack structure
2406+
po.osubhd(self.outfile, "TF winding pack (WP) geometry:")
2407+
po.ovarre(
2408+
self.outfile,
2409+
"WP cross section area with insulation and insertion (per coil) (m2)",
2410+
"(awpc)",
2411+
sctfcoil_module.awpc,
2412+
)
2413+
po.ovarre(
2414+
self.outfile,
2415+
"WP cross section area (per coil) (m2)",
2416+
"(a_tf_wp_steel)",
2417+
sctfcoil_module.a_tf_wp_no_insulation,
2418+
)
2419+
po.ovarre(
2420+
self.outfile,
2421+
"Winding pack radial thickness (m)",
2422+
"(dr_tf_wp)",
2423+
tfcoil_variables.dr_tf_wp,
2424+
"OP ",
2425+
)
2426+
if tfcoil_variables.i_tf_turns_integer == 1:
2427+
po.ovarre(
2428+
self.outfile,
2429+
"Winding pack toroidal width (m)",
2430+
"(dx_tf_wp_outer)",
2431+
tfcoil_variables.dx_tf_wp_outer,
2432+
"OP ",
2433+
)
2434+
else:
2435+
po.ovarre(
2436+
self.outfile,
2437+
"Winding pack toroidal width 1 (m)",
2438+
"(dx_tf_wp_outer)",
2439+
tfcoil_variables.dx_tf_wp_outer,
2440+
"OP ",
2441+
)
2442+
po.ovarre(
2443+
self.outfile,
2444+
"Winding pack toroidal width 2 (m)",
2445+
"(wwp2)",
2446+
tfcoil_variables.wwp2,
2447+
"OP ",
2448+
)
2449+
2450+
po.ovarre(
2451+
self.outfile,
2452+
"Ground wall insulation thickness (m)",
2453+
"(dx_tf_wp_insulation)",
2454+
tfcoil_variables.dx_tf_wp_insulation,
2455+
)
2456+
po.ovarre(
2457+
self.outfile,
2458+
"Winding pack insertion gap (m)",
2459+
"(tfinsgap)",
2460+
tfcoil_variables.tfinsgap,
2461+
)
2462+
2463+
# WP material fraction
2464+
po.osubhd(self.outfile, "TF winding pack (WP) material area/fractions:")
2465+
po.ovarre(
2466+
self.outfile,
2467+
"Steel WP cross-section (total) (m2)",
2468+
"(a_tf_wp_steel*n_tf_coils)",
2469+
tfcoil_variables.a_tf_wp_steel * tfcoil_variables.n_tf_coils,
2470+
)
2471+
po.ovarre(
2472+
self.outfile,
2473+
"Steel WP fraction",
2474+
"(a_tf_wp_steel/awpc)",
2475+
tfcoil_variables.a_tf_wp_steel / sctfcoil_module.awpc,
2476+
)
2477+
po.ovarre(
2478+
self.outfile,
2479+
"Insulation WP fraction",
2480+
"(a_tf_coil_wp_turn_insulation/awpc)",
2481+
tfcoil_variables.a_tf_coil_wp_turn_insulation / sctfcoil_module.awpc,
2482+
)
2483+
po.ovarre(
2484+
self.outfile,
2485+
"Cable WP fraction",
2486+
"((awpc-a_tf_wp_steel-a_tf_coil_wp_turn_insulation)/awpc)",
2487+
(
2488+
sctfcoil_module.awpc
2489+
- tfcoil_variables.a_tf_wp_steel
2490+
- tfcoil_variables.a_tf_coil_wp_turn_insulation
2491+
)
2492+
/ sctfcoil_module.awpc,
2493+
)
2494+
2495+
# Number of turns
2496+
po.osubhd(self.outfile, "WP turn information:")
2497+
po.ovarin(
2498+
self.outfile,
2499+
"Turn parametrisation",
2500+
"(i_tf_turns_integer)",
2501+
tfcoil_variables.i_tf_turns_integer,
2502+
)
2503+
if tfcoil_variables.i_tf_turns_integer == 0:
2504+
po.ocmmnt(self.outfile, " Non-integer number of turns")
2505+
else:
2506+
po.ocmmnt(self.outfile, " Integer number of turns")
2507+
2508+
po.ovarre(
2509+
self.outfile,
2510+
"Number of turns per TF coil",
2511+
"(n_tf_coil_turns)",
2512+
tfcoil_variables.n_tf_coil_turns,
2513+
"OP ",
2514+
)
2515+
if tfcoil_variables.i_tf_turns_integer == 1:
2516+
po.ovarin(
2517+
self.outfile,
2518+
"Number of TF pancakes",
2519+
"(n_pancake)",
2520+
tfcoil_variables.n_pancake,
2521+
)
2522+
po.ovarin(
2523+
self.outfile,
2524+
"Number of TF layers",
2525+
"(n_layer)",
2526+
tfcoil_variables.n_layer,
2527+
)
2528+
2529+
po.oblnkl(self.outfile)
2530+
2531+
if tfcoil_variables.i_tf_turns_integer == 1:
2532+
po.ovarre(
2533+
self.outfile,
2534+
"Radial width of turn (m)",
2535+
"(dr_tf_turn)",
2536+
sctfcoil_module.dr_tf_turn,
2537+
)
2538+
po.ovarre(
2539+
self.outfile,
2540+
"Toroidal width of turn (m)",
2541+
"(dx_tf_turn)",
2542+
sctfcoil_module.dx_tf_turn,
2543+
)
2544+
po.ovarre(
2545+
self.outfile,
2546+
"Radial width of conductor (m)",
2547+
"(t_conductor_radial)",
2548+
sctfcoil_module.t_conductor_radial,
2549+
"OP ",
2550+
)
2551+
po.ovarre(
2552+
self.outfile,
2553+
"Toroidal width of conductor (m)",
2554+
"(t_conductor_toroidal)",
2555+
sctfcoil_module.t_conductor_toroidal,
2556+
"OP ",
2557+
)
2558+
po.ovarre(
2559+
self.outfile,
2560+
"Radial width of cable space",
2561+
"(dr_tf_turn_cable_space)",
2562+
sctfcoil_module.dr_tf_turn_cable_space,
2563+
)
2564+
po.ovarre(
2565+
self.outfile,
2566+
"Toroidal width of cable space",
2567+
"(dx_tf_turn_cable_space)",
2568+
sctfcoil_module.dx_tf_turn_cable_space,
2569+
)
2570+
else:
2571+
po.ovarre(
2572+
self.outfile,
2573+
"Width of turn including inter-turn insulation (m)",
2574+
"(t_turn_tf)",
2575+
tfcoil_variables.t_turn_tf,
2576+
"OP ",
2577+
)
2578+
po.ovarre(
2579+
self.outfile,
2580+
"Width of conductor (square) (m)",
2581+
"(t_conductor)",
2582+
tfcoil_variables.t_conductor,
2583+
"OP ",
2584+
)
2585+
po.ovarre(
2586+
self.outfile,
2587+
"Width of space inside conductor (m)",
2588+
"(t_cable)",
2589+
sctfcoil_module.t_cable,
2590+
"OP ",
2591+
)
2592+
2593+
po.ovarre(
2594+
self.outfile,
2595+
"Steel conduit thickness (m)",
2596+
"(dx_tf_turn_steel)",
2597+
tfcoil_variables.dx_tf_turn_steel,
2598+
)
2599+
po.ovarre(
2600+
self.outfile,
2601+
"Inter-turn insulation thickness (m)",
2602+
"(dx_tf_turn_insulation)",
2603+
tfcoil_variables.dx_tf_turn_insulation,
2604+
)
2605+
2606+
if tfcoil_variables.i_tf_sc_mat in (1, 2, 3, 4, 5, 7, 8, 9):
2607+
po.osubhd(self.outfile, "Conductor information:")
2608+
po.ovarre(
2609+
self.outfile,
2610+
"Diameter of central helium channel in cable",
2611+
"(dia_tf_turn_coolant_channel)",
2612+
tfcoil_variables.dia_tf_turn_coolant_channel,
2613+
)
2614+
po.ocmmnt(self.outfile, "Fractions by area")
2615+
po.ovarre(
2616+
self.outfile,
2617+
"internal area of the cable space",
2618+
"(a_tf_turn_cable_space)",
2619+
tfcoil_variables.a_tf_turn_cable_space,
2620+
)
2621+
po.ovarre(
2622+
self.outfile,
2623+
"Coolant fraction in conductor excluding central channel",
2624+
"(vftf)",
2625+
tfcoil_variables.vftf,
2626+
)
2627+
po.ovarre(
2628+
self.outfile,
2629+
"Copper fraction of conductor",
2630+
"(fcutfsu)",
2631+
tfcoil_variables.fcutfsu,
2632+
)
2633+
po.ovarre(
2634+
self.outfile,
2635+
"Superconductor fraction of conductor",
2636+
"(1-fcutfsu)",
2637+
1 - tfcoil_variables.fcutfsu,
2638+
)
2639+
2640+
ap = (
2641+
tfcoil_variables.acond
2642+
+ tfcoil_variables.n_tf_coil_turns * tfcoil_variables.a_tf_turn_steel
2643+
+ tfcoil_variables.a_tf_coil_wp_turn_insulation
2644+
+ tfcoil_variables.avwp
2645+
+ tfcoil_variables.a_tf_wp_coolant_channels
2646+
)
2647+
po.ovarrf(
2648+
self.outfile,
2649+
"Check total area fractions in winding pack = 1",
2650+
"",
2651+
(
2652+
tfcoil_variables.acond
2653+
+ tfcoil_variables.n_tf_coil_turns
2654+
* tfcoil_variables.a_tf_turn_steel
2655+
+ tfcoil_variables.a_tf_coil_wp_turn_insulation
2656+
+ tfcoil_variables.avwp
2657+
+ tfcoil_variables.a_tf_wp_coolant_channels
2658+
)
2659+
/ ap,
2660+
)
2661+
po.ovarrf(
2662+
self.outfile,
2663+
"minimum TF conductor temperature margin (K)",
2664+
"(tmargmin_tf)",
2665+
tfcoil_variables.tmargmin_tf,
2666+
)
2667+
po.ovarrf(
2668+
self.outfile,
2669+
"TF conductor temperature margin (K)",
2670+
"(tmargtf)",
2671+
tfcoil_variables.tmargtf,
2672+
)
2673+
2674+
po.ovarin(
2675+
self.outfile,
2676+
"Elastic properties behavior",
2677+
"(i_tf_cond_eyoung_axial)",
2678+
tfcoil_variables.i_tf_cond_eyoung_axial,
2679+
)
2680+
if tfcoil_variables.i_tf_cond_eyoung_axial == 0:
2681+
po.ocmmnt(self.outfile, " Conductor stiffness neglected")
2682+
elif tfcoil_variables.i_tf_cond_eyoung_axial == 1:
2683+
po.ocmmnt(self.outfile, " Conductor stiffness is user-input")
2684+
elif tfcoil_variables.i_tf_cond_eyoung_axial == 2:
2685+
po.ocmmnt(
2686+
self.outfile,
2687+
" Conductor stiffness is set by material-specific default",
2688+
)
2689+
2690+
po.ovarre(
2691+
self.outfile,
2692+
"Conductor axial Youngs modulus",
2693+
"(eyoung_cond_axial)",
2694+
tfcoil_variables.eyoung_cond_axial,
2695+
)
2696+
po.ovarre(
2697+
self.outfile,
2698+
"Conductor transverse Youngs modulus",
2699+
"(eyoung_cond_trans)",
2700+
tfcoil_variables.eyoung_cond_trans,
2701+
)
2702+
2703+
# Quench information
2704+
if tfcoil_variables.i_tf_sup == 1:
2705+
po.osubhd(self.outfile, "Quench information :")
2706+
po.ovarre(
2707+
self.outfile,
2708+
"Actual quench time (or time constant) (s)",
2709+
"(tdmptf)",
2710+
tfcoil_variables.tdmptf,
2711+
)
2712+
po.ovarre(
2713+
self.outfile,
2714+
"Vacuum Vessel stress on quench (Pa)",
2715+
"(vv_stress_quench)",
2716+
sctfcoil_module.vv_stress_quench,
2717+
"OP ",
2718+
)
2719+
po.ovarre(
2720+
self.outfile,
2721+
"Maximum allowed voltage during quench due to insulation (kV)",
2722+
"(vdalw)",
2723+
tfcoil_variables.vdalw,
2724+
)
2725+
po.ovarre(
2726+
self.outfile,
2727+
"Actual quench voltage (kV)",
2728+
"(vtfskv)",
2729+
tfcoil_variables.vtfskv,
2730+
"OP ",
2731+
)
2732+
2733+
if tfcoil_variables.i_tf_sc_mat in (1, 2, 3, 4, 5):
2734+
po.ovarre(
2735+
self.outfile,
2736+
"Maximum allowed temp rise during a quench (K)",
2737+
"(tmaxpro)",
2738+
tfcoil_variables.tmaxpro,
2739+
)
2740+
elif tfcoil_variables == 6:
2741+
po.ocmmnt(self.outfile, "CroCo cable with jacket: ")
2742+
2743+
po.ovarre(
2744+
self.outfile,
2745+
"Actual TF coil current / copper area (A/m2)",
2746+
"(copperA_m2)",
2747+
rebco_variables.copperA_m2,
2748+
)
24052749

24062750

24072751
@staticmethod

0 commit comments

Comments
 (0)