Sunlight arrives as a spectrum of photons whose energies follow the Planck blackbody distribution of the Sun's ~5778 K surface. A semiconductor with bandgap Eg can only turn each absorbed photon into at most Eg of usable electrical energy — any energy above Eg is thermalized as heat within picoseconds, and any photon with energy below Eg passes straight through, absorbing nothing.
photon number flux: φ(E) ∝ E² / (exp(E / kT) − 1) [Planck's law, kT in eV]
useful energy: u(E) = Eg if E ≥ Eg, else 0
thermalized heat: h(E) = E − Eg if E ≥ Eg, else 0
ultimate efficiency(Eg,T) = Eg·∫[Eg,∞] φ(E) dE / ∫[0,∞] E·φ(E) dE
This is the "ultimate photovoltaic efficiency" first derived by Shockley in 1961 — a simplified predecessor of the full Shockley–Queisser detailed-balance limit, which additionally subtracts unavoidable radiative-recombination losses (Voc penalty) and tops out at 33.7% for a single junction at 1.34 eV. The simpler spectral-utilization limit modeled live here peaks near 44% at Eg ≈ 1.1 eV for the Sun's spectrum — silicon's actual bandgap (1.12 eV) sits almost exactly at that spectral sweet spot.
- Bandgap slider — raise it and fewer photons carry enough energy to be absorbed (more grey "transmitted" streaks); lower it and thermalization losses grow (more red heat bursts) even though almost every photon is absorbed.
- Sun temperature slider — shifts the whole spectrum hotter/cooler, moving where the optimal bandgap sits.
- Snap to optimal Eg — numerically sweeps Eg at the current temperature and jumps the slider to the value that maximizes the theoretical limit.
- The simulated efficiency (particle counting, live) and theoretical limit (closed-form integral) should converge to the same number as counters accumulate — a direct demonstration that the statistical spectral-limit formula is exactly what the particle-by-particle bookkeeping adds up to.