Help

HV Cable Sizing Calculator

Jump to section

Overview

Sizes three-phase high voltage copper XLPE cables for systems rated 3.3–33 kV per AS/NZS 3008.1.1 and IEC 60502. Cable data is sourced from Nexans Olex published tables for copper conductors with XLPE insulation rated at 90°C.

The calculator performs four checks simultaneously:

  1. Current capacity — selects the smallest standard conductor whose derated ampacity meets the design current, then automatically upsizes if voltage drop or short circuit withstand checks require a larger conductor.
  2. Voltage drop — verifies the three-phase voltage drop stays within the user-specified limit.
  3. Short circuit withstand — verifies the conductor cross-section exceeds the adiabatic minimum for the prospective fault current and clearing time.
  4. Power loss — calculates I²R losses in the cable run.

Input Parameters

Load Parameters

Parameter Type Default Range Description
load_power Number 5000 min 10 Three-phase load power (kW or kVA)
power_type Enum: kW / kVA kVA — Whether load_power is active (kW) or apparent (kVA)
power_factor Number 0.9 0.5 – 1.0 Lagging power factor (cos φ)
system_voltage Enum: 3.3 / 6.6 / 11 / 22 / 33 kV 11 — Nominal line-to-line voltage (kV)

Cable Type

Parameter Type Default Range Description
cable_type Enum: Multi-core (3-core) / Single-core Multi-core (3-core) — Cable construction
cable_configuration Enum: Trefoil / Flat / N/A (Multi-core) N/A (Multi-core) — Single-core laying arrangement (ignored for multi-core)

Installation Conditions

Parameter Type Default Range Description
installation_method Enum Direct Buried — Direct Buried / In Ducts (Underground) / In Cable Trays / In Air (Clipped) / Enclosed Trunking
ambient_temperature Number 25 −20 – 80 °C Ground temperature (buried) or air temperature (in air)
thermal_resistivity Number 1.0 0.5 – 3.0 K·m/W Ground thermal resistivity (buried cables only)
depth_of_burial Number 0.8 0.5 – 2.0 m Depth of burial (buried cables only)
number_of_circuits Integer 1 1 – 6 Number of circuits sharing the same route
circuit_spacing Enum: 0 / 0.15 / 0.3 / 0.6 m 0.3 — Spacing between grouped circuits (0 = touching)

Route Parameters

Parameter Type Default Range Description
cable_length_m Number 250 1 – 10,000 m Total cable route length
max_voltage_drop_percent Number 2.5 0.5 – 10% Maximum allowable voltage drop percentage

Short Circuit Parameters

Parameter Type Default Range Description
short_circuit_current_ka Number 25 1 – 100 kA Prospective fault current (RMS symmetric)
short_circuit_duration_s Enum: 0.1 / 0.5 / 1.0 / 3.0 s 1.0 — Fault clearing time

Design Parameters

Parameter Type Default Range Description
conductor_temp_rating Enum: 90 °C 90 — Info only — R values always use 90°C from Nexans Olex tables

Output Results

Output Unit Description
load_current_a A Three-phase load current
k1_temperature_factor — Temperature correction factor
k2_grouping_factor — Grouping correction factor
k3_thermal_resistivity_factor — Soil thermal resistivity correction factor
k4_depth_factor — Depth of burial correction factor
combined_derating_factor — Product \( k_1 \times k_2 \times k_3 \times k_4 \)
design_current_a A Required cable rating = \( I_L / k_{total} \)
selected_conductor_size_mm2 mm² Selected standard conductor cross-section
cable_current_rating_a A Tabulated ampacity at reference conditions
cable_resistance_ohm_per_km Ω/km AC resistance per phase at 90°C
cable_reactance_ohm_per_km Ω/km Reactance per phase at 50 Hz
cable_impedance_ohm_per_km Ω/km Cable impedance \( Z = \sqrt{R^2 + X^2} \)
actual_voltage_drop_volts V Three-phase voltage drop in volts
actual_voltage_drop_percent % Voltage drop as percentage of nominal voltage
voltage_drop_compliant Boolean Whether \( V_{d\%} \leq V_{d,max\%} \)
min_size_short_circuit_mm2 mm² Minimum conductor area for SC withstand
short_circuit_compliant Boolean Whether selected size ≥ minimum SC size
power_loss_w W Total I²R loss in the cable run
power_loss_percent % Power loss as percentage of transmitted power
current_utilization_percent % Load current as percentage of cable rating
overall_compliant Boolean True when ampacity, voltage drop, and SC checks all pass
compliance_status text "COMPLIANT" or "NON-COMPLIANT"
derated_current_rating_a A Tabulated ampacity × combined derating factor
governing_criterion text "Ampacity", "Short Circuit Withstand", or "Voltage Drop"

