In this section
- Manifest docs-config · globalgrid2050 / solar-bess-topology-v7/upgrades/005_gis_sld_map_expand_and_key_collapse/manifest.yml lines 1–83
- Manifest docs-config · globalgrid2050 / solar-bess-topology-v7/upgrades/006_gis_sld_map_tool_overlay/manifest.yml lines 1–130
- Battery Energy Storage System (BESS) Electrical Topology Review electrical · globalgrid2050 / solar-bess-topology-v8/bess-electrical-topology-review/bess-electrical-topology-review.css lines 1–36
- Battery Energy Storage System (BESS) Electrical Topology Review electrical · globalgrid2050 / solar-bess-topology-v8/bess-electrical-topology-review/bess-electrical-topology-review.js lines 1–143
- Solar Battery Energy Storage System (BESS) Topology V8 — Battery Energy Storage System (BESS) Electrical… render · globalgrid2050 / solar-bess-topology-v8/bess-electrical-topology-review/index.html lines 1–87
- Battery Energy Storage System (BESS) GIS Single-Line Diagram (SLD) Financial Sandbox electrical · globalgrid2050 / solar-bess-topology-v8/bess-gis-sld-financial-sandbox/bess-gis-sld-financial-sandbox.css lines 1–49
Manifest
A configuration file in the upgrades folder of GlobalGrid2050 covering solar and battery storage (BESS).
docs-configglobalgrid2050 / solar-bess-topology-v7/upgrades/005_gis_sld_map_expand_and_key_collapse/manifest.yml · lines 1–83 of 83 · Not reached from any entry point (candidate for review)
- What it does
- Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- Domain stage sub33kv_design (path word 'bess'): inside-the-fence electrical and civil design below 33kV, which Ventus Ltd states is within its commercial execution boundary. Domain terms in the code: solar, battery storage (BESS).
- What it achieves
- Add map expand mode and key collapse controls.
- Why it matters
- No other file in the estate was found to import it.
- Application
- globalgrid2050 · solar-bess-topology-v7/upgrades/005_gis_sld_map_expand_and_key_collapse · configuration
- Uses
- none found
- Used by
- none found
- 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 solar-bess-topology-v7/upgrades/005_gis_sld_map_expand_and_key_collapse/manifest.yml:1-83 · blob 570628134fc3ec570f87cec01652a2252677a927 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom · domain stage: sub33kv_design · users: EPC_contractor, ICP_grid_engineer · canonical: unreached_review
upgrade_id: 005_gis_sld_map_expand_and_key_collapse
target_app: gis-sld-financial-sandbox
description: Add map expand mode and key collapse controls.
allowed_paths:
- solar-bess-topology-v7/gis-sld-financial-sandbox/index.html
- solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5.css
- solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5-ui.js
operations:
- type: insert_after
file: solar-bess-topology-v7/gis-sld-financial-sandbox/index.html
marker: '<button id="btn_basemap" class="map-toggle-btn">SATELLITE VIEW</button>'
insert: |
<button id="btn_map_expand" class="map-toggle-btn">MAP MAX</button>
<button id="btn_key_toggle" class="map-toggle-btn active">KEY ON</button>
- type: insert_before
file: solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5.css
marker: '/* Map Elements */'
insert: |
body.map-expanded { overflow: hidden; padding: 0; }
body.map-expanded .dashboard { max-width: none; width: 100vw; height: 100vh; }
body.map-expanded .panel-left { display: none; }
.panel-right.map-expanded { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 9999; border-radius: 0; border: none; }
.panel-right.map-expanded #map { min-height: 100vh; }
.legend.key-collapsed { display: none; }
@media (max-width: 900px) {
.map-controls { left: 10px; right: 10px; align-items: flex-end; }
.map-toggle-row { gap: 6px; }
.map-toggle-btn { font-size: 10px; padding: 5px 7px; }
}
- type: insert_before
file: solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5-ui.js
marker: |
// ============================================================
// WIRE EVERYTHING UP
insert: |
function toggleMapExpand() {
const panel = document.querySelector(".panel-right");
const btn = $("btn_map_expand");
if (!panel) return;
const active = !panel.classList.contains("map-expanded");
panel.classList.toggle("map-expanded", active);
document.body.classList.toggle("map-expanded", active);
if (btn) {
btn.textContent = active ? "MAP MIN" : "MAP MAX";
btn.classList.toggle("active", active);
}
setTimeout(() => { if (map && typeof map.resize === "function") map.resize(); }, 150);
}
function toggleKeyCollapse() {
const legend = $("map_legend");
const btn = $("btn_key_toggle");
if (!legend) return;
const hidden = !legend.classList.contains("key-collapsed");
legend.classList.toggle("key-collapsed", hidden);
if (btn) {
btn.textContent = hidden ? "KEY OFF" : "KEY ON";
btn.classList.toggle("active", !hidden);
}
}
- type: insert_after
file: solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5-ui.js
marker: 'wireAtlasV8GridToggleButtons();'
insert: |
$("btn_map_expand")?.addEventListener("click", toggleMapExpand);
$("btn_key_toggle")?.addEventListener("click", toggleKeyCollapse);
checks:
- type: assert_contains
file: solar-bess-topology-v7/gis-sld-financial-sandbox/index.html
text: 'btn_map_expand'
- type: assert_contains
file: solar-bess-topology-v7/gis-sld-financial-sandbox/index.html
text: 'btn_key_toggle'
- type: assert_contains
file: solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5.css
text: '.panel-right.map-expanded'
- type: assert_contains
file: solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5-ui.js
text: 'toggleMapExpand'Manifest
A configuration file in the upgrades folder of GlobalGrid2050 covering solar and battery storage (BESS).
docs-configglobalgrid2050 / solar-bess-topology-v7/upgrades/006_gis_sld_map_tool_overlay/manifest.yml · lines 1–130 of 130 · Not reached from any entry point (candidate for review)
- Why it exists in the grid workflow
- Domain stage sub33kv_design (path word 'bess'): inside-the-fence electrical and civil design below 33kV, which Ventus Ltd states is within its commercial execution boundary. Domain terms in the code: solar, battery storage (BESS).
- What it achieves
- Add collapsible map overlay tools for draw, cable route pins, array movement and rotation using existing functions.
- Why it matters
- No other file in the estate was found to import it.
- Application
- globalgrid2050 · solar-bess-topology-v7/upgrades/006_gis_sld_map_tool_overlay · configuration
- Uses
- none found
- Used by
- none found
- 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 solar-bess-topology-v7/upgrades/006_gis_sld_map_tool_overlay/manifest.yml:1-130 · blob ffee7bf90b01380310a1257c0fd1efe0e9c5f8c3 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: unknown · effects: none found · domain stage: sub33kv_design · users: EPC_contractor, ICP_grid_engineer · canonical: unreached_review
upgrade_id: 006_gis_sld_map_tool_overlay
target_app: gis-sld-financial-sandbox
description: Add collapsible map overlay tools for draw, cable route pins, array movement and rotation using existing functions.
allowed_paths:
- solar-bess-topology-v7/gis-sld-financial-sandbox/index.html
- solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5.css
- solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5-ui.js
operations:
- type: insert_after
file: solar-bess-topology-v7/gis-sld-financial-sandbox/index.html
marker: |
</div>
</div>
<div class="crosshair">⌖</div>
insert: |
<div class="map-tool-overlay" id="map_tool_overlay">
<div class="map-toggle-row">
<button id="btn_map_tools_toggle" class="map-toggle-btn active">TOOLS ON</button>
<button id="btn_map_draw" class="map-toggle-btn">DRAW</button>
<button id="btn_map_pick_array" class="map-toggle-btn">PICK ARRAY</button>
<button id="btn_map_drop_pins" class="map-toggle-btn">DROP PINS</button>
<button id="btn_map_draw_route" class="map-toggle-btn">DRAW ROUTE</button>
</div>
<div class="map-toggle-row map-tool-row-secondary">
<button id="btn_map_rotate_left" class="map-toggle-btn">ROT -30</button>
<button id="btn_map_rotate_right" class="map-toggle-btn">ROT +30</button>
<button id="btn_map_rotate_90" class="map-toggle-btn">ROT +90</button>
<button id="btn_map_nudge_up" class="map-toggle-btn">↑</button>
<button id="btn_map_nudge_left" class="map-toggle-btn">←</button>
<button id="btn_map_nudge_right" class="map-toggle-btn">→</button>
<button id="btn_map_nudge_down" class="map-toggle-btn">↓</button>
</div>
<div class="map-toggle-row map-tool-row-secondary">
<button id="btn_map_undo_pin" class="map-toggle-btn">UNDO PIN</button>
<button id="btn_map_clear_route" class="map-toggle-btn">CLEAR ROUTE</button>
<button id="btn_map_reset_rotation" class="map-toggle-btn">RESET ROT</button>
<button id="btn_map_reset_array" class="map-toggle-btn">RESET ARRAY</button>
</div>
</div>
- type: insert_before
file: solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5.css
marker: '/* Map Elements */'
insert: |
.map-tool-overlay {
position: absolute;
top: 110px;
right: 10px;
z-index: 20;
display: flex;
flex-direction: column;
gap: 6px;
align-items: flex-end;
max-width: 520px;
}
.map-tool-overlay.tools-collapsed .map-tool-row-secondary,
.map-tool-overlay.tools-collapsed button:not(#btn_map_tools_toggle) {
display: none;
}
.map-tool-row-secondary .map-toggle-btn {
font-size: 10px;
padding: 5px 7px;
}
@media (max-width: 900px) {
.map-tool-overlay {
left: 10px;
right: 10px;
top: 118px;
max-width: none;
}
}
- type: insert_before
file: solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5-ui.js
marker: |
// ============================================================
// WIRE EVERYTHING UP
insert: |
function toggleMapToolsOverlay() {
const overlay = $("map_tool_overlay");
const btn = $("btn_map_tools_toggle");
if (!overlay || !btn) return;
const collapsed = !overlay.classList.contains("tools-collapsed");
overlay.classList.toggle("tools-collapsed", collapsed);
btn.textContent = collapsed ? "TOOLS OFF" : "TOOLS ON";
btn.classList.toggle("active", !collapsed);
}
function wireMapToolOverlayButtons() {
$("btn_map_tools_toggle")?.addEventListener("click", toggleMapToolsOverlay);
$("btn_map_draw")?.addEventListener("click", triggerDrawAtCenter);
$("btn_map_pick_array")?.addEventListener("click", toggleArrayMoveMode);
$("btn_map_drop_pins")?.addEventListener("click", toggleCablePinMode);
$("btn_map_draw_route")?.addEventListener("click", commitCablePinRoute);
$("btn_map_rotate_left")?.addEventListener("click", () => rotateArrayBy(-30));
$("btn_map_rotate_right")?.addEventListener("click", () => rotateArrayBy(30));
$("btn_map_rotate_90")?.addEventListener("click", () => rotateArrayBy(90));
$("btn_map_reset_rotation")?.addEventListener("click", resetArrayRotation);
$("btn_map_reset_array")?.addEventListener("click", resetArrayLocation);
$("btn_map_nudge_up")?.addEventListener("click", () => nudgeArray(0));
$("btn_map_nudge_right")?.addEventListener("click", () => nudgeArray(90));
$("btn_map_nudge_down")?.addEventListener("click", () => nudgeArray(180));
$("btn_map_nudge_left")?.addEventListener("click", () => nudgeArray(270));
$("btn_map_undo_pin")?.addEventListener("click", undoCablePin);
$("btn_map_clear_route")?.addEventListener("click", clearCableRoute);
}
- type: insert_after
file: solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5-ui.js
marker: '$("btn_key_toggle")?.addEventListener("click", toggleKeyCollapse);'
insert: |
wireMapToolOverlayButtons();
checks:
- type: assert_contains
file: solar-bess-topology-v7/gis-sld-financial-sandbox/index.html
text: 'map_tool_overlay'
- type: assert_contains
file: solar-bess-topology-v7/gis-sld-financial-sandbox/index.html
text: 'btn_map_draw_route'
- type: assert_contains
file: solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5.css
text: '.map-tool-overlay'
- type: assert_contains
file: solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5-ui.js
text: 'wireMapToolOverlayButtons'Battery Energy Storage System (BESS) Electrical Topology Review
A style sheet in GlobalGrid2050 covering battery storage (BESS). Served with the page at https://globalgrid2050.com/solar-bess-topology-v8/bess-electrical-topology-review/.
electricalglobalgrid2050 / solar-bess-topology-v8/bess-electrical-topology-review/bess-electrical-topology-review.css · lines 1–36 of 36 · Entry point
- What it does
- Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- Domain stage sub33kv_design (path word 'bess'): inside-the-fence electrical and civil design below 33kV, which Ventus Ltd states is within its commercial execution boundary. Domain terms in the code: battery storage (BESS). README: "The BESS Electrical Topology Review handles cable, impedance, leakage, reverse current, transformer impedance, fault level and formal study flags."
- Downstream impact
- Used directly by 1 file: Solar Battery Energy Storage System (BESS) Topology V8 — Battery Energy Storage System (BESS) Electrical… (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v8/bess-electrical-topology-review/). Reached from 4 other entry points, including GlobalGrid2050 — Solar Battery Energy Storage System (BESS) Topology V8 Page (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v8/); Solar Battery Energy Storage System (BESS) Topology V8 — Battery Energy Storage System (BESS) GIS… (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v8/bess-gis-sld-financial-sandbox/); Solar Battery Energy Storage System (BESS) Topology V8 — Battery Energy Storage System (BESS) Pcs… (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v8/bess-pcs-standalone/). It is itself an entry point, published at https://globalgrid2050.com/solar-bess-topology-v8/bess-electrical-topology-review/.
- What it achieves
- The README says: The BESS Electrical Topology Review handles cable, impedance, leakage, reverse current, transformer impedance, fault level and formal study flags.
- Why it matters
- Loaded by the Battery Energy Storage System (BESS) Electrical… page at https://globalgrid2050.com/solar-bess-topology-v8/bess-electrical-topology-review/.
- Application
- globalgrid2050 · solar-bess-topology-v8/bess-electrical-topology-review · style sheet
- Uses
- none found
- Used by
- loaded by Solar Battery Energy Storage System (BESS) Topology V8 — Battery Energy Storage System (BESS) Electrical… (stylesheet)
- 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 solar-bess-topology-v8/bess-electrical-topology-review/bess-electrical-topology-review.css:1-36 · blob e8a25a072af71a8dbfc2890e4bcc5679cb4cc026 · GitHub at these lines
- State
- achieves: readme · context: readme_derived · stage: output · effects: dom · domain stage: sub33kv_design · users: EPC_contractor, ICP_grid_engineer · canonical: production_core
* { box-sizing: border-box; }
:root { --bg:#050505; --panel:#0b0e14; --line:#2f343d; --text:#fff; --muted:#a6adbb; --accent:#00ffff; --ok:#00ff88; --warn:#ff9900; --bad:#ff3333; }
body { margin:0; background:var(--bg); color:var(--text); font-family:'Courier New', monospace; }
.app-shell { padding:24px; }
.app-header { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; border:1px solid var(--line); background:rgba(10,10,10,.96); border-radius:14px; padding:20px; margin-bottom:18px; }
.kicker { color:var(--accent); letter-spacing:.14em; text-transform:uppercase; font-size:12px; }
h1 { margin:8px 0 8px 0; font-size:28px; }
h2 { color:var(--accent); font-size:18px; margin:20px 0 10px 0; border-bottom:1px solid var(--line); padding-bottom:6px; }
p, .note { color:var(--muted); line-height:1.55; }
.header-links { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.link-btn { border:1px solid var(--accent); color:var(--accent); background:#050505; border-radius:6px; padding:9px 12px; text-decoration:none; font-family:inherit; cursor:pointer; }
.main-grid { display:grid; grid-template-columns:360px 1fr; gap:18px; align-items:start; }
.panel { border:1px solid var(--line); background:var(--panel); border-radius:14px; padding:18px; }
.input-panel label { display:block; color:var(--muted); font-size:13px; margin:10px 0 4px 0; }
input, select { width:100%; background:#050505; color:#fff; border:1px solid #444; border-radius:5px; padding:9px; font-family:inherit; }
.stat { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid #222; }
.stat span { color:var(--muted); }
.stat strong { color:var(--ok); text-align:right; }
.status-box { margin-top:14px; padding:14px; border-radius:10px; border:1px solid var(--warn); color:var(--warn); background:rgba(255,153,0,.08); line-height:1.5; }
.status-box.good { border-color:var(--ok); color:var(--ok); background:rgba(0,255,136,.08); }
.status-box.bad { border-color:var(--bad); color:var(--bad); background:rgba(255,51,51,.08); }
.note { margin-top:14px; border:1px dashed #444; padding:12px; border-radius:10px; }
ul { color:var(--muted); line-height:1.6; }
.diagram-panel { grid-column:1 / -1; }
.diagram-title { color:var(--accent); font-weight:bold; margin-bottom:12px; }
svg { width:100%; height:auto; background:#030303; border:1px solid #222; border-radius:10px; }
.diagram-footer { display:flex; justify-content:space-between; color:var(--muted); font-size:13px; margin-top:8px; }
.scada-box { fill:#081018; stroke:#00ffff; stroke-width:2; }
.scada-warn { fill:#1b1205; stroke:#ff9900; stroke-width:2; }
.scada-bad { fill:#190505; stroke:#ff3333; stroke-width:2; }
.scada-text { fill:#ffffff; font-family:'Courier New', monospace; font-size:22px; font-weight:bold; }
.scada-small { fill:#a6adbb; font-family:'Courier New', monospace; font-size:16px; }
.scada-line { stroke:#00ff88; stroke-width:4; fill:none; }
.scada-dc { stroke:#ff9900; stroke-width:5; fill:none; }
@media (max-width: 900px) { .app-shell { padding:14px; } .app-header { flex-direction:column; } .main-grid { grid-template-columns:1fr; } }
@media print { body { background:#fff; color:#000; } .app-header, .panel { border-color:#000; background:#fff; } .link-btn { display:none; } }Battery Energy Storage System (BESS) Electrical Topology Review
A JavaScript file in GlobalGrid2050 that updates BESS topology (`updateBessTopology`) and draws scada (`drawScada`), covering battery storage (BESS), cables and transformers. Served with the page at https://globalgrid2050.com/solar-bess-topology-v8/bess-electrical-topology-review/.
electricalglobalgrid2050 / solar-bess-topology-v8/bess-electrical-topology-review/bess-electrical-topology-review.js · lines 1–143 of 143 · Entry point · pattern setText (shared by 20 files)
- What it does
- It draws battery storage (BESS), cables and transformers. Defines 6 functions or classes, including num, val, setText, fmt, updateBessTopology. Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- Domain stage sub33kv_design (path word 'bess'): inside-the-fence electrical and civil design below 33kV, which Ventus Ltd states is within its commercial execution boundary. Domain terms in the code: battery storage (BESS), cables, transformers. README: "The BESS Electrical Topology Review handles cable, impedance, leakage, reverse current, transformer impedance, fault level and formal study flags."
- Downstream impact
- Used directly by 1 file: Solar Battery Energy Storage System (BESS) Topology V8 — Battery Energy Storage System (BESS) Electrical… (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v8/bess-electrical-topology-review/). Reached from 4 other entry points, including GlobalGrid2050 — Solar Battery Energy Storage System (BESS) Topology V8 Page (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v8/); Solar Battery Energy Storage System (BESS) Topology V8 — Battery Energy Storage System (BESS) GIS… (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v8/bess-gis-sld-financial-sandbox/); Solar Battery Energy Storage System (BESS) Topology V8 — Battery Energy Storage System (BESS) Pcs… (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v8/bess-pcs-standalone/). It is itself an entry point, published at https://globalgrid2050.com/solar-bess-topology-v8/bess-electrical-topology-review/.
- What it achieves
- It sets text (`setText`), updates BESS topology (`updateBessTopology`) and draws scada (`drawScada`). The README says: The BESS Electrical Topology Review handles cable, impedance, leakage, reverse current, transformer impedance, fault level and formal study flags. It responds to input, change and DOMContentLoaded events.
- Why it matters
- Loaded by the Battery Energy Storage System (BESS) Electrical… page at https://globalgrid2050.com/solar-bess-topology-v8/bess-electrical-topology-review/.
- Application
- globalgrid2050 · solar-bess-topology-v8/bess-electrical-topology-review · script
- Uses
- none found
- Used by
- loaded by Solar Battery Energy Storage System (BESS) Topology V8 — Battery Energy Storage System (BESS) Electrical… (script src)
- Produces
- num, val, setText, fmt, updateBessTopology, drawScada
- Defines here
- num, val, setText, fmt, updateBessTopology, drawScada
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 solar-bess-topology-v8/bess-electrical-topology-review/bess-electrical-topology-review.js:1-143 · blob 8443127b3ef73c4a4b7bc6980b01971b1139e5bf · GitHub at these lines
- State
- achieves: readme · context: readme_derived · stage: output · effects: dom · domain stage: sub33kv_design · users: EPC_contractor, ICP_grid_engineer · canonical: production_core
function num(id, fallback = 0) {
const value = parseFloat(document.getElementById(id)?.value || fallback);
return Number.isFinite(value) ? value : fallback;
}
function val(id) {
return document.getElementById(id)?.value || 'unknown';
}
function setText(id, text) {
const el = document.getElementById(id);
if (el) el.textContent = text;
}
function fmt(value, digits = 2) {
if (!Number.isFinite(value)) return '0';
return value.toLocaleString(undefined, { maximumFractionDigits: digits });
}
function updateBessTopology() {
const bessMw = num('bess_power_mw');
const bessMwh = num('bess_energy_mwh');
const dcV = num('dc_voltage', 1500);
const sets = Math.max(1, num('parallel_sets', 1));
const routeM = num('dc_route_m');
const rKm = num('r_ohm_km');
const xKm = num('x_ohm_km');
const pcsQty = Math.max(1, num('pcs_qty', 1));
const pcsMw = num('pcs_total_mw');
const totalCurrent = dcV > 0 ? (bessMw * 1000000) / dcV : 0;
const currentPerSet = totalCurrent / sets;
const duration = bessMw > 0 ? bessMwh / bessMw : 0;
const mwPerPcs = pcsMw / pcsQty;
const km = routeM / 1000;
const rPath = sets > 0 ? (2 * rKm * km) / sets : 0;
const xPath = sets > 0 ? (2 * xKm * km) / sets : 0;
const zPath = Math.sqrt((rPath * rPath) + (xPath * xPath));
const vdrop = dcV > 0 ? ((totalCurrent * rPath) / dcV) * 100 : 0;
setText('out_total_dc_current', fmt(totalCurrent, 0) + ' A');
setText('out_current_per_set', fmt(currentPerSet, 0) + ' A');
setText('out_duration', fmt(duration, 2) + ' h');
setText('out_mw_per_pcs', fmt(mwPerPcs, 2) + ' MW');
setText('out_r_path', fmt(rPath, 5) + ' ohm');
setText('out_x_path', fmt(xPath, 5) + ' ohm');
setText('out_z_path', fmt(zPath, 5) + ' ohm');
setText('out_vdrop', fmt(vdrop, 3) + ' %');
const pcsMismatch = Math.abs(pcsMw - bessMw) > Math.max(1, bessMw * 0.05);
setText('out_pcs_match', pcsMismatch ? 'PCS and BESS MW mismatch' : 'PCS rating aligned');
const required = [];
const warnings = [];
const critical = [];
if (currentPerSet > 300) warnings.push('High current per DC cable set');
if (routeM > 100) warnings.push('Long DC route, voltage drop and thermal review required');
if (val('installation_basis') === 'unknown') critical.push('Installation basis unknown');
if (val('pcs_tx_arrangement') === 'separated') warnings.push('Separated PCS and transformer station needs AC cable and protection interface review');
if (val('pcs_tx_arrangement') === 'unknown') critical.push('PCS to transformer arrangement unknown');
if (val('dc_imd') !== 'yes') critical.push('DC insulation monitoring not confirmed');
if (val('dc_leakage') !== 'yes') critical.push('DC leakage protection not confirmed');
if (val('reverse_current') !== 'yes') critical.push('Reverse current protection not confirmed');
if (val('dc_disconnector') !== 'yes') warnings.push('DC disconnector rating not confirmed');
if (val('dc_fault_withstand') !== 'yes') critical.push('DC short circuit withstand not confirmed');
if (val('rx_confirmed') !== 'yes') warnings.push('Cable R and X not confirmed from datasheet');
if (val('tx_impedance_confirmed') !== 'yes') warnings.push('Transformer impedance not confirmed');
if (val('protection_status') !== 'validated') critical.push('Protection coordination not validated');
if (pcsMismatch) warnings.push('PCS total MW does not align with BESS MW');
required.push('BESS to PCS DC cable thermal calculation');
required.push('DC insulation monitoring and leakage protection review');
required.push('Reverse current protection and battery source contribution review');
required.push('Cable R, X, Z confirmation from manufacturer datasheet');
required.push('PCS to transformer AC interface review');
required.push('Short circuit and protection coordination study');
const status = document.getElementById('status_box');
if (status) {
status.className = 'status-box';
if (critical.length) {
status.classList.add('bad');
status.textContent = 'RED: formal BESS electrical protection and cable study required. ' + critical.join('; ') + '.';
setText('out_validation_status', 'Red, formal study required');
} else if (warnings.length) {
status.textContent = 'AMBER: assumptions incomplete. ' + warnings.join('; ') + '.';
setText('out_validation_status', 'Amber, assumptions incomplete');
} else {
status.classList.add('good');
status.textContent = 'GREEN: key screening flags confirmed. Formal engineering approval is still required.';
setText('out_validation_status', 'Green, screening flags confirmed');
}
}
const list = document.getElementById('required_studies');
if (list) list.innerHTML = required.map(item => '<li>' + item + '</li>').join('');
drawScada({ bessMw, bessMwh, dcV, totalCurrent, currentPerSet, pcsQty, pcsMw, routeM, warnings, critical });
}
function drawScada(data) {
const svg = document.getElementById('bess_scada');
if (!svg) return;
const riskClass = data.critical.length ? 'scada-bad' : (data.warnings.length ? 'scada-warn' : 'scada-box');
svg.innerHTML = `
<rect x="50" y="90" width="220" height="120" rx="14" class="${riskClass}" />
<text x="160" y="135" text-anchor="middle" class="scada-text">BESS</text>
<text x="160" y="165" text-anchor="middle" class="scada-small">${fmt(data.bessMw,1)} MW / ${fmt(data.bessMwh,1)} MWh</text>
<path d="M270 150 L470 150" class="scada-dc" />
<text x="370" y="120" text-anchor="middle" class="scada-small">DC cable sets</text>
<text x="370" y="185" text-anchor="middle" class="scada-small">${fmt(data.currentPerSet,0)} A per set</text>
<rect x="470" y="90" width="220" height="120" rx="14" class="scada-box" />
<text x="580" y="135" text-anchor="middle" class="scada-text">PCS</text>
<text x="580" y="165" text-anchor="middle" class="scada-small">${data.pcsQty} units / ${fmt(data.pcsMw,1)} MW</text>
<path d="M690 150 L850 150" class="scada-line" />
<rect x="850" y="90" width="220" height="120" rx="14" class="scada-box" />
<text x="960" y="135" text-anchor="middle" class="scada-text">Transformer</text>
<text x="960" y="165" text-anchor="middle" class="scada-small">LV AC to MV</text>
<path d="M960 210 L960 330" class="scada-line" />
<rect x="760" y="330" width="400" height="120" rx="14" class="scada-box" />
<text x="960" y="375" text-anchor="middle" class="scada-text">MV switchgear / grid interface</text>
<text x="960" y="405" text-anchor="middle" class="scada-small">Protection, fault level and compliance boundary</text>
<rect x="80" y="330" width="500" height="210" rx="14" class="${riskClass}" />
<text x="330" y="375" text-anchor="middle" class="scada-text">Validation Gate</text>
<text x="330" y="410" text-anchor="middle" class="scada-small">Insulation monitoring</text>
<text x="330" y="440" text-anchor="middle" class="scada-small">Leakage and reverse current protection</text>
<text x="330" y="470" text-anchor="middle" class="scada-small">Cable R, X, Z and thermal study</text>
<text x="330" y="500" text-anchor="middle" class="scada-small">Protection coordination</text>
<text x="600" y="630" text-anchor="middle" class="scada-small">BESS design is not just MW and MWh. The critical boundary is DC current, cable geometry, leakage, reverse current and protection coordination.</text>
`;
}
document.addEventListener('input', updateBessTopology);
document.addEventListener('change', updateBessTopology);
document.addEventListener('DOMContentLoaded', updateBessTopology);Solar Battery Energy Storage System (BESS) Topology V8 — Battery Energy Storage System (BESS) Electrical…
A web page in GlobalGrid2050 that draws SVG graphics and reads inputs for BESS power MW, BESS energy MWh and dc voltage (units: MW, Ω, mm²). Published at https://globalgrid2050.com/solar-bess-topology-v8/bess-electrical-topology-review/.
renderglobalgrid2050 / solar-bess-topology-v8/bess-electrical-topology-review/index.html · lines 1–87 of 87 · Entry point
- What it does
- It draws battery storage (BESS), transformers, cables and solar. Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- Domain stage sub33kv_design (path word 'bess'): inside-the-fence electrical and civil design below 33kV, which Ventus Ltd states is within its commercial execution boundary. Domain terms in the code: battery storage (BESS), transformers, cables, solar.
- Inputs & outputs
- In: form fields (user input). Out: web page; SVG drawing.
- Downstream impact
- Used directly by 2 files: Solar Battery Energy Storage System (BESS) Topology V8 — Battery Energy Storage System (BESS) GIS… (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v8/bess-gis-sld-financial-sandbox/); GlobalGrid2050 — Solar Battery Energy Storage System (BESS) Topology V8 Page (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v8/). Reached from 2 other entry points, including Solar Battery Energy Storage System (BESS) Topology V8 — Battery Energy Storage System (BESS) Pcs… (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v8/bess-pcs-standalone/); Spider Maya — V1 Page (spiders, https://ventusltd.github.io/spiders/spider_maya/v1/). It is itself an entry point, published at https://globalgrid2050.com/solar-bess-topology-v8/bess-electrical-topology-review/.
- What it achieves
- Its code works with 0 MW.
- Why it matters
- Loaded by the Battery Energy Storage System (BESS) GIS… page at https://globalgrid2050.com/solar-bess-topology-v8/bess-gis-sld-financial-sandbox/ and 1 other page.
- Application
- globalgrid2050 · solar-bess-topology-v8/bess-electrical-topology-review · page
- Uses
- Battery Energy Storage System (BESS) Electrical Topology Review (stylesheet), GlobalGrid2050 — Solar Battery Energy Storage System (BESS) Topology V8 Page (link), GlobalGrid2050 — Solar Battery Energy Storage System (BESS) Topology V7 Page (link), Battery Energy Storage System (BESS) Electrical Topology Review (script src)
- Used by
- linked from Solar Battery Energy Storage System (BESS) Topology V8 — Battery Energy Storage System (BESS) GIS… (link), linked from GlobalGrid2050 — Solar Battery Energy Storage System (BESS) Topology V8 Page (link)
- 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 solar-bess-topology-v8/bess-electrical-topology-review/index.html:1-87 · blob e7704fcbd6549eb57af9a5eba00f0c599c7ebf9a · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: sub33kv_design · users: EPC_contractor, ICP_grid_engineer · canonical: production_core
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>BESS Electrical Topology Review V8 | GlobalGrid2050</title>
<link rel="stylesheet" href="./bess-electrical-topology-review.css" />
</head>
<body>
<div class="app-shell">
<header class="app-header">
<div>
<div class="kicker">GlobalGrid2050 V8</div>
<h1>BESS Electrical Topology Review</h1>
<p>Standalone engineering review app for BESS DC interface, PCS, transformer connection, cable impedance, reverse current protection, leakage protection and protection coordination screening.</p>
</div>
<div class="header-links">
<button id="btn_print" class="link-btn" type="button" onclick="window.print()">Print</button>
<a class="link-btn" href="../index.html">Back to V8</a>
<a class="link-btn" href="../../solar-bess-topology-v7/index.html">V7 Stable</a>
</div>
</header>
<main class="main-grid">
<section class="panel input-panel">
<h2>1. BESS DC Interface</h2>
<label>BESS Power MW</label><input id="bess_power_mw" type="number" value="50" min="0" step="1" />
<label>BESS Energy MWh</label><input id="bess_energy_mwh" type="number" value="100" min="0" step="1" />
<label>Nominal DC Voltage V</label><input id="dc_voltage" type="number" value="1500" min="1" step="50" />
<label>Parallel DC Cable Sets</label><input id="parallel_sets" type="number" value="10" min="1" step="1" />
<label>One Way DC Route Length m</label><input id="dc_route_m" type="number" value="30" min="0" step="1" />
<label>Conductor Size mm²</label><input id="conductor_mm2" type="number" value="300" min="1" step="1" />
<label>Conductor Material</label><select id="conductor_material"><option value="al" selected>Aluminium</option><option value="cu">Copper</option></select>
<label>Resistance R ohm per km</label><input id="r_ohm_km" type="number" value="0.125" min="0" step="0.001" />
<label>Reactance X ohm per km</label><input id="x_ohm_km" type="number" value="0.080" min="0" step="0.001" />
<label>Installation Basis</label><select id="installation_basis"><option value="unknown">Unknown</option><option value="buried" selected>Buried or ducted underground</option><option value="trench">Open trench or trough</option><option value="free_air">Ladder or free air section</option></select>
<h2>2. PCS and AC Interface</h2>
<label>PCS Quantity</label><input id="pcs_qty" type="number" value="10" min="1" step="1" />
<label>Total PCS Rating MW</label><input id="pcs_total_mw" type="number" value="50" min="0" step="1" />
<label>PCS to Transformer Arrangement</label><select id="pcs_tx_arrangement"><option value="unknown">Unknown</option><option value="integrated" selected>Integrated PCS transformer station</option><option value="separated">Separated PCS and transformer station</option></select>
<label>LV AC Voltage V</label><input id="ac_voltage" type="number" value="690" min="1" step="10" />
<label>Transformer Rating MVA</label><input id="tx_mva" type="number" value="5" min="0" step="0.1" />
<label>Transformer Impedance Confirmed</label><select id="tx_impedance_confirmed"><option value="unknown">Unknown</option><option value="yes">Yes</option><option value="no">No</option></select>
<h2>3. Protection and Leakage Validation</h2>
<label>DC Insulation Monitoring Confirmed</label><select id="dc_imd"><option value="unknown">Unknown</option><option value="yes">Yes</option><option value="no">No</option></select>
<label>DC Leakage Protection Confirmed</label><select id="dc_leakage"><option value="unknown">Unknown</option><option value="yes">Yes</option><option value="no">No</option></select>
<label>Reverse Current Protection Confirmed</label><select id="reverse_current"><option value="unknown">Unknown</option><option value="yes">Yes</option><option value="no">No</option></select>
<label>DC Disconnector Rating Confirmed</label><select id="dc_disconnector"><option value="unknown">Unknown</option><option value="yes">Yes</option><option value="no">No</option></select>
<label>DC Short Circuit Withstand Confirmed</label><select id="dc_fault_withstand"><option value="unknown">Unknown</option><option value="yes">Yes</option><option value="no">No</option></select>
<label>Cable R and X Confirmed From Datasheet</label><select id="rx_confirmed"><option value="unknown">Unknown</option><option value="yes">Yes</option><option value="no">No</option></select>
<label>Protection Coordination Status</label><select id="protection_status"><option value="not_started">Not started</option><option value="data_missing">Data missing</option><option value="preliminary">Preliminary check</option><option value="formal_required" selected>Formal study required</option><option value="validated">Validated by engineer</option></select>
</section>
<section class="panel results-panel">
<h2>Topology Results</h2>
<div class="stat"><span>Total DC Current</span><strong id="out_total_dc_current">0 A</strong></div>
<div class="stat"><span>Current per DC Cable Set</span><strong id="out_current_per_set">0 A</strong></div>
<div class="stat"><span>Energy Duration</span><strong id="out_duration">0 h</strong></div>
<div class="stat"><span>MW per PCS</span><strong id="out_mw_per_pcs">0 MW</strong></div>
<div class="stat"><span>Estimated DC R Path</span><strong id="out_r_path">0 ohm</strong></div>
<div class="stat"><span>Estimated DC X Path</span><strong id="out_x_path">0 ohm</strong></div>
<div class="stat"><span>Estimated DC Z Path</span><strong id="out_z_path">0 ohm</strong></div>
<div class="stat"><span>Indicative DC Voltage Drop</span><strong id="out_vdrop">0 %</strong></div>
<div class="stat"><span>PCS Match Status</span><strong id="out_pcs_match">Check</strong></div>
<div class="stat"><span>Electrical Validation Status</span><strong id="out_validation_status">Check</strong></div>
<div id="status_box" class="status-box">Ready.</div>
<div class="note">
Screening only. This app does not replace formal load flow, short circuit calculation, protection grading, insulation coordination, earthing design, harmonic study, manufacturer interface review, cable thermal study or IFC design.
</div>
<h2>Required formal studies</h2>
<ul id="required_studies"></ul>
</section>
<section class="panel diagram-panel">
<div class="diagram-title">SCADA Style BESS Topology Panel</div>
<svg id="bess_scada" viewBox="0 0 1200 720" role="img" aria-label="BESS electrical topology diagram"></svg>
<div class="diagram-footer"><span>BESS DC terminals</span><span>PCS</span><span>Transformer</span><span>MV Grid Interface</span></div>
</section>
</main>
</div>
<script src="./bess-electrical-topology-review.js"></script>
</body>
</html>Battery Energy Storage System (BESS) GIS Single-Line Diagram (SLD) Financial Sandbox
A style sheet in GlobalGrid2050 covering battery storage (BESS). Served with the page at https://globalgrid2050.com/solar-bess-topology-v8/bess-gis-sld-financial-sandbox/.
electricalglobalgrid2050 / solar-bess-topology-v8/bess-gis-sld-financial-sandbox/bess-gis-sld-financial-sandbox.css · lines 1–49 of 49 · Entry point
- What it does
- Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- Domain stage experimental (path word 'sandbox'): 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: battery storage (BESS). README: "The BESS GIS SLD Financial Sandbox handles:"
- Downstream impact
- Used directly by 1 file: Solar Battery Energy Storage System (BESS) Topology V8 — Battery Energy Storage System (BESS) GIS… (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v8/bess-gis-sld-financial-sandbox/). Reached from 4 other entry points, including GlobalGrid2050 — Solar Battery Energy Storage System (BESS) Topology V8 Page (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v8/); Solar Battery Energy Storage System (BESS) Topology V8 — Battery Energy Storage System (BESS) Electrical… (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v8/bess-electrical-topology-review/); Solar Battery Energy Storage System (BESS) Topology V8 — Battery Energy Storage System (BESS) Pcs… (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v8/bess-pcs-standalone/). It is itself an entry point, published at https://globalgrid2050.com/solar-bess-topology-v8/bess-gis-sld-financial-sandbox/.
- What it achieves
- No statement of purpose was found in the file, a README line naming it, or its name.
- Why it matters
- Loaded by the Battery Energy Storage System (BESS) GIS… page at https://globalgrid2050.com/solar-bess-topology-v8/bess-gis-sld-financial-sandbox/.
- Application
- globalgrid2050 · solar-bess-topology-v8/bess-gis-sld-financial-sandbox · style sheet
- Uses
- none found
- Used by
- loaded by Solar Battery Energy Storage System (BESS) Topology V8 — Battery Energy Storage System (BESS) GIS… (stylesheet)
- 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 solar-bess-topology-v8/bess-gis-sld-financial-sandbox/bess-gis-sld-financial-sandbox.css:1-49 · blob cfae2dd8ab8aa6fb19ab81e27e546d8cbc3139e4 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: none · canonical: production_core
* { box-sizing: border-box; }
:root { --bg:#050505; --panel:#0b0e14; --line:#2f343d; --text:#fff; --muted:#a6adbb; --accent:#00ffff; --ok:#00ff88; --warn:#ff9900; --bad:#ff3333; }
body { margin:0; background:var(--bg); color:var(--text); font-family:'Courier New', monospace; }
.app-shell { padding:22px; }
.topbar { display:flex; justify-content:space-between; gap:18px; border:1px solid var(--line); background:rgba(10,10,10,.96); border-radius:14px; padding:20px; margin-bottom:18px; }
.kicker { color:var(--accent); text-transform:uppercase; letter-spacing:.14em; font-size:12px; }
h1 { margin:8px 0 8px 0; font-size:28px; }
h2 { color:var(--accent); font-size:18px; border-bottom:1px solid var(--line); padding-bottom:6px; margin:18px 0 10px 0; }
p { color:var(--muted); line-height:1.55; }
.topbar-actions { display:flex; gap:8px; flex-wrap:wrap; align-content:flex-start; justify-content:flex-end; }
a, button { font-family:inherit; }
.topbar-actions a, .topbar-actions button, .map-toolbar button, .action, .tab-btn { border:1px solid var(--accent); color:var(--accent); background:#050505; border-radius:6px; padding:9px 12px; text-decoration:none; cursor:pointer; }
.workspace { display:grid; grid-template-columns:360px 1fr; gap:18px; align-items:start; }
.panel { border:1px solid var(--line); background:var(--panel); border-radius:14px; padding:18px; }
.controls-panel { grid-row: span 2; }
.tabs { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-bottom:12px; }
.tab-btn.active { color:var(--ok); border-color:var(--ok); }
.tab-panel { display:none; }
.tab-panel.active { display:block; }
label { display:block; color:var(--muted); font-size:13px; margin:10px 0 4px 0; }
input, select { width:100%; background:#050505; color:#fff; border:1px solid #444; border-radius:5px; padding:9px; font-family:inherit; }
.action { width:100%; margin-top:10px; color:var(--ok); border-color:var(--ok); font-weight:bold; }
.stat { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid #222; }
.stat span { color:var(--muted); }
.stat strong { color:var(--ok); text-align:right; }
.logic-box { margin-top:14px; border:1px solid var(--warn); color:var(--warn); background:rgba(255,153,0,.08); border-radius:10px; padding:14px; line-height:1.5; }
.map-panel { min-height:520px; }
.map-toolbar { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
#map { width:100%; height:480px; border:1px solid #222; border-radius:10px; overflow:hidden; }
.drawing-panel { grid-column:1 / -1; }
.drawing-title { color:var(--accent); font-weight:bold; margin-bottom:12px; }
svg { width:100%; height:auto; background:#030303; border:1px solid #222; border-radius:10px; }
.svg-battery { fill:#102018; stroke:#00ff88; stroke-width:2; }
.svg-pcs { fill:#081018; stroke:#00ffff; stroke-width:3; }
.svg-tx { fill:#141008; stroke:#ff9900; stroke-width:3; }
.svg-grid { fill:#111; stroke:#fff; stroke-width:2; }
.svg-road { fill:#25180f; opacity:.95; }
.svg-boundary { fill:none; stroke:#2b7cff; stroke-width:3; stroke-dasharray:12 8; }
.svg-wall { fill:#5a3b20; opacity:.9; }
.svg-line { stroke:#00ffff; stroke-width:4; fill:none; }
.svg-dc { stroke:#ff9900; stroke-width:3; fill:none; }
.svg-text { fill:#fff; font-family:'Courier New', monospace; font-size:18px; font-weight:bold; }
.svg-small { fill:#a6adbb; font-family:'Courier New', monospace; font-size:13px; }
@media (max-width: 980px) { .app-shell { padding:14px; } .topbar { flex-direction:column; } .workspace { grid-template-columns:1fr; } .controls-panel { grid-row:auto; } #map { height:420px; } }
@media print { body { background:#fff; color:#000; } .topbar, .panel { background:#fff; border-color:#000; } .topbar-actions, .map-toolbar, .tabs { display:none; } .tab-panel { display:block; } #map { height:320px; } }
.map-inline-label { color: var(--muted); align-self:center; font-size:13px; }
.map-inline-input { width:90px; padding:8px; }