GLOBALGRID2050 / EXPLORE CODE

Part of: Explore Code / Cables and conductors / globalgrid2050 / testcode/202609060432/cable

Data Core and 2 more files

A JavaScript file in the cable folder of GlobalGrid2050 covering 11kV, 33kV, cables and 110kV, using BS 7870-4 and IEC 60840. Served with the page at https://globalgrid2050.com/testcode/202609060432/cable/.

361 lines of JavaScript from globalgrid2050, in 3 files. Topic: Cables and conductors. Section 26 of 2044.

Cut 2026-12-06T03:07:51+00:00. A copy for reading; the repository at the stated commit is the source.

In the State lines below, domain stage, users and canonical status are rule-based first approximations from code and path evidence (rules explore-agent-rules-v1), not observed facts: the rules.

In this section

  1. Data Core other · globalgrid2050 / testcode/202609060432/cable/data-core.js lines 1–308
  2. Data LV other · globalgrid2050 / testcode/202609060432/cable/data-lv.js lines 1–37
  3. Drawing View Exit interaction · globalgrid2050 / testcode/202609060432/cable/drawing-view-exit.js lines 1–16

Data Core

A JavaScript file in the cable folder of GlobalGrid2050 covering 11kV, 33kV, cables and 110kV, using BS 7870-4 and IEC 60840. Served with the page at https://globalgrid2050.com/testcode/202609060432/cable/.

otherglobalgrid2050 / testcode/202609060432/cable/data-core.js · lines 1–308 of 308 · version 2026-09-06 04:32 · Entry point