Formulas

Load Current (Three-Phase)

For apparent power (kVA):

\[ I_L = \frac{S}{\sqrt{3} \times U} \]

For active power (kW):

\[ I_L = \frac{P}{\sqrt{3} \times U \times \cos\phi} \]

Where \(S\) is apparent power (kVA), \(P\) is active power (kW), \(U\) is line-to-line voltage (kV), and \(\cos\phi\) is the power factor.

Derating Factors

Four correction factors are applied to convert tabulated ampacity to site-specific conditions:

  • \(k_1\) — temperature correction (ambient vs reference)
  • \(k_2\) — grouping/proximity of adjacent circuits
  • \(k_3\) — soil thermal resistivity (buried cables only)
  • \(k_4\) — depth of burial (buried cables only)
\[ k_{total} = k_1 \times k_2 \times k_3 \times k_4 \]

Factors are interpolated from AS/NZS 3008 correction tables. For in-air installations, \(k_3 = k_4 = 1.0\).

Design Current

\[ I_z = \frac{I_L}{k_{total}} \]

The cable must have a tabulated rating \(I_{rated} \geq I_z\). The smallest standard size satisfying this condition is selected.

Cable Impedance

\[ Z_c = \sqrt{R_c^2 + X_c^2} \quad (\Omega/\text{km}) \]

Where \(R_c\) is the AC resistance at 90°C and \(X_c\) is the reactance at 50 Hz, both from Nexans Olex tables.

Three-Phase Voltage Drop

\[ \Delta V = \sqrt{3} \times I_L \times L \times (R_c \cos\phi + X_c \sin\phi) \]

Where \(I_L\) is the load current (A), \(L\) is the cable length (km), \(R_c\) is resistance (Ω/km), \(X_c\) is reactance (Ω/km), and \(\cos\phi\) is the power factor.

\[ V_{d\%} = \frac{\Delta V}{U} \times 100 \]

\(U\) is the nominal line-to-line voltage in volts.

Short Circuit Withstand (Adiabatic Equation)

\[ A_{min} = \frac{I_{sc} \times \sqrt{t}}{k} \]

Where \(I_{sc}\) is the prospective fault current (A, RMS symmetric), \(t\) is the fault clearing time (s), and \(k\) is the adiabatic constant. For copper XLPE conductors (90°C initial to 250°C final):

\[ k = 143 \;\text{A}\cdot\text{s}^{0.5}/\text{mm}^2 \]

The selected conductor must satisfy \(A_{selected} \geq A_{min}\).

Three-Phase Power Loss

\[ P_{loss} = 3 \times I_L^2 \times R_c \times L \]

Where \(R_c\) is resistance (Ω/km) and \(L\) is length (km). Factor of 3 accounts for all three phases.

Key Lookup Tables

11 kV Multi-core — Current Ratings & Impedance

Copper XLPE, direct buried, 0.8 m depth, 25°C ground, 1.0 K·m/W (Nexans Olex reference conditions)

CSA (mm²) Rating (A) R @ 90°C (Ω/km) X (Ω/km)
161201.5400.110
251550.9690.105
351850.6680.102
502200.5240.100
702700.3630.095
953250.2610.090
1203750.2070.087
1504250.1680.084
1854850.1340.082
2405650.1020.079
3006450.08170.077
4007500.06380.074
5008500.04970.072
6309650.03840.070

