# Kerr-Lens Mode-Locking: Numerical Simulation of the Spatio-Temporal Dynamics on All Time Scales
## 3 Materials and Methods
We now need to account for the nonlinear response of the Kerr medium, i.e., Kerr-lens and SPM, which we assume to be instantaneous. For simplicity, we start with a thin Kerr medium, whose thickness \(L_{c}\) is much smaller than the Rayleigh beam range \(L_{c}\ll z_{R}\), and later generalize the result for a thick medium. The ABCD matrix of a thin Kerr medium is a simple lens with an intensity-dependent focus:  
\[M_{\text{kl}}(t)= \begin{pmatrix}1&0\\ -\frac{1}{f_{\text{kl}}(t)}&1\end{pmatrix}  \tag{4}\]  
Figure 6: Flowchart of the simulation. The roundtrip time is denoted \(\tau\), and includes a spatial part (outer loop—blue), which propagates the beam parameter \(q(t)\) through the cavity with the ABCD formalism; and a temporal part (inner loop—green), which propagates the field in time \(E(t)\) from one roundtrip to the next according to the spectral transfer function of the cavity, which includes gain saturation and the spectral gaincurve, loss and chromatic dispersion (all conveniently calculated in the frequency domain with a fast Fourier transform—FFT). The two parts are coupled together via the Kerrlensing effect and the diffraction losses, where the temporal intensity dictates the instantaneous nonlinear lens and the temporal beam parameter \(q(t)\) dictates the instantaneous diffraction losses. where \(f_{kl}\) is the time dependent Kerr-lens focus, which, for a thin nonlinear medium, is given by:  
\[\frac{1}{f_{kl}}=\frac{8n_{2}L_{c}}{\pi w(t)^{2}}I(t), \tag{5}\]  
with \(n_{2}\) the nonlinear index of refraction, \(L_{c}\) the medium length, \(w(t)\) the instantaneous beam waist, and \(I(t)\) the on-axis instantaneous intensity [19]. The SPM of a thin Kerr medium is a simple phase modulation of \(e^{i\mathbf{n}_{2}I(t)L_{c}/\pi\lambda}\). This introduces a new, fast time scale \(t\) into the problem. Unlike the slow laser dynamics, which occur on a time scale of many round-trips (from one round-trip to the next), the instantaneous Kerr-lens evolves on the pulse time-scale within a single cavity round-trip. As a result, we use two different time variables to describe the cavity dynamics--\(n\), which enumerates the round-trip time, and a fast time variable \(t\), which measures the time within each round-trip. The beam, under the Gaussian approximation, is completely described by two variables--the instantaneous power \(P_{n}(t)\) and Gaussian beam parameter \(q_{n}(t)\) that reflects the beam waist \(w\) and phase curvature \(R\) as \(\frac{1}{q}=\frac{1}{R}-i\frac{\lambda}{\pi w^{2}(t)}\). The local intensity is \(I_{n}(t)=\frac{P_{n}(t)}{w^{2}(t)}\). With the instantaneous power and beam parameter we can calculate the instantaneous matrix \(M_{kl}(t)\). The total ABCD matrix of the cavity round trip can now be written. For a ring cavity it is,  
\[M_{ring}(t)=M_{cav}M_{kl}(t). \tag{6}\]  
However, for a linear cavity, the Kerr interaction occurs twice, which leads to:  
\[M_{lin}(t)=M_{1}M_{kl}^{\pm}(t)M_{2}M_{kl}^{-}(t), \tag{7}\]  
where \(M_{1,2}\) are the linear ABCD matrices for the two halves of the cavity around the Kerr medium and \(M_{kl}^{\pm}\) are the nonlinear lens matrices in the forward and backward propagation through the cavity, which are time dependent and not necessarily equal. In fact, the dual interaction with the Kerr medium can break the symmetry between the forward and backwards direction, as we showed in [17]. Note that under a small-gain (or slow-varying envelope) assumption, the order of the cavity elements is not of particular importance, and would not change the results. For a thick Kerr medium, whose thickness cannot be neglected relative to the Rayleigh range, we must also account for the propagation of the beam within the nonlinear medium. This can be approximated with a split-operator approach, where the thick medium is divided into \(N_{kl}\) thin lenses that are separated by a short distance \(l=L_{c}/N_{kl}\) of free propagation.