summaryrefslogtreecommitdiff
path: root/sample_notebooks/Haseen
diff options
context:
space:
mode:
authorThomas Stephen Lee2015-08-28 16:53:23 +0530
committerThomas Stephen Lee2015-08-28 16:53:23 +0530
commitdb0855dbeb41ecb8a51dde8587d43e5d7e83620f (patch)
treeb95975d958cba9af36cb1680e3f77205354f6512 /sample_notebooks/Haseen
parent5a86a20b9de487553d4ef88719fb0fd76a5dd6a7 (diff)
downloadPython-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.gz
Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.bz2
Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.zip
add books
Diffstat (limited to 'sample_notebooks/Haseen')
-rwxr-xr-xsample_notebooks/Haseen/ch4.ipynb376
1 files changed, 376 insertions, 0 deletions
diff --git a/sample_notebooks/Haseen/ch4.ipynb b/sample_notebooks/Haseen/ch4.ipynb
new file mode 100755
index 00000000..c4d5994a
--- /dev/null
+++ b/sample_notebooks/Haseen/ch4.ipynb
@@ -0,0 +1,376 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Ch-4, Permanent Magnet Generators"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1 page 222 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi, floor\n",
+ "# Given data\n",
+ "kf=0.12 # in Nm/A\n",
+ "V=48 #in volt\n",
+ "\n",
+ "#Calculations\n",
+ "omega_mo=V/kf#in radian/sec\n",
+ "No=omega_mo*60/(2*pi)#in rpm\n",
+ "print \"No load speed in rpm =\",floor(No) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "No load speed in rpm = 3819.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2 page 223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "Tst=1.0 # in N-m\n",
+ "Ist=5.0 #in Ampere\n",
+ "V=28.0 #in volt\n",
+ "\n",
+ "#Calculations\n",
+ "kf=Tst/Ist #in Nm/A\n",
+ "omega_m=V/kf#in radian/sec\n",
+ "No=omega_m*60/(2*pi)#in rpm\n",
+ "print \"No load speed in rpm =\", No "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "No load speed in rpm = 1336.90152197\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3 page 223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "Ra=0.8 #in \u03a9\n",
+ "Vdd=2 #in volt\n",
+ "V=28 #in volt\n",
+ "T1=0.3 # in N-m\n",
+ "Tst=1 # in N-m\n",
+ "Ist=5 #in Ampere\n",
+ "\n",
+ "#Calculations\n",
+ "#We know : Tst = fi_1*Ist and T1 = IL*fi_2\n",
+ "#Deviding these two eqn we have\n",
+ "IL=(T1/Tst)*Ist/0.8 #in Ampere\n",
+ "Ebo=V #in volt\n",
+ "NLbyNo=(V-IL*Ra-Vdd)/(0.8*Ebo) # temporary calculation for NL\n",
+ "No=1337 #in rpm\n",
+ "NL=NLbyNo*No #in rpm\n",
+ "print \"Speed of motor in rpm =\",NL "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Speed of motor in rpm = 1462.34375\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4 page 224"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "ke=0.12 #in Nm/A\n",
+ "V=48 #in volt\n",
+ "Rph=0.15 #in \u03a9\n",
+ "Vdd=2 #in volt\n",
+ "\n",
+ "#Calculations\n",
+ "omega_mo=V/ke#in radian/sec\n",
+ "No=omega_mo*60/(2*pi)#in rpm\n",
+ "print \"No load speed in rpm =\",No \n",
+ "\n",
+ "Ist=(V-Vdd)/(2*Rph) #in Ampere\n",
+ "Tst=ke*Ist # in N-m\n",
+ "print \"Starting Torque in N-m =\",Tst \n",
+ "#Note : answer is wrong in the book."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "No load speed in rpm = 3819.71863421\n",
+ "Starting Torque in N-m = 18.4\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5 page 225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "Vs=120 #in volt\n",
+ "V=60 #in volt\n",
+ "Ra=2.5 #in \u03a9\n",
+ "T=0.5 # in N-m\n",
+ "N=6000#in rpm\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "omega_mo=2*pi*N/60#in radian/sec\n",
+ "ke=Vs/omega_mo #in Nm/A\n",
+ "Ia=T/ke #in Ampere\n",
+ "E=V-Ia*Ra #in Volt\n",
+ "omega_m=E/ke#in radian/sec\n",
+ "N=omega_m/(2*pi/60) #in rpm\n",
+ "print \"Speed in rpm =\",N \n",
+ "#Note : answer is wrong in the book because calculation is not accurate. ."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Speed in rpm = 2672.75076525\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6 page 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data\n",
+ "lm=6*10**-3 #magnet length in m\n",
+ "g=2*10**-3 #in m\n",
+ "Tph=200.0 #turns\n",
+ "Br=0.3 #in T\n",
+ "l=50*10**-3 #in m\n",
+ "n=25*10**-3 #in m\n",
+ "I=10*10**-3 #in A\n",
+ "N=200.0 #turns\n",
+ "mo=4.0*pi*10**-7 #permittivity\n",
+ "#Calculations\n",
+ "Am=(2/3)*pi*(n-g-lm/2)*l #in m**2\n",
+ "Ag=((2/3)*pi*(n-g/2)+2*g)*(l+2*g) #in m**2 \n",
+ "Cfi=Am/Ag #unitless\n",
+ "#For normal BLDG motor, HC=606 KA/M\n",
+ "HC=606 #in KA/M\n",
+ "Hm=N*I/l #KA/M\n",
+ "Bm=Br*(1-Hm/HC) #in T\n",
+ "Mrec=(Br-Bm)*10**-3.0/(4*pi*10**-7*40) \n",
+ "Pmo=mo*Mrec*Am/lm #in m-Wb/AT\n",
+ "Pmo=Pmo*10**-3 #in Wb/AT\n",
+ "Kc=1.05 #given constant\n",
+ "g_dash=Kc*g #in m\n",
+ "Rg=g_dash/mo/Am \n",
+ "Bg=Cfi*Br/(1+Pmo*Rg) #in T\n",
+ "Torque=2*Tph*Bg*l*n*I #in N-m\n",
+ "print \"Torque per phase in N-m =\",Torque "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Torque per phase in N-m = 0.00107194515868\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.7 page 228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sin, sqrt, pi\n",
+ "# Given data\n",
+ "P=16 #no.of poles\n",
+ "slots=144 #no. of slotes\n",
+ "conductors=10 #per slot\n",
+ "fi=0.03 #in mb/pole\n",
+ "N=375#in rpm\n",
+ "\n",
+ "#Calculations\n",
+ "f=P*N/120 #in Hz\n",
+ "print f,\"Frequency in Hz = \" \n",
+ "kc=1 #for full pitcheed coil\n",
+ "n=slots/P #slots per pole\n",
+ "Beta=180/n #in degree\n",
+ "m=n/3 #slots per pole per phase\n",
+ "kd=sin(3*Beta/2*pi/180)/(m*sin(Beta/2*pi/180)) #Distribution factor\n",
+ "Z=conductors*slots #total no. of conductors\n",
+ "Zph=Z/3 # no. of armature per phase conductions\n",
+ "Tph=Zph/2 #turns/ph\n",
+ "Eph=4.44*kc*kd*f*fi*Tph #in volts\n",
+ "print Eph,\"Phase Voltage in volts = \" \n",
+ "VL=sqrt(3)*Eph #in volt\n",
+ "print \"Line Voltage in Volts =\",VL "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "50.0 Frequency in Hz = \n",
+ "1534.13645671 Phase Voltage in volts = \n",
+ "Line Voltage in Volts = 2657.20228876\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.8 page 229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import cos\n",
+ "# Given data\n",
+ "P=4 #no.of poles\n",
+ "phase=3 #no. of phase\n",
+ "slots=36 #no. of stator slotes\n",
+ "turns=20 #turns per coil\n",
+ "conductors=10 #per slot\n",
+ "fi_m=1.8 #in m wb\n",
+ "N=3000#in rpm\n",
+ "\n",
+ "#Calculations\n",
+ "f=P*N/120 #in Hz\n",
+ "Tph=turns*phase*P #no. of turns per phase\n",
+ "m=slots/(phase*P) #slots per pole per phase\n",
+ "n=slots/P #slots per pole\n",
+ "beta=180/n #in degree\n",
+ "kd1=sin(3*beta/2*pi/180)/(m*sin(beta/2*pi/180)) #Distribution factor\n",
+ "alfa=2*beta #in degree(Short Pitched by 2slots)\n",
+ "kp1=cos(alfa/2*pi/180) #unitless\n",
+ "ks1=1 #coefficient\n",
+ "kn1=kd1*kp1*ks1 #winding factor\n",
+ "Eq=4.44*f*fi_m*10**-3*kn1*Tph #in volts\n",
+ "print \"Open Circuit Phase emf in Volts =\",Eq "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Open Circuit Phase emf in Volts = 172.994004918\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}