Engineering · Simulator 083
An off-grid home runs on solar panels and a battery. The sun shines at midday, but people use the most power in the morning and evening. Change the panel size, battery capacity and power limit, efficiency and weather, then watch the battery fill and empty, and count the hours when the lights go out.
Class 11–12CollegeBuilds on Class 12 Chemistry: Electrochemistry (batteries)
Every few minutes the model compares solar generation G and load L:
G > L: charge with min(G − L, P_max, room left); the rest is spilled
G < L: discharge min(L − G, P_max, energy stored); anything still missing is unmet demand
The state of charge (SOC) is the energy stored as a share of capacity. Charging and discharging each lose a little energy: with round-trip efficiency η, each 1 kWh put in returns only η kWh (the model applies √η each way).
Two limits matter. Capacity (kWh) decides how much midday sun can be carried into the night. The power rating (kW) of the battery and inverter decides how fast it can deliver: a full battery still cannot meet a 1.3 kW evening peak through a 1 kW inverter.
The solar output is a half-sine from 6:00 to 18:00 with the chosen peak; "Mixed weather" scales each day by 100%, 35%, 80%, 25%, 100%, 60% and 90%. The load has a small base, a morning peak and a larger evening peak, scaled to the daily total.
Idealized profiles, no grid connection, no battery ageing or temperature effects, and no limit on how deeply the battery may be discharged. Real systems usually keep a reserve and use forecasts.
Panels with a 1.3 kW peak make about 9.9 kWh/day, and the home uses 10 kWh/day, so energy almost balances. Over three sunny days everything is served, but over a week some demand goes unmet. Why?
Much of the evening and night load must pass through the battery, and every kWh stored loses 10% on the round trip. So the usable energy is less than the 9.9 kWh generated, and the battery drains a little each day: after a week the SOC has fallen from 50% to about 14% and about 2.6% of demand is unmet. Try solar peak 1.3 kW for 3 days, then 7.
Solar energy per day: a half-sine from 6:00 to 18:00 with a 2 kW peak gives 2 × 12 × 2/π ≈ 15.3 kWh.
Night load: suppose 6 kWh of the 10 kWh daily load falls outside sunny hours. With 90% round-trip efficiency (√0.9 ≈ 0.95 each way), the battery must hold 6 / 0.95 ≈ 6.3 kWh and needs 6 / 0.9 ≈ 6.7 kWh of solar to charge it.
Capacity: a 10 kWh battery covers one night with room to spare. To ride through two dull days without sun it would need about 20 kWh.
Power: the evening peak is about 1.3 kW, so a 3 kW inverter is ample; a 1 kW one leaves short outages even when the battery is full.
Set the capacity to 10 kWh and power to 3 kW, then switch to mixed weather.
kWh is how much energy it stores; kW is how fast it can deliver it. A 10 kWh, 5 kW battery can supply 5 kW for 2 hours.
The share of energy put into a battery that comes back out. Lithium-ion home batteries typically return 85–95%; the rest is lost as heat.
Enough to cover the evening and night load from the daytime surplus, plus a margin for cloudy days. Bigger batteries help only if there is spare solar to fill them.