Temperature Correction Factors (Buried, 90°C XLPE)

Ground Temp (°C) k1
151.11
201.05
25 (reference)1.00
300.94
350.88
400.82

Grouping Factors — Multi-core Buried

Circuits Touching 0.15 m 0.30 m 0.60 m
11.001.001.001.00
20.800.850.900.95
30.700.780.850.92
40.650.730.810.90
50.600.700.780.88
60.570.680.760.87

Worked Examples

The 4 examples below are the validation cases for this calculation. Each one was produced by the calculation engine from the inputs shown, every figure was checked against the independent reference quoted at the end of the example, and the same cases are run against every engine build (see validation scorecard, tool fe_calc_cable_size; worked examples for every calculation).

#CaseCableIL (A)Iderated (A)Vd (%)GoverningResult
111 kV 5 MVA substation feeder, 500 m: short-circuit withstand governs185 mm² Cu XLPE 3-core262.4485.00.32short-circuit withstandPASS
233 kV 20 MW sub-transmission, single-core trefoil in hot, dry soil240 mm² Cu XLPE trefoil411.7440.70.55current-carrying capacityPASS
311 kV 3 MVA mine feeder, four touching circuits: ampacity governs120 mm² Cu XLPE 3-core157.5175.90.83current-carrying capacityPASS
46.6 kV 1.5 MVA feeder, 3 km single-core trefoil: voltage drop governs120 mm² Cu XLPE trefoil131.2424.02.29voltage dropPASS

Example 1 — 11 kV 5 MVA substation feeder, 500 m: short-circuit withstand governs

Reference buried conditions (no derating): 25 kA for 1 s needs 174.8 mm², so 185 mm² is selected although 150 mm² would carry the 262 A load.

Given: 5,000 kVA at 11 kV, PF 0.9; copper XLPE 3-core cable, direct buried, ground 25 °C (default), soil 1 K·m/W (default), depth 0.8 m (default), 1 circuit; route 500 m; fault 25 kA (default) for 1 s (default); voltage-drop limit 2.5 % (default).

Load currentIL = 5,000 kVA × 1000 / (√3 × 11,000) = 262.43 A
Deratingk1 = 1.00 (25 °C ground); k2 = 1.00 (1 circuit); k3 = 1.00 (1 K·m/W); k4 = 1.00 (0.8 m); ktotal = 1.00 × 1.00 × 1.00 × 1.00 = 1.00; Iz = 262.43 / 1.00 = 262.43 A
Short-circuit minimumAmin = Isc × √t / k = 25,000 × √1 / 143 = 174.83 mm²
Size selectionMulti-core (3-core) sizes tried smallest first for rating ≥ Iz, A ≥ Amin and ΔV within 2.5 %: selected 185 mm² — Nexans Olex 11 kV table: rating 485 A, R = 0.134 Ω/km at 90 °C, X = 0.0820 Ω/km (Z = 0.1571 Ω/km). Last check to reject a smaller size: short circuit withstand
Check — capacityIderated = 485 × 1.00 = 485.0 A vs IL 262.43 A (utilisation 54.1 %) PASS
Check — voltage dropΔV = √3 × 262.43 × 0.500 × (0.134 × 0.9 + 0.0820 × 0.4359) = 35.53 V = 0.323 % of 11,000 V, limit 2.5 % PASS
Check — short circuitA = 185 mm² ≥ Amin 174.83 mm² (margin 5.8 %) PASS
Power lossPloss = 3 × 262.43² × 0.134 × 0.500 = 13,843 W (0.28 % of the load)
Result3/3 checks pass → PASS; 185 mm² Cu XLPE; power loss 13,843 W; governing: short circuit withstand
Referencec0020 help-page Example 1 (calcs/test_c0020 test_example1_*): I = 5 MVA / (√3 × 11 kV) = 262.4 A; adiabatic minimum S = 25 000 × √1 / 143 = 174.83 mm² → 185 mm²; governed by short-circuit withstand. (validation case c0020-5000kva-11kv-example1)

Example 2 — 33 kV 20 MW sub-transmission, single-core trefoil in hot, dry soil

