On a clear calm night the ground radiates to space faster than it receives heat from the atmosphere, so it cools; the thin layer of air touching it cools too, and cold air is dense. The usual decrease of temperature with height is reversed: that is a temperature inversion. A stable layer resists vertical mixing, so smoke released near the floor cannot rise, and winter valley towns (Alpine valleys, the Po plain, Salt Lake City, Almaty) suffer long smog episodes.
Ground: a skin of heat capacity C = 2.5×105 J m-2 K-1 obeys C dTg/dt = (1-α)SW + εsLW↓ - εsσTg4 - H - G. The albedo is α = 0.18 + 0.64 s (s = snow cover; fresh snow is about 0.8). LW↓ = εaσTair4 with εa = 0.78 (clear) to 0.96 (overcast); SW = 1361 × 0.76 × sin(elevation) × (1 - 0.75 c3.4); G = k(Tg - 272 K) is conduction from the deep soil/snowpack. Sun elevation comes from latitude 47° N and the solar declination of the chosen day.
Air: potential temperature θ = T + (g/cp)z obeys ∂θ/∂t = ∂/∂z(K ∂θ/∂z) + heating with the dry-adiabatic rate g/cp = 9.76 K/km. The eddy diffusivity is a mixing-length closure, K = l²|dU/dz| F(Ri), with l = κz/(1+κz/60 m) and a logarithmic wind profile; the gradient Richardson number is Ri = (g/θ) (dθ/dz) / (dU/dz)² and F = 1/(1+10 Ri)² for Ri > 0 (turbulence is strangled in a strong inversion) and √(1-16 Ri) for Ri < 0. If heating makes θ decrease with height, the layer is mixed instantly (convective adjustment). The surface heat flux uses a bulk formula H = ρcpCHU (Tg - θ1) with the same stability dependence.
Smoke: a tracer obeys the same diffusion, is emitted at the floor and removed by ventilation (weak inside the valley, strong above the ridge). The 4000 grey particles are a Lagrangian twin of that tracer: a random walk with the drift term dK/dz that keeps a well-mixed cloud well mixed.
Why it can last for days: snow reflects 80 % of the weak winter sun, the low sun is blocked by the ridges for much of the day, and the sun cannot erode the pool; warm air aloft (an anticyclone) adds a stable lid. Wind helps ventilate, but note the experiment: with a little wind the surface cooling is carried upward and the inversion becomes deeper before strong wind finally breaks it.
Simplifications, stated honestly: (1) a single column over the valley floor; there is no cold-air drainage down the slopes, which in reality is a major source of cold air, and no horizontal advection except a relaxation of the whole column to its starting profile over 0.7 day (stronger aloft) that stands in for synoptic exchange. (2) No humidity, fog, latent heat or snowmelt. (3) The closure constants (60 m mixing length, factor 10 in F, 2.5×105 heat capacity, 0.78 clear-sky emissivity, 3 km ventilation length, 0.04 sheltering factor) are plausible round numbers, not fitted to a particular valley. (4) The emission flux (0-1.5 µg m-2 s-1) is illustrative; modelled PM is in µg/m³ but is not a forecast. (5) Houses and trees are drawn about twice their real size; vertical scale is true (1 unit = 10 m). The WHO 24-hour PM2.5 guideline of 15 µg/m³ (2021 update) is quoted as a typical reference value; verify before citing.
Models and baked textures: Blender 5.2 (Cycles); rendering: Three.js r160.