{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Sweep the coupler gap\n", "\n", "Analytic calculation of 100% coupling length into two parallel SOI waveguides\n", "with a varying gap at different TE wavelengths.\n", "\n", "An example refractive index profile for the two waveguides spaced 200nm is\n", "shown." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import modes as ms\n", "import opticalmaterialspy as mat\n", "from modes.design import directional_coupler_lc\n", "\n", "wavelength_nm = 1550\n", "width = 0.45\n", "thickness = 0.22\n", "widths = [width]*2\n", "wg_gaps = np.arange(0.15, 0.30, 0.05)\n", "wg_gaps = np.array([0.15, 0.2, 0.25])\n", "dcs = [ms.waveguide_array(widths=widths, wg_gaps=[wg_gap], sub_width=3, thickness=thickness) for wg_gap in wg_gaps]\n", "dcs[0]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "ms.mode_solver_full(wg=dcs[0], n_modes=2, plot=True, plot_index=True, fields_to_write=('Ex'))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "n_effs = [ms.mode_solver_full(wg=wg, n_modes=2).results['n_effs'] for wg in dcs]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "ne = [ n_eff[0].real for n_eff in n_effs]\n", "no = [ n_eff[1].real for n_eff in n_effs]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "lc = [directional_coupler_lc(wavelength_nm, n_eff_1, n_eff_2) for n_eff_1, n_eff_2 in zip(ne, no)]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "plt.plot(wg_gaps*1e3, lc, 'o')\n", "plt.xlabel('gap (nm)')\n", "plt.ylabel('100% Coupling length (um)')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# to increase reduce the gap step we need to reduce the size of the x_step and y_step computing grid\n", "\n", "wg_gaps = np.arange(0.15, 0.30, 0.02)\n", "dcs = [ms.waveguide_array(widths=widths, wg_gaps=[wg_gap], x_step=0.01, y_step=0.01) for wg_gap in wg_gaps]\n", "n_effs = [ms.mode_solver_full(wg=wg, n_modes=2).results['n_effs'] for wg in dcs]\n", "ne = [ n_eff[0].real for n_eff in n_effs]\n", "no = [ n_eff[1].real for n_eff in n_effs]\n", "lc = [directional_coupler_lc(wavelength_nm, n_eff_1, n_eff_2) for n_eff_1, n_eff_2 in zip(ne, no)]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "plt.plot(wg_gaps*1e3, lc, 'o')\n", "plt.xlabel('gap (nm)')\n", "plt.ylabel('100% Coupling length (um)')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exercise\n", "\n", "Design a directional coupler with a gap of 250nm that will tap off 10% of the optical power at a wavelength of 1550nm. What length in microns does the directional coupler have to be?" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "directional_coupler_lc?" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "wavelength_nm = 1550\n", "width = 0.5\n", "thickness = 0.22\n", "widths = [width]*2\n", "dc = ms.waveguide_array(widths=widths, wg_gaps=[0.25], sub_width=3, thickness=thickness)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "ms.mode_solver_full(wg=dc, n_modes=2, plot=True, plot_index=True, fields_to_write=('Ex'))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "directional_coupler_lc(1550, 2.481, 2.464, power_ratio=0.1)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exercise \n", "What is the coupler length (in µm) that corresponds with 100% power transfer from the through port (top) to the cross port (bottom)? Assume 500nm x 220nm Si waveguides in SiO2, 1550 nm wavelength, and a 100 nm coupler gap" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "dc = ms.waveguide_array(widths=widths, wg_gaps=[0.1], sub_width=3, thickness=thickness, x_step=0.01)\n", "m = ms.mode_solver_full(wg=dc, n_modes=2, plot=True, fields_to_write=('Ex'))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "directional_coupler_lc(1550, np.abs(m.n_effs)[0], np.abs(m.n_effs)[1], power_ratio=1)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "directional_coupler_lc(1550, 2.498, 2.437, power_ratio=1)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.7" } }, "nbformat": 4, "nbformat_minor": 4 }