All four buried derating factors apply (0.88 × 0.93 × 0.79 × 0.96 = 0.62); 240 mm² carries the 412 A load and drops 0.55 % over 2 km.

Given: 20,000 kW at 33 kV, PF 0.85; copper XLPE single-core trefoil cable, direct buried, ground 35 °C, soil 2 K·m/W, depth 1.2 m, 2 circuits, 0.3 m apart; route 2,000 m; fault 31.5 kA for 1 s (default); voltage-drop limit 5 %.

Load currentIL = 20,000 kW × 1000 / (√3 × 33,000 × 0.85) = 411.66 A
Deratingk1 = 0.88 (35 °C ground); k2 = 0.93 (2 circuits, 0.3 m apart); k3 = 0.79 (2 K·m/W); k4 = 0.96 (1.2 m); ktotal = 0.88 × 0.93 × 0.79 × 0.96 = 0.621; Iz = 411.66 / 0.621 = 663.24 A
Short-circuit minimumAmin = Isc × √t / k = 31,500 × √1 / 143 = 220.28 mm²
Size selectionSingle-core trefoil sizes tried smallest first for rating ≥ Iz, A ≥ Amin and ΔV within 5 %: selected 240 mm² — Nexans Olex 11 kV table: rating 710 A, R = 0.102 Ω/km at 90 °C, X = 0.0750 Ω/km (Z = 0.1266 Ω/km). Last check to reject a smaller size: ampacity
Check — capacityIderated = 710 × 0.621 = 440.7 A vs IL 411.66 A (utilisation 93.4 %) PASS
Check — voltage dropΔV = √3 × 411.66 × 2.000 × (0.102 × 0.85 + 0.0750 × 0.5268) = 179.98 V = 0.545 % of 33,000 V, limit 5 % PASS
Check — short circuitA = 240 mm² ≥ Amin 220.28 mm² (margin 9.0 %) PASS
Power lossPloss = 3 × 411.66² × 0.102 × 2.000 = 103,711 W (0.44 % of the load)
Result3/3 checks pass → PASS; 240 mm² Cu XLPE; power loss 103,711 W; governing: current carrying capacity. Cable utilization is high (93.4%) Consider voltage drop carefully for long cable runs The HV engine uses its 11 kV cable data (ratings, R, X) for every system voltage; confirm with manufacturer data for this voltage.
Referencec0020 help-page Example 2 (calcs/test_c0020 test_example2_*): I = 20 MW / (√3 × 33 kV × 0.85) = 411.7 A; derating 0.88 × 0.93 × 0.79 × 0.96 = 0.621; 240 mm² selected; ΔV ≈ 0.545 %. (validation case c0020-20mw-33kv-trefoil-example2)

Example 3 — 11 kV 3 MVA mine feeder, four touching circuits: ampacity governs

Heavy grouping (0.65) with 40 °C soil and 1.5 K·m/W soil takes the derating to 0.47, so 120 mm² is set by ampacity rather than the 98.9 mm² short-circuit minimum.

Given: 3,000 kVA at 11 kV, PF 0.9; copper XLPE 3-core cable, direct buried, ground 40 °C, soil 1.5 K·m/W, depth 0.8 m (default), 4 circuits, 0 m apart; route 1,500 m; fault 20 kA for 0.5 s; voltage-drop limit 3 %.

