# --- # jupyter: # jupytext: # formats: py:percent # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.16.7 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # %% import os import sys # %% import numpy as np import sympy as s from scipy import constants as const # %% s.init_printing() # %% [markdown] # # TIR cavity # %% ell, R, n, lam = s.var("ell R n lambda", real=True) L = s.var("L", real=True) # %% aoi = np.pi / 4 R_n = 5 lam_n = 1064e-9 # m ell_n = np.sqrt(2)*0.0254 L_n = 4 * ell_n Rt_n = R_n * np.cos(aoi) Rs_n = R_n / np.cos(aoi) n_n = 1.45 # %% subs = [(n, n_n), (ell, ell_n), (lam, lam_n)] subst = [(R, Rt_n)] subss = [(R, Rs_n)] # %% Mprop = s.Matrix([[1, ell/n], [0, 1]]) Mrefl = s.Matrix([[1, 0], [-2*n/R, 1]]) # %% Mtot = s.simplify(Mprop @ Mrefl @ Mprop @ Mprop @ Mrefl @ Mprop) Mtot # %% [markdown] # ## Cavity stability # # We define the cavity stability as $(A+D)/2$. A stable cavity has $|(A+D)/2| < 1$. # %% stab = (Mtot[0,0] + Mtot[1,1]) / 2 stab # %% [markdown] # ## Gouy phase # # The Gouy phase of the TEM$_{mn}$ mode is # $$ \zeta_{mn} = \left(m + \frac{1}{2}\right) \zeta_{\text{T}} +\left(n + \frac{1}{2}\right) \zeta_{\text{S}} $$ # with # $$ \zeta_{\text{T,S}} = \operatorname{sgn}{B} \arccos{\left(\frac{A_\text{T,S}+D_\text{T,S}}{2}\right)},$$ # T referring to the transverse ABCD parameters and S to the sagittal parameters (assuming the signs of $B_{\text{T}}$ and $B_{\text{S}}$ are identical). # %% gouy_t = s.acos(stab).subs(subs + subst).evalf() gouy_s = s.acos(stab).subs(subs + subss).evalf() print(f"Gouy phase (T): {gouy_t * 180 / np.pi:.1f} deg.") print(f"Gouy phase (S): {gouy_s * 180 / np.pi:.1f} deg.") # %% [markdown] # ## Free spectral range # # The FSR is $\nu_{\text{FSR}} = c/nL$, with $L$ being the **round trip physical length** of the cavity. # %% fsr = const.c / n_n / L_n print(f"FSR: {fsr/1e9:.3f} GHz") # %% [markdown] # ## Transverse mode spacing # # The transverse mode spacing can be found from the Gouy phase as follows. To maintain resonance, the longitudinal mode frequency $\nu_{mn}$ for the TEM$_{mn}$ mode must satsify # $$ 2\pi p = k_{mn} L + \zeta_{mn} = \frac{2\pi\nu_{mn}}{c} L + \zeta_{mn} = \frac{2\pi\nu_{mn}}{\nu_{\text{FSR}}} + \zeta_{mn}$$ # for some $p \in \mathbb{Z}$. Hence, # $$ \nu_{mn} - \nu_{00} = \nu_{\text{FSR}} + \frac{\zeta_{mn} - \zeta_{00}}{2\pi}.$$ # Therefore # \begin{align} # \nu_{\text{TMS,T}} &= \nu_{10} - \nu_{00} = \frac{\zeta_{\text{T}}}{2\pi} \\ # \nu_{\text{TMS,S}} &= \nu_{01} - \nu_{00} = \frac{\zeta_{\text{S}}}{2\pi} # \end{align} # %% tms_t = fsr / (2 * np.pi) * gouy_t tms_s = fsr / (2 * np.pi) * gouy_s print(f"TMS (T): {tms_t / 1e6:.0f} MHz") print(f"TMS (S): {tms_s / 1e6:.0f} MHz") # %% [markdown] # Since we observe some HOM nearly co-resonant with 00, we can compute # %% print(f"Nearest TEM(0,n) mode order n: {fsr // tms_s}") print(f"Location of TEM(0,n) below 00 mode: {(fsr % tms_s) / 1e6:.2f} MHz") # %% [markdown] # ## Waist size # # From Kogelnik and Li, given a set of ABCD parameters describing a round-trip propagation through a stable cavity, the cavity's $q$ paramter is given by # $$ \frac{1}{q} = \frac{D - A}{2B} \pm \frac{4\mathrm{i}}{2B} \sqrt{1 - \left(\frac{A+D}{2}\right)^2}.$$ # Hence, # $$ w^2 = \frac{2\lambda B/\pi}{\sqrt{1 - \left(\dfrac{A+D}{2}\right)^2}} .$$ # Note that in our case, $A = D$, implying $\operatorname{Re}{q} = 0$, so the beam is planar. # We have defined our round-trip matrix to start and end at the planar faces, which (in terms of optical path length) are equidistant from the curved faces, so we indeed expect a planar phase front for the beam here. # %% w_t = s.sqrt(2 * lam * Mtot[0,1] / s.pi / s.sqrt(1 - stab**2)).subs(subs + subst).evalf() w_s = s.sqrt(2 * lam * Mtot[0,1] / s.pi / s.sqrt(1 - stab**2)).subs(subs + subss).evalf() print(f"Waist (T): {w_t*1e3:.2f} mm") print(f"Waist (S): {w_s*1e3:.2f} mm") # %% [markdown] # # Cross-check: LIGO's linear FP cavities # %% L_LIGO = 3995 # m; the ONE-WAY length now fsr_LIGO = const.c / (2 * L_LIGO) # %% Mfp = s.simplify(Mprop @ Mrefl.subs(R, s.var("Re")) @ Mprop @ Mrefl.subs(R, s.var("Ri"))).subs([(ell, L), (n, 1)]) # %% gouy_LIGO = s.acos((Mfp[0,0] + Mfp[1,1]) / 2).subs(Re, 2245).subs(Ri, 1934).subs(L, 4e3).evalf() # %% tms_LIGO = fsr_LIGO / (2 * np.pi) * 0.836 print(f"TMS (LIGO): {tms_LIGO:.0f} Hz") # %%