This 2D companion drives the exact same carrier/photon rate equations as the 3D cavity simulator, but plots them two ways a 3D scene can't show directly: a spectral gain lineshape across the inhomogeneously-broadened dot ensemble, and a phase portrait of the carrier–photon dynamics.
Modal gain: G(n) = Γ · N_dot · g₀ · (2n − 1) / (1 + σ/σ₀)
Threshold: G(n) = α_i + α_m (modal gain = internal + mirror loss)
Carriers: dn/dt = P(1 − n) − n/τ_sp − G(n)·S
Photons: dS/dt = [G(n) − Loss]·S + β·n/τ_sp
Per-class lineshape: g(z) = G(n) · exp(−(z·σ)² / 0.35)
(z = a dot's size deviation in std. devs; g(0) = G(n) exactly)
- Top panel — the spectral gain/absorption curve across the dot ensemble's size-detuning axis z. Its peak height at z = 0 is the modal gain G(n); the dashed line is the total loss. Widening σ spreads the same peak over more detuning, which is exactly why it flattens (inhomogeneous broadening lowering the achievable peak gain).
- Bottom panel — the (n, S) phase portrait. The dotted line at n = 0.5 is transparency (equal absorption/emission); the dashed line is the current lasing-threshold occupation n★ solved from G(n★) = Loss. The trail shows the live trajectory settling toward its operating point each time you move a slider.
- Injection current fills empty dot states (pump rate P); note that P itself must exceed the spontaneous-decay rate before n can even approach 0.5 — this is why very low pump settings can never lase no matter how the other sliders are set, mirroring a real laser's need to out-pump spontaneous emission before inversion is possible.
- Cavity loss, dispersion and density shift n★ exactly as in the 3D model: more loss or broader σ raises it (harder to reach), more areal density lowers it (easier to reach).
Note: the reference 3D engine's own constants (peak gain coefficient g₀ = 0.021 against a fixed internal loss of 0.35) make G(n) top out near 0.039 for every slider combination while the loss floor is 0.53 — the lasing threshold is mathematically unreachable there. This 2D engine keeps the identical rate-equation structure but rescales the gain coefficient and fixed internal loss (g₀ = 20, α_i = 0.1) so the threshold is genuinely reachable — verified numerically against the analytic crossing condition — while default settings still sit clearly below it, matching the intended "push the sliders to find threshold" interaction.