Load currentIL = 3,000 kVA × 1000 / (√3 × 11,000) = 157.46 A
Deratingk1 = 0.82 (40 °C ground); k2 = 0.65 (4 circuits, 0 m apart); k3 = 0.88 (1.5 K·m/W); k4 = 1.00 (0.8 m); ktotal = 0.82 × 0.65 × 0.88 × 1.00 = 0.469; Iz = 157.46 / 0.469 = 335.71 A
Short-circuit minimumAmin = Isc × √t / k = 20,000 × √0.5 / 143 = 98.90 mm²
Size selectionMulti-core (3-core) sizes tried smallest first for rating ≥ Iz, A ≥ Amin and ΔV within 3 %: selected 120 mm² — Nexans Olex 11 kV table: rating 375 A, R = 0.207 Ω/km at 90 °C, X = 0.0870 Ω/km (Z = 0.2245 Ω/km). Last check to reject a smaller size: ampacity
Check — capacityIderated = 375 × 0.469 = 175.9 A vs IL 157.46 A (utilisation 89.5 %) PASS
Check — voltage dropΔV = √3 × 157.46 × 1.500 × (0.207 × 0.9 + 0.0870 × 0.4359) = 91.73 V = 0.834 % of 11,000 V, limit 3 % PASS
Check — short circuitA = 120 mm² ≥ Amin 98.90 mm² (margin 21.3 %) PASS
Power lossPloss = 3 × 157.46² × 0.207 × 1.500 = 23,095 W (0.77 % of the load)
Result3/3 checks pass → PASS; 120 mm² Cu XLPE; power loss 23,095 W; governing: current carrying capacity. Consider voltage drop carefully for long cable runs Review grouping factors and thermal considerations for multiple circuits
Referencec0020 help-page Example 3 (calcs/test_c0020 test_example3_*): I = 3 MVA / (√3 × 11 kV) = 157.5 A; derating 0.82 × 0.65 × 0.88 × 1.00; 120 mm² selected, governed by ampacity; S_min = 20 000 × √0.5 / 143 = 98.9 mm²; ΔV ≈ 0.834 %. (validation case c0020-3000kva-11kv-grouped-example3)

Example 4 — 6.6 kV 1.5 MVA feeder, 3 km single-core trefoil: voltage drop governs

