Time--
Outdoor--
Indoor--
Price--
Grid--
Loading 3D house model...

Home Energy Hub: Solar, Battery, Heat Pump and EV Dispatch Lab Blender 5.2

Hourly dispatch of rooftop PV, a home battery, an air-source heat pump (COP vs outdoor temperature), an EV charger and a time-of-use tariff.

Presets

Day

Cloudiness shift

Dispatch strategy

Equipment

Today

Power flows (kW)

PVBattery outGrid importExportBattery inDemand

Battery state and price

Stored energy (kWh)Import price (p/kWh)

House temperature and COP

IndoorOutdoorCOP (x1)

Self-checks

12 typical days, weighted by month length

Monthly bill and PV

Net bill (GBP)PV generation (kWh x0.1)Heat pump elec. (kWh x0.1)

Strategy comparison (same equipment)

Payback

PV cost (GBP per kWp)
Battery cost (GBP per kWh)

Experiment: how big should the battery be?

Sweeps the battery from 0 to 20 kWh with everything else (strategy, tariff, PV, climate) as set now, and finds the size with the best simple payback and the size where each extra kWh stops paying for itself.
Press the button.

Experiment: heat pump COP vs outdoor temperature

The science

Solar generation

Sun geometry: cos z = sinφ sinδ + cosφ cosδ cosω with declination δ = 23.45° sin(2π(284+n)/365). Clear-sky beam DNI = 1353 · 0.7^(AM^0.678) (Meinel), air mass AM = 1/cos z, diffuse taken as 10 % of beam. Plane-of-array irradiance on a 35° south roof uses the incidence-angle cosine plus sky-diffuse and ground-reflected parts. Clouds multiply by 1 - 0.8 c^1.5, so the weather is a smooth monthly mean, not a random day. Output: P = kWp · G/1000 · (1 - 0.0035(Tcell - 25)) · 0.88 · 0.97 with Tcell = Ta + 0.031 G.

Heat pump

Real heat pumps reach a fraction of the Carnot limit: COP = η (Tsup+273.15)/(Tsup - Tout + 7) with η = 0.45 and a 7 % frosting/defrost penalty between -2 and 5 °C. Weather compensation sets the flow temperature Tsup = 26 + 0.7(Tset - Tout) (28-50 °C), so colder weather means both a bigger heat demand and a lower COP. Capacity falls about 2.7 % per kelvin below 7 °C. Hot water is made at 55 °C, which has a lower COP than space heating. A 3 kW resistive backup only starts when the house is more than 1 K below target.

House as a thermal battery

One-node model: C dT/dt = Qhp + Qgain - UA (T - Tout), solved exactly over each 15-minute step as T = Teq + (T0 - Teq) e^(-Δt/τ), τ = C/UA. A large τ lets tariff shifting pre-heat the building when power is cheap and coast through the evening peak.

Dispatch

  • Baseline: EV charges on arrival, battery greedy.
  • Self-consumption: EV takes rooftop surplus first.
  • Tariff shifting: cheapest-slot EV and hot water, battery charges in cheap slots, house pre-heated +1 K in cheap slots and -1 K in peak slots.
  • Optimised: dynamic programming over a 41-level battery state of charge. The cost-to-go is Vt(E) = minE' [ price(t) · grid kWh + Vt+1(E') ] with efficiency, power and 10 % reserve limits, and the day must end with at least the starting charge. It uses perfect foresight of the day, so it is an upper bound on what a real forecast-driven controller achieves.

Energy balance (the check)

Every 15 minutes the bus must balance: PV + import + discharge = load + export + charge. Over a day, the stored-energy state is tracked separately, and Σ(PV + import) - Σ(load + export) = ΔEstored + Σ battery losses must close to rounding error. The thermal solver is also compared against a 1-minute explicit Euler integration.

Economics

Bill = import × price - export × export price + 55p/day standing charge. Payback = (PV + battery cost) / (annual bill of the same home without PV or battery - annual bill now). Tariffs are illustrative GB-style numbers, not any supplier's offer.

Simplifications

  • One typical day per month; weekends, heat waves and random cloud are not modelled; no cooling or summer air conditioning.
  • Battery degradation, inverter clipping details, grid export limits, standing-charge changes and EV driving variability are ignored.
  • "PV self-consumption" counts every exported kWh up to the PV total, so grid arbitrage exports lower it.
  • Prices, costs and climate are illustrative; real savings depend on your tariff and roof.
Made with 🟠 Blender · Three.js