In this section
- GlobalGrid2050 — Solar Battery Energy Storage System (BESS) Topology Page render · globalgrid2050 / solar-bess-topology/index.html lines 1757–2028
- Indexforgis Single-Line Diagram (SLD) electrical · globalgrid2050 / solar-bess-topology/indexforgis-sld.html lines 1–428
GlobalGrid2050 — Solar Battery Energy Storage System (BESS) Topology Page
A web page covering cables, 33kV, 132kV and solar, using BS EN 50618 and BS 7671, and uses data from UK Power Networks open data. Published at https://globalgrid2050.com/solar-bess-topology/.
Set aside from the main view: 99% of its lines are the same as solar-bess-topology-v5/cable-geometry-visualiser-v5.html (globalgrid2050), which stays. (near-copy-of, proposed by families.py). 98% of lines shared with Cable Geometry Visualiser V5; read that one first. All set-aside files, with reasons. Nothing was deleted.
Evidence
- line-jaccard 0.986 to globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 solar-bess-topology-v5/cable-geometry-visualiser-v5.html:1-2051 aec703fef5d69bf8db682aa4a0f4dc769aaff445
- sha256 ef607058af4daf3e57cf6018c9fa6bea74ace90d6156da9b6026c99d7213f1c4
- target sha256 944209710f74336fdefbeea3b9919071d692061ed43d637bcba54560188c1073
- group of 2 (identity.json near-copy edges >= 0.9)
- canonical rule: reachable, newest stamp, core repo, most lines
renderglobalgrid2050 / solar-bess-topology/index.html · lines 1757–2028 of 2028 (continued from section 114) · Entry point · pattern normaliseBurialDepthFieldOnBlur (shared by 4 files)
- What it does
- It draws cables, 33kV, 132kV and solar. Defines 41 functions or classes, including lookupOD, byId, clampInteger, formatMm, effectiveGap. 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: cables, 33kV, 132kV, solar, 110kV, 66kV.
- Inputs & outputs
- In: form fields (user input). Out: web page; canvas drawing. Voltage levels named: 132kV, 110kV, 66kV, 33kV, 20kV, 15kV, 10kV, 6kV.
- Downstream impact
- It is itself an entry point, published at https://globalgrid2050.com/solar-bess-topology/.
- What it achieves
- It looks up od (`lookupOD`), clamps integer (`clampInteger`) and formats mm (`formatMm`). Defines `lookupOD`, `byId`, `clampInteger` and 38 more. Its code works with 1 kV, 33 kV and 132 kV. It responds to focus, click and touchend events.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- globalgrid2050 · solar-bess-topology · page
- Uses
- none found
- Used by
- none found
- Produces
- lookupOD, byId, clampInteger, formatMm, effectiveGap, getBurialDepthForComputation, normaliseBurialDepthFieldOnBlur, normaliseIntegerFields, getInputs, getGroupGeometry, computeLayout, buildReview
- Defines here
- applyLookup, updateFromLookup, renderAll, debounce, handleInput, handleChange, handleBlur, updateViewportMode, toggleDrawingView, bindNumericFieldUX, sel, bindEvents, init
- 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/index.html:1757-2028 · blob 7d380de4ee5e6ca8b8b6c09585d6bc568334f0a1 · 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
noteEl.innerHTML = "<strong>PV DC string cable — 1500V DC only.</strong> " +
"Flexible tinned Cu, XLPE Class II, UV/ozone resistant (BS EN 50618 H1Z2Z2-K type). " +
"MBR = 4× OD (fixed installation). " +
"This cable is rated for DC use only — do not use on AC circuits. " +
"Confirm OD and MBR with your cable manufacturer.";
} else if (vk === "flex_hv_ac") {
noteEl.innerHTML = "<strong>Flexible screened — 1000/1000V AC (Uo=1000V).</strong> " +
"Fine wire Cu, tinned Cu braid screen. Rated 1000/1000V AC. " +
"MBR: fixed = 3× OD | occasionally moved = 5× OD (both shown after CSA selection). " +
"<strong>Uo=1000V — correct for inverter IT systems up to 1000V AC</strong> (e.g. 800V inverters). " +
"Contrast: standard 0.6/1kV cable (Uo=600V) is non-compliant on an 800V IT system. " +
"Confirm MBR and ratings with your cable manufacturer.";
} else if (vk === "flex_hv_dc") {
noteEl.innerHTML = "<strong>Flexible screened — 1500V DC.</strong> " +
"Same construction as the 1000/1000V AC version — fine wire Cu, tinned Cu braid screen. Rated 1500V DC. " +
"MBR: fixed = 3× OD | occasionally moved = 5× OD. " +
"Confirm MBR and ratings with your cable manufacturer.";
} else if (vk === "al_ata_ac") {
noteEl.innerHTML = "<strong>Rigid Al solar — 1000/1000V AC, aluminium tube armour.</strong> " +
"Compacted Al class 2, XLPE, halogen-free. " +
"<strong>Aluminium tube armour is non-magnetic</strong> — safe for single-core AC use. " +
"Steel wire armour must NEVER be used on single-core AC cables (eddy current losses). " +
"MBR = 12× OD — rigid, fixed installation only. Direct burial capable. " +
"Uo=1000V — correct for 800V IT inverter systems. " +
"Confirm with manufacturer.";
} else if (vk === "al_ata_dc") {
noteEl.innerHTML = "<strong>Rigid Al solar — 1500/1500V DC (Um=1800V), aluminium tube armour.</strong> " +
"Same cable as the 1000/1000V AC version — compacted Al class 2, XLPE, halogen-free. " +
"Aluminium tube armour, non-magnetic. MBR = 12× OD — rigid, fixed installation only. " +
"Direct burial capable. Confirm with manufacturer.";
} else if (vk === "33cu") {
noteEl.innerHTML = "<strong>33 kV Cu 3-core unarmoured.</strong> " +
"Stranded Cu conductor, XLPE insulation, copper screen, PVC outer jacket. " +
"ODs from generic power cable catalogue, IEC 60502-2 / VDE 0276-620. " +
"MBR = 15× OD. Fixed installation. Confirm with cable manufacturer.";
}
let csas;
if (vk === "lv_cu_sc") csas = SC_CSAS_LV_CU_PWR;
else if (vk === "lv_al_sc") csas = SC_CSAS_LV_AL_PWR;
else if (vk === "lv_cu_2c") csas = MC2_CSAS_CU_LV;
else if (vk === "lv_cu_3c") csas = MC_CSAS_CU_LV;
else if (vk === "lv_cu_4c") csas = MC_CSAS_CU_LV;
else if (vk === "lv_cu_5c") csas = MC5_CSAS_CU_LV;
else if (vk === "lv_al_3c") csas = MC_CSAS_AL_LV;
else if (vk === "lv_al_4c") csas = MC_CSAS_AL_LV;
else if (vk === "lv_al_5c") csas = MC5_CSAS_AL_LV;
else if (vk.startsWith("lv")) csas = isThree ? TC_CSAS_LV : SC_CSAS_LV;
else if (vk === "pv_string") csas = SC_CSAS_STR;
else if (vk === "flex_hv_ac" || vk === "flex_hv_dc") csas = SC_CSAS_FLX;
else if (vk === "al_ata_ac" || vk === "al_ata_dc") csas = SC_CSAS_ATA;
else if (["66","110","132"].includes(vk)) csas = SC_CSAS_HV;
else if (vk === "33cu") csas = TC_CSAS_MV;
else csas = isThree ? TC_CSAS_MV : SC_CSAS_MV;
csas.forEach(csa => {
const res = lookupOD(vk, csa, isThree);
const opt = document.createElement("option");
opt.value = csa;
opt.textContent = res
? `${csa} mm² — OD ${res.od} mm | MBR ${res.mbr} mm${res.estimated ? " (est.)" : " ✓"}`
: `${csa} mm² — no data`;
sel.appendChild(opt);
});
}
function applyLookup() {
const vk = byId("lookup_voltage").value;
const csa = byId("lookup_csa").value;
if (!vk || !csa) return;
const isThree = byId("lookup_cores").value === "three";
const result = lookupOD(vk, parseFloat(csa), isThree);
if (!result) return;
const vc = VOLTAGE_CLASSES[vk];
const mbr_factor = vc.mbr_factor;
byId("cable_od").value = result.od;
byId("bend_factor").value = mbr_factor;
const noteEl = byId("lookup_note");
const srcTag = result.estimated
? " (catalogue model ±3mm — verify with manufacturer)"
: ` (${result.src})`;
if (vk === "pv_string") {
noteEl.innerHTML = `<strong>PV DC string — ${csa}mm²:</strong> OD = ${result.od}mm. ` +
`Fixed installation MBR = ${result.mbr}mm (4× OD)${srcTag}. ` +
`<strong>1500V DC only</strong> — not for AC use. Flexible tinned Cu, Class II.`;
} else if (vk === "flex_hv_ac" || vk === "flex_hv_dc") {
const mbr_occ = Math.round(5 * result.od);
const vLabel = vk === "flex_hv_ac" ? "1000/1000V AC (Uo=1000V)" : "1500V DC";
noteEl.innerHTML = `<strong>Flexible screened ${vLabel} — ${csa}mm²:</strong> OD = ${result.od}mm. ` +
`MBR <strong>fixed = ${result.mbr}mm (3× OD)</strong> | ` +
`occasionally moved = ${mbr_occ}mm (5× OD)${srcTag}. ` +
(vk === "flex_hv_ac"
? `Uo=1000V — correct for 800V IT systems. Same cable serves AC and DC.`
: `Same cable construction also rated 1000/1000V AC.`) +
` Confirm with cable manufacturer.`;
byId("bend_factor").value = 3;
} else if (vk === "al_ata_ac" || vk === "al_ata_dc") {
const vLabel = vk === "al_ata_ac" ? "1000/1000V AC (Uo=1000V)" : "1500/1500V DC (Um=1800V)";
noteEl.innerHTML = `<strong>Rigid Al solar ${vLabel} — ${csa}mm²:</strong> OD = ${result.od}mm. ` +
`Fixed installation MBR = ${result.mbr}mm (12× OD)${srcTag}. ` +
`<strong>Aluminium tube armour — non-magnetic, safe for single-core AC.</strong> ` +
`Steel wire armour must never be used on single-core AC cables. ` +
`Rigid fixed installation only — no occasional-move rating. Confirm with manufacturer.`;
} else if (vk === "33cu") {
noteEl.innerHTML = `<strong>33 kV Cu 3-core unarmoured — ${csa}mm²:</strong> OD = ${result.od}mm. ` +
`Fixed installation MBR = ${result.mbr}mm (15× OD)${srcTag}. ` +
`IEC 60502-2 / VDE 0276-620. Fixed installation only. Confirm with manufacturer.`;
} else if (["lv_cu_sc","lv_al_sc","lv_cu_2c","lv_cu_3c","lv_cu_4c","lv_cu_5c",
"lv_al_3c","lv_al_4c","lv_al_5c"].includes(vk)) {
const condLabel = vk.includes("_cu_") ? "Cu" : "Al";
const coreLabel = {"lv_cu_sc":"1c","lv_al_sc":"1c","lv_cu_2c":"2c","lv_cu_3c":"3c",
"lv_cu_4c":"4c","lv_cu_5c":"5c","lv_al_3c":"3c",
"lv_al_4c":"4c","lv_al_5c":"5c"}[vk];
const armour = (vk === "lv_cu_sc" || vk === "lv_al_sc") ? "AWA" : "SWA";
noteEl.innerHTML = `<strong>0.6/1kV ${condLabel} XLPE ${coreLabel} ${armour} — ${csa}mm²:</strong> OD = ${result.od}mm. ` +
`Fixed installation MBR = ${result.mbr}mm (${mbr_factor}× OD). ` +
`<strong>⚠ Catalogue model estimate ±1–2mm — verify against manufacturer controlled datasheet before use in design.</strong> ` +
`BS EN 60502-1 / BS 5467.` +
((vk === "lv_cu_sc" || vk === "lv_al_sc")
? ` Single-core AC: AWA only — SWA must not be used on single-core AC cables (eddy current losses).` : ``);
} else {
const srcTag2 = result.estimated ? " (model estimate ±3mm)" : ` (${result.src})`;
noteEl.innerHTML = `<strong>${vc.label} — ${csa}mm²:</strong> OD = ${result.od}mm. ` +
`Fixed installation MBR = ${result.mbr}mm (${mbr_factor}× OD)${srcTag2}. ` +
`Fixed installation only. Verify with cable manufacturer.`;
}
updateFromLookup();
}
function updateFromLookup() {
const odEl = byId("cable_od");
const srcEl = byId("od_source_note");
const vk = byId("lookup_voltage").value;
const csa = byId("lookup_csa").value;
const isThree = byId("lookup_cores").value === "three";
if (vk && csa) {
const res = lookupOD(vk, parseFloat(csa), isThree);
if (res) {
srcEl.textContent = res.estimated
? `OD from catalogue model ±3mm — ${res.src}. Verify with manufacturer.`
: `OD confirmed — ${res.src}.`;
srcEl.style.color = res.estimated ? "var(--warn)" : "var(--ok)";
}
}
renderAll();
}
function renderAll() {
const inputs = getInputs();
const layout = computeLayout(inputs);
const review = buildReview(inputs, layout);
appState.inputs = inputs;
appState.layout = layout;
appState.review = review;
renderStatus(review);
renderIssues(review);
renderStats(layout, review, inputs);
drawFormation(inputs, layout, review);
drawTrench(inputs, layout);
drawBend(inputs, layout);
buildSnapshot(inputs, layout, review);
}
function debounce(fn, delay) {
let t = null;
return function (...args) { clearTimeout(t); t = setTimeout(() => fn.apply(this, args), delay); };
}
const debouncedRenderAll = debounce(renderAll, 80);
function handleInput(event) {
const id = event.target.id;
if (id === "service_type") {
populateFormationOptions(byId("service_type").value, byId("formation_type").value);
syncBurialDepthNote(true);
}
if (id === "spacing_basis" || id === "circuit_qty") syncSpacingInputs();
debouncedRenderAll();
}
function handleChange(event) {
const id = event.target.id;
if (id === "service_type") {
populateFormationOptions(byId("service_type").value, byId("formation_type").value);
syncBurialDepthNote(true);
}
if (id === "spacing_basis" || id === "circuit_qty") syncSpacingInputs();
renderAll();
}
function handleBlur(event) {
const id = event.target.id;
const otherNumerics = ["section_length","circuit_qty","max_per_row","cable_od","spacing_h","spacing_v","bend_factor"];
if (otherNumerics.includes(id)) {
normaliseIntegerFields();
if (id === "circuit_qty") syncSpacingInputs();
renderAll();
} else if (id === "burial_depth") {
normaliseBurialDepthFieldOnBlur();
renderAll();
}
}
function updateViewportMode() {
const isLM = window.matchMedia("(orientation: landscape) and (max-width: 1200px)").matches;
document.body.classList.toggle("landscape-mobile", isLM);
}
function toggleDrawingView() {
const isOn = document.body.classList.toggle("drawing-view");
byId("drawing_view_btn").textContent = isOn ? "Exit Drawing View" : "Drawing View";
updateViewportMode();
renderAll();
}
function bindNumericFieldUX() {
document.querySelectorAll('input[data-numeric="true"]').forEach(el => {
const sel = () => { window.setTimeout(() => { try { el.select(); el.setSelectionRange && el.setSelectionRange(0, el.value.length); } catch(_) {} }, 0); };
el.addEventListener("focus", sel);
el.addEventListener("click", sel);
el.addEventListener("touchend", sel);
});
}
function bindEvents() {
["installation_condition","service_type","grouping_basis","formation_type","spacing_basis"]
.forEach(id => byId(id).addEventListener("change", handleChange));
byId("lookup_cores").addEventListener("change", () => { populateLookupCSA(); applyLookup(); });
byId("lookup_voltage").addEventListener("change", () => { populateLookupCSA(); applyLookup(); });
byId("lookup_csa").addEventListener("change", applyLookup);
byId("cable_od").addEventListener("input", () => {
const vk = byId("lookup_voltage").value;
const csa = byId("lookup_csa").value;
if (!vk || !csa) {
byId("od_source_note").textContent = "OD entered manually.";
byId("od_source_note").style.color = "var(--muted-soft)";
}
});
["route_name","section_length","burial_depth","circuit_qty","max_per_row","cable_od","spacing_h","spacing_v","bend_factor"]
.forEach(id => {
byId(id).addEventListener("input", handleInput);
byId(id).addEventListener("blur", handleBlur);
});
byId("export_btn").addEventListener("click", exportJson);
byId("copy_btn").addEventListener("click", copySnapshot);
byId("drawing_view_btn").addEventListener("click", toggleDrawingView);
window.addEventListener("resize", debounce(() => { updateViewportMode(); renderAll(); }, 80));
}
function init() {
populateFormationOptions(byId("service_type").value, "trefoil_single_row");
syncSpacingInputs();
syncBurialDepthNote(true);
normaliseIntegerFields();
bindNumericFieldUX();
populateLookupCSA();
bindEvents();
updateViewportMode();
renderAll();
}
init();
</script>
</body>
</html>Indexforgis Single-Line Diagram (SLD)
A map page in the solar BESS topology folder of GlobalGrid2050 that maps grid substations, sat s and l sat, and uses data from OpenStreetMap Nominatim. Published at https://globalgrid2050.com/solar-bess-topology/indexforgis-sld.html.
electricalglobalgrid2050 / solar-bess-topology/indexforgis-sld.html · lines 1–428 of 1454 · Entry point · pattern triggerDownload (shared by 3 files)
- What it does
- It maps grid substations, sat s, l sat and l subs. Defines 47 functions or classes, including $, num, intVal, checked, setText. Side effects: changes the web page (DOM); makes network requests.
- 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: 33kV.
- Inputs & outputs
- In: data source: OpenStreetMap Nominatim; GeoJSON file grid_substations.geojson; JSON file style.json; form fields (user input). Out: web page; interactive map. Voltage levels named: 33kV.
- Downstream impact
- It is itself an entry point, published at https://globalgrid2050.com/solar-bess-topology/indexforgis-sld.html.
- What it achieves
- It sets text (`setText`), sets class (`setClass`) and picks prop (`pickProp`). GIS-SLD and Financial Sandbox. Its code works with 33 kV. It responds to click, keydown and change events.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- globalgrid2050 · solar-bess-topology · page
- Uses
- https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.css, https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.js, https://cdn.jsdelivr.net/npm/@turf/turf@6/turf.min.js
- Used by
- none found
- Produces
- $, num, intVal, checked, setText, setClass, money, debounce, isValidLngLat, pickProp, setFetchStatus, initMap
- 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/indexforgis-sld.html:1-428 · blob 727275a46deedb86e05835eaaee57a25219a78b6 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom, network · 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" />
<title>GIS-SLD and Financial Sandbox</title>
<link href="https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.css" rel="stylesheet" />
<script src="https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/@turf/turf@6/turf.min.js" defer></script>
<style>
:root {
--bg: #050505; --panel: rgba(10, 10, 10, 0.96); --line: #2f343d;
--text: #ffffff; --muted: #a6adbb; --accent: #00ffff; --accent-alt: #ff9900;
--ok: #00ff88; --substation: #ff3333; --private-sub: #00ff88; --inverter: #ffff00;
--mv: #6633ff; --bess: #ff00aa; --array-blue: #0066ff; --warn: #ff4444;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; padding: 20px; background: var(--bg); color: var(--text); font-family: "Courier New", monospace; display: flex; justify-content: center; overflow: hidden; }
.dashboard { display: flex; gap: 20px; width: 100%; max-width: 1600px; height: 100%; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; display: flex; flex-direction: column; }
.panel-left { width: 440px; padding: 20px; flex-shrink: 0; overflow-y: auto; }
.panel-right { flex: 1 1 auto; position: relative; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); min-height: 400px; }
h2 { margin: 0 0 10px 0; color: var(--text); font-size: 18px; text-transform: uppercase; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
h3 { margin: 15px 0 5px 0; color: var(--muted); font-size: 11px; text-transform: uppercase; border-bottom: 1px dashed #333; padding-bottom: 3px; }
.tab-container { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 15px; }
.tab-btn { flex: 1; padding: 10px 5px; background: transparent; color: var(--muted); border: none; cursor: pointer; font-family: monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; transition: 0.2s; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom: 2px solid var(--accent); font-weight: bold; background: rgba(0, 255, 255, 0.05); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.input-group { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.input-group input[type="text"], .input-group input[type="number"], .input-group select { width: 95px; background: #111; color: var(--accent); border: 1px solid #444; padding: 5px; text-align: right; border-radius: 3px; font-family: monospace; font-size: 11px; }
.input-group input[type="text"] { text-align: left; }
.input-group select { width: auto; min-width: 140px; text-align: left; }
.tab-content#central_tab .input-group input[type="number"], .tab-content#central_tab .input-group select { color: var(--accent-alt); }
.input-group input:focus, .input-group select:focus { border-color: var(--text); outline: none; }
.search-box { display: flex; gap: 5px; margin-bottom: 15px; }
.search-box input { flex: 1; background: #111; color: #fff; border: 1px solid #444; padding: 8px; border-radius: 3px; font-family: monospace; font-size: 12px; }
.search-box button { background: #222; color: var(--text); border: 1px solid #555; padding: 8px 12px; border-radius: 3px; cursor: pointer; font-family: monospace; font-weight: bold; }
.search-box button:hover { background: #444; color: #fff; }
.stat-box { background: rgba(0, 255, 255, 0.05); border: 1px solid var(--accent); padding: 12px; border-radius: 3px; margin-top: 15px; }
.stat-row { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 6px; color: var(--muted); }
.stat-val { color: var(--text); font-weight: bold; text-align: right; }
.stat-val.cyan { color: var(--accent); font-size: 13px; }
.stat-val.orange { color: var(--accent-alt); font-size: 13px; }
.finance-box { background: rgba(0, 255, 136, 0.05); border: 1px solid var(--ok); border-radius: 3px; padding: 10px; margin-top: 15px; }
.finance-box summary { color: var(--ok); cursor: pointer; font-size: 12px; font-weight: bold; text-transform: uppercase; margin-bottom: 8px; }
.finance-headline { border: 1px solid #264d3a; padding: 10px; margin-bottom: 10px; background: rgba(0, 255, 136, 0.04); }
.finance-box input[type="number"] { width: 95px; background: #111; color: var(--ok); border: 1px solid #444; padding: 5px; text-align: right; border-radius: 3px; font-family: monospace; font-size: 11px; }
.finance-box input[type="checkbox"] { accent-color: var(--ok); cursor: pointer; margin: 0; }
.warning-box { color: #ffcc00; font-size: 10px; margin-top: 8px; line-height: 1.4; }
.ux-note { font-size: 9px; color: var(--muted); margin-top: 4px; font-style: italic; }
.btn { padding: 10px; background: #000; color: var(--text); border: 1px solid #555; cursor: pointer; font-family: monospace; font-weight: bold; text-transform: uppercase; border-radius: 3px; margin-top: 10px; width: 100%; transition: 0.2s; }
.btn:hover { background: #222; color: #fff; }
.btn.draw-btn { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.btn.draw-btn.central { background: var(--accent-alt); border-color: var(--accent-alt); }
#map { width: 100%; height: 100%; min-height: 400px; }
.crosshair { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 24px; pointer-events: none; z-index: 10; text-shadow: 0 0 5px #000; }
.legend { position: absolute; bottom: 20px; left: 20px; background: var(--panel); border: 1px solid var(--line); padding: 10px; font-size: 10px; z-index: 1; border-radius: 4px; pointer-events: none; }
.legend-item { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.swatch { width: 12px; height: 12px; border: 1px solid #666; }
.maplibregl-popup-content { background: #111; color: #fff; border: 1px solid #444; border-radius: 4px; font-family: "Courier New", monospace; padding: 12px; font-size: 11px; box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.maplibregl-popup-close-button { color: #888; padding: 4px; }
.maplibregl-popup-close-button:hover { color: #fff; }
.popup-row { display: flex; justify-content: space-between; margin-bottom: 4px; border-bottom: 1px solid #222; padding-bottom: 2px; gap: 15px; }
.popup-val { font-weight: bold; color: var(--accent); }
.benchmark-box { background: rgba(17, 17, 17, 0.8); border: 1px solid #444; border-radius: 3px; padding: 10px; margin-top: 15px; }
.disclaimer-box { background: rgba(255, 68, 68, 0.05); border: 1px solid #ff4444; color: #ff9999; font-size: 10px; padding: 12px; border-radius: 3px; margin-top: 15px; line-height: 1.5; text-align: justify; }
.explainer-box { background: rgba(0, 255, 255, 0.04); border: 1px solid var(--accent); color: var(--muted); font-size: 10px; padding: 12px; border-radius: 3px; margin-top: 15px; line-height: 1.55; text-align: justify; }
.explainer-box strong { color: var(--text); }
.explainer-box h3 { color: var(--accent); margin-top: 0; }
.map-toggle-btn { background: rgba(5,5,5,0.85); color: var(--muted); border: 1px solid #444; padding: 6px 12px; border-radius: 3px; font-family: monospace; font-size: 11px; font-weight: bold; cursor: pointer; transition: 0.2s; }
.map-toggle-btn:hover { background: #222; border-color: #888; }
.map-toggle-btn.active { color: var(--accent); border-color: var(--accent); background: rgba(0, 255, 255, 0.05); }
#fetch_status { position: absolute; top: 10px; left: 10px; z-index: 20; background: rgba(5,5,5,0.9); border: 1px solid #555; padding: 6px 10px; border-radius: 3px; font-size: 10px; color: var(--muted); display: none; }
#fetch_status.error { color: #ff6666; border-color: #ff4444; display: block; }
@media (max-width: 800px) {
html, body { height: auto; }
body { overflow: auto; padding: 10px; }
.dashboard { flex-direction: column; height: auto; }
.panel-left { width: 100%; max-height: none; flex-shrink: 0; }
.panel-right { height: 60vh; flex-shrink: 0; min-height: 400px; }
}
</style>
</head>
<body>
<div class="dashboard">
<div class="panel panel-left">
<h2>GIS-SLD Sandbox</h2>
<div class="search-box">
<input type="text" id="loc_search" placeholder="Enter location (e.g. London)..." />
<button id="btn_search">FLY</button>
</div>
<div class="tab-container">
<button class="tab-btn active" id="tabbtn_string" data-tab="string">String</button>
<button class="tab-btn" id="tabbtn_central" data-tab="central">Central</button>
</div>
<div id="string_tab" class="tab-content active">
<h3>Dimensions & Physics</h3>
<div class="input-group"><label>Module Rating (Wp)</label><input type="number" id="mod_wp" value="660" min="1" /></div>
<div class="input-group">
<label>Mod L x W (m)</label>
<div style="display: flex; gap: 4px;">
<input type="number" id="mod_l" value="2.38" step="0.01" min="0.01" style="width: 45px;" />
<input type="number" id="mod_w" value="1.30" step="0.01" min="0.01" style="width: 45px;" />
</div>
</div>
<div class="input-group">
<label>Mounting & GCR</label>
<select id="mounting_type">
<option value="0.75">East-West Dome (~75%)</option>
<option value="0.45" selected>Fixed Tilt South (~45%)</option>
<option value="0.35">Tracker (~35%)</option>
</select>
</div>
<div class="input-group"><label>Gross Site Factor</label><input type="number" id="gross_factor" value="1.35" step="0.05" min="1.0" /></div>
<h3>Array Hierarchy (String)</h3>
<div class="input-group"><label>DC/AC Ratio</label><input type="number" id="dc_ac_ratio" value="1.20" step="0.05" min="0.01" /></div>
<div class="input-group"><label>Mods / String</label><input type="number" id="x_mods" value="28" min="1" /></div>
<div class="input-group"><label>Strings / Inverter</label><input type="number" id="z_strings" value="18" min="1" /></div>
<div class="input-group"><label>Inverters / Sub</label><input type="number" id="y_invs" value="28" min="1" /></div>
<div class="input-group"><label>Subs / Ring</label><input type="number" id="s_subs" value="5" min="1" /></div>
<div class="input-group"><label>33kV Rings</label><input type="number" id="b_cols" value="6" min="1" /></div>
<h3>Module Logistics</h3>
<div class="input-group">
<label>Packaging Preset</label>
<select id="logistics_preset" data-suffix="">
<option value="high_density" selected>High Density (33/box, 594/40ft)</option>
<option value="legacy">Standard Legacy (31/box, 620/40ft)</option>
<option value="manual">Manual Entry</option>
</select>
</div>
<div class="input-group"><label>Modules / Packing Unit</label><input type="number" id="mods_pallet" value="33" min="1" /></div>
<div class="input-group"><label>Mods / 40ft Container</label><input type="number" id="mods_container" value="594" min="1" /></div>
<div class="input-group"><label>Spare Allowance %</label><input type="number" id="spare_pct" value="1.0" step="0.1" min="0" /></div>
<details class="finance-box">
<summary>Baseline Project Economics</summary>
<div class="finance-headline">
<div class="stat-row"><span>Year 1 Revenue Projection</span><span class="stat-val" id="fin_string_annual_rev">£0</span></div>
<div class="stat-row"><span>25 Year Revenue Projection</span><span class="stat-val" id="fin_string_25_rev">£0</span></div>
<div class="stat-row"><span>35 Year Revenue Projection</span><span class="stat-val" id="fin_string_35_rev">£0</span></div>
<div class="stat-row"><span>Total CAPEX</span><span class="stat-val" id="fin_string_capex">£0</span></div>
<div class="stat-row"><span>CAPEX per Wp</span><span class="stat-val" id="fin_string_capex_wp">£0.00/Wp</span></div>
<div class="stat-row"><span>Indicative 25 Year Surplus</span><span class="stat-val" id="fin_string_surplus_25">£0</span></div>
<div class="stat-row"><span>Indicative 35 Year Surplus</span><span class="stat-val" id="fin_string_surplus_35">£0</span></div>
</div>
<h3>Revenue</h3>
<div class="input-group"><label>Energy Price £/MWh</label><input type="number" id="fin_string_price" value="65" step="1" min="0"></div>
<div class="input-group"><label>Other Income £/MWh</label><input type="number" id="fin_string_other" value="0" step="1" min="0"></div>
<div class="input-group"><label>Base Yield kWh/kWp</label><input type="number" id="fin_string_yield" value="1000" step="10" min="0"></div>
<div class="input-group"><label>Bifacial Gain %</label><input type="number" id="fin_string_bifacial" value="5" step="0.5" min="0" max="15"></div>
<div class="input-group"><label>Base Losses %</label><input type="number" id="fin_string_losses" value="2" step="0.1" min="0"></div>
<div class="input-group"><label>Degradation % (Yr 2+)</label><input type="number" id="fin_string_deg" value="0.4" step="0.01" min="0"></div>
<div class="input-group"><label>OPEX £/MWac/yr</label><input type="number" id="fin_string_opex" value="25000" step="1000" min="0"></div>
<h3>CAPEX</h3>
<div class="input-group"><label>EPC ex Modules £/Wp</label><input type="number" id="fin_string_epc_ex" value="0.30" step="0.01" min="0"></div>
<div class="input-group">
<label>Flood Resilience</label>
<div style="display: flex; gap: 4px; align-items: center;">
<input type="checkbox" id="fin_string_flood" />
<input type="number" id="fin_string_flood_rate" value="0.03" step="0.01" min="0" style="width: 50px;" />
</div>
</div>
<div class="input-group"><label>Modules £/Wp</label><input type="number" id="fin_string_modules" value="0.15" step="0.01" min="0"></div>
<div class="input-group"><label>Other CAPEX £/Wp</label><input type="number" id="fin_string_other_capex" value="0.20" step="0.01" min="0"></div>
<div class="input-group"><label>Fixed CAPEX £</label><input type="number" id="fin_string_fixed_capex" value="1500000" step="50000" min="0"></div>
<div class="input-group"><label>Contingency %</label><input type="number" id="fin_string_cont" value="7" step="0.5" min="0"></div>
<h3>Loss Allowances</h3>
<div class="input-group"><label>DC String Cable Loss %</label><input type="number" id="fin_string_loss_dc_string" value="0" step="0.1" min="0"></div>
<div class="input-group"><label>LV Main DC Loss %</label><input type="number" id="fin_string_loss_lv_dc" value="0" step="0.1" min="0"></div>
<div class="input-group"><label>LV AC Loss %</label><input type="number" id="fin_string_loss_lv_ac" value="0" step="0.1" min="0"></div>
<div class="input-group"><label>Transformer Loss %</label><input type="number" id="fin_string_loss_tx" value="0" step="0.1" min="0"></div>
<div class="input-group"><label>Other Electrical Loss %</label><input type="number" id="fin_string_loss_other" value="0" step="0.1" min="0"></div>
<h3>BESS Optional</h3>
<div class="input-group"><label>BESS Power MW</label><input type="number" id="fin_string_bess_mw" value="0" step="1" min="0"></div>
<div class="input-group"><label>BESS Energy MWh</label><input type="number" id="fin_string_bess_mwh" value="0" step="1" min="0"></div>
<div class="input-group"><label>BESS CAPEX £/MWh</label><input type="number" id="fin_string_bess_capex" value="0" step="10000" min="0"></div>
<div class="input-group"><label>BESS Cycles / Year</label><input type="number" id="fin_string_bess_cycles" value="0" step="10" min="0"></div>
<div class="input-group"><label>BESS Spread £/MWh</label><input type="number" id="fin_string_bess_spread" value="0" step="1" min="0"></div>
<div class="input-group"><label>BESS Efficiency %</label><input type="number" id="fin_string_bess_eff" value="88" step="1" min="0" max="100"></div>
<div class="warning-box" id="fin_string_warnings"></div>
</details>
</div>
<div id="central_tab" class="tab-content">
<h3>Dimensions & Physics</h3>
<div class="input-group"><label>Module Rating (Wp)</label><input type="number" id="mod_wp_c" value="660" min="1" /></div>
<div class="input-group">
<label>Mod L x W (m)</label>
<div style="display: flex; gap: 4px;">
<input type="number" id="mod_l_c" value="2.38" step="0.01" min="0.01" style="width: 45px;" />
<input type="number" id="mod_w_c" value="1.30" step="0.01" min="0.01" style="width: 45px;" />
</div>
</div>
<div class="input-group">
<label>Mounting & GCR</label>
<select id="mounting_type_c">
<option value="0.75">East-West Dome (~75%)</option>
<option value="0.45" selected>Fixed Tilt South (~45%)</option>
<option value="0.35">Tracker (~35%)</option>
</select>
</div>
<div class="input-group"><label>Gross Site Factor</label><input type="number" id="gross_factor_c" value="1.35" step="0.05" min="1.0" /></div>
<h3>Array Hierarchy (Central)</h3>
<div class="input-group">
<label>Central AC Rating MWac</label>
<select id="inv_ac_mw_c">
<option value="3.15">3.15 MWac</option>
<option value="4.4" selected>4.40 MWac</option>
<option value="4.6">4.60 MWac</option>
<option value="5.0">5.00 MWac</option>
<option value="6.25">6.25 MWac</option>
<option value="6.8">6.80 MWac</option>
</select>
</div>
<div class="input-group"><label>DC/AC Ratio</label><input type="number" id="dc_ac_ratio_c" value="1.20" step="0.05" min="0.01" /></div>
<div class="input-group"><label>Modules / String</label><input type="number" id="x_mods_c" value="28" min="1" /></div>
<div class="input-group"><label>Strings / Combiner Box</label><input type="number" id="str_per_cb_c" value="24" min="1" /></div>
<div class="input-group"><label>Central Invs / MV Station</label><input type="number" id="inv_per_mv_c" value="1" min="1" /></div>
<div class="input-group"><label>MV Stations / 33kV Ring</label><input type="number" id="mv_per_ring_c" value="4" min="1" /></div>
<div class="input-group"><label>33kV Rings</label><input type="number" id="rings_c" value="4" min="1" /></div>
<h3>Module Logistics</h3>
<div class="input-group">
<label>Packaging Preset</label>
<select id="logistics_preset_c" data-suffix="_c">
<option value="high_density" selected>High Density (33/box, 594/40ft)</option>
<option value="legacy">Standard Legacy (31/box, 620/40ft)</option>
<option value="manual">Manual Entry</option>
</select>
</div>
<div class="input-group"><label>Modules / Packing Unit</label><input type="number" id="mods_pallet_c" value="33" min="1" /></div>
<div class="input-group"><label>Mods / 40ft Container</label><input type="number" id="mods_container_c" value="594" min="1" /></div>
<div class="input-group"><label>Spare Allowance %</label><input type="number" id="spare_pct_c" value="1.0" step="0.1" min="0" /></div>
<details class="finance-box">
<summary>Baseline Project Economics</summary>
<div class="finance-headline">
<div class="stat-row"><span>Year 1 Revenue Projection</span><span class="stat-val" id="fin_central_annual_rev">£0</span></div>
<div class="stat-row"><span>25 Year Revenue Projection</span><span class="stat-val" id="fin_central_25_rev">£0</span></div>
<div class="stat-row"><span>35 Year Revenue Projection</span><span class="stat-val" id="fin_central_35_rev">£0</span></div>
<div class="stat-row"><span>Total CAPEX</span><span class="stat-val" id="fin_central_capex">£0</span></div>
<div class="stat-row"><span>CAPEX per Wp</span><span class="stat-val" id="fin_central_capex_wp">£0.00/Wp</span></div>
<div class="stat-row"><span>Indicative 25 Year Surplus</span><span class="stat-val" id="fin_central_surplus_25">£0</span></div>
<div class="stat-row"><span>Indicative 35 Year Surplus</span><span class="stat-val" id="fin_central_surplus_35">£0</span></div>
</div>
<h3>Revenue</h3>
<div class="input-group"><label>Energy Price £/MWh</label><input type="number" id="fin_central_price" value="65" step="1" min="0"></div>
<div class="input-group"><label>Other Income £/MWh</label><input type="number" id="fin_central_other" value="0" step="1" min="0"></div>
<div class="input-group"><label>Base Yield kWh/kWp</label><input type="number" id="fin_central_yield" value="1000" step="10" min="0"></div>
<div class="input-group"><label>Bifacial Gain %</label><input type="number" id="fin_central_bifacial" value="5" step="0.5" min="0" max="15"></div>
<div class="input-group"><label>Base Losses %</label><input type="number" id="fin_central_losses" value="2" step="0.1" min="0"></div>
<div class="input-group"><label>Degradation % (Yr 2+)</label><input type="number" id="fin_central_deg" value="0.4" step="0.01" min="0"></div>
<div class="input-group"><label>OPEX £/MWac/yr</label><input type="number" id="fin_central_opex" value="25000" step="1000" min="0"></div>
<h3>CAPEX</h3>
<div class="input-group"><label>EPC ex Modules £/Wp</label><input type="number" id="fin_central_epc_ex" value="0.30" step="0.01" min="0"></div>
<div class="input-group">
<label>Flood Resilience</label>
<div style="display: flex; gap: 4px; align-items: center;">
<input type="checkbox" id="fin_central_flood" />
<input type="number" id="fin_central_flood_rate" value="0.03" step="0.01" min="0" style="width: 50px;" />
</div>
</div>
<div class="input-group"><label>Modules £/Wp</label><input type="number" id="fin_central_modules" value="0.15" step="0.01" min="0"></div>
<div class="input-group"><label>Other CAPEX £/Wp</label><input type="number" id="fin_central_other_capex" value="0.20" step="0.01" min="0"></div>
<div class="input-group"><label>Fixed CAPEX £</label><input type="number" id="fin_central_fixed_capex" value="1500000" step="50000" min="0"></div>
<div class="input-group"><label>Contingency %</label><input type="number" id="fin_central_cont" value="7" step="0.5" min="0"></div>
<h3>Loss Allowances</h3>
<div class="input-group"><label>DC String Cable Loss %</label><input type="number" id="fin_central_loss_dc_string" value="0" step="0.1" min="0"></div>
<div class="input-group"><label>LV Main DC Loss %</label><input type="number" id="fin_central_loss_lv_dc" value="0" step="0.1" min="0"></div>
<div class="input-group"><label>LV AC Loss %</label><input type="number" id="fin_central_loss_lv_ac" value="0" step="0.1" min="0"></div>
<div class="input-group"><label>Transformer Loss %</label><input type="number" id="fin_central_loss_tx" value="0" step="0.1" min="0"></div>
<div class="input-group"><label>Other Electrical Loss %</label><input type="number" id="fin_central_loss_other" value="0" step="0.1" min="0"></div>
<h3>BESS Optional</h3>
<div class="input-group"><label>BESS Power MW</label><input type="number" id="fin_central_bess_mw" value="0" step="1" min="0"></div>
<div class="input-group"><label>BESS Energy MWh</label><input type="number" id="fin_central_bess_mwh" value="0" step="1" min="0"></div>
<div class="input-group"><label>BESS CAPEX £/MWh</label><input type="number" id="fin_central_bess_capex" value="0" step="10000" min="0"></div>
<div class="input-group"><label>BESS Cycles / Year</label><input type="number" id="fin_central_bess_cycles" value="0" step="10" min="0"></div>
<div class="input-group"><label>BESS Spread £/MWh</label><input type="number" id="fin_central_bess_spread" value="0" step="1" min="0"></div>
<div class="input-group"><label>BESS Efficiency %</label><input type="number" id="fin_central_bess_eff" value="88" step="1" min="0" max="100"></div>
<div class="warning-box" id="fin_central_warnings"></div>
</details>
</div>
<div class="stat-box" style="border-color: #ff3333; background: rgba(255, 51, 51, 0.05); margin-bottom: 15px;">
<h3 style="margin-top: 0; color: #ff3333; border-bottom-color: #ff3333;">Selected Grid Node</h3>
<div class="stat-row"><span>Substation:</span><span class="stat-val" id="out_selected_sub_name">None selected</span></div>
<div class="stat-row"><span>Voltage:</span><span class="stat-val" id="out_selected_sub_voltage">Unknown</span></div>
<div class="stat-row"><span>Longitude:</span><span class="stat-val" id="out_selected_sub_lon">n/a</span></div>
<div class="stat-row"><span>Latitude:</span><span class="stat-val" id="out_selected_sub_lat">n/a</span></div>
</div>
<div class="stat-box" id="tech_summary_box">
<h3>Technical Quantity Summary</h3>
<div class="stat-row"><span>Total Module Count:</span><span class="stat-val" id="out_module_count">0</span></div>
<div class="stat-row"><span>Total DC Capacity:</span><span class="stat-val cyan" id="out_dc_capacity">0.00 MWp</span></div>
<div class="stat-row"><span>Implied AC Capacity:</span><span class="stat-val" id="out_ac_capacity">0.00 MWac</span></div>
<div class="stat-row"><span>DC/AC Ratio:</span><span class="stat-val" id="out_actual_dcac">1.20</span></div>
<div class="stat-row central-only" style="display: none;"><span>Central Combiner Boxes / Inverter:</span><span class="stat-val" id="out_cb_per_inv">0</span></div>
<div class="stat-row central-only" style="display: none;"><span>Total Central Combiner Boxes:</span><span class="stat-val" id="out_total_cb">0</span></div>
<div style="border-top:1px dashed #333; margin: 8px 0;"></div>
<div class="stat-row"><span>Net Module Surface Area:</span><span class="stat-val" id="out_net_mod_area">0 Acres</span></div>
<div class="stat-row"><span>Net Array Area at GCR:</span><span class="stat-val" id="out_net_array_area">0 Acres</span></div>
<div class="stat-row"><span>Indicative Gross Site Area:</span><span class="stat-val orange" id="out_gross_area">0 Acres</span></div>
<div style="border-top:1px dashed #333; margin: 8px 0;"></div>
<div class="stat-row"><span>Modules per Packing Unit:</span><span class="stat-val" id="out_mod_per_pallet">0</span></div>
<div class="stat-row"><span>Total Packing Units:</span><span class="stat-val" id="out_pallets">0</span></div>
<div class="stat-row"><span>Modules per Container:</span><span class="stat-val" id="out_mod_per_cont">0</span></div>
<div class="stat-row"><span>Total Base Containers:</span><span class="stat-val" id="out_containers">0</span></div>
<div class="stat-row"><span>Spare Module Allowance:</span><span class="stat-val" id="out_spare_pct">0%</span></div>
<div class="stat-row"><span>Containers (Inc. Spares):</span><span class="stat-val cyan" id="out_containers_spares">0</span></div>
<div class="stat-row"><span>Containers per MWp:</span><span class="stat-val cyan" id="out_cont_per_mwp">0.00</span></div>
</div>
<div class="benchmark-box">
<h3 style="margin-top: 0;">Custom Reference Benchmark</h3>
<div class="input-group"><label>Reference Project</label><input type="text" id="ref_name" value="Custom Project X" style="width: 140px; text-align: left;"/></div>
<div class="input-group"><label>Reference Capacity (MW)</label><input type="number" id="ref_mw" value="100" min="1" /></div>
<div class="input-group"><label>Reference Module Count</label><input type="number" id="ref_modules" value="150000" min="1" /></div>
<div class="stat-row" style="margin-top: 8px; border-top: 1px dashed #333; padding-top: 8px;">
<span>Implied Benchmark:</span><span class="stat-val" id="out_ref_implied">~ 1,500 modules/MW</span>
</div>
</div>
<button class="btn draw-btn" id="btn_draw">⌖ DRAW NEAT GRID</button>
<button class="btn" id="btn_export">⬇ Export GeoJSON</button>
<div class="disclaimer-box">
<strong>ENGINEERING SCREENING OUTPUT</strong><br><br>
These outputs are indicative screening values only. They are not construction design, financial advice, EPC pricing, grid compliance, logistics planning or transport instruction. All quantities, packaging, site area, cable routes, container loads, module specifications and financial assumptions must be verified against current manufacturer datasheets, project specific drawings, EPC scope, … [line shortened here: 451 characters; full line on GitHub]
</div>
<div class="explainer-box">
<h3>About the VENTUS GIS SLD Sandbox</h3>
<p>VENTUS GIS SLD Sandbox is a working engineering screening tool for utility scale solar, storage and grid connection analysis.</p>
<p>The tool helps users explore the relationship between land, grid proximity, solar topology, module count, inverter architecture, logistics, BESS assumptions and baseline project economics in one visual interface.</p>
<p>Users can enter a location, view UK substation reference data, select a grid node and generate an indicative solar layout using either string inverter or central inverter topology. The tool can estimate module count, DC capacity, AC capacity, site area, packing units, container loads, baseline revenue, CAPEX assumptions and simple long term financial outputs.</p>
<p>This is a real engineering screening tool. It is not a final construction design package, grid offer, connection approval, EPC quotation or financial advice. It is designed to support early stage project assessment by making technical, spatial, logistics and financial assumptions visible before deeper engineering, grid, planning, procurement and financial studies begin.</p>
<p>A key feature of the sandbox is that technical and commercial assumptions are shown together. In real projects, module count becomes logistics. Cable routing becomes electrical loss. Grid proximity becomes interface risk. BESS assumptions affect land, CAPEX and revenue logic. Financial outputs only become useful when the physical assumptions behind them are visible.</p>
<p>The tool also includes GeoJSON export so that generated layouts and assumptions can be carried into external GIS workflows, reports, internal review or further engineering discussion. The exported data is intended to preserve context, including topology mode, technical assumptions, logistics assumptions, financial assumptions and warnings.</p>
<p>The public substation layer is reference data only. A visible substation point does not confirm available capacity, connection rights, voltage suitability, cable route, grid acceptance or point of connection approval. Any real project must still be reviewed by competent engineers, grid specialists, planners, EPC teams, legal advisers and project finance professionals before real world d … [line shortened here: 422 characters; full line on GitHub]
<p>VENTUS created this sandbox to support better early stage thinking in solar and storage deployment. The aim is to help developers, engineers, suppliers, investors and commercial teams ask better questions before committing time, capital and contractual responsibility.</p>
<p>Use the sandbox as a thinking tool. Use it to test scale. Use it to compare assumptions. Use it to understand where deeper engineering begins.</p>
</div>
</div>
<div class="panel panel-right">
<div id="fetch_status"></div>
<div style="position: absolute; top: 10px; right: 10px; z-index: 20; display: flex; gap: 8px;">
<button id="btn_subs_toggle" class="map-toggle-btn active">SUBS ON</button>
<button id="btn_basemap" class="map-toggle-btn">SATELLITE VIEW</button>
</div>
<div class="crosshair">⌖</div>
<div id="map"></div>
<div class="legend" id="map_legend"></div>
</div>
</div>
<script>
"use strict";
// ============================================================
// CONFIGURATION
// ============================================================
// Absolute path from domain root. Works at globalgrid2050.com/grid_substations.geojson
// regardless of which subfolder this HTML lives in.
// If you ever move the geojson somewhere else, change this single line.
const SUBSTATIONS_URL = "/grid_substations.geojson";
const CONSTANTS = {
M2_PER_ACRE: 4046.86,
BESS_M2_PER_MWH: 85,
BESS_ASPECT: 2.5,
BLOCK_SPACING_KM: 0.01,
BOUNDARY_BUFFER_KM: 0.02,
ARRAY_OFFSET_KM: 0.2,
DEFAULT_CENTER: [-0.1276, 51.5072],
DEFAULT_ZOOM: 13,
RECALC_DEBOUNCE_MS: 80,
BIFACIAL_BY_GCR: { "0.35": 8, "0.45": 5, "0.75": 2 },
LOGISTICS_PRESETS: {
high_density: { pallet: 33, container: 594 },
legacy: { pallet: 31, container: 620 }
}
};
// ============================================================
// STATE
// ============================================================
const state = {