{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "SNOWs_Inductance.ipynb", "provenance": [], "collapsed_sections": [], "include_colab_link": true }, "kernelspec": { "name": "python3", "display_name": "Python 3" } }, "cells": [ { "cell_type": "markdown", "metadata": { "id": "view-in-github", "colab_type": "text" }, "source": [ "\"Open" ] }, { "cell_type": "markdown", "metadata": { "id": "h5yEUkcppbQ8", "colab_type": "text" }, "source": [ "# SNOWs formula for inductance of a single layer solenoid\n", "\n", "\n", "This is quite accurate formula for a single layer solenoid. Formula comes from the paper\n", "http://www.coe.ufrj.br/~acmq/tesla/maxwell.pdf\n", " and compares well with Kirchoffs and Maxwells formulas. " ] }, { "cell_type": "code", "metadata": { "id": "IIJIE7k9ph2_", "colab_type": "code", "colab": {} }, "source": [ "import numpy as np\n", "import math\n", "import matplotlib.pyplot as plt\n", "import matplotlib\n", "import scipy.special as special" ], "execution_count": 0, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "cs9s5hH2pxos", "colab_type": "code", "colab": {} }, "source": [ "a=0.486 #5e-2 # coil raduis\n", "b=0.0921 #4e-2 # coil height\n", "c=0.0095 #1.88e-3 # coil diameter\n", "n=5 # number of coils\n", "pi=np.pi\n", "mi_0=4*pi*1e-7" ], "execution_count": 0, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "btL6wf_uqBdG", "colab_type": "code", "colab": {} }, "source": [ "p=2*a/b\n", "theta=np.arctan(p)\n", "k=np.sin(theta)\n", "k1=np.cos(theta)\n", "z=pi*n*c/b" ], "execution_count": 0, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "6tKvwZKPqaI9", "colab_type": "code", "outputId": "c395bdf0-83f5-476a-e60e-19e0149f60b2", "colab": { "base_uri": "https://localhost:8080/", "height": 461 } }, "source": [ "K=special.ellipk(k) # elliptic integral of a first kind\n", "E=special.ellipe(k) # elliptic integral of a second kind\n", "\n", "\n", "%whos\n" ], "execution_count": 0, "outputs": [ { "output_type": "stream", "text": [ "Variable Type Data/Info\n", "---------------------------------\n", "E float64 1.008021304684566\n", "K float64 4.0961576922801575\n", "L float64 1.98269910975166e-05\n", "S1 float64 199.84660832730418\n", "S2 float64 -0.6290450162020763\n", "S3 float64 0.10305798056070045\n", "S4 float64 0.31999368858514404\n", "a float 0.486\n", "b float 0.0921\n", "c float 0.0095\n", "k float64 0.9955409295862284\n", "k1 float64 0.09433057573548517\n", "math module \n", "matplotlib module /matplotlib/__init__.py'>\n", "mi_0 float 1.2566370614359173e-06\n", "n int 5\n", "np module kages/numpy/__init__.py'>\n", "p float 10.553745928338762\n", "pi float 3.141592653589793\n", "plt module es/matplotlib/pyplot.py'>\n", "special module ipy/special/__init__.py'>\n", "theta float64 1.4763252916068947\n", "z float 1.6202567974540192\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "2Z3FggTnqcFF", "colab_type": "code", "colab": {} }, "source": [ "" ], "execution_count": 0, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "bCbSk960rWKA", "colab_type": "code", "colab": {} }, "source": [ "S1=8*n**2*a*pi/3*((K+(p**2-1)*E)/k-p*p)\n", "S2=2*n*(1/4-np.log(z))+1/3*np.log(2*pi*n*a/b)-4/pi**2*(E/k-1)*(1+z**2/8)\n", "S3=-2/3*((K-E)/k-k*K/2)-k1/(2*k)*(1-k1*theta/k)\n", "S4=np.log((1+k1)/(1-k1))+k1*np.log(4)\n" ], "execution_count": 0, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "VRalbsL5tTS5", "colab_type": "code", "colab": {} }, "source": [ "L=mi_0/(4*pi)*(S1+2*pi*a*(S2+S3)+b*S4)" ], "execution_count": 0, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "fdT9IntArnQA", "colab_type": "code", "outputId": "b8b0b46b-d4a5-446d-da0d-17ccf07e6c48", "colab": { "base_uri": "https://localhost:8080/", "height": 461 } }, "source": [ "%whos" ], "execution_count": 0, "outputs": [ { "output_type": "stream", "text": [ "Variable Type Data/Info\n", "---------------------------------\n", "E float64 1.008021304684566\n", "K float64 4.0961576922801575\n", "L float64 4.5368905947438836e-05\n", "S1 float64 457.86893963105894\n", "S2 float64 -0.6290450162020763\n", "S3 float64 -0.7494305196721343\n", "S4 float64 0.31999368858514404\n", "a float 0.486\n", "b float 0.0921\n", "c float 0.0095\n", "k float64 0.9955409295862284\n", "k1 float64 0.09433057573548517\n", "math module \n", "matplotlib module /matplotlib/__init__.py'>\n", "mi_0 float 1.2566370614359173e-06\n", "n int 5\n", "np module kages/numpy/__init__.py'>\n", "p float 10.553745928338762\n", "pi float 3.141592653589793\n", "plt module es/matplotlib/pyplot.py'>\n", "special module ipy/special/__init__.py'>\n", "theta float64 1.4763252916068947\n", "z float 1.6202567974540192\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "mvlvlQGHroBM", "colab_type": "code", "outputId": "69c770ee-ef6e-4930-9c10-5aeb2c8330fa", "colab": { "base_uri": "https://localhost:8080/", "height": 35 } }, "source": [ "4**2/2" ], "execution_count": 0, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "8.0" ] }, "metadata": { "tags": [] }, "execution_count": 9 } ] } ] }