From 5a956f1c82b10f4283fa8bbfd52fd9c6c2a39bd9 Mon Sep 17 00:00:00 2001 From: Louis Date: Sun, 8 Nov 2026 15:20:31 +0100 Subject: Add Panasonic Aquarea, hot water and PV, step-by-step layout - Panasonic Aquarea J (WH-MDC05/07/09J3E5) and L (WH-WDG05/07/09LE5) monobloc capacity and COP tables from the service manuals. - Optional hot water (daily demand charged 11-15 h MEZ with priority over heating) and PV with battery from DWD 10-minute global/diffuse irradiation, each switched on separately; surplus fed in or curtailed. - Inputs in five steps with the key figures always visible on top and the matching chart beside each step; full results in the last step. - Bisect the bivalence point so no hour at exactly that temperature is left uncovered (seen with 1 K bins). - Average the duration curve between sample points instead of picking single hours, which showed hot water hours as spikes. - Make the hidden attribute override label display rules. Co-Authored-By: Claude Opus 5.5 --- web/app.js | 420 +++++++++++++++++++++++++++++++++++++++++++++++++++------ web/devices.js | 90 +++++++++++++ web/index.html | 136 +++++++++++++++---- web/style.css | 91 +++++++++++-- 4 files changed, 663 insertions(+), 74 deletions(-) (limited to 'web') diff --git a/web/app.js b/web/app.js index 3f70176..6468943 100644 --- a/web/app.js +++ b/web/app.js @@ -53,10 +53,19 @@ const FUELS = { wood: { unit: "rm", kwh: 1700, price: 110, priceUnit: "€/rm", perPrice: 1700, scale: 1, eff: 80 }, }; +// hot water is charged daily in these hours (UTC), i.e. 11 to 15 h MEZ +const WW_HOURS = [10, 11, 12, 13]; +const WW_LIFT = 5; // flow temperature above the tank temperature +// PV module: temperature coefficient per K and cell heating per W/m² (NOCT 45 °C); +// the stored yield includes 14 % losses, so irradiance is yield / 0.86 +const PV_GAMMA = -0.004, PV_HEATING = 25 / 800, PV_PR = 0.86; +const BATTERY_EFF = Math.sqrt(0.9); // per direction, 90 % round trip + const fmt = (v, digits = 0) => v.toLocaleString("de-DE", { minimumFractionDigits: digits, maximumFractionDigits: digits }); -let meta, plzMap, stationById; +let meta, plzMap, stationById, pvStationById; const seriesCache = new Map(); +const pvCache = new Map(); let station = null; let tnEdited = false; let lastResult = null; @@ -78,6 +87,18 @@ async function loadSeries(id) { return seriesCache.get(id); } +/** Hourly PV yield in Wh/kWp of a solar station for one year, or null without data. */ +async function loadPv(id, year) { + if (!id) return null; + if (!pvCache.has(id)) { + pvCache.set(id, fetch(`data/pv/${id}.bin`).then(async (res) => new Uint16Array(await res.arrayBuffer()))); + } + const raw = await pvCache.get(id); + const i = meta.years.indexOf(year); + const slice = raw.subarray(i * meta.hours, (i + 1) * meta.hours); + return slice[0] === meta.pvMissing ? null : slice; +} + /** Heating degree hours below 15 °C, used to find the coldest and warmest year. */ function degreeHours(slice) { let sum = 0; @@ -122,6 +143,9 @@ function temperatures(slice, resolution) { * alternative mode, where it is the user's switching temperature. * Below the bivalence point the backup heater is released (always when monovalent, * i.e. monoenergetic with heater rod); load neither of them covers stays uncovered. + * Hot water has priority: in its charging hours it takes the share of the capacity it + * needs at its own flow temperature, and the backup heater covers what is left. Below the + * bivalence point that share is missing for heating and the backup heater covers it too. */ function model(p) { const dev = p.type === "air" && p.device !== "generic" ? DEVICES[p.device] : null; @@ -132,57 +156,84 @@ function model(p) { const f = 20 + ((p.flowN - 20) * (20 - t)) / (20 - p.tn); return Math.min(p.flowN, Math.max(25, f)); }; - let capacity; + let capacityAt; if (dev) { - capacity = (t) => (t < dev.tmin ? 0 : interpFlow(dev.cap, t, flow(t))); + capacityAt = (t, f) => (t < dev.tmin ? 0 : interpFlow(dev.cap, t, f)); } else { const pb = load(tb); - capacity = (t) => Math.max(0, pb * (1 + p.slope * (t - tb))); + capacityAt = (t) => Math.max(0, pb * (1 + p.slope * (t - tb))); } - // highest outdoor temperature at which the heat pump alone no longer covers the load + const capacity = (t) => capacityAt(t, flow(t)); + // outdoor temperature below which the heat pump alone no longer covers the load: + // scan down in 0.1 K steps, then bisect, so every colder temperature lies strictly below it + const short = (t) => capacity(t) < load(t) - 1e-9; let limit = null; - for (let t = p.thg; t >= -30; t -= 0.1) { - if (capacity(t) < load(t) - 1e-9) { limit = Math.round(t * 10) / 10; break; } + for (let k = 1; p.thg - k / 10 >= -30; k++) { + let lo = p.thg - k / 10, hi = p.thg - (k - 1) / 10; + if (!short(lo)) continue; + for (let i = 0; i < 40; i++) { + const mid = (lo + hi) / 2; + if (short(mid)) lo = mid; else hi = mid; + } + limit = hi; + break; } if (dev && p.mode !== "alternative") tb = limit ?? -Infinity; - const heatPump = (t) => { - if (p.mode === "alternative" && t < tb) return 0; - if (p.mode === "parallel" && Number.isFinite(p.cutoff) && t < p.cutoff) return 0; - return Math.min(load(t), capacity(t)); - }; + const running = (t) => !(p.mode === "alternative" && t < tb) && + !(p.mode === "parallel" && Number.isFinite(p.cutoff) && t < p.cutoff); + // `share` is the part of the hour the heat pump spends on hot water + const heatPump = (t, share = 0) => (running(t) ? Math.min(load(t), capacity(t) * (1 - share)) : 0); const backupAllowed = (t) => p.mode === "mono" || t < tb; - const cop = (t) => { - if (p.type === "air") return deviceCop(dev || DEVICES.lwm110, t, flow(t)); + const copAt = (t, f) => { + if (p.type === "air") return deviceCop(dev || DEVICES.lwm110, t, f); const [source, eta] = SOURCE[p.type]; - return Math.min(COP_MAX, eta * carnot(flow(t), source)); + return Math.min(COP_MAX, eta * carnot(f, source)); }; - return { dev, tb, pb: Number.isFinite(tb) ? capacity(tb) : 0, load, capacity, heatPump, backupAllowed, flow, cop, limit }; + const cop = (t) => copAt(t, flow(t)); + const wwFlow = p.wwTemp + WW_LIFT; + /** Hot water of one charging hour: heat pump part, its share of the hour and electricity. */ + const hotWater = (t, need) => { + const cap = running(t) ? capacityAt(t, wwFlow) : 0; + const hp = Math.min(need, cap); + return { hp, share: cap > 0 ? hp / cap : 0, el: hp > 0 ? hp / copAt(t, wwFlow) : 0 }; + }; + return { dev, tb, pb: Number.isFinite(tb) ? capacity(tb) : 0, load, capacity, heatPump, backupAllowed, flow, cop, limit, hotWater, wwFlow, copAt }; } function simulate(series, years, p) { const m = model(p); const n = years.length; + const wwNeed = p.hotWater ? p.ww / WW_HOURS.length : 0; const r = { years, n, tb: m.tb, pb: m.pb, model: m, params: p, q: 0, hp: 0, backup: 0, uncovered: 0, el: 0, peak: 0, heatingHours: 0, backupHours: 0, uncoveredHours: 0, cyclingHours: 0, belowTn: 0, + ww: 0, wwHp: 0, wwBackup: 0, elWw: 0, months: Array.from({ length: 12 }, () => ({ hp: 0, backup: 0, uncovered: 0 })), + wwMonths: Array.from({ length: 12 }, () => ({ hp: 0, backup: 0 })), els: new Float32Array(n * 8760), bins: new Map(), loads: new Float32Array(n * 8760), hps: new Float32Array(n * 8760), backs: new Float32Array(n * 8760), + wwHps: new Float32Array(n * 8760), + wwBacks: new Float32Array(n * 8760), temps: [], }; + const isWw = new Uint8Array(8760); + if (wwNeed > 0) for (let i = 0; i < 8760; i++) isWw[i] = WW_HOURS.includes(i % 24) ? 1 : 0; // temperatures repeat a lot (0.1 K resolution), so evaluate the model once per value - const cache = new Map(); - const evaluate = (t) => { - let v = cache.get(t); + const caches = [new Map(), new Map()]; + const evaluate = (t, ww) => { + let v = caches[ww].get(t); if (!v) { - const q = m.load(t), hp = m.heatPump(t); + const w = ww ? m.hotWater(t, wwNeed) : { hp: 0, share: 0, el: 0 }; + // above the bivalence point the heat pump catches up on the heating pause afterwards + const q = m.load(t), hp = m.heatPump(t, m.backupAllowed(t) ? w.share : 0); const backup = m.backupAllowed(t) ? q - hp : 0; - v = { q, hp, backup, uncovered: q - hp - backup, el: hp > 0 ? hp / m.cop(t) : 0 }; - cache.set(t, v); + v = { q, hp, backup, uncovered: q - hp - backup, el: hp > 0 ? hp / m.cop(t) : 0, + wwHp: w.hp, wwBackup: ww ? wwNeed - w.hp : 0, wwEl: w.el }; + caches[ww].set(t, v); } return v; }; @@ -190,17 +241,25 @@ function simulate(series, years, p) { const t = temperatures(series.get(year), p.resolution); r.temps.push(t); for (let i = 0; i < t.length; i++) { - const { q, hp, backup, uncovered, el } = evaluate(t[i]); - r.loads[y * 8760 + i] = q; - r.hps[y * 8760 + i] = hp; - r.backs[y * 8760 + i] = backup; + const { q, hp, backup, uncovered, el, wwHp, wwBackup, wwEl } = evaluate(t[i], isWw[i]); + const j = y * 8760 + i; + r.loads[j] = q; + r.hps[j] = hp; + r.backs[j] = backup; + r.els[j] = el + wwEl; + if (isWw[i]) { + r.wwHps[j] = wwHp; + r.wwBacks[j] = wwBackup; + r.ww += wwNeed; r.wwHp += wwHp; r.wwBackup += wwBackup; r.elWw += wwEl; + r.wwMonths[HOUR_MONTH[i]].hp += wwHp; + r.wwMonths[HOUR_MONTH[i]].backup += wwBackup; + } if (q <= 0) continue; - r.els[y * 8760 + i] = el; r.q += q; r.hp += hp; r.backup += backup; r.uncovered += uncovered; r.el += el; r.heatingHours++; if (backup > 1e-9) r.backupHours++; if (uncovered > 1e-9) r.uncoveredHours++; - if (m.dev && hp > 0 && hp < m.dev.pmin) r.cyclingHours++; + if (m.dev?.pmin && hp > 0 && hp < m.dev.pmin) r.cyclingHours++; if (t[i] < p.tn) r.belowTn++; if (q > r.peak) r.peak = q; r.months[HOUR_MONTH[i]].hp += hp; @@ -214,8 +273,8 @@ function simulate(series, years, p) { }); // per-year averages for (const k of ["q", "hp", "backup", "uncovered", "el", "heatingHours", "backupHours", - "uncoveredHours", "cyclingHours", "belowTn"]) r[k] /= n; - for (const month of r.months) for (const k in month) month[k] /= n; + "uncoveredHours", "cyclingHours", "belowTn", "ww", "wwHp", "wwBackup", "elWw"]) r[k] /= n; + for (const month of [...r.months, ...r.wwMonths]) for (const k in month) month[k] /= n; for (const bin of r.bins.values()) for (const k in bin) bin[k] /= n; r.jaz = r.el > 0 ? r.hp / r.el : 0; r.costHp = (r.el * p.priceEl) / 100; @@ -225,9 +284,77 @@ function simulate(series, years, p) { r.costBackup = (r.backupFuel / fuel.perPrice) * p.priceBackup * fuel.scale; const loadTn = m.load(p.tn); r.powerShareTn = loadTn > 0 ? m.heatPump(p.tn) / loadTn : 0; + // heating and hot water together + r.heat = r.q + r.ww; + r.hpAll = r.hp + r.wwHp; + r.backupAll = r.backup + r.wwBackup; + r.elAll = r.el + r.elWw; + r.jazWw = r.elWw > 0 ? r.wwHp / r.elWw : 0; + r.jazAll = r.elAll > 0 ? r.hpAll / r.elAll : 0; + r.backupFuelAll = r.backupAll / p.effBackup; + r.backupAmountAll = r.backupFuelAll / fuel.kwh; + r.costBackupAll = (r.backupFuelAll / fuel.perPrice) * p.priceBackup * fuel.scale; + r.cost = (r.elAll * p.priceEl) / 100 + r.costBackupAll; return r; } +/** + * Hourly electricity balance of heat pump and (electric backup only) heater rod with PV + * and battery. `pvData` holds the yield in Wh/kWp per simulated year, or null. + * The battery starts empty each year, charges only from surplus PV and is limited to 1 C. + */ +function balance(r, p, series, pvData) { + const n = r.n, cap = p.battery; + const electric = p.fuel === "electric"; + const b = { + pv: 0, direct: 0, charge: 0, discharge: 0, feed: 0, grid: 0, demand: 0, gridCost: 0, noPvCost: 0, + months: Array.from({ length: 12 }, () => ({ pv: 0, direct: 0, battery: 0, grid: 0 })), + pvs: new Float32Array(n * 8760), grids: new Float32Array(n * 8760), feeds: new Float32Array(n * 8760), + missingYears: r.years.filter((_, y) => !pvData[y]), + }; + r.years.forEach((year, y) => { + const yieldWh = pvData[y], temps = series.get(year); + let soc = 0; + for (let i = 0; i < 8760; i++) { + const j = y * 8760 + i; + const hp = r.els[j]; + const rod = electric ? (r.backs[j] + r.wwBacks[j]) / p.effBackup : 0; + const d = hp + rod; + let pv = 0; + if (yieldWh && yieldWh[i] > 0) { + const cell = temps[i] / 10 + (PV_HEATING * yieldWh[i]) / PV_PR; + pv = ((p.kwp * yieldWh[i]) / 1000) * (1 + PV_GAMMA * (cell - 25)); + } + const direct = Math.min(pv, d); + const charge = Math.min(pv - direct, (cap - soc) / BATTERY_EFF, cap); + soc += charge * BATTERY_EFF; + const discharge = Math.min(d - direct, soc * BATTERY_EFF, cap); + soc -= discharge / BATTERY_EFF; + const grid = d - direct - discharge; + const feed = pv - direct - charge; + // grid electricity is priced per consumer in proportion to its demand + const price = d > 0 ? (hp * p.priceEl + rod * p.priceBackup) / d : 0; + b.gridCost += (grid * price) / 100; + b.noPvCost += (hp * p.priceEl + rod * p.priceBackup) / 100; + b.pv += pv; b.direct += direct; b.charge += charge; b.discharge += discharge; + b.feed += feed; b.grid += grid; b.demand += d; + const month = b.months[HOUR_MONTH[i]]; + month.pv += pv; month.direct += direct; month.battery += discharge; month.grid += grid; + b.pvs[j] = pv; b.grids[j] = grid; b.feeds[j] = feed; + } + }); + for (const k of ["pv", "direct", "charge", "discharge", "feed", "grid", "demand", "gridCost", "noPvCost"]) b[k] /= n; + for (const month of b.months) for (const k in month) month[k] /= n; + b.selfShare = b.pv > 0 ? (b.pv - b.feed) / b.pv : 0; + b.autarky = b.demand > 0 ? (b.direct + b.discharge) / b.demand : 0; + b.revenue = p.feedOn ? (b.feed * p.feedIn) / 100 : 0; + b.cycles = cap > 0 ? b.discharge / cap : 0; + // electricity from the grid replaces the electricity costs; fuels stay as they are + b.cost = b.gridCost - b.revenue + (electric ? 0 : r.costBackupAll); + b.saving = r.cost - b.cost; + return b; +} + // ---------- form ---------- /** Number from an input; NaN when it is empty or not a valid number (e.g. while typing "-"). */ @@ -255,6 +382,15 @@ function params() { fuel: $("fuel").value, priceBackup: num("priceBackup"), effBackup: num("effBackup") / 100, + hotWater: $("wwOn").checked, + pv: $("pvOn").checked, + extra: $("wwOn").checked || $("pvOn").checked, + ww: num("ww"), + wwTemp: num("wwTemp"), + kwp: num("kwp"), + battery: num("battery"), + feedOn: $("feedOn").checked, + feedIn: num("feedIn"), }; } @@ -267,6 +403,9 @@ function validate(p) { ]; if (p.mode !== "mono" && manualTbiv) required.push(["tbiv", $("tbivLabel").textContent]); if (generic) required.push(["slope", "Leistungsänderung der WP"]); + if (p.hotWater) required.push(["ww", "Warmwasserbedarf"], ["wwTemp", "Speichertemperatur"]); + if (p.pv) required.push(["kwp", "PV-Anlage"], ["battery", "Batteriespeicher"]); + if (p.pv && p.feedOn) required.push(["feedIn", "Einspeisevergütung"]); for (const [key, label] of required) { if (!Number.isFinite(p[key])) return `Bitte eine gültige Zahl für „${label}“ eingeben.`; } @@ -274,6 +413,11 @@ function validate(p) { if (!(p.flowN >= 25 && p.flowN <= 65)) return "Vorlauftemperatur muss zwischen 25 und 65 °C liegen."; if (!(p.effBackup > 0)) return "Wirkungsgrad der Zusatzheizung muss größer als 0 sein."; if (!(p.tn < p.thg)) return "Norm-Außentemperatur muss unter der Heizgrenztemperatur liegen."; + if (p.hotWater) { + if (!(p.ww >= 0)) return "Warmwasserbedarf darf nicht negativ sein."; + if (!(p.wwTemp >= 40 && p.wwTemp <= 60)) return "Speichertemperatur muss zwischen 40 und 60 °C liegen."; + } + if (p.pv && (!(p.kwp >= 0) || !(p.battery >= 0))) return "PV-Leistung und Speicher dürfen nicht negativ sein."; if (p.mode !== "mono" && manualTbiv && !(p.tbiv < p.thg)) return `${$("tbivLabel").textContent} muss unter der Heizgrenztemperatur liegen.`; return null; } @@ -318,6 +462,62 @@ function updateFieldVisibility() { $("tbivLabel").textContent = device ? "Umschalttemperatur" : "Bivalenzpunkt"; $("cutoffField").hidden = mode !== "parallel"; $("cutoffField").nextElementSibling.hidden = mode !== "parallel"; + const ww = $("wwOn").checked, pv = $("pvOn").checked; + $("wwFields").hidden = !ww; + $("pvFields").hidden = !pv; + $("feedInField").hidden = !(pv && $("feedOn").checked); + $("summaryBlock").hidden = !(ww || pv); + $("extraBlock").hidden = !(ww || pv); + $("extraHeading").textContent = ww && pv ? "Warmwasser & PV" : ww ? "Warmwasser" : "PV und Speicher"; + $("wwFigure").hidden = !ww; + if (!pv) $("powerFigure").hidden = true; +} + +// ---------- steps ---------- + +const steps = [...document.querySelectorAll(".step")]; +const figures = [...document.querySelectorAll("figure[data-step]")]; +let step = 1; + +/** Show one step; charts sit beside the inputs they depend on and all together under Ergebnisse. */ +function showStep(n) { + step = Math.min(Math.max(n, 1), steps.length); + steps.forEach((s) => { s.hidden = +s.dataset.step !== step; }); + const last = step === steps.length; + for (const f of figures) { + const target = last ? `figs-${f.dataset.group}` : +f.dataset.step === step ? `aside-${step}` : "figures"; + $(target).append(f); + } + $("stepper").querySelectorAll("button").forEach((b) => { + const k = +b.dataset.step; + b.setAttribute("aria-current", k === step ? "step" : "false"); + b.classList.toggle("done", k < step); + if (k === step) b.scrollIntoView({ block: "nearest", inline: "nearest" }); + }); + $("prev").hidden = step === 1; + $("next").hidden = last; + if (!last) $("next").textContent = `Weiter: ${steps[step].dataset.title}`; + try { history.replaceState(null, "", `#${step}`); } catch {} +} + +function buildStepper() { + $("stepper").innerHTML = steps.map((s) => + ``).join(""); + $("stepper").querySelectorAll("button").forEach((b) => b.addEventListener("click", () => showStep(+b.dataset.step))); + $("prev").addEventListener("click", () => { showStep(step - 1); scrollTo({ top: 0 }); }); + $("next").addEventListener("click", () => { showStep(step + 1); scrollTo({ top: 0 }); }); + showStep(parseInt(location.hash.slice(1), 10) || 1); +} + +/** Solar station used for the most recent simulated year, with its distance. */ +function pvStationText(years) { + const id = station.pv?.[meta.years.indexOf(years[years.length - 1])]; + const s = id && pvStationById[id]; + if (!s) return null; + const rad = Math.PI / 180; + const a = Math.sin(((s.lat - station.lat) * rad) / 2) ** 2 + + Math.cos(station.lat * rad) * Math.cos(s.lat * rad) * Math.sin(((s.lon - station.lon) * rad) / 2) ** 2; + return `${s.name} (${fmt(12742 * Math.asin(Math.sqrt(a)), 0)} km von der Temperaturstation)`; } function onFuelChange(resetValues = true) { @@ -351,17 +551,34 @@ async function run() { const p = params(); const error = validate(p); // keep the last results visible but greyed out until the input is valid again - $("results").classList.toggle("stale", !!error); + document.body.classList.toggle("stale", !!error); if (error) { $("status").innerHTML = `${error}`; return; } const token = ++runToken; const series = await loadSeries(station.id); if (token !== runToken) return; - const years = scenarioYears(series, $("scenario").value); + let years = scenarioYears(series, $("scenario").value); + let pvData = null, pvOnly = false; + if (p.pv && p.kwp > 0) { + // with PV the mean covers only the years with irradiation data, so both sides match + const pvId = (year) => station.pv?.[meta.years.indexOf(year)]; + const withPv = years.filter(pvId); + if (years.length > 1 && withPv.length && withPv.length < years.length) { years = withPv; pvOnly = true; } + pvData = await Promise.all(years.map((year) => loadPv(pvId(year), year))); + if (token !== runToken) return; + } const r = simulate(series, years, p); + r.pv = pvData ? balance(r, p, series, pvData) : null; lastResult = r; $("status").textContent = years.length > 1 - ? `Mittelwerte über ${years.length} Jahre (${years[0]}–${years[years.length - 1]}), Station ${station.name}.` + ? `Mittelwerte über ${years.length} Jahre${pvOnly ? " mit Strahlungsdaten" : ""} (${years[0]}–${years[years.length - 1]}), Station ${station.name}.` : `Wetterjahr ${years[0]}, Station ${station.name}.`; + if (r.pv) { + const text = pvStationText(years); + if (text) $("status").textContent += ` Strahlung: ${text}.`; + if (r.pv.missingYears.length) { + $("status").innerHTML += ` Keine Strahlungsdaten (Station bis 100 km) für ${r.pv.missingYears.join(", ")}, dort ohne PV gerechnet.`; + } + } if (r.model.dev) { const auto = p.mode !== "alternative"; $("tbivHint").textContent = r.model.limit == null @@ -376,10 +593,15 @@ async function run() { if (r.uncovered > 0.5) { $("status").innerHTML += ` ${fmt(r.uncovered)} kWh/a nicht gedeckt: Die WP schafft die Heizlast oberhalb des Bivalenzpunkts nicht.`; } + renderPreview(r); renderKpis(r); renderDuration(r); renderBins(r); renderMonths(r); + if (p.extra) { + renderSummary(r); + renderExtra(r); + } } // ---------- output ---------- @@ -388,6 +610,22 @@ function kpi(label, value, sub = "", cls = "") { return `
${label}
${value}
${sub}
`; } +/** The few numbers that stay visible above every step. */ +function renderPreview(r) { + const p = r.params, b = r.pv; + const heat = p.extra ? r.heat : r.q, hp = p.extra ? r.hpAll : r.hp; + const el = p.extra ? r.elAll : r.el, jaz = p.extra ? r.jazAll : r.jaz; + const cost = b ? b.cost : p.extra ? r.cost : r.costHp + r.costBackup; + $("previewKpis").innerHTML = [ + kpi(p.hotWater ? "Wärmebedarf" : "Heizwärmebedarf", `${fmt(heat)} kWh/a`), + kpi("Deckungsanteil WP", `${fmt(heat > 0 ? (100 * hp) / heat : 0, 1)} %`, "", "hp"), + kpi("Jahresarbeitszahl", fmt(jaz, 2), "", "hp"), + b ? kpi("Autarkie Strom", `${fmt(100 * b.autarky, 1)} %`, "", "pv") : kpi("Strombedarf WP", `${fmt(el)} kWh/a`, "", "hp"), + Number.isFinite(r.tb) ? kpi("Bivalenzpunkt", `${fmt(r.tb, 1)} °C`, "", "backup") : kpi("Bivalenzpunkt", "keiner", "", "backup"), + kpi("Energiekosten", `${fmt(cost)} €/a`), + ].join(""); +} + function renderKpis(r) { const share = (x) => (r.q > 0 ? (100 * x) / r.q : 0); const p = r.params; @@ -408,11 +646,58 @@ function renderKpis(r) { (r.model.dev && p.mode === "alternative" && r.model.limit != null ? ` · Leistungsgrenze ${fmt(r.model.limit, 1)} °C` : "")) : kpi("Bivalenzpunkt", "keiner", "WP deckt die Heizlast allein"), kpi("Heizstunden", `${fmt(r.heatingHours)} h/a`, `davon ${fmt(r.backupHours)} h mit Zusatzheizung` + - (r.model.dev ? `, ${fmt(r.cyclingHours)} h unter Mindestleistung ${fmt(r.model.dev.pmin, 1)} kW (Takten)` : "")), + (r.model.dev?.pmin ? `, ${fmt(r.cyclingHours)} h unter Mindestleistung ${fmt(r.model.dev.pmin, 1)} kW (Takten)` : "")), kpi("Stunden unter Norm-Außentemp.", `${fmt(r.belowTn)} h/a`, `max. Heizlast ${fmt(r.peak, 1)} kW`), ].join(""); } +/** Heating and hot water together, with PV and battery if there are any. */ +function renderSummary(r) { + const p = r.params, b = r.pv, fuel = FUELS[p.fuel]; + const share = (x) => (r.heat > 0 ? (100 * x) / r.heat : 0); + const uncovered = r.uncovered; + const cost = b ? b.cost : r.cost; + $("summaryKpis").innerHTML = [ + kpi("Wärmebedarf gesamt", `${fmt(r.heat)} kWh/a`, p.hotWater ? `Heizung ${fmt(r.q)} · Warmwasser ${fmt(r.ww)} kWh` : "nur Heizung"), + kpi("Deckungsanteil Wärmepumpe", `${fmt(share(r.hpAll), 1)} %`, `${fmt(r.hpAll)} kWh/a`, "hp"), + kpi("Deckungsanteil Zusatzheizung", `${fmt(share(r.backupAll), 1)} %`, `${fmt(r.backupAll)} kWh/a`, "backup"), + uncovered > 0.5 ? kpi("Nicht gedeckt", `${fmt(share(uncovered), 1)} %`, `${fmt(uncovered)} kWh/a Heizung`, "uncovered") : "", + kpi("Jahresarbeitszahl WP", fmt(r.jazAll, 2), p.hotWater ? `Heizung ${fmt(r.jaz, 2)} · Warmwasser ${fmt(r.jazWw, 2)}` : "", "hp"), + kpi("Strombedarf WP", `${fmt(r.elAll)} kWh/a`, p.hotWater ? `Heizung ${fmt(r.el)} · Warmwasser ${fmt(r.elWw)} kWh` : "", "hp"), + kpi(`Endenergie ${$("fuel").selectedOptions[0].text}`, + `${fmt(r.backupAmountAll, fuel.unit === "rm" ? 1 : 0)} ${fuel.unit}/a`, + `${p.fuel === "electric" ? "" : `${fmt(r.backupFuelAll)} kWh · `}${fmt(r.costBackupAll)} €/a${p.fuel === "electric" && b ? " ohne PV" : ""}`, "backup"), + b ? kpi("Autarkie Strom", `${fmt(100 * b.autarky, 1)} %`, `Netzbezug ${fmt(b.grid)} von ${fmt(b.demand)} kWh/a`, "pv") : "", + kpi("Energiekosten gesamt", `${fmt(cost)} €/a`, + `${fmt(r.heat > 0 ? (100 * cost) / r.heat : 0, 1)} ct/kWh Wärme` + (b ? ` · ohne PV ${fmt(r.cost)} €/a` : "")), + ].join(""); +} + +function renderExtra(r) { + const p = r.params, b = r.pv; + const wwShare = r.ww > 0 ? (100 * r.wwHp) / r.ww : 0; + $("extraKpis").innerHTML = [ + ...(p.hotWater ? [ + kpi("Warmwasser", `${fmt(r.ww)} kWh/a`, `Vorlauf ${fmt(r.model.wwFlow)} °C`, "ww"), + kpi("Warmwasser durch WP", `${fmt(wwShare, 1)} %`, `Zusatzheizung ${fmt(r.wwBackup)} kWh/a`, "ww"), + kpi("Arbeitszahl Warmwasser", fmt(r.jazWw, 2), `Strom ${fmt(r.elWw)} kWh/a`, "ww"), + ] : []), + ...(b ? [ + kpi("PV-Ertrag", `${fmt(b.pv)} kWh/a`, `${fmt(p.kwp > 0 ? b.pv / p.kwp : 0)} kWh/kWp`, "pv"), + kpi("Eigenverbrauch", `${fmt(100 * b.selfShare, 1)} %`, `${fmt(b.pv - b.feed)} kWh/a genutzt`, "pv"), + kpi("Autarkie Strom", `${fmt(100 * b.autarky, 1)} %`, `direkt ${fmt(b.direct)} · Speicher ${fmt(b.discharge)} kWh/a`, "pv"), + kpi("Netzbezug", `${fmt(b.grid)} kWh/a`, `${fmt(b.gridCost)} €/a`), + p.feedOn ? kpi("Einspeisung", `${fmt(b.feed)} kWh/a`, `${fmt(b.revenue)} €/a Vergütung`) + : kpi("Abgeregelt", `${fmt(b.feed)} kWh/a`, "ohne Einspeisung, keine Vergütung"), + p.battery > 0 ? kpi("Speicher", `${fmt(b.cycles)} Vollzyklen/a`, `${fmt(b.discharge)} kWh/a entladen`) : "", + kpi("Ersparnis durch PV", `${fmt(b.saving)} €/a`, p.feedOn ? "Strom für WP und Heizstab inkl. Einspeisung" : "Strom für WP und Heizstab"), + ] : []), + ].join(""); + $("powerFigure").hidden = !b; + if (b) renderPower(r); + if (p.hotWater) renderWwMonths(r); +} + const W = 760, H = 280, PAD = { l: 62, r: 12, t: 10, b: 32 }; function niceMax(v) { @@ -468,13 +753,20 @@ function renderDuration(r) { const yMax = niceMax(r.peak); const px = (h) => PAD.l + (iw * h) / xMax, py = (v) => PAD.t + ih - (ih * v) / yMax; const loadPts = [], coveredPts = [], hpPts = []; + // each point averages the hours up to the next one, so single hours (e.g. hot water + // charging) don't show up as spikes + const index = (s) => Math.min(total, Math.floor(((s / steps) * xMax) * r.n)); for (let s = 0; s <= steps; s++) { - const idx = Math.min(total - 1, Math.floor(((s / steps) * xMax) * r.n)); - const i = order[idx]; - const h = (s / steps) * xMax; - loadPts.push(`${px(h)},${py(r.loads[i])}`); - coveredPts.push(`${px(h)},${py(r.hps[i] + r.backs[i])}`); - hpPts.push(`${px(h)},${py(r.hps[i])}`); + const a = Math.min(total - 1, index(s)), b = Math.max(a + 1, index(s + 1)); + let load = 0, hp = 0, back = 0; + for (let k = a; k < b; k++) { + const i = order[k]; + load += r.loads[i]; hp += r.hps[i]; back += r.backs[i]; + } + const h = (s / steps) * xMax, c = b - a; + loadPts.push(`${px(h)},${py(load / c)}`); + coveredPts.push(`${px(h)},${py((hp + back) / c)}`); + hpPts.push(`${px(h)},${py(hp / c)}`); } const base = `${px(xMax)},${py(0)} ${px(0)},${py(0)}`; const ticks = []; @@ -545,6 +837,45 @@ function renderMonths(r) { legend(energyLegend(r)); } +/** Monthly electricity demand split into PV direct, battery and grid, PV yield as a line. */ +function renderPower(r) { + const b = r.pv; + const iw = W - PAD.l - PAD.r, ih = H - PAD.t - PAD.b, bw = iw / 12; + const yMax = niceMax(Math.max(...b.months.map((m) => Math.max(m.pv, m.direct + m.battery + m.grid)))); + const py = (v) => PAD.t + ih - (ih * v) / yMax; + let bars = ""; + const ticks = [], line = []; + b.months.forEach((m, i) => { + const x = PAD.l + i * bw; + ticks.push([x + bw / 2, MONTH_NAMES[i]]); + line.push(`${x + bw / 2},${py(m.pv)}`); + bars += `${MONTH_NAMES[i]}: PV direkt ${fmt(m.direct)} kWh, Speicher ${fmt(m.battery)} kWh, Netz ${fmt(m.grid)} kWh, PV-Ertrag ${fmt(m.pv)} kWh` + + stack(x + 4, bw - 8, py, [["pv", m.direct], ["battery", m.battery], ["grid-el", m.grid]]) + ``; + }); + $("power").innerHTML = + `` + + axes(ticks, yMax, "Strom [kWh]", "") + bars + `` + + legend([["pv", "PV direkt"], ["battery", "aus Speicher"], ["grid-el", "Netzbezug"], ["pv", "PV-Ertrag (Linie)"]]); +} + +function renderWwMonths(r) { + const iw = W - PAD.l - PAD.r, ih = H - PAD.t - PAD.b, bw = iw / 12; + const yMax = niceMax(Math.max(...r.wwMonths.map((m) => m.hp + m.backup))); + const py = (v) => PAD.t + ih - (ih * v) / yMax; + let bars = ""; + const ticks = []; + r.wwMonths.forEach((m, i) => { + const x = PAD.l + i * bw; + ticks.push([x + bw / 2, MONTH_NAMES[i]]); + bars += `${MONTH_NAMES[i]}: WP ${fmt(m.hp)} kWh, Zusatz ${fmt(m.backup)} kWh` + + stack(x + 4, bw - 8, py, [["ww", m.hp], ["backup", m.backup]]) + ``; + }); + $("wwMonths").innerHTML = + `` + + axes(ticks, yMax, "Wärme [kWh]", "") + bars + `` + + legend([["ww", "Wärmepumpe"], ["backup", "Zusatzheizung"]]); +} + // ---------- export ---------- function download(name, rows) { @@ -571,13 +902,16 @@ function exportBins() { function exportHours() { const r = lastResult; if (!r) return; - const rows = [["Jahr", "Monat", "Tag", "Stunde (UTC)", "Außentemperatur °C", "Heizlast kW", "WP kW", "Zusatzheizung kW", "nicht gedeckt kW", "Strom WP kW"]]; + const ww = r.params.hotWater, b = r.pv; + const rows = [["Jahr", "Monat", "Tag", "Stunde (UTC)", "Außentemperatur °C", "Heizlast kW", "WP kW", "Zusatzheizung kW", "nicht gedeckt kW", "Strom WP kW", + ...(ww ? ["Warmwasser WP kW", "Warmwasser Zusatz kW"] : []), ...(b ? ["PV kW", "Netzbezug kW", r.params.feedOn ? "Einspeisung kW" : "Abgeregelt kW"] : [])]]; r.years.forEach((year, y) => { let i = 0; MONTH_DAYS.forEach((days, month) => { for (let d = 1; d <= days; d++) for (let h = 0; h < 24; h++, i++) { const j = y * 8760 + i, q = r.loads[j], hp = r.hps[j], backup = r.backs[j]; - rows.push([year, month + 1, d, h, r.temps[y][i], q, hp, backup, q - hp - backup, r.els[j]]); + rows.push([year, month + 1, d, h, r.temps[y][i], q, hp, backup, q - hp - backup, r.els[j], + ...(ww ? [r.wwHps[j], r.wwBacks[j]] : []), ...(b ? [b.pvs[j], b.grids[j], b.feeds[j]] : [])]); } }); }); @@ -592,6 +926,7 @@ async function init() { fetch("data/plz.json").then((r) => r.json()), ]); stationById = Object.fromEntries(meta.stations.map((s) => [s.id, s])); + pvStationById = Object.fromEntries((meta.pvStations || []).map((s) => [s.id, s])); $("plz").addEventListener("input", () => { showLocation(); scheduleRun(); }); $("tn").addEventListener("input", () => { tnEdited = true; }); @@ -613,6 +948,7 @@ async function init() { $("form").addEventListener("submit", (e) => e.preventDefault()); $("exportBins").addEventListener("click", exportBins); $("exportHours").addEventListener("click", exportHours); + buildStepper(); showLocation(); run(); diff --git a/web/devices.js b/web/devices.js index b41a2cc..54f447f 100644 --- a/web/devices.js +++ b/web/devices.js @@ -7,6 +7,12 @@ // section 2.1 (EN 14511, 60 Hz) where those exist. // pmin: minimum heating capacity in kW; tmin: lowest outdoor temperature for heating. // Points are [outdoor °C, value]. +// +// Panasonic Aquarea, from the heating capacity tables of the service manuals (capacity and +// input power, COP = capacity / input power; points at +2 °C include defrost): +// - Generation J monobloc WH-MDC05/07/09J3E5: PAPAMY2003034CE. +// - Generation L WH-WDG05/07/09LE5 (with WH-SDC0509L3E5): PAPAMY2307068CE. +// Panasonic does not publish a minimum capacity, so pmin is missing for them. const DEVICES = { lwm80: { name: "Remko LWM 80", @@ -53,4 +59,88 @@ const DEVICES = { 55: [[-15, 2.12], [-12, 2.27], [-10, 2.38], [-7, 2.51], [-5, 2.57], [-2, 2.68], [0, 2.74], [5, 2.97], [7, 3.13], [10, 3.37], [12, 3.54]], }, }, + mdc05j: { + name: "Panasonic WH-MDC05J3E5", + tmin: -20, + cap: { + 35: [[-20, 4.16], [-15, 5], [-7, 5], [2, 5], [7, 5], [25, 5.04]], + 45: [[-20, 3.84], [-15, 4.75], [-7, 4.8], [2, 5], [7, 5], [25, 5.31]], + 55: [[-20, 3.43], [-15, 3.7], [-7, 5], [2, 5], [7, 5], [25, 5.61]], + }, + cop: { + 35: [[-20, 2.05], [-15, 2.3], [-7, 2.78], [2, 3.57], [7, 5.05], [25, 5.6]], + 45: [[-20, 1.62], [-15, 1.89], [-7, 2.22], [2, 2.76], [7, 3.82], [25, 4.58]], + 55: [[-20, 1.3], [-15, 1.51], [-7, 1.85], [2, 2.27], [7, 3.01], [25, 4.19]], + }, + }, + mdc07j: { + name: "Panasonic WH-MDC07J3E5", + tmin: -20, + cap: { + 35: [[-20, 4.66], [-15, 5.6], [-7, 6.8], [2, 7], [7, 7], [25, 6.67]], + 45: [[-20, 4.44], [-15, 5.3], [-7, 6.3], [2, 6.85], [7, 7], [25, 6.79]], + 55: [[-20, 4.23], [-15, 5], [-7, 6.3], [2, 6.3], [7, 7], [25, 6.7]], + }, + cop: { + 35: [[-20, 1.98], [-15, 2.33], [-7, 2.81], [2, 3.4], [7, 4.76], [25, 7.17]], + 45: [[-20, 1.61], [-15, 1.87], [-7, 2.23], [2, 2.74], [7, 3.57], [25, 4.92]], + 55: [[-20, 1.35], [-15, 1.51], [-7, 1.86], [2, 2.16], [7, 2.82], [25, 3.72]], + }, + }, + mdc09j: { + name: "Panasonic WH-MDC09J3E5", + tmin: -20, + cap: { + 35: [[-20, 6.43], [-15, 7.6], [-7, 7.5], [2, 7.45], [7, 9], [25, 7.88]], + 45: [[-20, 5.78], [-15, 7], [-7, 7.3], [2, 7], [7, 9], [25, 8.46]], + 55: [[-20, 4.83], [-15, 5.6], [-7, 7], [2, 7], [7, 8.95], [25, 7.6]], + }, + cop: { + 35: [[-20, 1.79], [-15, 2.23], [-7, 2.63], [2, 3.13], [7, 4.48], [25, 5.97]], + 45: [[-20, 1.51], [-15, 1.89], [-7, 2.17], [2, 2.46], [7, 3.45], [25, 4.55]], + 55: [[-20, 1.33], [-15, 1.47], [-7, 1.8], [2, 2.12], [7, 2.78], [25, 3.74]], + }, + }, + wdg05l: { + name: "Panasonic WH-WDG05LE5", + tmin: -25, + cap: { + 35: [[-25, 2.45], [-20, 4.7], [-15, 5], [-7, 5], [2, 5], [7, 5], [25, 5]], + 45: [[-25, 3.8], [-20, 4.5], [-15, 5], [-7, 5], [2, 5], [7, 5], [25, 5]], + 55: [[-25, 3.6], [-20, 4.25], [-15, 5], [-7, 5], [2, 5], [7, 5], [25, 5]], + }, + cop: { + 35: [[-25, 1.39], [-20, 2.15], [-15, 2.58], [-7, 3.01], [2, 3.52], [7, 5.05], [25, 8.33]], + 45: [[-25, 1.65], [-20, 1.9], [-15, 2.16], [-7, 2.58], [2, 2.92], [7, 3.94], [25, 5.81]], + 55: [[-25, 1.46], [-20, 1.65], [-15, 1.9], [-7, 2.12], [2, 2.34], [7, 3.07], [25, 4.55]], + }, + }, + wdg07l: { + name: "Panasonic WH-WDG07LE5", + tmin: -25, + cap: { + 35: [[-25, 4.75], [-20, 5.5], [-15, 6], [-7, 5.8], [2, 6.85], [7, 7], [25, 7]], + 45: [[-25, 4.3], [-20, 5.1], [-15, 5.5], [-7, 5.8], [2, 6.6], [7, 7], [25, 7]], + 55: [[-25, 3.95], [-20, 4.9], [-15, 5.2], [-7, 5.8], [2, 6.25], [7, 7], [25, 7]], + }, + cop: { + 35: [[-25, 1.88], [-20, 2.15], [-15, 2.4], [-7, 3.01], [2, 3.42], [7, 4.93], [25, 8.64]], + 45: [[-25, 1.62], [-20, 1.85], [-15, 2.12], [-7, 2.5], [2, 2.82], [7, 3.68], [25, 5.69]], + 55: [[-25, 1.42], [-20, 1.65], [-15, 1.8], [-7, 2.12], [2, 2.34], [7, 2.98], [25, 4.24]], + }, + }, + wdg09l: { + name: "Panasonic WH-WDG09LE5", + tmin: -25, + cap: { + 35: [[-25, 6.05], [-20, 7], [-15, 7.4], [-7, 7], [2, 7], [7, 9], [25, 9]], + 45: [[-25, 5.25], [-20, 6.2], [-15, 6.8], [-7, 7], [2, 7], [7, 9], [25, 9]], + 55: [[-25, 4.65], [-20, 5.6], [-15, 6.3], [-7, 7], [2, 7], [7, 8.9], [25, 9]], + }, + cop: { + 35: [[-25, 1.76], [-20, 1.97], [-15, 2.31], [-7, 2.8], [2, 3.41], [7, 4.55], [25, 7.03]], + 45: [[-25, 1.6], [-20, 1.77], [-15, 2], [-7, 2.35], [2, 2.8], [7, 3.49], [25, 5.2]], + 55: [[-25, 1.48], [-20, 1.63], [-15, 1.77], [-7, 2.13], [2, 2.41], [7, 3.03], [25, 4.09]], + }, + }, }; diff --git a/web/index.html b/web/index.html index bc22366..d3a0dbf 100644 --- a/web/index.html +++ b/web/index.html @@ -12,8 +12,16 @@

Heizwärmebedarf und Aufteilung Wärmepumpe / Zusatzheizung für jede Postleitzahl in Deutschland, auf Basis stündlicher DWD-Messwerte 2007–2025.

+
+
+
Lade Daten …
+
+ + +
-
+ + + + + +
+ -
-
Lade Daten …
+ + + + +
+ + +
+ +
+

Vereinfachtes Modell: Heizlast linear zwischen Norm-Heizlast bei Norm-Außentemperatur und 0 bei Heizgrenztemperatur. Wetterdaten: Deutscher Wetterdienst (DWD Climate Data Center, Stundenwerte Lufttemperatur, 10-Minuten-Werte Global- und Diffusstrahlung), Postleitzahlen: GeoNames (CC BY 4.0). Die Norm-Außentemperatur der Station ist eine Schätzung aus den Messdaten, nicht der Wert nach DIN/TS 12831-1.

+
diff --git a/web/style.css b/web/style.css index 20d6574..8d529fe 100644 --- a/web/style.css +++ b/web/style.css @@ -8,6 +8,10 @@ --backup: #d9822b; --uncovered: #c0392b; --accent: #2f7d6d; + --ww: #3d7cc9; + --pv: #d4a017; + --battery: #7a9a3a; + --grid-el: #8a8f8c; } @media (prefers-color-scheme: dark) { :root { @@ -20,9 +24,14 @@ --backup: #e89a4c; --uncovered: #e06456; --accent: #4fb39d; + --ww: #6aa2e8; + --pv: #e8c04a; + --battery: #9cbf5a; + --grid-el: #7b817e; } } * { box-sizing: border-box; } +[hidden] { display: none !important; } body { margin: 0; background: var(--bg); @@ -32,16 +41,75 @@ body { header { padding: 24px 16px 8px; max-width: 1200px; margin: 0 auto; } h1 { margin: 0 0 4px; font-size: 1.5rem; } header p { margin: 0; color: var(--muted); } -main { +main, footer { max-width: 1200px; margin: 0 auto; padding: 0 16px 16px; } +.preview { + position: sticky; + top: 0; + z-index: 2; + background: var(--bg); + border-bottom: 1px solid var(--line); + padding: 10px max(16px, calc((100% - 1200px) / 2 + 16px)) 8px; +} +.kpis.compact { grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0 0 6px; gap: 8px; } +.kpis.compact .kpi { padding: 6px 10px; } +.kpis.compact .value { font-size: 1.1rem; } +.kpis.compact .sub { display: none; } +@media (max-width: 800px) { + .kpis.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; } + .kpis.compact .kpi { padding: 4px 6px; } + .kpis.compact .label { font-size: 0.68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } + .kpis.compact .value { font-size: 0.92rem; white-space: nowrap; } + .preview #status { font-size: 0.72rem; } +} +.stepper { + display: flex; + gap: 4px; + max-width: 1200px; + margin: 14px auto; + padding: 0 16px; + overflow-x: auto; +} +.stepper button { + flex: 1 0 auto; + display: flex; + align-items: center; + gap: 8px; + border: 0; + border-bottom: 3px solid var(--line); + border-radius: 0; + background: none; + color: var(--muted); + padding: 6px 4px 8px; + white-space: nowrap; +} +.stepper .num { + display: inline-grid; + place-items: center; + width: 22px; + height: 22px; + border-radius: 50%; + border: 1px solid var(--line); + font-size: 0.8rem; +} +.stepper button.done { border-bottom-color: var(--hp); color: var(--text); } +.stepper button.done .num { background: var(--hp); border-color: var(--hp); color: var(--panel); } +.stepper button[aria-current="step"] { border-bottom-color: var(--accent); color: var(--text); font-weight: 600; } +.stepper button[aria-current="step"] .num { border-color: var(--accent); color: var(--accent); } +.step:not([hidden]) { display: grid; - grid-template-columns: 320px 1fr; + grid-template-columns: 340px minmax(0, 1fr); gap: 20px; - max-width: 1200px; - margin: 0 auto; - padding: 16px; + align-items: start; } -@media (max-width: 800px) { main { grid-template-columns: 1fr; } } -form, #results { min-width: 0; } +.step:not(:has(aside)), .step.results { grid-template-columns: minmax(0, 560px); } +.step.results:not([hidden]) { display: block; } +@media (max-width: 800px) { .step:not([hidden]) { grid-template-columns: minmax(0, 1fr); } } +.step fieldset { margin: 0; } +h2 { font-size: 1.1rem; margin: 18px 0 0; } +.results h2:first-child, .results > div:first-child h2 { margin-top: 0; } +.step-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; } +.step-nav #next { margin-left: auto; } +button.primary { background: var(--accent); border-color: var(--accent); color: var(--panel); } fieldset { border: 1px solid var(--line); background: var(--panel); @@ -117,4 +185,11 @@ figcaption { font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; } .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; } button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--panel); } -#results.stale > :not(#status) { opacity: 0.35; pointer-events: none; } +body.stale .kpis, body.stale figure { opacity: 0.35; } +.chart .ww { fill: var(--ww); } +.chart .pv { fill: var(--pv); } +.chart .battery { fill: var(--battery); } +.chart .grid-el { fill: var(--grid-el); } +.chart .pvline { stroke: var(--pv); stroke-width: 2; fill: none; } +.kpi.pv { border-left: 4px solid var(--pv); } +.kpi.ww { border-left: 4px solid var(--ww); } -- cgit v1.3