{ "cells": [ { "cell_type": "markdown", "id": "748dc020", "metadata": {}, "source": [ "# Double layers of Py / CoFeB\n", "\n", "Here, we calculate the dispersion of the Damon-Eshbach (DE) modes in a bilayer made of two different materials. In this system, mirror symmetries are broken, and the dipolar interaction induces a dispersion asymmetry. For more details, see Grassi *et al.* in Ref. 1. For the present case, we consider a bilayer with 25 nm permalloy and 25 nm CoFeB (without any nonmagnetic spacer). \n", "\n", "## Sample creation\n", "\n", "This can be modeled using the monolayer geometry and by setting inhomogenous material parameters. We start by creating the sample" ] }, { "cell_type": "code", "execution_count": 1, "id": "3e649e39-7895-47d7-8aae-98e7549ec296", "metadata": {}, "outputs": [], "source": [ "import tetrax as tx\n", "import numpy as np\n", "\n", "t1_Py = 25\n", "t2_CoFeB = 25\n", "total_thickness = t1_Py + t2_CoFeB\n", "res = 2.0\n", "\n", "\n", "dlayer_50 = tx.Sample(\n", " tx.geometries.layer.monolayer(total_thickness, res),\n", " name=\"Py25CoFeB25\"\n", ")\n", "\n" ] }, { "cell_type": "markdown", "id": "4c4e9dce", "metadata": {}, "source": [ "and set the material parameters in both layers." ] }, { "cell_type": "code", "execution_count": 2, "id": "c514ace3", "metadata": { "scrolled": true }, "outputs": [], "source": [ "dlayer_50.gamma = 29.2 * 2 * np.pi * 1e9\n", "\n", "Msat_Py = 845e3\n", "Msat_CoFeB = 1270e3\n", "middle = -(total_thickness)/2 + t1_Py\n", "Msat_ = np.piecewise(dlayer_50.xyz.x, [dlayer_50.xyz.y <= middle, dlayer_50.xyz.y > middle], [Msat_Py,Msat_CoFeB])\n", "dlayer_50.material[\"Msat\"] = Msat_\n", "\n", "A_Py = 12.8e-12\n", "A_CoFeB = 17e-12\n", "Aex_ = np.piecewise(dlayer_50.xyz.x, [dlayer_50.xyz.y <= middle, dlayer_50.xyz.y > middle], [A_Py,A_CoFeB])\n", "dlayer_50.material[\"Aex\"] = Aex_" ] }, { "cell_type": "markdown", "id": "e7494f8a", "metadata": {}, "source": [ "Here, the `piecewise` function of the *NumPy* package creates a staircase dependent on the material parameters (which are piecewise constant)." ] }, { "cell_type": "code", "execution_count": 3, "id": "6f5778d1", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/Users/attilak/micromag/tetrax-tests/fresh_environement_test/venv/lib/python3.13/site-packages/traittypes/traittypes.py:97: UserWarning: Given trait value dtype \"float32\" does not match required type \"float32\". A coerced copy has been created.\n", " warnings.warn(\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "2337404fd23a492c80aa99f239f791aa", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Plot(antialias=3, axes=['x', 'y', 'z'], axes_helper=1.0, axes_helper_colors=[16711680, 65280, 255], background…" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dlayer_50.mag = (1,0,0)\n", "dlayer_50.show()" ] }, { "cell_type": "markdown", "id": "55b76ff1", "metadata": {}, "source": [ "![](double_layer_inhom.png)" ] }, { "cell_type": "markdown", "id": "598d6bd1-e7fb-45d2-a34e-c7a7cfc4bab8", "metadata": {}, "source": [ "We see that the difference in saturation magnetization `Msat` between the two layers is visualized as different arrow lengths in the 3D plot. Note, that ```dlayer_50.mag``` is still a unitary vector field $\\mathbf{m}(\\mathbf{r})$ of length 1 everywhere. The scaled magnetization vector $M_\\mathrm{s}(\\mathbf{r})\\mathbf{m}(\\mathbf{r})$ can be obtained as ```dlayer_50.mag_full```. " ] }, { "cell_type": "code", "execution_count": 4, "id": "2bb1a537-b119-4846-935d-7d2f166a8382", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "MeshVector([[ 845000., 0., 0.],\n", " [1270000., 0., 0.],\n", " [ 845000., 0., 0.],\n", " [ 845000., 0., 0.],\n", " [ 845000., 0., 0.],\n", " [ 845000., 0., 0.],\n", " [ 845000., 0., 0.],\n", " [ 845000., 0., 0.],\n", " [ 845000., 0., 0.],\n", " [ 845000., 0., 0.],\n", " [ 845000., 0., 0.],\n", " [ 845000., 0., 0.],\n", " [ 845000., 0., 0.],\n", " [ 845000., 0., 0.],\n", " [1270000., 0., 0.],\n", " [1270000., 0., 0.],\n", " [1270000., 0., 0.],\n", " [1270000., 0., 0.],\n", " [1270000., 0., 0.],\n", " [1270000., 0., 0.],\n", " [1270000., 0., 0.],\n", " [1270000., 0., 0.],\n", " [1270000., 0., 0.],\n", " [1270000., 0., 0.],\n", " [1270000., 0., 0.],\n", " [1270000., 0., 0.]])" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dlayer_50.mag_full" ] }, { "cell_type": "markdown", "id": "3d6cf8a1-9ea7-44b7-a3e9-eb4e44156376", "metadata": {}, "source": [ "The vectors displayed in the 3D plot are simply `dlayer_50.mag_full / dlayer_50.material[\"Msat\"].average`." ] }, { "cell_type": "markdown", "id": "cef7c011", "metadata": {}, "source": [ "## Dispersion calculation for the first N=5 Damon-Eshbach modes\n", "\n", "To calculate the first 5 DE modes, we apply an external field perpendicular to the propagation ($z$) direction. A homogeneous magnetization in the same direction can be assumed as the equilibrium. So we do not need to relax anymore." ] }, { "cell_type": "code", "execution_count": 5, "id": "b092cb0f", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "100%|███████████████████| 41/41 [00:01<00:00, 34.14it/s]\n" ] } ], "source": [ "dlayer_50.external_field = (30e-3,0,0)\n", "dlayer_50.mag = (1,0,0)\n", "\n", "spectrum = tx.experiments.eigenmodes(dlayer_50, kmin=-50e6,kmax=50e6,num_k=81, num_cpus=-1,num_modes=5)" ] }, { "cell_type": "markdown", "id": "379039ff-a79a-4fe7-b98d-ac268f79329c", "metadata": {}, "source": [ "Plotting the spectrum shows hybridization and dispersion asymmetry of the lowest two modes." ] }, { "cell_type": "code", "execution_count": 6, "id": "1f2800ea-fa30-4705-be65-f394422357e2", "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "spectrum.plot(fscale=\"G\", kscale=\"u\", n=[0,1], renderer=\"notebook\") # remove the renderer argument when running on your computer" ] }, { "cell_type": "markdown", "id": "fde7270c-7f71-48aa-a1de-fb971f7bd9a0", "metadata": {}, "source": [ "## References\n", "\n", "1. Grassi et al. \"Slow-Wave-Based Nanomagnonic Diode\", [Physical Review Applied 14, 024047](https://doi.org/10.1103/PhysRevApplied.14.024047) (2020)" ] } ], "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.13.1" } }, "nbformat": 4, "nbformat_minor": 5 }