|
| 1 | +#= |
| 2 | +# Tutorial 2a - Building a sector-shaped cable design |
| 3 | +
|
| 4 | +This tutorial demonstrates how to model a typical low-voltage three-core power cable with sector-shaped conductors |
| 5 | +using the [`LineCableModels.jl`](@ref) package. The objective is to build a complete representation of a three-core 1 kV cable with 95 mm² aluminum sector-shaped conductors and a concentric copper neutral. |
| 6 | +=# |
| 7 | + |
| 8 | +#= |
| 9 | +**Tutorial outline** |
| 10 | +```@contents |
| 11 | +Pages = [ |
| 12 | + "tutorial2_sector.md", |
| 13 | +] |
| 14 | +Depth = 2:3 |
| 15 | +``` |
| 16 | +=# |
| 17 | + |
| 18 | +#= |
| 19 | +## Introduction |
| 20 | +
|
| 21 | +Three-core power cables with sector-shaped conductors are common in low-voltage distribution networks. Their compact design allows for efficient use of space. This tutorial will guide you through creating a detailed [`CableDesign`](@ref) for such a cable. |
| 22 | +
|
| 23 | +This tutorial covers: |
| 24 | +
|
| 25 | +1. Defining materials with corrected resistivity. |
| 26 | +2. Creating sector-shaped conductors using [`SectorParams`](@ref) and [`Sector`](@ref). |
| 27 | +3. Assembling a multi-core [`CableDesign`](@ref). |
| 28 | +4. Modeling a concentric neutral wire array. |
| 29 | +5. Previewing the final cable design. |
| 30 | +=# |
| 31 | + |
| 32 | +#= |
| 33 | +## Getting started |
| 34 | +=# |
| 35 | + |
| 36 | +# Load the package and set up the environment: |
| 37 | +using LineCableModels |
| 38 | +using DataFrames |
| 39 | +import LineCableModels.BackendHandler: renderfig #hide |
| 40 | +fullfile(filename) = joinpath(@__DIR__, filename); #hide |
| 41 | +set_verbosity!(0); #hide |
| 42 | + |
| 43 | +#= |
| 44 | +## Cable and Material Data |
| 45 | +
|
| 46 | +We start by defining the materials. We will create a custom aluminum material with a resistivity corrected based on its nominal DC resistance, and a PVC material for insulation. |
| 47 | +=# |
| 48 | + |
| 49 | +# Initialize materials library and add a PVC material |
| 50 | +materials = MaterialsLibrary(add_defaults=true) |
| 51 | +pvc = Material(Inf, 8.0, 1.0, 20.0, 0.1) # simple PVC |
| 52 | +add!(materials, "pvc", pvc) |
| 53 | +copper = get(materials, "copper") |
| 54 | +aluminum = get(materials, "aluminum") |
| 55 | + |
| 56 | + |
| 57 | +#= |
| 58 | +## Sector-Shaped Core Conductors |
| 59 | +
|
| 60 | +The core of the cable consists of three sector-shaped aluminum conductors. We define the geometry using `SectorParams` based on datasheet or standard values. |
| 61 | +=# |
| 62 | + |
| 63 | +# === Sector (core) geometry (table data) === |
| 64 | +# Based on Urquhart's paper for a 3-core 95mm^2 cable |
| 65 | +n_sectors = 3 |
| 66 | +r_back_mm = 10.24 # sector radius b |
| 67 | +d_sector_mm = 9.14 # sector depth s |
| 68 | +r_corner_mm = 1.02 # corner radius c |
| 69 | +theta_cond_deg = 119.0 # sector angle φ |
| 70 | +ins_thick = 1.1e-3 # core insulation thickness |
| 71 | + |
| 72 | +sector_params = SectorParams( |
| 73 | + n_sectors, |
| 74 | + r_back_mm / 1000, |
| 75 | + d_sector_mm / 1000, |
| 76 | + r_corner_mm / 1000, |
| 77 | + theta_cond_deg, |
| 78 | + ins_thick |
| 79 | +) |
| 80 | + |
| 81 | +#= |
| 82 | +With the sector parameters defined, we can create the individual `Sector` conductors and their insulation. Each sector is rotated to form the 3-core bundle. |
| 83 | +=# |
| 84 | + |
| 85 | +rot_angles = (0.0, 120.0, 240.0) |
| 86 | +sectors = [Sector(sector_params, ang, aluminum) for ang in rot_angles] |
| 87 | +insulators = [SectorInsulator(sectors[i], ins_thick, pvc) for i in 1:3] |
| 88 | + |
| 89 | +components = [ |
| 90 | + CableComponent("core1", ConductorGroup(sectors[1]), InsulatorGroup(insulators[1])), |
| 91 | + CableComponent("core2", ConductorGroup(sectors[2]), InsulatorGroup(insulators[2])), |
| 92 | + CableComponent("core3", ConductorGroup(sectors[3]), InsulatorGroup(insulators[3])) |
| 93 | +] |
| 94 | + |
| 95 | +#= |
| 96 | +## Concentric Neutral and Outer Jacket |
| 97 | +
|
| 98 | +The cable includes a concentric neutral conductor made of copper wires and an outer PVC jacket. |
| 99 | +=# |
| 100 | + |
| 101 | +# === Concentric neutral (30 wires) === |
| 102 | +n_neutral = 30 |
| 103 | +r_strand = 0.79e-3 |
| 104 | +R_N = 14.36e-3 # radius to center of neutral wires |
| 105 | +R_O = 17.25e-3 # outer radius of the cable |
| 106 | + |
| 107 | +inner_radius_neutral = R_N - r_strand |
| 108 | +outer_jacket_thickness = R_O - (R_N + r_strand) |
| 109 | + |
| 110 | +neutral_wires = WireArray( |
| 111 | + inner_radius_neutral, |
| 112 | + Diameter(2*r_strand), |
| 113 | + n_neutral, |
| 114 | + 0.0, # lay ratio |
| 115 | + copper |
| 116 | +) |
| 117 | + |
| 118 | +neutral_jacket = Insulator(neutral_wires, Thickness(outer_jacket_thickness), pvc) |
| 119 | +neutral_component = CableComponent("neutral", ConductorGroup(neutral_wires), InsulatorGroup(neutral_jacket)) |
| 120 | + |
| 121 | +#= |
| 122 | +## Assembling the Cable Design |
| 123 | +
|
| 124 | +Now we assemble the complete `CableDesign` by adding all the components. |
| 125 | +=# |
| 126 | + |
| 127 | +design = CableDesign("NAYCWY_O_3x95_30x2_5", components[1]) |
| 128 | +add!(design, components[2]) |
| 129 | +add!(design, components[3]) |
| 130 | +add!(design, neutral_component) |
| 131 | + |
| 132 | +#= |
| 133 | +## Examining the Cable Design |
| 134 | +
|
| 135 | +We can now display a summary of the cable design and preview it graphically. |
| 136 | +=# |
| 137 | + |
| 138 | +println("Cable design summary:") |
| 139 | +detailed_df = DataFrame(design, :detailed) |
| 140 | +display(detailed_df) |
| 141 | + |
| 142 | +println("Previewing cable design...") |
| 143 | +plt, _ = preview(design) |
| 144 | +plt #hide |
| 145 | + |
| 146 | +#= |
| 147 | +## Storing in a Library |
| 148 | +
|
| 149 | +Finally, we can store the cable design in a `CablesLibrary` for future reference. |
| 150 | +=# |
| 151 | + |
| 152 | +library = CablesLibrary() |
| 153 | +add!(library, design) |
| 154 | +library_df = DataFrame(library) |
| 155 | + |
| 156 | +# Save to file for later use: |
| 157 | +output_file = fullfile("cables_library.json") |
| 158 | +save(library, file_name = output_file); |
| 159 | + |
| 160 | +#= |
| 161 | +## Conclusion |
| 162 | +
|
| 163 | +This tutorial has demonstrated how to model a three-core cable with sector-shaped conductors. Key takeaways include: |
| 164 | +
|
| 165 | +1. Creating custom materials with corrected properties. |
| 166 | +2. Defining complex conductor shapes like sectors. |
| 167 | +3. Assembling a multi-core cable design component by component. |
| 168 | +4. Visualizing the final design for verification. |
| 169 | +
|
| 170 | +This detailed modeling capability allows for accurate analysis of various cable configurations. |
| 171 | +=# |
| 172 | + |
0 commit comments