Why it exists in the grid workflow
Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: 11kV, 33kV, cables, 110kV, 1kV.
Inputs & outputs
Voltage levels named: 110kV, 33kV, 11kV, 1kV.
Downstream impact
Used directly by 1 file: Testcode — Cable Page (globalgrid2050, https://globalgrid2050.com/testcode/202609060432/cable/). Reached from 16 other entry points, including Homepage V077 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v077.html); Homepage V078 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v078.html); Homepage V079 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v079.html). It is itself an entry point, published at https://globalgrid2050.com/testcode/202609060432/cable/.
What it achieves
Core reference data: burial depths, conductor labels, voltage class definitions, CSA ranges, dropdown groups, and formation library. Its code works with 11 kV, 33 kV and 1 kV.
Why it matters
Loaded by the Cable page at https://globalgrid2050.com/testcode/202609060432/cable/.
Application
globalgrid2050 · testcode/202609060432/cable · script
Uses
none found
Used by
loaded by Testcode — Cable Page (script src)
Produces
none declared
Defines here
none
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609060432/cable/data-core.js:1-308 · blob e3151c1ef34d042427bf6bdeec006bdefd2df478 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: none found · domain stage: experimental · users: none · canonical: production_core
// =============================================================
// data-core.js
// Core reference data: burial depths, conductor labels,
// voltage class definitions, CSA ranges, dropdown groups,
// and formation library.
// =============================================================

const DEFAULT_BURIAL_DEPTHS = { lv: 900, mv: 900, ehv: 900, dc: 900 };

// Removed enforced minimums — system will not block lower or higher values
const MIN_BURIAL_DEPTHS = null;

const CONDUCTOR_SHAPE_LABELS = {
circular_stranded: "Stranded circular conductor",
sector_stranded:   "Stranded sector conductor",
compacted_round:   "Compacted round conductor",
solid_round:       "Solid round conductor",
flexible_round:    "Flexible round conductor"
};

// =============================================================
// VOLTAGE CLASSES
// =============================================================

const VOLTAGE_CLASSES = {

// =========================================================
// LV
// =========================================================
"lv_cu_sc": {
    label: "0.6/1 kV Cu XLPE single core",
    display_short: "0.6/1 kV Cu 1c",
    service_family: "lv",
    cores: ["single"],
    conductor_material: "Cu",
    conductor_shape: "compacted_round"
},

"lv_cu_3c": {
    label: "0.6/1 kV Cu XLPE 3 core",
    display_short: "0.6/1 kV Cu 3c",
    service_family: "lv",
    cores: ["three"],
    conductor_material: "Cu",
    conductor_shape: "sector_stranded",
    sectorial: true
},

// =========================================================
// BRITISH MV
// =========================================================

"uk_11kv_sc": {
    label: "6.35/11 kV single core XLPE",
    display_short: "11 kV 1c",
    service_family: "mv",
    cores: ["single"],
    conductor_material: "Al",
    conductor_shape: "compacted_round",
    british_system_voltage: "6.35/11 kV",
    standard_basis: "BS 7870-4.10"
},

"uk_11kv_3c": {
    label: "6.35/11 kV 3 core XLPE",
    display_short: "11 kV 3c",
    service_family: "mv",
    cores: ["three"],
    conductor_material: "Cu",
    conductor_shape: "sector_stranded",
    british_system_voltage: "6.35/11 kV",
    standard_basis: "BS 7870-4.10",
    sectorial: true
},

"uk_33kv_sc": {
    label: "19/33 kV single core XLPE",
    display_short: "33 kV 1c",
    service_family: "mv",
    cores: ["single"],
    conductor_material: "Al",
    conductor_shape: "compacted_round",
    british_system_voltage: "19/33 kV"
},

"uk_33kv_3c": {
    label: "19/33 kV 3 core XLPE",
    display_short: "33 kV 3c",
    service_family: "mv",
    cores: ["three"],
    conductor_material: "Cu",
    conductor_shape: "sector_stranded",
    british_system_voltage: "19/33 kV",
    sectorial: true
},

// =========================================================
// IEC HV — TENNET ALIGNED
// =========================================================

"iec_110kv_sc": {
    label: "64/110 kV single core XLPE (IEC 60840 system)",
    display_short: "110 kV 1c IEC",
    service_family: "ehv",
    cores: ["single"],
    conductor_material: "Al",
    conductor_shape: "compacted_round",
    system_type: "IEC 60840",
    grid_reference: "TenneT typical specification",
    locked_csa: 630,
    metallic_screen: 95
},

// =========================================================
// DC — SOLAR PV STRING
// Flexible tinned Cu, installed in air, tray or conduit
// =========================================================

"pv_string": {
    label: "PV string cable flexible Cu (EN 50618 / IEC 62930)",
    display_short: "PV string",
    service_family: "dc",
    cores: ["single"],
    conductor_material: "Cu",
    conductor_shape: "flexible_round",
    system_type: "EN 50618 / IEC 62930",
    dc_type: "solar_string"
},

// =========================================================
// DC — FLEXIBLE HV AC RATED (inverter / high-flex use)
// =========================================================

"flex_hv_ac": {
    label: "Flexible cable — HV AC rated, single core",
    display_short: "Flex HV AC",
    service_family: "dc",
    cores: ["single"],
    conductor_material: "Cu",
    conductor_shape: "flexible_round",
    dc_type: "flexible_ac_rated"
},

"flex_hv_dc": {
    label: "Flexible cable — HV DC rated, single core",
    display_short: "Flex HV DC",
    service_family: "dc",
    cores: ["single"],
    conductor_material: "Cu",
    conductor_shape: "flexible_round",
    dc_type: "flexible_dc_rated"
},

// =========================================================
// DC — ALUMINIUM ARMOURED BURIED (ATA — Al conductor, Al armour)
// Main DC cables: BESS, inverter burial, moisture-blocked
// =========================================================

"al_ata_ac": {
    label: "Al armoured buried cable — AC rated (Al/XLPE/SWA/PE)",
    display_short: "Al ATA AC",
    service_family: "dc",
    cores: ["single"],
    conductor_material: "Al",
    conductor_shape: "compacted_round",
    system_type: "Buried moisture-blocked AC rated",
    dc_type: "buried_armoured_ac"
},

"al_ata_dc": {
    label: "Al armoured buried cable — DC rated (Al/XLPE/SWA/PE)",
    display_short: "Al ATA DC",
    service_family: "dc",
    cores: ["single"],
    conductor_material: "Al",
    conductor_shape: "compacted_round",
    system_type: "Buried moisture-blocked DC rated",
    dc_type: "buried_armoured_dc"
}

};

// =============================================================
// CSA RANGES BY VOLTAGE KEY
// =============================================================

const CSA_BY_VOLTAGE_KEY = {

"lv_cu_sc":  [50, 70, 95, 120, 150, 185, 240, 300],
"lv_cu_3c":  [50, 70, 95, 120, 150, 185, 240],

"uk_11kv_sc": [70, 95, 120, 150, 185, 240, 300, 400, 500, 630],
"uk_11kv_3c": [70, 95, 120, 150, 185, 240, 300],

"uk_33kv_sc": [95, 120, 150, 185, 240, 300, 400, 500, 630],
"uk_33kv_3c": [95, 120, 150, 185, 240, 300],

"iec_110kv_sc": [630],

"pv_string":  [1.5, 2.5, 4, 6, 10, 16, 25, 35, 50, 70, 95, 120, 150, 185, 240],

"flex_hv_ac": [4, 6, 10, 16, 25, 35, 50, 70, 95, 120, 150, 185],
"flex_hv_dc": [4, 6, 10, 16, 25, 35, 50, 70, 95, 120, 150, 185],

"al_ata_ac":  [50, 70, 95, 120, 150, 185, 240, 300, 400, 500, 630],
"al_ata_dc":  [50, 70, 95, 120, 150, 185, 240, 300, 400, 500, 630]

};

// =============================================================
// VOLTAGE DROPDOWN GROUPS
// =============================================================

const VOLTAGE_DROPDOWN_GROUPS = {

lv: [
    {
        label: "Low voltage 0.6/1 kV",
        options: [
            { value: "lv_cu_sc", text: "0.6/1 kV single core Cu XLPE" },
            { value: "lv_cu_3c", text: "0.6/1 kV 3 core Cu XLPE (sector conductors)" }
        ]
    }
],

mv: [
    {
        label: "British medium voltage",
        options: [
            { value: "uk_11kv_sc", text: "6.35/11 kV single core XLPE" },
            { value: "uk_11kv_3c", text: "6.35/11 kV 3 core XLPE (sector conductors)" },
            { value: "uk_33kv_sc", text: "19/33 kV single core XLPE" },
            { value: "uk_33kv_3c", text: "19/33 kV 3 core XLPE (sector conductors)" }
        ]
    }
],

ehv: [
    {
        label: "IEC high voltage transmission",
        options: [
            { value: "iec_110kv_sc", text: "64/110 kV single core XLPE (IEC 60840, TenneT system)" }
        ]
    }
],

dc: [
    {
        label: "Solar PV string",
        options: [
            { value: "pv_string", text: "PV string cable flexible Cu (EN 50618 / IEC 62930)" }
        ]
    },
    {
        label: "Flexible HV rated",
        options: [
            { value: "flex_hv_ac", text: "Flexible single core — HV AC rated" },
            { value: "flex_hv_dc", text: "Flexible single core — HV DC rated" }
        ]
    },
    {
        label: "Buried armoured DC (Al ATA)",
        options: [
            { value: "al_ata_ac", text: "Al armoured buried — AC rated (BESS / inverter)" },
            { value: "al_ata_dc", text: "Al armoured buried — DC rated (BESS / inverter)" }
        ]
    }
]

};

// =============================================================
// FORMATION LIBRARY
// Defines which formation options are available per service type.
// Values must match case strings in getGroupGeometry().
// =============================================================

const FORMATION_LIBRARY = {

lv: [
    { value: "trefoil_single_row", label: "Trefoil — single core, single row" },
    { value: "flat_single_row",    label: "Flat — single core, single row" },
    { value: "stacked_two_high",   label: "Stacked two high — single core" },
    { value: "multicore_3c",       label: "Multicore 3 core" },
    { value: "multicore_4c",       label: "Multicore 4 core" },
    { value: "multicore_5c",       label: "Multicore 5 core" }
],

mv: [
    { value: "trefoil_single_row", label: "Trefoil — single core, single row" },
    { value: "flat_single_row",    label: "Flat — single core, single row" },
    { value: "stacked_two_high",   label: "Stacked two high — single core" },
    { value: "multicore_3c",       label: "Multicore 3 core" }
],

ehv: [
    { value: "trefoil_single_row", label: "Trefoil — single core, single row" },
    { value: "flat_single_row",    label: "Flat — single core, single row" }
],

dc: [
    { value: "dc_pair_horizontal", label: "DC pair — horizontal" },
    { value: "dc_pair_vertical",   label: "DC pair — vertical" },
    { value: "flat_single_row",    label: "Flat — single core, single row" },
    { value: "trefoil_single_row", label: "Trefoil — single core, single row" }
]

};

Data LV

A JavaScript file in the cable folder of GlobalGrid2050 covering cables, using BS 5467 and BS 6724. Served with the page at https://globalgrid2050.com/testcode/202609060432/cable/.

otherglobalgrid2050 / testcode/202609060432/cable/data-lv.js · lines 1–37 of 37 · version 2026-09-06 04:32 · Entry point

Why it exists in the grid workflow
Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: cables, 1kV.
Inputs & outputs
Voltage levels named: 1kV.
Downstream impact
Used directly by 1 file: Testcode — Cable Page (globalgrid2050, https://globalgrid2050.com/testcode/202609060432/cable/). Reached from 16 other entry points, including Homepage V077 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v077.html); Homepage V078 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v078.html); Homepage V079 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v079.html). It is itself an entry point, published at https://globalgrid2050.com/testcode/202609060432/cable/.
What it achieves
`OD_LV` — Low Voltage Cable OD and MBR Schedule 0.6/1kV Cu XLPE — single core and 3 core Source: Generic UK LV schedule (BS 5467 / BS 6724 basis). Its code works with 1 kV.
Why it matters
Loaded by the Cable page at https://globalgrid2050.com/testcode/202609060432/cable/.
Application
globalgrid2050 · testcode/202609060432/cable · script
Uses
none found
Used by
loaded by Testcode — Cable Page (script src)
Produces
none declared
Defines here
none
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609060432/cable/data-lv.js:1-37 · blob 15b73b7612e565c47ede3acc09f59d7659448eb4 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: none found · domain stage: experimental · users: none · canonical: production_core
// =============================================================
// OD_LV — Low Voltage Cable OD and MBR Schedule
// 0.6/1 kV Cu XLPE — single core and 3 core
// Source: Generic UK LV schedule (BS 5467 / BS 6724 basis)
// Fixed installation values only. Verify before design use.
// =============================================================

const OD_LV = {

// =========================================================
// 0.6/1 kV Single Core Cu XLPE — compacted round conductor
// Key pattern: sc_cu_lv_{csa}
// MBR basis: 15 x OD (lv_cu_sc mbr_factor)
// =========================================================
"sc_cu_lv_50":  { od: 14.5, mbr: 218, src: "Generic UK LV schedule" },
"sc_cu_lv_70":  { od: 16.5, mbr: 248, src: "Generic UK LV schedule" },
"sc_cu_lv_95":  { od: 18.5, mbr: 278, src: "Generic UK LV schedule" },
"sc_cu_lv_120": { od: 20.5, mbr: 308, src: "Generic UK LV schedule" },
"sc_cu_lv_150": { od: 22.5, mbr: 338, src: "Generic UK LV schedule" },
"sc_cu_lv_185": { od: 25.0, mbr: 375, src: "Generic UK LV schedule" },
"sc_cu_lv_240": { od: 28.0, mbr: 420, src: "Generic UK LV schedule" },
"sc_cu_lv_300": { od: 31.0, mbr: 465, src: "Generic UK LV schedule" },

// =========================================================
// 0.6/1 kV 3 Core Cu XLPE — sector stranded conductor
// Key pattern: 3c_cu_lv_{csa}
// MBR basis: 12 x OD (lv_cu_3c mbr_factor)
// =========================================================
"3c_cu_lv_50":  { od: 34.0, mbr: 408, src: "Generic UK LV schedule" },
"3c_cu_lv_70":  { od: 38.0, mbr: 456, src: "Generic UK LV schedule" },
"3c_cu_lv_95":  { od: 42.5, mbr: 510, src: "Generic UK LV schedule" },
"3c_cu_lv_120": { od: 46.5, mbr: 558, src: "Generic UK LV schedule" },
"3c_cu_lv_150": { od: 50.5, mbr: 606, src: "Generic UK LV schedule" },
"3c_cu_lv_185": { od: 55.5, mbr: 666, src: "Generic UK LV schedule" },
"3c_cu_lv_240": { od: 62.0, mbr: 744, src: "Generic UK LV schedule" }

};

Drawing View Exit

A JavaScript file in the cable folder of GlobalGrid2050 that keeps the existing Drawing View toggle reachable while its parent panel is hidden. Served with the page at https://globalgrid2050.com/testcode/202609060432/cable/.

interactionglobalgrid2050 / testcode/202609060432/cable/drawing-view-exit.js · lines 1–16 of 16 · version 2026-09-06 04:32 · Entry point · pattern leave (shared by 7 files)

What it does
It draws its content. Defines sync, leave. Side effects: changes the web page (DOM).
Why it exists in the grid workflow
Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
Downstream impact
Used directly by 1 file: Testcode — Cable Page (globalgrid2050, https://globalgrid2050.com/testcode/202609060432/cable/). Reached from 16 other entry points, including Homepage V077 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v077.html); Homepage V078 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v078.html); Homepage V079 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v079.html). It is itself an entry point, published at https://globalgrid2050.com/testcode/202609060432/cable/.
What it achieves
Defines `sync` and `leave`. It responds to click and keydown events.
Why it matters
Loaded by the Cable page at https://globalgrid2050.com/testcode/202609060432/cable/.
Application
globalgrid2050 · testcode/202609060432/cable · script
Uses
none found
Used by
loaded by Testcode — Cable Page (script src)
Produces
sync, leave
Defines here
sync, leave
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609060432/cable/drawing-view-exit.js:1-16 · blob 78f71bae9fffc6a2e09d110f218f1c8a9bfa517a · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: none · canonical: production_core
/* Keep the existing Drawing View toggle reachable while its parent panel is hidden. */
(()=>{
 const original=document.getElementById('drawing_view_btn');
 if(!original||document.getElementById('exit_drawing_view'))return;
 const exit=document.createElement('button');
 exit.id='exit_drawing_view';exit.type='button';exit.textContent='Exit Drawing View';
 exit.style.cssText='position:fixed;right:16px;bottom:16px;z-index:1000;min-height:44px;padding:10px 16px;color:#050505;background:#0ff;border:2px solid #fff;border-radius:5px;font:bold 14px monospace;cursor:pointer';
 exit.hidden=true;document.body.append(exit);
 const sync=()=>{exit.hidden=!document.body.classList.contains('drawing-view');};
 const leave=()=>{if(exit.hidden)return;original.click();original.focus();};
 exit.addEventListener('click',leave);
 original.addEventListener('click',()=>{sync();if(!exit.hidden)exit.focus();});
 document.addEventListener('keydown',event=>{if(event.key==='Escape'&&!exit.hidden){event.preventDefault();leave();}});
 new MutationObserver(sync).observe(document.body,{attributes:true,attributeFilter:['class']});
 sync();
})();