Skip to content

Commit

Permalink
working on ybranch simulations
Browse files Browse the repository at this point in the history
  • Loading branch information
Andeloth committed Jan 17, 2024
1 parent 7ccd5a3 commit ba3bde7
Showing 1 changed file with 57 additions and 1 deletion.
58 changes: 57 additions & 1 deletion book/pages/y_branch.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,48 @@
"The above image shows light coming from the upper right arm being split between the fundamental and 1st order modes in the left waveguide. There is also significant reflections going into the lower right waveguide.\n"
]
},
{
"cell_type": "code",
"execution_count": 55,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAzAAAAJoCAYAAAC5ogQ1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAAxOAAAMTgF/d4wjAAAY4UlEQVR4nO3dbXLrxrmFUcDlmWoimIjGivyI5TgySfCj0f1u9FpVT3XujeLTRxLrYJtysu77vi8AAAAB/hh9AQAAgGcZMAAAQAwDBgAAiGHAAAAAMQwYAAAghgEDAADEMGAAAIAYfx59wLquPe4BAACwHP3PVHoHBgAAiGHAAAAAMQwYAAAghgEDAADEMGAAAIAYBgwAABDDgAEAAGIYMAAAQAwDBgAAiGHAAAAAMboOmG3bev5yb3HHdhLu6Y5tuGMbCXdclox7umMb7thOwj3dsQ13PN+67/v+8APWtdddAACAyR3MEz9CBgAA5DBgAACAGAYMAAAQw4ABAABiGDAAAEAMAwYAAIhhwAAAADEMGAAAIIYBAwAAxDBgAACAGAYMAAAQw4ABAABiGDAAAEAMAwYAAIhhwAAAADEMGAAAIIYBAwAAxDBgAACAGAYMAAAQw4ABAABiGDAAAEAMAwYAAIhhwAAAADEMGAAAIIYBAwAAxDBgAACAGAYMAAAQw4ABAABiGDAAAEAMAwYAAIhhwAAAADEMGAAAIIYBAwAAxDBgAACAGAYMAAAQw4ABAABiGDAAAEAMAwYAAIhhwAA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DH6EDAAAiGHAAAAAMQwYAAAghgEDAADE8A/x3+EfkgcAgHrW/eB/6nJd1153AQAAJncwT/wIGQAAkMOAAQAAYnQdMAn/XIk7tpNwT3dswx3bSLjjsmTc0x3bcMd2Eu7pjm244/n8MzAAAEAZ/hkYAADgMgwYAAAghgEDAADEMGAAAIAYBgwAABDDgAEAAGIYMAAAQAwDBgAAiGHAAAAAMQwYAAAghgEDAADE+PPoA/Z973EPAACAQ96BAQAAYhgwAABADAMGAACIYcAAAAAxDBgAACCGAQMAAMQwYAAAgBj/ARVrbK3pTHBwAAAAAElFTkSuQmCC",
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import gdsfactory as gf\n",
"\n",
"ybranch = gf.Component(\"Y-branch\")\n",
"\n",
"inwg = gf.components.straight(length=5)\n",
"splitter = gf.components.mmi1x2_with_sbend()\n",
"\n",
"inwg_ref = ybranch.add_ref(inwg)\n",
"splitter_ref = ybranch.add_ref(splitter)\n",
"\n",
"splitter_ref.connect(port=\"o1\", destination=inwg_ref.ports[\"o2\"])\n",
"\n",
"ybranch.plot()\n",
"grid = ybranch.to_np()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import meep as mp"
]
},
{
"attachments": {},
"cell_type": "markdown",
Expand Down Expand Up @@ -102,8 +144,22 @@
}
],
"metadata": {
"kernelspec": {
"display_name": "gdsf",
"language": "python",
"name": "python3"
},
"language_info": {
"name": "python"
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
},
"orig_nbformat": 4
},
Expand Down

0 comments on commit ba3bde7

Please sign in to comment.