Two trefoil circuits 0.3 m apart in 30 °C soil: 95 mm² meets ampacity and the 16 kA / 0.5 s withstand but exceeds 2.5 % over 3 km, so 120 mm² is selected (the engine's 11 kV data is applied at 6.6 kV).

Given: 1,500 kVA at 6.6 kV, PF 0.9 (default); copper XLPE single-core trefoil cable, direct buried, ground 30 °C, soil 1 K·m/W (default), depth 0.8 m (default), 2 circuits, 0.3 m apart; route 3,000 m; fault 16 kA for 0.5 s; voltage-drop limit 2.5 % (default).

Load currentIL = 1,500 kVA × 1000 / (√3 × 6,600) = 131.22 A
Deratingk1 = 0.94 (30 °C ground); k2 = 0.93 (2 circuits, 0.3 m apart); k3 = 1.00 (1 K·m/W); k4 = 1.00 (0.8 m); ktotal = 0.94 × 0.93 × 1.00 × 1.00 = 0.874; Iz = 131.22 / 0.874 = 150.10 A
Short-circuit minimumAmin = Isc × √t / k = 16,000 × √0.5 / 143 = 79.12 mm²
Size selectionSingle-core trefoil sizes tried smallest first for rating ≥ Iz, A ≥ Amin and ΔV within 2.5 %: selected 120 mm² — Nexans Olex 11 kV table: rating 485 A, R = 0.207 Ω/km at 90 °C, X = 0.0810 Ω/km (Z = 0.2223 Ω/km). Last check to reject a smaller size: voltage drop
Check — capacityIderated = 485 × 0.874 = 424.0 A vs IL 131.22 A (utilisation 30.9 %) PASS
Check — voltage dropΔV = √3 × 131.22 × 3.000 × (0.207 × 0.9 + 0.0810 × 0.4359) = 151.10 V = 2.289 % of 6,600 V, limit 2.5 % PASS
Check — short circuitA = 120 mm² ≥ Amin 79.12 mm² (margin 51.7 %) PASS
Power lossPloss = 3 × 131.22² × 0.207 × 3.000 = 32,076 W (2.14 % of the load)
Result3/3 checks pass → PASS; 120 mm² Cu XLPE; power loss 32,076 W; governing: voltage drop. Voltage drop margin is tight (0.21%) Consider voltage drop carefully for long cable runs The HV engine uses its 11 kV cable data (ratings, R, X) for every system voltage; confirm with manufacturer data for this voltage.
ReferenceHand calculation with the engine's embedded Nexans Olex 11 kV single-core trefoil table (help page Key Lookup Tables): I = 1500 kVA / (√3 × 6.6 kV) = 131.22 A; k1 = 0.94 (30 °C ground), k2 = 0.93 (2 trefoil circuits, 0.3 m), k3 = k4 = 1.00 → 0.874, Iz = 150.1 A; Amin = 16 000 × √0.5 / 143 = 79.12 mm²; 95 mm² (R 0.261, X 0.083 Ω/km) gives ΔV = √3 × 131.22 × 3 × (0.261 × 0.9 + 0.083 × 0.4359) = 184.8 V = 2.80 % > 2.5 %; 120 mm² (R 0.207, X 0.081, rated 485 A) gives 151.1 V = 2.29 %; derated rating 485 × 0.874 = 424.0 A. (validation case c0020-1500kva-6.6kv-trefoil-3km-vd)

Standards & References

  • AS/NZS 3008.1.1:2017 — Electrical installations — Selection of cables — Cables for alternating voltages up to and including 0.6/1 kV (derating factor methodology also applied to HV cables)
  • IEC 60502-2 — Power cables with extruded insulation and their accessories for rated voltages from 1 kV up to 30 kV
  • IEC 60909 — Short-circuit currents in three-phase a.c. systems — used for adiabatic withstand calculation
  • IEC 60287 — Electric cables — Calculation of the current rating (thermal resistivity, grouping, depth corrections)
  • Nexans Olex — High Voltage Cable Systems product catalogue (ampacity tables, R and X data for copper XLPE cables)
  • Short circuit constant \(k = 143\) for copper/XLPE (90°C → 250°C) per AS/NZS 3008 Table 52

Tips & Limitations

Tips
  • Short circuit withstand often governs HV cable sizing rather than current capacity or voltage drop. Always check SC first to avoid upsizing late in the design.
  • Reducing fault clearing time from 1.0 s to 0.5 s reduces the minimum SC cross-section by approximately 29%.
  • Single-core trefoil cables typically have 15–25% higher current ratings than multi-core cables of the same CSA.
  • For long cable runs (>1 km), voltage drop may become the governing criterion even at HV. Check the VD margin carefully.
  • Increasing circuit spacing from touching to 0.6 m can recover 20–30% of ampacity lost to grouping derating.
  • The calculator reports power loss — for cables operating near full load, losses above 3% suggest an economic case for a larger conductor.
Limitations
  • Copper XLPE only — aluminium conductors and other insulation types (EPR, paper/lead) are not currently supported.
  • Balanced three-phase only — single-phase and unbalanced loading are not modelled.
  • Cable data referenced to 11 kV — the Nexans Olex tables are 11 kV reference data. For other voltage ratings (3.3, 6.6, 22, 33 kV) the same R and X values are used; actual insulation thickness differences may cause minor variations in ampacity.
  • Adiabatic SC only — the short circuit withstand uses the simplified adiabatic method. For fault durations >3 s or where heat dissipation is significant, a non-adiabatic analysis should be performed.
  • No motor starting analysis — inrush and starting current (typically 5–8× FLC) voltage drop is not calculated.
  • No earth/screen conductor sizing — earth fault withstand of the cable screen is not assessed; a separate earth fault calculation should be performed.
  • Derating factor tables use linear interpolation between tabulated points. For temperatures outside the range 15–50°C the nearest boundary factor is used.

Developer Guide

Architecture

File layout:

  • components/c0020_hv_cable_sizing/component.py — Component registration, parameter schema, calculator class (HVCableSizingCalculator), SVG diagram generator, summary cards builder
  • components/c0020_hv_cable_sizing/calculations.py — Pure math functions, Nexans Olex cable data tables, derating factor tables (no Django dependencies)
  • components/c0020_hv_cable_sizing/equations.py — LaTeX/HTML equation builder and table data builder for rendered output
  • components/c0020_hv_cable_sizing/excel_generator.py — Excel report generation

The calculator extends ElectricalCalculator (from calcs.core.base_calculator). The calculate() method delegates to the pure function calculate_hv_cable_sizing(data) in calculations.py.

Cable data tables are defined as Python dicts in calculations.py:

  • CABLE_DATA_11KV_MULTICORE
  • CABLE_DATA_11KV_SINGLECORE_TREFOIL
  • CABLE_DATA_11KV_SINGLECORE_FLAT

Derating factor tables:

  • TEMP_CORRECTION_BURIED_90C — reference 25°C
  • TEMP_CORRECTION_AIR_90C — reference 30°C
  • THERMAL_RESISTIVITY_FACTORS — reference 1.0 K·m/W
  • DEPTH_OF_BURIAL_FACTORS — reference 0.8 m
  • GROUPING_MULTICORE_BURIED
  • GROUPING_SINGLECORE_TREFOIL
  • GROUPING_SINGLECORE_FLAT

SVG generators registered via register_component():

  • cable_sizing_diagram — generate_cable_sizing_diagram_svg()
  • qr_code_display — generate_qr_code_svg()

Code Paths

Key functions in calculations.py:

Function Purpose
calculate_load_current(power, power_type, voltage_kv, pf) Three-phase load current (kW or kVA input)
get_temperature_correction_factor(temp, method) k1 from buried or in-air tables
get_grouping_factor(circuits, spacing, type, config) k2 from grouping tables
get_thermal_resistivity_factor(resistivity) k3 from soil resistivity table
get_depth_of_burial_factor(depth) k4 from burial depth table
interpolate_factor(value, table) Linear interpolation helper for all factor tables
get_cable_data(size, type, config, voltage) Lookup rating, R, X from Nexans Olex tables
find_next_standard_size(min_size, cable_type) Next standard CSA ≥ minimum required
calculate_voltage_drop_3phase(I, L, R, X, pf) Three-phase voltage drop in volts
calculate_short_circuit_withstand(sc_ka, duration) Adiabatic minimum CSA (k = 143)
calculate_hv_cable_sizing(data) Main orchestrator — runs all 11 steps

Calculation steps in calculate_hv_cable_sizing():

  1. Load current
  2. Derating factors (k1–k4)
  3. Design current (load / combined derating)
  4. Cable selection from ampacity tables
  5. Voltage drop check
  6. Short circuit withstand check
  7. Power loss calculation
  8. Current utilization & margins
  9. Overall compliance
  10. Recommendations generation
  11. Standards reference attachment

Key functions in equations.py:

Function Purpose
build_equations(result) Builds LaTeX-formatted HTML for all calculation steps
build_table_data(result) Builds input/output table data for rendering

Testing

Running tests:

pytest calcs/components/c0020_hv_cable_sizing/ -v
pytest calcs/test_c0020* -v

Worked examples: the examples above are generated from the MCP validation corpus (mcp_public/validation/cases/fe_calc_cable_size/) by python manage.py generate_help_examples --tool fe_calc_cable_size, which writes help/_hv_cable_sizing_examples.html; calcs/test_help_examples.py fails if the committed fragment is stale.

Key constants for test validation:

  • SC constant k = 143 A·s0.5/mm² (copper XLPE, 90°C → 250°C)
  • Standard multi-core sizes: 16, 25, 35, 50, 70, 95, 120, 150, 185, 240, 300, 400, 500, 630 mm²
  • Standard single-core sizes: 50, 70, 95, 120, 150, 185, 240, 300, 400, 500, 630, 800, 1000, 1200 mm²

How to extend:

  1. Add voltage-specific cable data tables (e.g., CABLE_DATA_33KV_MULTICORE) in calculations.py and update get_cable_data() to select by voltage.
  2. Add aluminium conductor tables with corresponding k-factor (k = 92 for Al/XLPE) and update calculate_short_circuit_withstand().
  3. Extend the parameter schema in component.py to expose new conductor material or insulation options.
  4. Add derating tables for in-air installation methods (currently uses buried tables as reference for all methods).
  5. Write tests covering new lookup values, edge cases (largest cable insufficient, boundary derating conditions), and cross-checks against published examples.