Presets
Playback
Site and guests
Energy system
Prices
Day and time
Camera
Layers
Quality
Model check
The science
The site and the sun
The hotel is an island (off-grid) microgrid with three sources: a solar PV array, a battery and a diesel generator. Every hour of a year (8760 steps) the model computes the sun, the weather, the hotel load and the dispatch. Clear-sky irradiance uses the Haurwitz (1945) formula G = 1098 cos z e^(-0.057/cos z) W/m2, where the solar zenith angle comes from latitude, the declination 23.45 deg sin(2 pi (284+n)/365) and the hour angle. A slowly changing random clearness factor per day (set by the cloudiness slider) and a small hourly flicker reduce it. PV output is P = kWp (G/1000) 0.9 (1 - 0.004 (Tcell - 25)) with Tcell = Tair + 0.034 G.
The hotel load
The load is the sum of four terms: guest rooms (lighting, plug loads, a morning and an evening peak), kitchen and laundry (breakfast, lunch and dinner peaks), air-conditioning and heating (0.034 kW electrical per room per kelvin outside a 21 deg C comfort band of plus or minus 2 K) and a constant common load (lobby, pool pumps, lifts). Occupancy follows a gentle yearly season with a summer maximum. The profile is a plausible synthetic one, not a measured hotel.
Dispatch rules
Each hour: solar serves the load first. A surplus charges the battery up to its power and energy limits; what is left is curtailed. A deficit is covered by the battery down to its minimum charge (15 %), then by the generator. The generator cannot run below 30 % of its rating, so a small deficit makes it run at the minimum and the excess charges the battery or is dumped. Battery charging and discharging each lose a factor sqrt(eta) so that a full round trip returns eta. Anything the sources cannot cover is unserved energy. Generator fuel follows the common straight-line curve L/h = 0.246 P + 0.08415 P_rated, which is 0.33 L/kWh at full load.
Cost of electricity
Each component's installed cost is turned into a yearly payment with the capital recovery factor CRF = i (1+i)^n / ((1+i)^n - 1) (25 years for PV, 12 for the battery, 15 for the generator). Add yearly maintenance and fuel, divide by the energy actually served, and you get the levelised cost of electricity (LCOE). The number labelled generator-only is the same site served by the generator alone, so you can see what the solar and battery are worth. The curve in the last graph shows how the LCOE changes with PV size while everything else stays fixed: too little solar wastes the free fuel savings, too much only produces curtailed power.
Four checks you can see
- The clear-sky formula at the equator at the equinox noon equals its closed form.
- Energy balance over the year closes to rounding: sources equal load served plus battery charging, curtailment and dumped energy; and with storage change and conversion loss included.
- The annuity factor equals its textbook value and a PV-only system's LCOE equals (CRF x capex + maintenance) / energy served.
- A battery tested in isolation returns exactly the set round-trip efficiency.
Honest simplifications
- Hourly steps: no sub-hour cloud transients, no inverter or grid dynamics, no voltage or frequency, no short circuits or protection.
- No battery ageing or temperature effects; efficiency is constant. No PV degradation. No fuel logistics.
- The weather is synthetic and the same seed is reused for every setting so that comparisons are fair. It is not a typical meteorological year of a real site.
- Costs are round illustrative values, not quotes. Real projects add grid connection, permits, thermal storage and demand management.
- The 3D scene is drawn to scale only roughly; the solar field shows at most 120 tables of 4.8 kWp.
What you see in 3D
Each solar table stands for 4.8 kWp, so the number of tables follows the PV slider. Each battery container stands for 250 kWh and its side gauge shows the charge (green, amber, red). Hotel and bungalow windows light up according to the hour's load. Yellow particles are solar power, cyan the battery (reverse when it charges), red the generator and white the power delivered to the hotel; more particles mean more kilowatts. The sun position comes from the same latitude, day and hour used by the model.