loading...
running...
How to use
Pick a preset and watch the inversion n (blue) clamp at the threshold line while the output settles after relaxation spikes. Raise r to see the spikes speed up. With Q-switch on, the cavity stays closed until the hold time ends, then a nanosecond giant pulse is shown in slow motion and compared with the Wagner-Lengyel prediction. Speed is the simulated microseconds per real second on a log scale. Space pauses, R resets.
Models and baked PBR textures made in Blender; Three.js r160 shows the beam, the lamp and the rod glow from the same rate-equation module as the 2D page.
The science
A single-mode four-level laser is described by two coupled rate equations for the inversion N (atoms in the upper laser level per volume) and the photon number in the cavity. In units of the threshold inversion, n = N/Nth, and photons per threshold-inversion count, s:
dn/dt = (r - n)/τ - κ n s, ds/dt = κ (n - 1) s + ε n/τ κ = 1/τc, r = Ppump/Pth
τ is the upper-level lifetime (230 us for Nd:YAG), τc = L/(c δ) the photon lifetime of a cavity of optical length L with round-trip loss δ = -ln(R1 R2) + passive loss (a few ns here), and ε a tiny spontaneous-emission seed. The threshold inversion is Nth = δ/(2 σ l) with the Nd:YAG cross-section σ = 2.8e-23 m² and rod length l, and the pump power at threshold Pth = Nth V hνp / (ηp τ) (ηp = 0.7 absorbed-pump efficiency).
Results you can test. Above threshold the inversion is clamped at n = 1 and the photon number is s = (r - 1) τc/τ, so the output rises linearly with the pump with slope efficiency ηp (νL/νp) (-ln R2/δ). A step in the pump produces damped relaxation oscillations, linearised frequency ωr = sqrt((r - 1)/(τ τc)) and damping rate r/(2τ). With the Q-switch closed the inversion builds up to ni = r (1 - e^(-t/τ)); when the cavity opens the pulse peak and the residual inversion follow from the conservation law s + n - ln n = const (Wagner-Lengyel): smax = ni - 1 - ln ni, and nf = ni exp(-(ni - nf)).
Simplifications. One longitudinal mode, no spatial hole burning, uniform pump, no thermal lensing, no pump excited-state absorption and no lower-level bottleneck (an ideal four-level system). Powers are for the stated rod and mirror values and are indicative only. Time is in microseconds; the integrator is a second-order split scheme with an exact exponential step for the photon equation and a step limited by the oscillation and spike time scales. The Q-switch is modelled as an instantaneous change of the cavity loss factor (closed = 0.02 of the open gain), and the pulse analysis neglects pumping and lifetime during the pulse, so the measured peak agrees with the closed form to a few percent.