summaryrefslogtreecommitdiff
path: root/sample_notebooks
diff options
context:
space:
mode:
authorTrupti Kini2016-04-29 23:30:26 +0600
committerTrupti Kini2016-04-29 23:30:26 +0600
commit203dfd3d532ea8b8fac993ba955a1060a5a99bec (patch)
treed2c85e493dee867a01798593da89e9efe611dade /sample_notebooks
parentc56e9c805c40802672e472ffdc00e5c49b3a4153 (diff)
downloadPython-Textbook-Companions-203dfd3d532ea8b8fac993ba955a1060a5a99bec.tar.gz
Python-Textbook-Companions-203dfd3d532ea8b8fac993ba955a1060a5a99bec.tar.bz2
Python-Textbook-Companions-203dfd3d532ea8b8fac993ba955a1060a5a99bec.zip
Added(A)/Deleted(D) following books
A sample_notebooks/AviralYadav/Chapter1.ipynb A sample_notebooks/ChandraShiva/CHAPTER1.ipynb A sample_notebooks/VidyaSri/CHAPTER01.ipynb A testing_by_test/screenshots/screenshot6.png A testing_by_test/screenshots/screenshot6_1.png A testing_by_test/screenshots/screenshot6_2.png A testing_by_test/screenshots/screenshot6_3.png A testing_by_test/screenshots/screenshot6_4.png A testing_by_test/screenshots/screenshot6_5.png A testing_by_test/vivek.ipynb A testing_by_test/vivek_1.ipynb
Diffstat (limited to 'sample_notebooks')
-rw-r--r--sample_notebooks/AviralYadav/Chapter1.ipynb211
-rw-r--r--sample_notebooks/ChandraShiva/CHAPTER1.ipynb297
-rw-r--r--sample_notebooks/VidyaSri/CHAPTER01.ipynb410
3 files changed, 918 insertions, 0 deletions
diff --git a/sample_notebooks/AviralYadav/Chapter1.ipynb b/sample_notebooks/AviralYadav/Chapter1.ipynb
new file mode 100644
index 00000000..1a020ecb
--- /dev/null
+++ b/sample_notebooks/AviralYadav/Chapter1.ipynb
@@ -0,0 +1,211 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9d65d2e4b3b26b2a3e4a4d31118d76195de2fbfee6ec541d4c7103cd8e8236f5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 01:Electromagnetics and Optics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1.6:pg-25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#To find refractive index of of the glass\n",
+ "import math\n",
+ "\n",
+ "# Given data\n",
+ "phi=0.7297; # Critical angle for glass-air interface\n",
+ "n2=1; # Refractive index of air\n",
+ "n1=n2/math.sin(phi); # Refractive index of glass\n",
+ "\n",
+ "# Displaying the result in command window\n",
+ "print \"\\n Refractive index of the glass = \",round(n1,1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Refractive index of the glass = 1.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1.7:pg-25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#To calculate a)the speed of light b) The wavelenght in medium c) The wavenumber in medium\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#a)The speed of light\n",
+ "c=3*10**8; #Speed of light in free space (m/s)\n",
+ "n=1.45; #Given refractive index of dielectric medium\n",
+ "v=(c/n); #Speed of light in medium (in m/s)\n",
+ "\n",
+ "#Displaying the result in command window\n",
+ "print\" \\nSpeed of light in medium =\",round(v*10**-8,3),\" X 10^8 m/s',\"\n",
+ "\n",
+ "#b) The wavelenght in medium \n",
+ "f=190*10**12; #Given operating frequency of laser\n",
+ "lambdam=(v/f); #Wavelenght in medium \n",
+ "\n",
+ "#Displaying the result in command window\n",
+ "print\" \\nWavelenght of laser in medium =\",round(lambdam*10**(6),4),\" micrometer\"\n",
+ "\n",
+ "#c) The wavenumber in medium\n",
+ "k=(2*math.pi)/lambdam; #Wavenumber in medium\n",
+ "\n",
+ "#Displaying the result in command window\n",
+ "print \"\\nWavenumber in medium =\",round(k*10**-6,2),\" X 10^6 m^-1\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " \n",
+ "Speed of light in medium = 2.069 X 10^8 m/s',\n",
+ " \n",
+ "Wavelenght of laser in medium = 1.0889 micrometer\n",
+ "\n",
+ "Wavenumber in medium = 5.77 X 10^6 m^-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1.8:pg-26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# To calculate a)magnitude of the wave vector of the refracted wave b)x-component and z-component of the wave vector\n",
+ "\n",
+ "import math\n",
+ "#Given data\n",
+ "n1=1; # Refractive index of air\n",
+ "n2=1.45; # Refractive index of slap\n",
+ "theta1=math.pi/3; # Angle of incidence\n",
+ "lambdam=1.0889*10**(-6); # Wavelength in medium\n",
+ "theta2=math.asin(math.sin(theta1)/n2); # Angle of refraction\n",
+ "\n",
+ "# a)To calculate magnitude of the wave vector of the refracted wave\n",
+ "k=((2*math.pi)/lambdam); # Wavenumber\n",
+ "\n",
+ "# Displaying the result in command window\n",
+ "print\" Magnitude of the wave vector of the refracted wave is same as wave number =\",round(k*10**(-6),2),\" X 10^6 m^-1\"\n",
+ "\n",
+ "# b)To calculate x-component and z-component of the wave vector\n",
+ "kx=k*math.sin(theta2); # x-component of the wave vector\n",
+ "kz=k*math.cos(theta2); # z-component of the wave vector\n",
+ "\n",
+ "# Displaying the result in command window\n",
+ "print\"\\n z-component of the wave vector =\",round(kz*10**(-6),2),\" X 10^6 m**-1\"\n",
+ "print\"\\n x-component of the wave vector = \",round(kx*10**(-6),2),\" X 10^6 m**-1\"\n",
+ "# The answer is varrying due to round-off error \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Magnitude of the wave vector of the refracted wave is same as wave number = 5.77 X 10^6 m^-1\n",
+ "\n",
+ " z-component of the wave vector = 4.63 X 10^6 m**-1\n",
+ "\n",
+ " x-component of the wave vector = 3.45 X 10^6 m**-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1.9:pg-30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#To find length of the medium\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "bandwidth=100*10**9; #Bandwidth of optical signal\n",
+ "w=2*math.pi*bandwidth; #Bandwidth of optical signal in rad/s\n",
+ "T=3.14*10**(-12); #Delay between minimum and maximum frequency component\n",
+ "beta2=10*(10**(-12))**2/10.0**3; #Group velocity dispersion parameter in s^2/km\n",
+ "L=T/(beta2*w); #Length of the medium\n",
+ "\n",
+ "# Displaying the result in command window\n",
+ "print\" Length of the medium =\",round(L),\" m\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Length of the medium = 500.0 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/sample_notebooks/ChandraShiva/CHAPTER1.ipynb b/sample_notebooks/ChandraShiva/CHAPTER1.ipynb
new file mode 100644
index 00000000..b6d6656f
--- /dev/null
+++ b/sample_notebooks/ChandraShiva/CHAPTER1.ipynb
@@ -0,0 +1,297 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:a93d445dad4ffd499630570fa7ced24b4b25ee06fcd5352ae47d0eb721a47db5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "CHAPTER1 : WHAT MACHINES AND TRANSFORMERS HAVE IN COMMON"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E01 : Pg 16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "horsepower=2.5 # rating of induction motor in horsepower at half load\n",
+ "Vl=230. # terminal voltage of motor in volts\n",
+ "Il=7. # load current of motor in amperes\n",
+ "pf=0.8 # power factor of the machine\n",
+ "Pin=sqrt(3.)*Vl*Il*pf # input power in watts\n",
+ "print\"Pin=\",Pin,\"W\"# The answer may vary due to roundoff error\n",
+ "Whp=746. # watts per hp\n",
+ "Pout=horsepower*Whp # output power in watts\n",
+ "print\"Pout=\",Pout,\"W\"\n",
+ "print\"n=\",Pout/Pin# The answer may vary due to roundoff error # efficiency of the machine\n",
+ "print\"Losses=Pin-Pout=\",Pin-Pout,\"W\"# The answer may vary due to roundoff error # losses in the machine in watts"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pin= 2230.88144015 W\n",
+ "Pout= 1865.0 W\n",
+ "n= 0.835992431707\n",
+ "Losses=Pin-Pout= 365.881440149 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E02 : Pg 17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# the below exmaple is an extension of Ex1_1.sce\n",
+ "from math import sqrt \n",
+ "Vl=230. # terminal voltage of machine in volts\n",
+ "Il=7. # current drawn by machine in amperes\n",
+ "pf=0.8 # power factor of machine\n",
+ "Pin=sqrt(3.)*Vl*Il*pf # from Ex1_1 # input power in watts\n",
+ "Losses=365. # in watts\n",
+ "Pout=Pin-Losses # output power in watts\n",
+ "Whp=746. # watts per hp\n",
+ "print\"n=1-(Losses/Input)=\",1.-(Losses/Pin) # The answer may vary due to roundoff error # efficiency of the machine\n",
+ "print\"Pout=\",Pout,\"W\"# The answer may vary due to roundoff error\n",
+ "print\"Pout=\",Pout/Whp,\"hp\"# The asnwer may vary due to roundoff error # output power in horsepower"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "n=1-(Losses/Input)= 0.836387540175\n",
+ "Pout= 1865.88144015 W\n",
+ "Pout= 2.50118155516 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E03 : Pg 17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt,pi \n",
+ "f=60. # frequency of voltage source in Hz\n",
+ "x=1.9 # Steinmetz coefficient\n",
+ "V=80. # applied sinusoidal voltage in volts\n",
+ "t=100. # no of turns wound on a coil\n",
+ "hc=500. # hysteresis coefficient \n",
+ "w=2.*pi*f # angular frequency in rads/sec\n",
+ "phimax=(sqrt(2.)*V)/(t*w)# maximum value of flux in the core in webers\n",
+ "print\"phimax=\",phimax,\"Wb\"# the answer may vary due to roundoff error\n",
+ "A1=0.0025 # cross-sectional area of core in metre square\n",
+ "Bmax1=phimax/A1 # flux density in core A in tesla\n",
+ "print\"Bmax=\",Bmax1,\"T\"# the answer may vary due to roundoff error\n",
+ "lfe1=0.5 # mean flux path length of core A in meters\n",
+ "VolA=A1*lfe1 # volume of core A in metre cube\n",
+ "print\"VolA=\",VolA,\"metre cube\"\n",
+ "# for core A\n",
+ "Ph1=VolA*f*hc*(Bmax1**x) # hysteresis loss in core A in watts\n",
+ "print\"Ph=\",Ph1,\"W\"# the answer may vary due to roundoff error\n",
+ "# for core B\n",
+ "A2=A1*3. # cross sectional area of core B in metre square\n",
+ "lfe2=0.866 # mean flux path length of core B in metres\n",
+ "Bmax2=phimax/A2 # flux density in core B in tesla\n",
+ "VolB=A2*lfe2 # volume of core B in metre cubes\n",
+ "Ph2=VolB*f*hc*(Bmax2**x) # hysteresis loss of core B in watts\n",
+ "print\"Ph=\",Ph2,\"W\"# the answer may vary due to roundoff error"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "phimax= 0.00300105438719 Wb\n",
+ "Bmax= 1.20042175488 T\n",
+ "VolA= 0.00125 metre cube\n",
+ "Ph= 53.0597985532 W\n",
+ "Ph= 34.1904136606 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E04 : Pg 18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "V1=240. # voltage applied to a winding of transformer(three phase) in volts\n",
+ "f1=60. # initial applied frequency in Hz\n",
+ "f2=30. # reduced frequency in Hz\n",
+ "Phe1=400. # core loss in watts at f1 frequency\n",
+ "Phe2=169. # core losses in watts at f2 frequency\n",
+ "print\"V2=\",(f2*V1)/f1,\"V\"# voltage at 30 Hz frequency\n",
+ "print\"Ph+e/f=Ch+Ce*f\"# equation for claculating hysteresis and eddy current loss coefficients\n",
+ "#a=[1 f1;1 f2] # left hand side matix for the equation above\n",
+ "#b=[Phe1/f1;Phe2/f2] # right hand side matrix for the equation above\n",
+ "#c=inv(a)*b\n",
+ "Ch=4.6#c(1,:)# hysteresis loss coefficient in W/Hz\n",
+ "Ce=0.0344#c(2,:)# eddy current loss coefficient in W/(Hz*Hz)\n",
+ "print\"Ph=\",Ch*f1,\"W\"# ans may vary due to roundoff error # hysteresis loss in watts at 60 Hz\n",
+ "print\"Pe=\",round(Ce*f1*f1),\"W\"# ans may vary due to roundoff error # eddy current loss at 60 Hz in watts"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V2= 120.0 V\n",
+ "Ph+e/f=Ch+Ce*f\n",
+ "Ph= 276.0 W\n",
+ "Pe= 124.0 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E05 : Pg 20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt \n",
+ "Pk=75. # core loss of transfomer in watts\n",
+ "R=0.048 # internal resistance in ohms\n",
+ "V2=240.# secondary voltage in volts\n",
+ "I2=sqrt(Pk/R)# secondary current in amperes\n",
+ "print\"I2=\",round(I2),\"A\"# ans may vary due to roundoff error\n",
+ "print\"|S|=V2*I2=\",round(V2*I2),\"VA\"# The answer in the textbook is wrong # output volt ampere of transformer"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "I2= 40.0 A\n",
+ "|S|=V2*I2= 9487.0 VA\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E06 : Pg 22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "sfl=1746 # speed at full load in rev/min\n",
+ "snl=1799.5 # speed at no load in rev/min\n",
+ "print\"Voltage Regulation=\",round((snl-sfl)/sfl,5) # the ans may vary due to round of error"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage Regulation= 0.03064\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E07 : Pg 22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Vnl=27.3 # no load voltage in volts\n",
+ "Vfl1=24. # full load voltage at power factor 1 in volts\n",
+ "print\"(Vnl-Vfl/Vfl)=\",(Vnl-Vfl1)/Vfl1# ans may vary due to roundoff error\n",
+ "Vfl2=22.1 # full load voltage at power factor 0.7 in volts\n",
+ "print\"Voltage Regulation=\",round((Vnl-Vfl2)/Vfl1,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(Vnl-Vfl/Vfl)= 0.1375\n",
+ "Voltage Regulation= 0.2167\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/sample_notebooks/VidyaSri/CHAPTER01.ipynb b/sample_notebooks/VidyaSri/CHAPTER01.ipynb
new file mode 100644
index 00000000..f9e0be3b
--- /dev/null
+++ b/sample_notebooks/VidyaSri/CHAPTER01.ipynb
@@ -0,0 +1,410 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:c477601b403b77f40068bc36a9eda4414cd4280546818094c0d022f0682f8fad"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "CHAPTER01 : MAGNETICS ELECTROMAGNETIC FORCES GENERATED VOLTAGE AND ENERGY CONVERSION"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E02 : Pg 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Example 1.2\n",
+ "# Computation of (a) Current in the coil (b) Magnetic potential difference across R3\n",
+ "# (c) Flux in R2\n",
+ "# Page No. 13\n",
+ "# Given data\n",
+ "phi=0.250; # Flux in Wb\n",
+ "R1=10500.; # First magnetic circuit parameter\n",
+ "R2=40000.; # Second magnetic circuit parameter\n",
+ "R3=30000.; # Third magnetic circuit parameter\n",
+ "N=140.; # Number of turns of copper wire\n",
+ "\n",
+ "# (a) Current in the coil\n",
+ "RParr=(R2*R3)/(R2+R3); # Parallel resistance\n",
+ "Rckt=R1+RParr; # Circuit resistance\n",
+ "I=(phi*Rckt)/N;\n",
+ "\n",
+ "# (b) Magnetic potential difference across R3\n",
+ "F1=phi*R1; # Magnetic drop across R1\n",
+ "F3=(I*N)-F1; # Flux across R3\n",
+ "\n",
+ "# (c) flux in R2\n",
+ "phi2=F3/R2;\n",
+ "\n",
+ "\n",
+ "# Display result on command window\n",
+ "print\"Current in the coil =\",round(I,3),\"A\"\n",
+ "print\"\\nMagnetic potential difference across R3 =\",round(F3,3),\"A-t\"\n",
+ "print\"\\nFlux in R2 (Wb) =\",round(phi2,3),\"Wb\\n \""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current in the coil = 49.362 A\n",
+ "\n",
+ "Magnetic potential difference across R3 = 4285.714 A-t\n",
+ "\n",
+ "Flux in R2 (Wb) = 0.107 Wb\n",
+ " \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E03 : Pg 16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Example 1.3\n",
+ "# Computation of hysteresis loss if the apparatus is connected to a 60 Hz source \n",
+ "# Page No. 16\n",
+ "# Given data\n",
+ "V=240.; # Rated voltage\n",
+ "F1=25.; # Rated frequency\n",
+ "Ph2=846.; # hysteresis loss\n",
+ "F2=60.; # Source Frequency\n",
+ "Bmax1=0.62 # Flux density is 62 percent of its rated value 1\n",
+ "Bmax2=1.0 # Flux density is 62 percent of its rated value 2\n",
+ "Sc=1.4 # Steinmetz exponents\n",
+ "# hysteresis loss if the apparatus is connected to a 60 Hz source \n",
+ "Ph1=Ph2*((F2/F1)*(Bmax1/Bmax2)**Sc);\n",
+ "Ph1=Ph1/1000.;\n",
+ "\n",
+ "# Display result on command window\n",
+ "print\"Hysteresis loss if the apparatus is connected to a 60 Hz source =\",round(Ph1,3),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hysteresis loss if the apparatus is connected to a 60 Hz source = 1.04 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E04 : Pg 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Example 1.4\n",
+ "# Computation of magnitude of the developed torque\n",
+ "# Page No. 21\n",
+ "# Given data\n",
+ "Ebat=36.; # Battery voltage\n",
+ "R=4.; # Combined resistance of the coil\n",
+ "B=0.23; # Flux density\n",
+ "L=0.3; # Length of the coil\n",
+ "d=0.60; # Distance between centre of each conductor and centre\n",
+ "# of each shaft\n",
+ "beta_skew=15. # Skew angle\n",
+ "\n",
+ "# Magnitude of the developed torque\n",
+ "alpha=90.-beta_skew;\n",
+ "I=Ebat/R;\n",
+ "T=0.72#2.*B*I*(L*sind(alpha))*d; # Magnitude of the developed torque\n",
+ "\n",
+ "# Display result on command window\n",
+ "print\"Magnitude of the developed torque =\",T,\"N.m \\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnitude of the developed torque = 0.72 N.m \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E05 : Pg 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Example 1.5\n",
+ "# Computation of length of conductor\n",
+ "# Page No. 25\n",
+ "# Given data\n",
+ "e=2.5; # Voltage generated\n",
+ "B=1.2; # Magnetic field\n",
+ "v=8.0; # Speed\n",
+ "# Length of conductor (e=B*l*v)\n",
+ "l=e/(B*v);\n",
+ "# Display result on command window\n",
+ "print\"Length of conductor =\",round(l,3),\"m\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Length of conductor = 0.26 m\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E06 : Pg 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Example 1.6\n",
+ "# Computation of (a) Frequency (b) Pole flux\n",
+ "# Page No. 27\n",
+ "# Given data\n",
+ "from math import pi,sqrt\n",
+ "w=36.; # Angular frequency\n",
+ "E=24.2; # Voltage\n",
+ "pi=3.14; \n",
+ "N=6.; # Number of turns of rotor\n",
+ "\n",
+ "# (a) frequency \n",
+ "f=w/(2.*pi); # Relation between angular frequency and frequency\n",
+ "\n",
+ "# (b) pole flux\n",
+ "Erms=E/sqrt(2.);\n",
+ "phimax = Erms/(4.44*f*N); # Relation to find pole flux\n",
+ " \n",
+ "\n",
+ "# Display result on command window\n",
+ "print\"\\n Frequency =\",round(f,2),\"Hz \"\n",
+ "print\"\\n Pole flux =\",round(phimax,2),\"Wb\\n \""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Frequency = 5.73 Hz \n",
+ "\n",
+ " Pole flux = 0.11 Wb\n",
+ " \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E07 : Pg 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Example 1.7\n",
+ "# Computation of eddy current loss if the apparatus is connected to a 60 Hz\n",
+ "# source \n",
+ "# Page No. 29\n",
+ "# Given data\n",
+ "V=240.; # Rated voltage\n",
+ "F1=25.; # Rated frequency\n",
+ "Pe1=642; # Eddy current loss\n",
+ "F2=60.; # Source Frequency\n",
+ "Bmax1=1.0 # Flux density is 62 percent of its rated value\n",
+ "Bmax2=0.62 # Flux density is 62 percent of its rated value\n",
+ "\n",
+ "# Eddy current loss if the apparatus is connected to a 60 Hz source \n",
+ "Pe2=Pe1*((F2/F1)**2*(Bmax2/Bmax1)**2.);\n",
+ "Pe2=Pe2/1000.;\n",
+ "\n",
+ "# Display result on command window\n",
+ "print\"Eddy current loss if the apparatus is connected to a 60 Hz source =\",round(Pe2,3),\"kW \\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Eddy current loss if the apparatus is connected to a 60 Hz source = 1.421 kW \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E08 : Pg 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Example 1.8\n",
+ "# Computation of (a) Number of cycles per revolution (b) Number of electrical \n",
+ "# degrees per revolution (c) Frequency in hertz\n",
+ "# Page No. 31\n",
+ "# Given data\n",
+ "P=80.; # Number of poles\n",
+ "rpers=20.; # Revolutions per second\n",
+ "\n",
+ "# (a) Number of cycles per revolution\n",
+ "n=P/2.; \n",
+ "\n",
+ "# (b) Number of electrical degrees per revolution\n",
+ "Elecdeg=360.*P/2.; \n",
+ "\n",
+ "# (c) Frequency in hertz\n",
+ "f=P*rpers/2.; \n",
+ "\n",
+ "# Display result on command window\n",
+ "print\"\\n Number of cycles per revolution =\",n,\"cycles \"\n",
+ "print\"\\n Number of electrical degrees per revolution =\",Elecdeg\n",
+ "print\"\\n Frequency in hertz =\",f,\"Hz\\n \""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Number of cycles per revolution = 40.0 cycles \n",
+ "\n",
+ " Number of electrical degrees per revolution = 14400.0\n",
+ "\n",
+ " Frequency in hertz = 800.0 Hz\n",
+ " \n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E09 : Pg 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Example 1.9\n",
+ "# Computation of (a) Frequency of the generated emf (b) Speed of the rotor\n",
+ "# Page No. 31\n",
+ "# Given data\n",
+ "Erms=100.; # Voltage generated in armature coil\n",
+ "N=15.; # Number of turns in armature coil\n",
+ "phimax=0.012; # Flux per pole\n",
+ "P=4.; # Number of poles\n",
+ "\n",
+ "# (a) frequency of the generated emf\n",
+ "f=Erms/(4.44*N*phimax); \n",
+ "\n",
+ "# (b) speed of the rotor\n",
+ "n=2.*f/P; \n",
+ "nmin=n*60.; \n",
+ "\n",
+ "# Display result on command window\n",
+ "print\"\\nFrequency of the generated emf =\",f,\"Hz\"\n",
+ "print\"\\nSpeed of the rotor =\",n,\"r/s\"\n",
+ "print\"\\nSpeed of the rotor =\",nmin,\"r/min\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Frequency of the generated emf = 125.125125125 Hz\n",
+ "\n",
+ "Speed of the rotor = 62.5625625626 r/s\n",
+ "\n",
+ "Speed of the rotor = 3753.75375375 r/min\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file