Presets
Playback
Sky and sun
Date, latitude, clouds and the rural air.
Wind
Speed and direction of the wind above the roofs.
Storm and drainage
Press Start storm to begin a storm at any time.
City design
Materials, vegetation, waste heat and the shape of the city.
Time and view
Model minutes per real second and building extrusion.
Layers
Model checks
The science
Surface energy balance
Every 12 m cell of the city (road, roof, lawn, tree canopy, water, plaza) obeys C dTs/dt = (1 - a)(S_dir (1 - shade) + S_dif SVF) + eps (SVF L_sky + (1 - SVF) L_wall) - eps sigma Ts^4 - H - LE - G. Sunlight comes from the Haurwitz clear-sky formula Gh = 1098 sin(h) exp(-0.057 / sin h) with the Kasten-Czeplak cloud factor 1 - 0.75 c^3.4; direct beam is blocked by buildings found by marching a ray over the height field, and the sky-view factor SVF is the mean of cos^2 of the horizon angle in 8 directions. Sensible heat is H = h_c (Ts - Ta) with h_c = 5.7 + 3.8 U and latent heat is the bulk formula LE = rho L_v (h_c / rho c_p) f_wet (q_sat(Ts) - q_a), so grass, trees, ponds and wet pavement cool themselves by evaporation while dry asphalt and roofs cannot. Street canyons store extra heat in their walls, which is why the city stays warm after sunset.
Urban heat island
The canopy air temperature is advected by the wind field (semi-Lagrangian, stable for any step), heated by the sensible flux plus waste heat spread over a mixing depth that grows with the sun (up to about 700 m by day, a few tens of metres at night), and relaxed towards the rural air that enters at the upwind edge. The heat island is the city-core air minus the rural reference, UHI = T_core - T_rural. It is largest on calm clear evenings. Cool roofs (high albedo), green roofs and street trees reduce it; waste heat and tall dark canyons increase it.
Wind between buildings
Wind is solved as depth-averaged incompressible potential flow in plan view: u = U_0 + grad(psi), laplace(psi) = 0 in the streets with no flow through building walls, by successive over-relaxation. Streets aligned with the wind channel it, flow accelerates round corners and stagnates in the lee. The result is scaled to pedestrian height with the Macdonald exponential canopy profile, U(z) = U_H exp(a (z/H - 1)), a = 9.6 lambda_f, and rooftop wind follows the log law.
Rain, snow and flooding
A triangular storm hyetograph feeds rain; drop size follows Marshall-Palmer, D0 = 0.9 R^0.21 mm, and the streaks fall at the terminal speed from the drag balance m g = 0.5 rho_a C_d A v^2 with the Schiller-Naumann drag law. Roofs drain to the adjacent street; grass and tree cells infiltrate with a Horton-like rate that falls as the soil saturates; storm drains remove water up to a capacity in mm/h; the rest runs downhill as a diffusive wave with Manning's law, q = h^(5/3) sqrt(S) / n (n = 0.03), and pools in the underpass basin. Below about 1 C precipitation becomes snow, which melts by a degree-day rule plus extra from warm pavement.
Independent numerical checks
1. A dry slab under steady forcing: the Newton root of the energy-balance equation versus the model time stepping run to equilibrium. 2. The drop terminal velocity from the force balance versus the Atlas et al. (1973) fit 9.65 - 10.3 exp(-0.6 D). 3. Mass conservation: the wind field boundary inflow equals the outflow and every cell divergence is near zero, and the water ledger closes (rain = infiltration + drains + outflow + storage).
Honest simplifications
This is a teaching model, not a weather forecast: one canopy air layer, no cloud or humidity feedback, plan-view potential flow (no recirculation vortices, no turbulence), walls represented by an effective heat capacity, no sewer network hydraulics, no building interiors. Real heat islands depend on regional winds and city size; the numbers here show the mechanisms and their relative sizes. The 3D scene uses Blender-baked facade textures and a Blender kit (trees, lamps, cars, rooftop units, solar panels, a weather station with a spinning anemometer).
What to try
- Pick Calm clear night: the heat island grows after sunset while the rural air cools faster.
- Compare Summer heatwave with Cool roofs and trees and Green roofs city; watch the hottest surface and the heat-island curve.
- Press Cloudburst flash flood and look at the Flood basin camera: water gathers in the underpass when the drains are overwhelmed. Raise the drain capacity and repeat.
- Choose Windy canyon day and rotate the wind direction: street-aligned wind channels, cross-street wind is calm; the wind particles show it.
- Pick Winter snowfall to see snow accumulate and melt first on warm pavement.