In this section
- Manifest docs-config · globalgrid2050 / feature_requests/009_clean_v3_identity/manifest.yml lines 1–52
- Manifest docs-config · globalgrid2050 / feature_requests/010_v3_modularisation_plan/manifest.yml lines 1–8
- Manifest docs-config · globalgrid2050 / feature_requests/add_operator_manual_v1/manifest.yml lines 1–11
- Grid Engine — Electrification Workbench Page render · globalgrid2050 / grid_engine/202609060148-electrification-workbench/index.html lines 1–313
- Grid Engine — Firm Capacity Page render · globalgrid2050 / grid_engine/202609060205-firm-capacity/index.html lines 1–245
Manifest
A configuration file in the feature requests folder of GlobalGrid2050 covering solar, battery storage (BESS) and substations.
docs-configglobalgrid2050 / feature_requests/009_clean_v3_identity/manifest.yml · lines 1–52 of 52 · Not reached from any entry point (candidate for review)
- Why it exists in the grid workflow
- Domain terms in the code: solar, battery storage (BESS), substations.
- What it achieves
- Rename the V3 clone identity so the V3 entry file loads V3 local support files and displays V3 in the browser title.
- Why it matters
- No other file in the estate was found to import it.
- Application
- globalgrid2050 · feature_requests/009_clean_v3_identity · configuration
- Uses
- none found
- Used by
- none found
- Produces
- none declared
- Defines here
- Clean GIS SLD V3 identity
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 feature_requests/009_clean_v3_identity/manifest.yml:1-52 · blob 3fa597101d3f40aacb339edebdff4e5b9832e55c · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: unknown · effects: none found · domain stage: unknown · users: none · canonical: unreached_review
name: Clean GIS SLD V3 identity
description: Rename the V3 clone identity so the V3 entry file loads V3 local support files and displays V3 in the browser title. V2 remains untouched.
operations:
- type: replace
file: solar-bess-topology-v3/indexforgis-sld-v3.html
find: 'GIS SLD Financial Sandbox V2'
replace: 'GIS SLD Financial Sandbox V3'
count: 1
- type: regex_replace
file: solar-bess-topology-v3/indexforgis-sld-v3.html
pattern: 'gis-sld-v2-config\.js'
replace: 'gis-sld-v3-config.js'
count: 1
- type: regex_replace
file: solar-bess-topology-v3/indexforgis-sld-v3.html
pattern: 'gis-sld-v2-helpers\.js'
replace: 'gis-sld-v3-helpers.js'
count: 1
- type: regex_replace
file: solar-bess-topology-v3/indexforgis-sld-v3.html
pattern: 'gis-sld-v2-state\.js'
replace: 'gis-sld-v3-state.js'
count: 1
- type: regex_replace
file: solar-bess-topology-v3/indexforgis-sld-v3.html
pattern: 'gis-sld-v2-substations\.js'
replace: 'gis-sld-v3-substations.js'
count: 1
- type: regex_replace
file: solar-bess-topology-v3/indexforgis-sld-v3.html
pattern: 'gis-sld-v2\.css'
replace: 'gis-sld-v3.css'
count: 1
- type: assert_contains
file: solar-bess-topology-v3/indexforgis-sld-v3.html
text: 'GIS SLD Financial Sandbox V3'
- type: assert_contains
file: solar-bess-topology-v3/indexforgis-sld-v3.html
text: 'gis-sld-v3-config.js'
- type: assert_contains
file: solar-bess-topology-v3/indexforgis-sld-v3.html
text: 'gis-sld-v3.css'Manifest
A configuration file in the feature requests folder of GlobalGrid2050.
docs-configglobalgrid2050 / feature_requests/010_v3_modularisation_plan/manifest.yml · lines 1–8 of 8 · Not reached from any entry point (candidate for review)
- What it achieves
- Add an auditable modularisation plan for breaking the V3 GIS single-line diagram (SLD) Financial Sandbox into small feature files without modifying V2.
- Why it matters
- No other file in the estate was found to import it.
- Application
- globalgrid2050 · feature_requests/010_v3_modularisation_plan · configuration
- Uses
- none found
- Used by
- none found
- Produces
- none declared
- Defines here
- Add V3 modularisation plan
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 feature_requests/010_v3_modularisation_plan/manifest.yml:1-8 · blob c356a24d85bef119fac3ca33b979eadbf7dcda66 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: unknown · effects: none found · domain stage: unknown · users: none · canonical: unreached_review
name: Add V3 modularisation plan
description: Add an auditable modularisation plan for breaking the V3 GIS SLD Financial Sandbox into small feature files without modifying V2.
operations:
- type: assert_contains
file: solar-bess-topology-v3/indexforgis-sld-v3.html
text: 'GIS SLD Financial Sandbox'Manifest
A configuration file in the feature requests folder of GlobalGrid2050.
docs-configglobalgrid2050 / feature_requests/add_operator_manual_v1/manifest.yml · lines 1–11 of 11 · Not reached from any entry point (candidate for review)
- What it achieves
- Install the root level Operator Manual V1 as reviewable operating doctrine for GlobalGrid2050 and Ventus Core.
- Why it matters
- No other file in the estate was found to import it.
- Application
- globalgrid2050 · feature_requests/add_operator_manual_v1 · configuration
- Uses
- none found
- Used by
- none found
- Produces
- none declared
- Defines here
- Add GlobalGrid2050 Operator Manual V1
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 feature_requests/add_operator_manual_v1/manifest.yml:1-11 · blob d626582cedb78a382101780cfab889b6fa69aa9c · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: unknown · effects: none found · domain stage: unknown · users: none · canonical: unreached_review
name: Add GlobalGrid2050 Operator Manual V1
description: Install the root level Operator Manual V1 as reviewable operating doctrine for GlobalGrid2050 and Ventus Core.
operations:
- type: assert_contains
file: OPERATOR_MANUAL_V1.md
text: 'GlobalGrid2050 is an open infrastructure intelligence operating system.'
- type: assert_contains
file: OPERATOR_MANUAL_V1.md
text: 'AI proposes. Python processes. GitHub records. GridBot executes. The maintainer approves.'Grid Engine — Electrification Workbench Page
A web page in GlobalGrid2050 using data from the ventus-grid-engine repository. Published at https://globalgrid2050.com/grid_engine/202609060148-electrification-workbench/. It renders pathways (`renderPathways`) and renders refusals (`renderRefusals`).
renderglobalgrid2050 / grid_engine/202609060148-electrification-workbench/index.html · lines 1–313 of 313 · version 2026-09-06 01:48 · Entry point
- What it does
- It draws its content. Defines fig, fail, render, renderPathways, renderRefusals. Side effects: changes the web page (DOM).
- Inputs & outputs
- In: form fields (user input). Out: web page.
- Downstream impact
- Used directly by 3 files: Homepage V090 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v090.html); Homepage V091 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v091.html); Homepage V093 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v093.html). It is itself an entry point, published at https://globalgrid2050.com/grid_engine/202609060148-electrification-workbench/.
- What it achieves
- Defines `fig`, `fail`, `render` and 2 more. It responds to input events.
- Why it matters
- Loaded by the Homepage V090 page at https://globalgrid2050.com/homepage_versions/homepage_v090.html and 2 other pages.
- Application
- globalgrid2050 · grid_engine/202609060148-electrification-workbench · page
- Uses
- Electrification Demand (link), Papers — Published Fault Level Page (link)
- Used by
- linked from Homepage V090 (link), linked from Homepage V091 (link), linked from Homepage V093 (link)
- Produces
- fig, fail, render, renderPathways, renderRefusals
- Defines here
- fig, fail, render, renderPathways, renderRefusals
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 grid_engine/202609060148-electrification-workbench/index.html:1-313 · blob 5bb57d061f7072cf2570c7e66aa000de8feecf63 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: unknown · users: none · canonical: production_core
<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Electrification Workbench — Ventus Grid Engine</title>
<style>
:root{
--bg:#000; --panel:#0b0e14; --line:#2f343d; --soft:#222; --text:#fff;
--muted:#a6adbb; --accent:#00ffff; --ok:#00ff88; --warn:#ffae00; --no:#ff5c5c;
}
*{box-sizing:border-box;margin:0;padding:0;font-family:'Courier New',ui-monospace,monospace}
html,body{background:var(--bg);color:var(--text)}
body{font-size:14px;line-height:1.5;padding:0 0 48px}
.wrap{max-width:960px;margin:0 auto;padding:0 14px}
header{border-bottom:1px solid var(--soft);padding:18px 0 14px;margin-bottom:18px}
h1{font-size:17px;letter-spacing:2px;color:var(--accent)}
.sub{color:var(--muted);font-size:11px;margin-top:6px;text-transform:uppercase;letter-spacing:1px}
.stamp{color:#7f8996;font-size:10px;margin-top:8px;overflow-wrap:anywhere}
.stamp a{color:#66ccff}
.status{border:1px solid var(--line);background:var(--panel);padding:9px 11px;margin-bottom:18px;font-size:11px}
.status.loading{border-color:#6b5a25;color:#e8d08a}
.status.live{border-color:#167d4d;color:var(--ok)}
.status.dead{border-color:#7d1616;color:var(--no)}
section{border:1px solid var(--soft);background:var(--panel);margin-bottom:16px}
h2{font-size:12px;letter-spacing:1.4px;color:var(--accent);padding:11px 13px;border-bottom:1px solid var(--soft)}
.body{padding:13px}
.lede{color:var(--muted);font-size:11px;line-height:1.6;margin-bottom:13px}
label{display:block;color:var(--muted);font-size:10px;letter-spacing:.6px;
text-transform:uppercase;margin:0 0 5px}
.field{margin-bottom:13px}
input[type=number]{width:100%;background:#000;border:1px solid var(--line);color:var(--text);
padding:11px 10px;font-size:16px;font-weight:700}
input[type=number]:focus{outline:none;border-color:var(--accent)}
input[type=range]{width:100%;accent-color:var(--accent);height:30px}
.rangerow{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.rangeval{color:var(--accent);font-weight:700;font-size:15px;white-space:nowrap}
.out{border:1px solid var(--line);background:#06080b;padding:11px;margin-top:11px}
.figure{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.figure .n{font-size:26px;font-weight:700;color:var(--ok);line-height:1.1}
.figure .u{font-size:12px;color:var(--muted)}
.figure .q{font-size:10px;color:#7f8996;text-transform:uppercase;letter-spacing:.8px;
flex:1 0 100%;margin-bottom:3px}
.basis{color:#8e98a5;font-size:10.5px;line-height:1.6;margin-top:9px;
border-top:1px dashed #252a31;padding-top:8px}
table{width:100%;border-collapse:collapse;font-size:11px}
th{color:var(--accent);text-align:left;padding:7px 6px;border-bottom:1px solid var(--line);
font-size:10px;letter-spacing:.5px}
td{padding:7px 6px;border-bottom:1px solid #1a1e25;color:var(--muted)}
td.n{color:var(--text);font-weight:700;text-align:right;white-space:nowrap}
.scroller{overflow-x:auto;-webkit-overflow-scrolling:touch}
.refuse{border:1px solid #5c2020;background:#120708}
.refuse h2{color:#ff8f8f;border-bottom-color:#5c2020}
.refuse dt{color:#ff8f8f;font-size:11px;font-weight:700;margin-top:11px;letter-spacing:.4px}
.refuse dt:first-child{margin-top:0}
.refuse dd{color:#c9a9a9;font-size:10.5px;line-height:1.6;margin-top:3px}
footer{color:#69727d;font-size:10px;line-height:1.7;padding-top:14px;
border-top:1px solid var(--soft);margin-top:22px}
footer a{color:#66ccff}
</style>
</head>
<body>
<div class="wrap">
<header>
<h1>ELECTRIFICATION WORKBENCH</h1>
<p class="sub">Ventus Grid Engine · applied arithmetic, with its assumptions attached</p>
<p class="stamp" id="stamp">Generation 202609060148</p>
</header>
<div class="status loading" id="engine-status">Loading the engine module…</div>
<section>
<h2>1 · ANNUAL ENERGY TO AVERAGE POWER</h2>
<div class="body">
<p class="lede">Exact by definition — annual energy divided by the hours in the
year. It is the only figure on this page that carries no assumption, and the
least useful on its own, because no network is ever sized for its average.</p>
<div class="field">
<label for="twh">Annual electricity (TWh)</label>
<input type="number" id="twh" value="480" min="1" max="2000" step="1" inputmode="decimal">
</div>
<div class="out" id="out-average"></div>
</div>
</section>
<section>
<h2>2 · AVERAGE TO PEAK, AT A LOAD FACTOR YOU STATE</h2>
<div class="body">
<p class="lede">Peak = average ÷ load factor. The load factor is the entire
assumption, so it is never defaulted — you set it, and it travels with the
answer. A system with unmanaged heat pumps and one with smart-charged vehicles
are different numbers.</p>
<div class="field">
<div class="rangerow">
<label for="lf">Load factor</label>
<span class="rangeval" id="lf-val">0.60</span>
</div>
<input type="range" id="lf" min="0.30" max="0.95" step="0.01" value="0.60">
</div>
<div class="out" id="out-peak"></div>
</div>
</section>
<section>
<h2>3 · NESO'S PUBLISHED 2050 PATHWAYS, MEASURED</h2>
<div class="body">
<p class="lede">The honest direction of travel: where a peak is published,
derive the load factor from it rather than assuming one. Note the third row —
Hydrogen Evolution carries the <em>largest</em> annual demand and a
<em>lower</em> peak than Electric Engagement. No single national
peak-to-average ratio can describe both, which is why scaling today's ratio
forward is wrong.</p>
<div class="scroller">
<table id="pathways">
<thead><tr>
<th>FES 2025 pathway</th><th style="text-align:right">Annual</th>
<th style="text-align:right">Average</th><th style="text-align:right">Published peak</th>
<th style="text-align:right">Load factor</th>
</tr></thead>
<tbody></tbody>
</table>
</div>
<p class="basis">Annual demand and peak are NESO FES 2025 Table 2, on that
report's boundary — customer demand, on-grid electrolysis and losses. The
load factor column is computed here from those two published figures.</p>
</div>
</section>
<section>
<h2>4 · NAMEPLATE FOR THE ENERGY, AT A CAPACITY FACTOR</h2>
<div class="body">
<p class="lede">How much nameplate produces this much annual energy. It answers
an energy question and nothing else — a portfolio satisfying this equation
may still fail on a still, cold evening.</p>
<div class="field">
<div class="rangerow">
<label for="cf">Annual capacity factor</label>
<span class="rangeval" id="cf-val">0.40</span>
</div>
<input type="range" id="cf" min="0.10" max="0.90" step="0.01" value="0.40">
</div>
<div class="out" id="out-nameplate"></div>
</div>
</section>
<section>
<h2>5 · DISPLACED FUEL TO ELECTRICITY</h2>
<div class="body">
<p class="lede">Useful output is conserved, not fuel energy. Burning fuel wastes
most of it; a heat pump moves more heat than the energy it draws. Skipping this
step — treating primary energy as future electrical load — is the commonest
error in electrification arithmetic.</p>
<div class="field">
<label for="fuel">Fuel energy displaced (TWh)</label>
<input type="number" id="fuel" value="100" min="1" max="5000" step="1" inputmode="decimal">
</div>
<div class="field">
<div class="rangerow">
<label for="eold">Efficiency of the route being replaced</label>
<span class="rangeval" id="eold-val">0.90</span>
</div>
<input type="range" id="eold" min="0.15" max="0.99" step="0.01" value="0.90">
</div>
<div class="field">
<div class="rangerow">
<label for="enew">Electrical performance (COP may exceed 1)</label>
<span class="rangeval" id="enew-val">3.00</span>
</div>
<input type="range" id="enew" min="0.50" max="5.00" step="0.05" value="3.00">
</div>
<div class="out" id="out-fuel"></div>
</div>
</section>
<section class="refuse">
<h2>WHAT THIS WORKBENCH WILL NOT COMPUTE</h2>
<div class="body">
<p class="lede" style="color:#c9a9a9">These are not features missing from a
later version. The engine proof asserts that no function of these names
exists, so their absence is a tested property rather than an oversight.</p>
<dl id="refusals"></dl>
</div>
</section>
<footer>
<p>The arithmetic on this page is not implemented here. It is imported live from
<a href="https://ventusltd.github.io/ventus-grid-engine/engine/electrification-demand.js">engine/electrification-demand.js</a>
in the Ventus Grid Engine, proven by
<a href="https://ventusltd.github.io/ventus-grid-engine/?graph=engine-graph">28 checks</a>
against the worked examples in the paper. If the engine cannot be reached, this
page says so and computes nothing — it does not fall back to a copy.</p>
<p style="margin-top:9px">Working paper:
<a href="/papers/202609060203-electrification/">Electrifying Great Britain</a> ·
<a href="/papers/202609060045-published-fault-level/">Published, dated, never calculated</a> ·
<a href="/">GlobalGrid2050</a></p>
<p style="margin-top:9px">Scenario arithmetic is not evidence of connection headroom.
A national load factor cannot establish utilisation at any particular transformer.</p>
</footer>
</div>
<script type="module">
const ENGINE = 'https://ventusltd.github.io/ventus-grid-engine/engine/electrification-demand.js';
const statusEl = document.getElementById('engine-status');
/* NESO FES 2025 Table 2. Published figures, carried not computed. The load
factor column is derived from them by the engine at render time. */
const PATHWAYS = [
{ name: 'Holistic Transition', twh: 705, peak: 120 },
{ name: 'Electric Engagement', twh: 785, peak: 144 },
{ name: 'Hydrogen Evolution', twh: 797, peak: 122 }
];
let E = null;
function fig(target, r, decimals = 1) {
document.getElementById(target).innerHTML =
`<div class="figure">
<span class="q">${r.quantity.replace(/_/g, ' ')}</span>
<span class="n">${r.value.toLocaleString('en-GB', {
minimumFractionDigits: decimals, maximumFractionDigits: decimals })}</span>
<span class="u">${r.unit}</span>
</div>
<p class="basis">${r.basis}</p>`;
}
function fail(message) {
statusEl.className = 'status dead';
statusEl.textContent = 'ENGINE UNREACHABLE — ' + message +
'. Nothing on this page is computed; there is no local copy of the arithmetic to fall back to.';
for (const id of ['out-average', 'out-peak', 'out-nameplate', 'out-fuel']) {
document.getElementById(id).innerHTML =
'<p class="basis" style="color:#ff8f8f;border:0;padding:0">No figure: the engine did not load.</p>';
}
}
function render() {
if (!E) return;
const twh = Number(document.getElementById('twh').value);
const lf = Number(document.getElementById('lf').value);
const cf = Number(document.getElementById('cf').value);
const fuel = Number(document.getElementById('fuel').value);
const eold = Number(document.getElementById('eold').value);
const enew = Number(document.getElementById('enew').value);
document.getElementById('lf-val').textContent = lf.toFixed(2);
document.getElementById('cf-val').textContent = cf.toFixed(2);
document.getElementById('eold-val').textContent = eold.toFixed(2);
document.getElementById('enew-val').textContent = enew.toFixed(2);
try {
const avg = E.averagePowerGw({ annualTwh: twh });
fig('out-average', avg);
fig('out-peak', E.peakFromLoadFactorGw({ averageGw: avg.value, loadFactor: lf }));
fig('out-nameplate', E.nameplateFromCapacityFactorGw({ annualTwh: twh, capacityFactor: cf }));
fig('out-fuel', E.electricityForDisplacedFuelTwh({
fuelTwh: fuel, oldEfficiency: eold, newPerformance: enew }), 2);
} catch (err) {
/* The engine refuses bad input by throwing with a reason. Print the reason
rather than a blank box — a refusal the user can read is the feature. */
document.getElementById('out-average').innerHTML =
`<p class="basis" style="color:#ffae00;border:0;padding:0">Engine refused this input: ${err.message}</p>`;
}
}
function renderPathways() {
const rows = PATHWAYS.map(p => {
const avg = E.averagePowerGw({ annualTwh: p.twh });
const lf = E.loadFactorFromPeak({ averageGw: avg.value, peakGw: p.peak });
return `<tr><td>${p.name}</td>
<td class="n">${p.twh} TWh</td>
<td class="n">${avg.value.toFixed(1)} GW</td>
<td class="n">${p.peak} GW</td>
<td class="n" style="color:#00ffff">${lf.value.toFixed(3)}</td></tr>`;
}).join('');
document.querySelector('#pathways tbody').innerHTML = rows;
}
function renderRefusals() {
document.getElementById('refusals').innerHTML =
Object.entries(E.NOT_COMPUTED).map(([k, v]) =>
`<dt>${k.replace(/([A-Z])/g, ' $1').toUpperCase()}</dt><dd>${v}</dd>`).join('');
}
try {
E = await import(ENGINE);
if (E.schema !== 'ventus-grid-engine.electrification-demand.v1') {
throw new Error('unexpected schema ' + E.schema);
}
statusEl.className = 'status live';
statusEl.textContent = 'ENGINE LIVE — ' + E.schema +
' · every figure below is computed by the engine module, not by this page.';
for (const id of ['twh', 'lf', 'cf', 'fuel', 'eold', 'enew']) {
document.getElementById(id).addEventListener('input', render);
}
renderPathways();
renderRefusals();
render();
} catch (err) {
fail(err.message);
}
</script>
</body>
</html>Grid Engine — Firm Capacity Page
A web page in GlobalGrid2050 covering transformers and substations, and uses data from the ventus-grid-engine repository. Published at https://globalgrid2050.com/grid_engine/202609060205-firm-capacity/.
renderglobalgrid2050 / grid_engine/202609060205-firm-capacity/index.html · lines 1–245 of 245 · version 2026-09-06 02:05 · Entry point · pattern parseUnits (shared by 7 files)
- What it does
- It draws transformers and substations. Defines 7 functions or classes, including el, num, fig, refuse, bind. Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- Domain terms in the code: transformers, substations.
- Inputs & outputs
- In: form fields (user input). Out: web page.
- Downstream impact
- Used directly by 3 files: Homepage V090 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v090.html); Homepage V091 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v091.html); Homepage V093 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v093.html). It is itself an entry point, published at https://globalgrid2050.com/grid_engine/202609060205-firm-capacity/.
- What it achieves
- It parses units (`parseUnits`) and is built from the num step (`num`) and the fig step (`fig`). Firm Capacity Workbench — Ventus Grid Engine. Its code works with 100 MW, 105.3 MVA and 30 MVA. It responds to input events.
- Why it matters
- Loaded by the Homepage V090 page at https://globalgrid2050.com/homepage_versions/homepage_v090.html and 2 other pages.
- Application
- globalgrid2050 · grid_engine/202609060205-firm-capacity · page
- Uses
- Firm Capacity (link), GlobalGrid2050 — Grid Engine Page (link), Papers — Published Fault Level Page (link)
- Used by
- linked from Homepage V090 (link), linked from Homepage V091 (link), linked from Homepage V093 (link), mentioned in Standalone (comment link)
- Produces
- el, num, fig, refuse, bind, parseUnits, render
- Defines here
- el, num, fig, refuse, bind, parseUnits, render
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 grid_engine/202609060205-firm-capacity/index.html:1-245 · blob 124f9b0d3cebfe043fa9fb57fa5c11f3890d3bb6 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom · domain stage: unknown · users: none · canonical: production_core
<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Firm Capacity Workbench — Ventus Grid Engine</title>
<style>
:root{--bg:#000;--panel:#0b0e14;--line:#2f343d;--soft:#222;--text:#fff;
--muted:#a6adbb;--accent:#00ffff;--ok:#00ff88;--warn:#ffae00;--no:#ff5c5c}
*{box-sizing:border-box;margin:0;padding:0;font-family:'Courier New',ui-monospace,monospace}
html,body{background:var(--bg);color:var(--text)}
body{font-size:14px;line-height:1.55;padding:0 0 48px}
.wrap{max-width:960px;margin:0 auto;padding:0 14px}
header{border-bottom:1px solid var(--soft);padding:18px 0 14px;margin-bottom:16px}
h1{font-size:17px;letter-spacing:2px;color:var(--accent)}
.sub{color:var(--muted);font-size:11px;margin-top:6px}
.stamp{color:#7f8996;font-size:10px;margin-top:8px;overflow-wrap:anywhere}
.status{border:1px solid var(--line);background:var(--panel);padding:9px 11px;
margin-bottom:16px;font-size:11px}
.status.live{border-color:#167d4d;color:var(--ok)}
.status.dead{border-color:#7d1616;color:var(--no)}
section{border:1px solid var(--soft);background:var(--panel);margin-bottom:16px}
h2{font-size:12px;letter-spacing:1.4px;color:var(--accent);padding:11px 13px;
border-bottom:1px solid var(--soft)}
.body{padding:13px}
.lede{color:var(--muted);font-size:11.5px;line-height:1.65;margin-bottom:13px}
label{display:block;color:var(--muted);font-size:10px;letter-spacing:.6px;
text-transform:uppercase;margin:0 0 5px}
.field{margin-bottom:13px}
input[type=number],input[type=text]{width:100%;background:#000;border:1px solid var(--line);
color:var(--text);padding:11px 10px;font-size:16px;font-weight:700}
input:focus{outline:none;border-color:var(--accent)}
input[type=range]{width:100%;accent-color:var(--accent);height:32px}
.rangerow{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.rangeval{color:var(--accent);font-weight:700;font-size:15px;white-space:nowrap}
.out{border:1px solid var(--line);background:#06080b;padding:11px;margin-top:11px}
.figure{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.figure .n{font-size:26px;font-weight:700;color:var(--ok);line-height:1.1}
.figure .n.over{color:var(--no)}
.figure .u{font-size:12px;color:var(--muted)}
.figure .q{font-size:10px;color:#7f8996;text-transform:uppercase;letter-spacing:.8px;
flex:1 0 100%;margin-bottom:3px}
.basis{color:#8e98a5;font-size:10.5px;line-height:1.65;margin-top:9px;
border-top:1px dashed #252a31;padding-top:8px}
.scroller{overflow-x:auto;-webkit-overflow-scrolling:touch}
table{width:100%;border-collapse:collapse;font-size:11px}
th{color:var(--accent);text-align:left;padding:7px 6px;border-bottom:1px solid var(--line);
font-size:10px;letter-spacing:.5px}
td{padding:7px 6px;border-bottom:1px solid #1a1e25;color:var(--muted)}
td.n{color:var(--text);font-weight:700;text-align:right;white-space:nowrap}
.refuse{border:1px solid #5c2020;background:#120708}
.refuse h2{color:#ff8f8f;border-bottom-color:#5c2020}
.refuse dt{color:#ff8f8f;font-size:11px;font-weight:700;margin-top:11px}
.refuse dt:first-child{margin-top:0}
.refuse dd{color:#c9a9a9;font-size:10.5px;line-height:1.65;margin-top:3px}
footer{color:#69727d;font-size:10.5px;line-height:1.9;padding-top:14px;
border-top:1px solid var(--soft);margin-top:20px}
/* Touch targets. Measured at 393px on 2026-09-06: footer links were 11.3px
tall, below the 24px WCAG 2.2 minimum. Inline links keep their flow but are
given real height through padding and line-height. */
footer a,.basis a{color:#66ccff;display:inline-block;padding:5px 2px;line-height:1.5}
.nav{margin-top:14px;font-size:11px}
.nav a{color:#66ccff;display:inline-block;padding:8px 10px 8px 0}
</style>
</head>
<body>
<div class="wrap">
<header>
<h1>FIRM CAPACITY WORKBENCH</h1>
<p class="sub">What a substation carries when one unit is out — the N-1 question</p>
<p class="stamp">Generation 202609060205 · engine firm-capacity.js at 294dcc0</p>
</header>
<div class="status" id="engine-status">Loading the engine module…</div>
<section>
<h2>1 · THE BANK — INSTALLED AGAINST FIRM</h2>
<div class="body">
<p class="lede">A substation's nameplate is the sum of its transformers. Its <strong>firm</strong>
capacity is what remains when the largest single unit is unavailable, because a
network planned to N-1 must survive the loss of any one element without shedding
load. Enter the transformer ratings, in MVA, separated by commas. A single
transformer returns zero firm capacity — that is the correct answer, not an error.</p>
<div class="field">
<label for="units">Transformer ratings (MVA, comma separated)</label>
<input type="text" id="units" value="30, 30" inputmode="text">
</div>
<div class="out" id="out-firm"></div>
</div>
</section>
<section>
<h2>2 · THE LOAD — MW TO MVA</h2>
<div class="body">
<p class="lede">Plant is limited by current, and current follows apparent power, not real power.
A 100 MW load at 0.95 power factor draws 105.3 MVA, and it is the 105.3 the
transformer has to carry. Sizing on MW alone under-counts by the reciprocal of the
power factor, every time.</p>
<div class="field">
<label for="mw">Real power (MW)</label>
<input type="number" id="mw" value="40" min="0.1" max="5000" step="0.1" inputmode="decimal">
</div>
<div class="field">
<div class="rangerow"><label for="pf">Power factor</label>
<span class="rangeval" id="pf-val">0.95</span></div>
<input type="range" id="pf" min="0.7" max="1" step="0.01" value="0.95">
</div>
<div class="out" id="out-mva"></div>
</div>
</section>
<section>
<h2>3 · THE N-1 ASSESSMENT</h2>
<div class="body">
<p class="lede">The question a planner actually asks: does this demand still sit inside firm
capacity, and by how much does it miss if not? The paper's worked substation grows
from 24 to 42 MVA on two 30 MVA units — a 75% increase that leaves installed
capacity looking comfortable at 70% while firm capacity is already 40% exceeded.
That gap is invisible if you look only at the total.</p>
<div class="out" id="out-assess"></div>
<div class="scroller"><table id="assess-table"><thead><tr><th>Measure</th><th style="text-align:right">Value</th><th style="text-align:right">Reading</th></tr></thead><tbody></tbody></table></div>
<p class="basis">The demand assessed is the MVA figure from panel 2, against the bank in panel 1.
Passing this arithmetic is not ER P2/7 compliance: a real security study also counts
transfer capacity from adjacent sites and permits interruption by group demand, so a
site can pass this and fail that, or fail this and remain compliant.</p>
</div>
</section>
<section class="refuse">
<h2>WHAT THIS WORKBENCH WILL NOT COMPUTE</h2>
<div class="body">
<p class="lede" style="color:#c9a9a9">These are not features missing from a later
version. The engine proof asserts that no function of these names exists, so
their absence is a tested property rather than an oversight.</p>
<dl id="refusals"></dl>
</div>
</section>
<footer>
<p>Every figure above is computed by
<a href="https://ventusltd.github.io/ventus-grid-engine/engine/firm-capacity.js">firm-capacity.js</a>
in the Ventus Grid Engine, imported at runtime and proven by 28 checks.
This page holds no copy of the mathematics: if the engine cannot be reached it
shows no numbers rather than a stale answer.</p>
<p class="nav">
<a href="../">All workbenches</a>
<a href="/papers/202609060203-electrification/">Electrification paper</a>
<a href="/papers/202609060045-published-fault-level/">Fault-level paper</a>
<a href="/">GlobalGrid2050</a></p>
<p style="margin-top:6px">Scenario arithmetic is not evidence of connection headroom.
A national load factor cannot establish utilisation at any particular transformer.</p>
</footer>
</div>
<script type="module">
const ENGINE = 'https://ventusltd.github.io/ventus-grid-engine/engine/firm-capacity.js';
const statusEl = document.getElementById('engine-status');
let E = null;
const el = id => document.getElementById(id);
const num = id => Number(el(id).value);
function fig(target, r, decimals = 1, over = false) {
el(target).innerHTML =
'<div class="figure">' +
'<span class="q">' + r.quantity.replace(/_/g, ' ') + '</span>' +
'<span class="n' + (over ? ' over' : '') + '">' +
r.value.toLocaleString('en-GB', { minimumFractionDigits: decimals, maximumFractionDigits: decimals }) +
'</span><span class="u">' + r.unit + '</span></div>' +
'<p class="basis">' + r.basis + '</p>';
}
function refuse(target, message) {
el(target).innerHTML = '<p class="basis" style="color:#ffae00;border:0;padding:0;margin:0">'
+ 'Engine refused this input: ' + message + '</p>';
}
function bind() {
['units','mw','pf'].forEach(id => el(id).addEventListener('input', render));
}
function parseUnits(raw) {
return raw.split(',').map(s => s.trim()).filter(Boolean).map(Number);
}
function render() {
el('pf-val').textContent = num('pf').toFixed(2);
let firm, mva;
try {
firm = E.firmCapacityMva({ units: parseUnits(el('units').value) });
fig('out-firm', firm, 1);
} catch (err) { refuse('out-firm', err.message); firm = null; }
try {
mva = E.apparentPowerMva({ mw: num('mw'), powerFactor: num('pf') });
fig('out-mva', mva, 2);
} catch (err) { refuse('out-mva', err.message); mva = null; }
const tb = document.querySelector('#assess-table tbody');
if (!firm || !mva) { tb.innerHTML = ''; el('out-assess').innerHTML =
'<p class="basis" style="border:0;padding:0;margin:0">Fix the inputs above to see the assessment.</p>'; return; }
try {
const a = E.assessAgainstFirm({ units: firm.from.units, demandMva: mva.value });
el('out-assess').innerHTML =
'<div class="figure"><span class="q">n-1 assessment</span>' +
'<span class="n' + (a.withinFirm ? '' : ' over') + '">' +
(a.withinFirm ? 'WITHIN FIRM' : a.withinInstalled ? 'BEYOND FIRM' : 'BEYOND INSTALLED') +
'</span></div><p class="basis">' + a.basis + '</p>';
tb.innerHTML = [
['Installed capacity', a.installedMva.toFixed(1) + ' MVA', 'sum of all units'],
['Firm capacity (N-1)', a.firmMva.toFixed(1) + ' MVA', 'largest unit out'],
['Demand', a.demandMva.toFixed(2) + ' MVA', 'from panel 2'],
['Utilisation of installed', (a.utilisationOfInstalled * 100).toFixed(1) + '%',
a.utilisationOfInstalled > 1 ? 'over' : 'looks comfortable'],
['Utilisation of firm', (a.utilisationOfFirm * 100).toFixed(1) + '%',
a.utilisationOfFirm > 1 ? 'EXCEEDED' : 'within'],
['Shortfall against firm', a.shortfallMva.toFixed(2) + ' MVA',
a.shortfallMva > 0 ? 'must be resolved' : 'none']
].map(r => '<tr><td>' + r[0] + '</td><td class="n">' + r[1] + '</td><td class="n" style="color:' +
(/EXCEEDED|over|must/.test(r[2]) ? '#ff5c5c' : '#8e98a5') + '">' + r[2] + '</td></tr>').join('');
} catch (err) { refuse('out-assess', err.message); }
}
try {
E = await import(ENGINE);
if (E.schema !== 'ventus-grid-engine.firm-capacity.v1') throw new Error('unexpected schema ' + E.schema);
statusEl.className = 'status live';
statusEl.textContent = 'ENGINE LIVE — ' + E.schema +
' · every figure below is computed by the engine module, not by this page.';
el('refusals').innerHTML = Object.entries(E.NOT_COMPUTED).map(([k, v]) =>
'<dt>' + k.replace(/([A-Z])/g, ' $1').toUpperCase() + '</dt><dd>' + v + '</dd>').join('');
bind();
render();
} catch (err) {
statusEl.className = 'status dead';
statusEl.textContent = 'ENGINE UNREACHABLE — ' + err.message +
'. Nothing on this page is computed; there is deliberately no local copy to fall back to.';
document.querySelectorAll('.out').forEach(o => {
o.innerHTML = '<p class="basis" style="color:#ff8f8f;border:0;padding:0;margin:0">'
+ 'No figure: the engine did not load.</p>'; });
}
</script>
</body>
</html>