{ "cells": [ { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "# Constants\n", "\n", "It is sometimes convenient to have some fundamental and derived constants predefined in the package. In `micromagneticmodel`, the following constants are available." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import micromagneticmodel as mm" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1. Magnetic constant" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1.2566370614359173e-06" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mm.consts.mu0" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2. Elementary charge" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1.6021766208e-19" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mm.consts.e" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 3. Electron's mass" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "9.1093835611e-31" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mm.consts.me" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 4. Boltzmann constant" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1.3806485279e-23" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mm.consts.kB" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 5. Planck's constant" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "6.62607004081e-34" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mm.consts.h" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 6. Lande g-factor" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2.00231930436182" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mm.consts.g" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 7. Reduced Planck constant" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1.0545718002680283e-34" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mm.consts.hbar" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 8. Gyrotropic ratio" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "176085964286.56906" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mm.consts.gamma" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 9. Bohr magneton" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "9.274009992067861e-24" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mm.consts.muB" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 10. LLG precession term gamma" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "221276.14872118403" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mm.consts.gamma0" ] } ], "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.10.12" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": {}, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 4 }