summaryrefslogtreecommitdiff
path: root/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA
diff options
context:
space:
mode:
authorkinitrupti2017-05-12 18:53:46 +0530
committerkinitrupti2017-05-12 18:53:46 +0530
commit6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d (patch)
tree22789c9dbe468dae6697dcd12d8e97de4bcf94a2 /BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA
parentd36fc3b8f88cc3108ffff6151e376b619b9abb01 (diff)
downloadPython-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.gz
Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.bz2
Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.zip
Removed duplicates
Diffstat (limited to 'BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA')
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter10.ipynb1357
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter11.ipynb929
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter12.ipynb1251
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter13.ipynb1498
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter14.ipynb1213
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter15.ipynb957
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter16.ipynb1654
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter17.ipynb332
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter18.ipynb542
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter2.ipynb1532
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter3.ipynb2116
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter4.ipynb1106
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter5.ipynb841
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter6.ipynb627
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter7.ipynb975
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter8.ipynb1188
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter9.ipynb1092
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/README.txt10
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/screenshots/Screenshot1.pngbin0 -> 102574 bytes
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/screenshots/Screenshot2.pngbin0 -> 71004 bytes
-rwxr-xr-xBASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/screenshots/Screenshot3.pngbin0 -> 75482 bytes
21 files changed, 19220 insertions, 0 deletions
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter10.ipynb b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter10.ipynb
new file mode 100755
index 00000000..946a157a
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter10.ipynb
@@ -0,0 +1,1357 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10: AC CIRCUITS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.1,Page number: 274 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power factor and the average power dissipated.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi,cos,degrees\n",
+ "from cmath import rect,phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vm=141.0 #Peak value of supply voltage(in Volts)\n",
+ "ang_freq=100.0*pi #Angular frequency(in radians per second) \n",
+ "R=3.0 #Resistance(in Ohms) \n",
+ "L=0.0127 #Self-inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calcultaions:\n",
+ "Vrms=Vm/sqrt(2.0)\n",
+ "V=rect(Vrms,0.0)\n",
+ "X_L=ang_freq*L\n",
+ "Z=R+ (X_L*1j)\n",
+ "I=V/Z\n",
+ "ang_I=degrees(phase(I))\n",
+ "P=Vrms*abs(I)*cos(phase(I))\n",
+ "pf=cos(phase(I))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The rms value of the steady-state current is %.2f A and the relative phase angle is %.2f degrees.\" %(abs(I),-ang_I)\n",
+ "print \"(b)The expression for the instantaneous current is i=%.3f sin(100*pi*t%.2f degrees) A.\" %((sqrt(2)*abs(I)),ang_I)\n",
+ "print \"(c)The average power dissipated in the circuit is %.2f W.\" %(P)\n",
+ "print \"(d)The power factor is %.3f lagging.\" %(pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The rms value of the steady-state current is 19.97 A and the relative phase angle is 53.06 degrees.\n",
+ "(b)The expression for the instantaneous current is i=28.246 sin(100*pi*t-53.06 degrees) A.\n",
+ "(c)The average power dissipated in the circuit is 1196.75 W.\n",
+ "(d)The power factor is 0.601 lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.2,Page number: 276"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the capacitance required,the phase angle,the power factor,the apparent power,and the reactive power.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi,degrees,acos,cos,sin\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "V=230.0 #Rms value of supply voltage(in Volts)\n",
+ "f=50.0 #Frequency of supply(in Hertz) \n",
+ "P_lamp=750.0 #Power rating of the lamp(in Watts) \n",
+ "V_lamp=100.0 #Voltage rating of the lamp(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_rated=P_lamp/V_lamp\n",
+ "Vc=sqrt((V*V)-(V_lamp*V_lamp))\n",
+ "Xc=Vc/I_rated\n",
+ "C=1/(2*pi*f*Xc)\n",
+ "phase_angle=acos(V_lamp/V)\n",
+ "pf=cos(phase_angle)\n",
+ "app_P=V*I_rated\n",
+ "rea_P=V*I_rated*sin(phase_angle)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The required capacitance is %e F.\" %(C)\n",
+ "print \"(b)The phase angle is %.3f degrees.\" %(degrees(phase_angle))\n",
+ "print \"(c)The power factor is %.3f leading.\" %(pf)\n",
+ "print \"(d)The apparent power is %.3f VA.\" %(app_P)\n",
+ "print \"(e)The reactive power is %.3f VAr.\" %(rea_P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The required capacitance is 1.152611e-04 F.\n",
+ "(b)The phase angle is 64.229 degrees.\n",
+ "(c)The power factor is 0.435 leading.\n",
+ "(d)The apparent power is 1725.000 VA.\n",
+ "(e)The reactive power is 1553.424 VAr.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.3,Page number: 277 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question: \n",
+ "\"\"\"Finding the impedance,the power factor,supply voltage,voltage across resistor,apparent power and reactive power.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import pi,cos,sin,degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=rect(0.9,0) #Current in the circuit(in Amperes)\n",
+ "R=120.0 #Resistance of the resistor(in Ohms) \n",
+ "Xc=250.0 #Reactance of the capacitor(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z=R- Xc*1j\n",
+ "pf=cos(phase(Z))\n",
+ "V=I*Z\n",
+ "V_R=I*R\n",
+ "V_C=I*Xc\n",
+ "act_P=abs(V)*abs(I)*cos(phase(Z))\n",
+ "app_P=abs(V)*abs(I)\n",
+ "rea_P=abs(V)*abs(I)*sin(phase(Z))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The impedance is %.3f ohm at a phase angle of %.3f degrees.\" %(abs(Z),degrees(phase(Z)))\n",
+ "print \"The power factor is %.3f leading.\" %(pf)\n",
+ "print \"The supply voltage is %.3f V at a phase angle of %.3f degrees.\" %(abs(V),degrees(phase(V)))\n",
+ "print \"The voltage across resistor is %.3f V at a phase angle of %.3f degrees.\" %(abs(V_R),degrees(phase(V_R)))\n",
+ "print \"The voltage across capacitor is %.3f V at a phase angle of %.3f degrees.\" %(abs(V_C),-90)\n",
+ "print \"The apparent power is %.3f VA.\" %(app_P)\n",
+ "print \"The active power is %.3f W.\" %(act_P)\n",
+ "print \"The reactive power is %.3f VAr.\" %(rea_P)\n",
+ "print \"Note: Negative sign indicates the capacitor supplies reactive power.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The impedance is 277.308 ohm at a phase angle of -64.359 degrees.\n",
+ "The power factor is 0.433 leading.\n",
+ "The supply voltage is 249.578 V at a phase angle of -64.359 degrees.\n",
+ "The voltage across resistor is 108.000 V at a phase angle of 0.000 degrees.\n",
+ "The voltage across capacitor is 225.000 V at a phase angle of -90.000 degrees.\n",
+ "The apparent power is 224.620 VA.\n",
+ "The active power is 97.200 W.\n",
+ "The reactive power is -202.500 VAr.\n",
+ "Note: Negative sign indicates the capacitor supplies reactive power.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.4,Page number: 279 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the impedance of the circuit and state whether it is inductive or capacitive.\"\"\"\n",
+ "\n",
+ "from cmath import phase,rect\n",
+ "from math import pi,degrees,radians,cos,sin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=160.0 +120.0*1j #ac sinusoidal voltage(in Volts) \n",
+ "I=-4.0+10.0*1j #Current in circuit(in Amperes) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z=V/I\n",
+ "\n",
+ "if Z.imag>0:\n",
+ " print(\"The nature of circuit is inductive\\n\")\n",
+ " pf_type=\"lagging\"\n",
+ "\n",
+ "elif Z.imag<0:\n",
+ " print(\"The nature of circuit is capacitive\\n\")\n",
+ " pf_type=\"leading\" \n",
+ " \n",
+ "else:\n",
+ " print(\"The nature of circuit is resistive\\n\")\n",
+ "\n",
+ "pf=cos(phase(Z))\n",
+ "act_P=abs(V)*abs(I)*pf\n",
+ "rea_P=abs(V)*abs(I)*sin(pi+phase(Z))\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The power factor is %.3f %s.\" %(pf,pf_type)\n",
+ "print \"The active power is %.2f W.\" %(act_P)\n",
+ "print \"The reactive power is %.2f VAr.\" %(rea_P) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The nature of circuit is capacitive\n",
+ "\n",
+ "The power factor is 0.260 leading.\n",
+ "The active power is 560.00 W.\n",
+ "The reactive power is 2080.00 VAr.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.5,Page number: 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the values of the two circuit elements.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50 #Frequency of the source(in Hertz)\n",
+ "Z=10+10*1j #Impedance of the circuit(in Ohm) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "ang_freq=2*pi*f\n",
+ "R=Z.real\n",
+ "X_L=Z.imag\n",
+ "L=X_L/ang_freq\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The nature of the impedance indicates that the circiut is inductive.\\n\"\n",
+ "print \"The values of the two elements are: \\n(a)Resistance(R)=%.2f ohm \\n(b)Inductance(C)=%e H.\" %(R,L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The nature of the impedance indicates that the circiut is inductive.\n",
+ "\n",
+ "The values of the two elements are: \n",
+ "(a)Resistance(R)=10.00 ohm \n",
+ "(b)Inductance(C)=3.183099e-02 H.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.6,Page number: 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the values of the two circuit elements.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50.0 #Frequency of the source(in Hertz)\n",
+ "Z=10.0-10.0*1j #Impedance of the circuit(in Ohm) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "ang_freq=2.0*pi*f\n",
+ "Y=1.0/Z\n",
+ "R=1/Y.real\n",
+ "C=Y.imag/ang_freq\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The nature of the impedance indicates that the circiut is capacitive.\\n\"\n",
+ "print \"The values of the two elements are: \\n(a)Resistance(R)=%.2f ohm \\n(b)Capacitance(C)=%e F.\" %(R,C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The nature of the impedance indicates that the circiut is capacitive.\n",
+ "\n",
+ "The values of the two elements are: \n",
+ "(a)Resistance(R)=20.00 ohm \n",
+ "(b)Capacitance(C)=1.591549e-04 F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.7,Page number: 281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the impedance,the current,the phase angle,the voltage across each element and power factor.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import cos,pi,degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=12.0 #Resistance of the resistor(in Ohms)\n",
+ "L=0.15 #Self-inductance of the inductor(in Henry)\n",
+ "C=100e-06 #Capacitance of the capacitor(in Farad)\n",
+ "f=50 #Frequency of the source(in Hertz) \n",
+ "V=rect(100,0) #Supply voltage(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "ang_freq=2*pi*f\n",
+ "X_L=ang_freq*L\n",
+ "X_C=1/(ang_freq*C)\n",
+ "Z=R + (X_L-X_C)*1j\n",
+ "\n",
+ "if Z.imag>0:\n",
+ " pf_type=\"lagging\"\n",
+ "\n",
+ "elif Z.imag<0:\n",
+ " pf_type=\"leading\" \n",
+ " \n",
+ "else:\n",
+ " print(\"The nature of circuit is resistive\\n\")\n",
+ "\n",
+ "I=V/Z\n",
+ "V_R=abs(I)*R\n",
+ "V_C=abs(I)*X_C\n",
+ "V_L=abs(I)*X_L\n",
+ "pf=cos(phase(I))\n",
+ "app_P=abs(V)*abs(I)\n",
+ "avg_P=abs(V)*abs(I)*pf\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The impedance is %.3f ohm at a phase angle of %.3f degrees.\" %(abs(Z),degrees(phase(Z)))\n",
+ "print \"(b)The current is %.3f A at a phase angle of %.3f degrees.\" %(abs(I),degrees(phase(I)))\n",
+ "print \"(c)The phase angle is %.3f degrees.\" %(degrees(phase(I)))\n",
+ "print \"(d)The voltage across the resistor is %.2f V.\" %(V_R) \n",
+ "print \" The voltage across the capacitor is %.2f V.\\n The voltage across the inductor is %.2f V.\" %(V_C,V_L)\n",
+ "print \"(e)The power factor is %.3f %s.\" %(pf,pf_type)\n",
+ "print \"(f)The apparent power is %.3f VA.\" %(app_P) \n",
+ "print \"(g)The average power is %.3f W.\" %(avg_P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The impedance is 19.439 ohm at a phase angle of 51.880 degrees.\n",
+ "(b)The current is 5.144 A at a phase angle of -51.880 degrees.\n",
+ "(c)The phase angle is -51.880 degrees.\n",
+ "(d)The voltage across the resistor is 61.73 V.\n",
+ " The voltage across the capacitor is 163.75 V.\n",
+ " The voltage across the inductor is 242.42 V.\n",
+ "(e)The power factor is 0.617 lagging.\n",
+ "(f)The apparent power is 514.431 VA.\n",
+ "(g)The average power is 317.567 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.8,Page number: 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across the capacitor by applying Thevenin's theorem.\"\"\"\n",
+ "\n",
+ "from math import sqrt,degrees\n",
+ "from cmath import rect,phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "\"\"\" Note: All the impedances are expresssed in kilo ohm.\"\"\" \n",
+ "ang_freq=3000.0 #Angular frequency(in radians per second)\n",
+ "Vs_m=40.0 #Peak value of the supply voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vs_rms=Vs_m/sqrt(2.0)\n",
+ "Vs=rect(Vs_rms,0)\n",
+ "Zeq=1.5 + ((1.0-(2.0*1j))/(1j+1.0-2.0*1j))*1.0j\n",
+ "I=Vs/Zeq\n",
+ "Im=abs(I)*sqrt(2)\n",
+ "V_Th=Vs*(1j/(1.5+1j))\n",
+ "Z_Th=1+ ((1.5*1j)/(1.5+1j))\n",
+ "Vc=V_Th*((-2*1j)/(Z_Th-2*1j))\n",
+ "Z_L=Z_Th.real-Z_Th.imag*1j \n",
+ "C=1/(ang_freq*abs(Z_L.imag)*1000)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The expression for i(t) can be written as i(t)=%.1f sin(%dt%.2fdegrees) mA.\" %(Im,ang_freq,degrees(phase(I)))\n",
+ "print \"(b)The voltage across the capacitor by applying Thevenin's theorem is %.3f V at a phase angle of %.3f degrees.\" %(abs(Vc),degrees(phase(Vc)))\n",
+ "print \"(c)The values of the two elements of the load impedance that consumes maximum power are R=%e kilo Ohms and C=%e F.\" %(Z_L.real,C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The expression for i(t) can be written as i(t)=16.0 sin(3000t-36.87degrees) mA.\n",
+ "(b)The voltage across the capacitor by applying Thevenin's theorem is 16.000 V at a phase angle of 8.130 degrees.\n",
+ "(c)The values of the two elements of the load impedance that consumes maximum power are R=1.461538e+00 kilo Ohms and C=4.814815e-07 F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.9,Page number: 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of resistance for a desired power factor.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "from cmath import atan\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "pf=0.8 #Power factor of the circuit\n",
+ "X_C=60.0 #Capacitive reactance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "sin_ang=sqrt(1-(pf*pf))\n",
+ "tan_ang=sin_ang/pf\n",
+ "R=X_C/tan_ang\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of R for which the power factor of the circuit is 0.8 is %.2f Ohms.\" %(R)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of R for which the power factor of the circuit is 0.8 is 80.00 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.10,Page number: 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance and the inductance of the coil.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vdc=20.0 #Supply dc voltage(in Volts)\n",
+ "Idc=4.0 #Current drawn by the coil(in Amperes)\n",
+ "f=50.0 #Frequency of supply voltage(in Hertz)\n",
+ "Vs=65.0 #Ac supply voltage(in Volts)\n",
+ "I=5.0 #Current drawn by the choke when connected ac supply(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R=Vdc/Idc\n",
+ "Z=Vs/I\n",
+ "X_L=sqrt((Z*Z)-(R*R))\n",
+ "L=X_L/(2*pi*f)\n",
+ "pf=R/Z\n",
+ "P=Vs*I*pf\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The resistance of the coil is %.2f Ohms and the inductance of the coil is %.5f H.\" %(R,L)\n",
+ "print \"(b)The power factor is %.3f lagging.\" %(pf)\n",
+ "print \"(c)The power(real) drawn by the coil is %.3f W.\" %(P) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The resistance of the coil is 5.00 Ohms and the inductance of the coil is 0.03820 H.\n",
+ "(b)The power factor is 0.385 lagging.\n",
+ "(c)The power(real) drawn by the coil is 125.000 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.11,Page number: 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance and inductance of the coil.\"\"\"\n",
+ "\n",
+ "from math import pi,pow,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vs=240.0 #AC supply voltage(in Volts)\n",
+ "f1=50.0 #Frequency of the ac supply voltage(in Hertz) \n",
+ "I1=60.0 #First reading of the ammeter(in Amperes)\n",
+ "f2=100.0 #Frequency of the ac supply voltage(in Hertz)\n",
+ "I2=40.0 #Second reading of the ammeter(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z1=Vs/I1\n",
+ "Z2=Vs/I2\n",
+ "L=sqrt(((Z2*Z2)-(Z1*Z1))/((pow((200*pi),2.0))-(pow((100*pi),2.0))))\n",
+ "X1=2*pi*f1*L\n",
+ "R=sqrt((Z1*Z1)-(X1*X1))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance of the coil is %.2f Ohms.\" %(R)\n",
+ "print \"The inductance of the coil is %.5f H.\" %(L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance of the coil is 3.06 Ohms.\n",
+ "The inductance of the coil is 0.00822 H.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.12,Page number: 287 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power consumed by the choke coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=100.0 #Resistance of the resistor(in Ohms)\n",
+ "V_R=200.0 #Voltage across resistor(in Volts)\n",
+ "V_Ch=300.0 #Voltage across choke coil(in Volts)\n",
+ "Vs=440.0 #Supply voltage(in Volts)\n",
+ "\n",
+ " \n",
+ "#Calculations:\n",
+ "pf=((Vs*Vs)-(V_R*V_R)-(V_Ch*V_Ch))/(2*V_R*V_Ch)\n",
+ "I=V_R/R\n",
+ "P=V_Ch*I*pf\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The power consumed by the choke coil is %.2f W.\" %(P) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power consumed by the choke coil is 318.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.13,Page number: 287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power dissipated in each coil.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "from cmath import phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R1=15.0 #Resistance of the first coil(in Ohms)\n",
+ "L1=0.2 #Inductance of the first coil(in Henry)\n",
+ "R2=25.0 #Resistance of the second coil(in Ohms)\n",
+ "L2=0.04 #Inductance of the second coil(in Henry)\n",
+ "V=230.0 #Supply voltage(in Volts)\n",
+ "f=50.0 #Frequency of supply voltage(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "X1=2*pi*f*L1\n",
+ "X2=2*pi*f*L2\n",
+ "Z1=R1+(1j*X1)\n",
+ "Z2=R2+(1j*X2)\n",
+ "Z=Z1+Z2\n",
+ "I=V/Z\n",
+ "V1=abs(I)*abs(Z1)\n",
+ "V2=abs(I)*abs(Z2)\n",
+ "P1=abs(I)*abs(I)*R1\n",
+ "P2=abs(I)*abs(I)*R2\n",
+ "pf=cos(phase(I))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The voltage across the first coil is %.2f V and the voltage across the second coil is %.2f V.\" %(V1,V2)\n",
+ "print \"(b)The power dissipated by the first coil is %.2f W and power dissipated by the second coil is %.2f W.\" %(P1,P2)\n",
+ "print \"(c)The power factor of the whole circuit is %.3f lagging.\" %(pf) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The voltage across the first coil is 174.07 V and the voltage across the second coil is 75.40 V.\n",
+ "(b)The power dissipated by the first coil is 108.92 W and power dissipated by the second coil is 181.54 W.\n",
+ "(c)The power factor of the whole circuit is 0.469 lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.14,Page number: 288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current and power drawn from the source.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I_A=8.0 #Current through coil A(in Amperes)\n",
+ "I_B=10.0 #Current through coil B(in Amperes)\n",
+ "V=100.0 #Voltage of the source(in Volts)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "P_A=120.0 #Power delivered to coil A(in Watts) \n",
+ "P_B=500.0 #Power delivered to coil B(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z_A=V/I_A\n",
+ "Z_B=V/I_B\n",
+ "R_A=P_A/(I_A*I_A)\n",
+ "R_B=P_B/(I_B*I_B)\n",
+ "X_A=sqrt((Z_A*Z_A)-(R_A*R_A))\n",
+ "X_B=sqrt((Z_B*Z_B)-(R_B*R_B))\n",
+ "R=R_A+R_B\n",
+ "X=X_A+X_B\n",
+ "Z=sqrt((R*R)+(X*X))\n",
+ "I=V/Z\n",
+ "P=I*I*R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current when the two coils are in series is %.2f A and the power taken from the source is %.2f W.\" %(I,P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current when the two coils are in series is 4.52 A and the power taken from the source is 140.58 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.15,Page number: 288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage drop across each coil.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=240.0 #Voltage of the source(in Volts)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "R_A=5.0 #Resistance of coil A(in Ohms)\n",
+ "L_B=0.015 #Inductance of the coil B(in Henry)\n",
+ "P=3e03 #Active power(in Watts)\n",
+ "Q=2e03 #Reactive power(in VAr)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "S=sqrt((P*P)+(Q*Q))\n",
+ "I=S/V\n",
+ "R_B=(P/(I*I))-R_A\n",
+ "X_B=2*pi*f*L_B\n",
+ "X_A=(Q/(I*I))-X_B\n",
+ "L_A=X_A/(2*pi*f)\n",
+ "Z_A=sqrt((R_A*R_A)+(X_A*X_A))\n",
+ "Z_B=sqrt((R_B*R_B)+(X_B*X_B))\n",
+ "V_A=Z_A*I\n",
+ "V_B=Z_B*I\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The resistance of coil B is %.2f Ohms.\" %(R_B)\n",
+ "print \"(b)The inductance of coil A is %.5f Henry.\" %(L_A)\n",
+ "print \"(c)The voltage drop across coil A is %.2f V and across coil B is %.2f V.\" %(V_A,V_B)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The resistance of coil B is 8.29 Ohms.\n",
+ "(b)The inductance of coil A is 0.01321 Henry.\n",
+ "(c)The voltage drop across coil A is 97.61 V and across coil B is 143.29 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.16,Page number: 289"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the total power consumed by the circuit and the power factor of the circuit.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=100.0 #Power rating of the bulb(in Watts)\n",
+ "V=120.0 #Voltage rating of the bulb(in Volts)\n",
+ "Vs=240.0 #Supply voltage(in Volts)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I=P/V\n",
+ "V_R=Vs-V\n",
+ "R=V_R/I\n",
+ "pf_a=1.0\n",
+ "Pt_a=Vs*I\n",
+ "V_C=sqrt((Vs*Vs)-(V*V))\n",
+ "X_C=V_C/I\n",
+ "C=1/(2*pi*X_C*f)\n",
+ "pf_b=V/Vs\n",
+ "Pt_b=Vs*I*pf_b\n",
+ "Vr=I*10.0\n",
+ "V_L=sqrt((Vs*Vs)-((V+Vr)*(V+Vr)))\n",
+ "X_L=V_L/I\n",
+ "L=X_L/(2*pi*f)\n",
+ "V_R_c=V+Vr\n",
+ "pf_c=V_R_c/Vs\n",
+ "Pt_c=Vs*I*pf_c\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The value of the component used R=%.2f Ohms.\" %(R)\n",
+ "print \" The total power consumed is %.2f W.\" %(Pt_a)\n",
+ "print \" The power factor is %.2f.\" %(pf_a)\n",
+ "print \"(b)The value of the component used C=%e Farad.\" %(C)\n",
+ "print \" The total power consumed is %.2f W.\" %(Pt_b)\n",
+ "print \" The power factor is %.2f leading.\" %(pf_b)\n",
+ "print \"(c)The value of the component used R=10 Ohms and L=%.3f Henry.\" %(L)\n",
+ "print \" The total power consumed is %.2f W.\" %(Pt_c)\n",
+ "print \" The power factor is %.3f lagging.\" %(pf_c)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The value of the component used R=144.00 Ohms.\n",
+ " The total power consumed is 200.00 W.\n",
+ " The power factor is 1.00.\n",
+ "(b)The value of the component used C=1.276224e-05 Farad.\n",
+ " The total power consumed is 100.00 W.\n",
+ " The power factor is 0.50 leading.\n",
+ "(c)The value of the component used R=10 Ohms and L=0.775 Henry.\n",
+ " The total power consumed is 106.94 W.\n",
+ " The power factor is 0.535 lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.17,Page number: 289\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of capacitance C in the cirucit.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=20.0 #Resistance connected in series(in Ohms)\n",
+ "L=15e-03 #Pure inductance in parallel with the capacitor(in Henry)\n",
+ "ang_fre=1000.0 #Angular frequency of voltage source(in radians per second)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "X_L=ang_fre*L\n",
+ "X=R*tan(pi/4.0)\n",
+ "\"\"\"Case 1:(X is inductive)\"\"\"\n",
+ "X_C1=1.0/((1.0/X_L)-(1.0/X))\n",
+ "C1=1.0/(ang_fre*X_C1)\n",
+ "\"\"\"Case 2:(X is capacitive)\"\"\"\n",
+ "X_C2=1.0/((1.0/X_L)+(1.0/X))\n",
+ "C2=1.0/(ang_fre*X_C2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of capacitance is:\"\n",
+ "print \"Case 1: If net reactance X is inductive, C=%e Farad.\" %(C1) \n",
+ "print \"Case 2: If net reactance X is capacitive, C=%e Farad.\" %(C2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of capacitance is:\n",
+ "Case 1: If net reactance X is inductive, C=1.666667e-05 Farad.\n",
+ "Case 2: If net reactance X is capacitive, C=1.166667e-04 Farad.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.18,Page number: 290\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding total current in the circuit.\"\"\"\n",
+ "\n",
+ "from cmath import phase\n",
+ "from math import degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Z1=(12+1j*15) #Impedance of the first branch(in Ohms) \n",
+ "Z2=(8-1j*4) #Impedance of the second branch(in Ohms)\n",
+ "V=(230+1j*0) #Potential difference across the parallel combination(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=V/Z1\n",
+ "I2=V/Z2\n",
+ "I=I1+I2\n",
+ "P=abs(V)*abs(I)*cos(phase(I))\n",
+ "P1=abs(I1)*abs(I1)*(Z1.real)\n",
+ "P2=abs(I2)*abs(I2)*(Z2.real)\n",
+ "pf1=Z1.real/abs(Z1)\n",
+ "pf2=Z2.real/abs(Z2)\n",
+ "pf=cos(phase(I))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current supplied to branch 1 is %.2f A at a phase angle of %.2f degrees.\" %(abs(I1),degrees(phase(I1))) \n",
+ "print \" The current supplied to branch 2 is %.2f A at a phase angle of %.2f degrees.\" %(abs(I2),degrees(phase(I2))) \n",
+ "print \" The total current is %.2f A at a phase angle of %.2f degrees.\\n\" %(abs(I),degrees(phase(I)))\n",
+ "print \"(b)The power consumed by branch 1 is %.2f W.\" %(P1)\n",
+ "print \" The power consumed by branch 2 is %.2f W.\" %(P2)\n",
+ "print \" The total power consumed is %.2f W.\\n\" %(P)\n",
+ "print \"(c)The power factor of branch 1 is %.4f lagging.\" %(pf1)\n",
+ "print \" The power factor of branch 2 is %.4f leading.\" %(pf2)\n",
+ "print \" The overall power factor of the circuit is %.4f leading.\" %(pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current supplied to branch 1 is 11.97 A at a phase angle of -51.34 degrees.\n",
+ " The current supplied to branch 2 is 25.71 A at a phase angle of 26.57 degrees.\n",
+ " The total current is 30.56 A at a phase angle of 4.04 degrees.\n",
+ "\n",
+ "(b)The power consumed by branch 1 is 1720.33 W.\n",
+ " The power consumed by branch 2 is 5290.00 W.\n",
+ " The total power consumed is 7010.33 W.\n",
+ "\n",
+ "(c)The power factor of branch 1 is 0.6247 lagging.\n",
+ " The power factor of branch 2 is 0.8944 leading.\n",
+ " The overall power factor of the circuit is 0.9975 leading.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.19,Page number: 290\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance and inductance of a coil.\"\"\"\n",
+ "\n",
+ "from math import acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=230.0 #Voltage of the supply(in Volts)\n",
+ "f=50.0 #Frequency of the supply ac voltage(in Hertz)\n",
+ "R=50.0 #Reistance in series with the coil(in Ohms) \n",
+ "V_coil=180.0 #Voltage across coil(in Volts)\n",
+ "V_R=130.0 #Voltage across resistance(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I=V_R/R\n",
+ "\"\"\"From parallelogram OACB,the angle theta is calculated.\"\"\"\n",
+ "cos_theta=((V*V)-(V_R*V_R)-(V_coil*V_coil))/(2*V_R*V_coil)\n",
+ "theta=acos(cos_theta)\n",
+ "V_L=V_coil*sin(theta)\n",
+ "V_r=V_coil*cos(theta)\n",
+ "L=V_L/(I*2*pi*f)\n",
+ "r=V_r/I\n",
+ "P=I*V_r\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The resistance of the coil is %.2f Ohms and the inductance is %.2f H.\" %(r,L)\n",
+ "print \"(b)The power dissipated in the coil is %.2f W.\" %(P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The resistance of the coil is 5.33 Ohms and the inductance is 0.22 H.\n",
+ "(b)The power dissipated in the coil is 36.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.20,Page number: 291\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the component values of the circuit.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt,radians,cos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vm=141.4 #Peak value of supply voltage(in Volts) \n",
+ "Im=7.07 #Peak value of current in the series circuit(in Amperes)\n",
+ "ang_fre=2000.0 #Angular frequency of the ac signal(in radians per second) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V=Vm/sqrt(2.0)\n",
+ "I=Im/sqrt(2.0)\n",
+ "Z=V/I\n",
+ "\"\"\" We know that V=I*Z; \n",
+ " \n",
+ " 100=5*sqrt((R*R)+(X_C*X_C));\n",
+ " \n",
+ " (R*R)+(X_C*X_C)=400; \n",
+ " \n",
+ " From the triangle OAB,\n",
+ " \n",
+ " cos(36.87)=V_R/V; \"\"\"\n",
+ "R=(V*cos(radians(36.87)))/I\n",
+ "X_C=sqrt((Z*Z)-(R*R))\n",
+ "C=1.0/(ang_fre*X_C)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The elements of the circuit are R=%.2f Ohms and C=%e Farad.\" %(R,C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The elements of the circuit are R=16.00 Ohms and C=4.166657e-05 Farad.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.21,Page number: 292\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage and current by Thevenin's theorem.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import degrees,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vs=rect(100,radians(20))\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Using voltage divider rule,\"\"\"\n",
+ "Z2=((1j*20)*(15-1j*30))/((1j*20)+(15-1j*30))\n",
+ "Z=10+Z2\n",
+ "I=Vs/Z\n",
+ "V2_div=Vs*(Z2/(10+Z2))\n",
+ "V1_div=V2_div*((-1j*30)/(15-1j*30))\n",
+ "\"\"\"Using Thevenin's theorem,\"\"\"\n",
+ "V_Th=Vs*((15-1j*30)/(10+15-1j*30))\n",
+ "Z_Th=(10*(15-1j*30))/(10+(15-1j*30))\n",
+ "V2=V_Th*((1j*20)/(Z_Th+1j*20))\n",
+ "V_Th=Vs*((1j*20)/(10+1j*20))\n",
+ "Z_Th=15+(1.0/((1.0/10)+(1.0/(1j*20))))\n",
+ "V1=V_Th*((-1j*30)/(Z_Th-1j*30))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)By voltage divider rule,\"\n",
+ "print \"(i)The current I is %.2f A at an angle of %.2f degrees.\" %(abs(I),degrees(phase(I))) \n",
+ "print \"(ii)The voltage V1 is %.2f V at an angle of %.2f degrees.\" %(abs(V1_div),degrees(phase(V1_div)))\n",
+ "print \"(b)By applying Thevenin's theorem,\"\n",
+ "print \"(i)The voltage V1 is %.2f V at an angle of %.2f degrees.\" %(abs(V1),degrees(phase(V1)))\n",
+ "print \"(ii)The voltage V2 is %.2f V at an angle of %.2f degrees.\" %(abs(V2),degrees(phase(V2)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)By voltage divider rule,\n",
+ "(i)The current I is 2.32 A at an angle of -28.62 degrees.\n",
+ "(ii)The voltage V1 is 77.30 V at an angle of 5.07 degrees.\n",
+ "(b)By applying Thevenin's theorem,\n",
+ "(i)The voltage V1 is 77.30 V at an angle of 5.07 degrees.\n",
+ "(ii)The voltage V2 is 86.42 V at an angle of 31.63 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.22,Page number: 293\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current by Norton's theorem.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import degrees,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Is=rect(20,radians(45)) #Current supplied by current source(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Using current divider rule,\"\"\"\n",
+ "Z2=(1j*3)+1.0/((1.0/4)+(1.0/(-1j*5)))\n",
+ "I=Is*(2/(Z2+2))\n",
+ "I_R_div=I*((-1j*5)/(4-1j*5))\n",
+ "\"\"\"Using Norton's theorem,\"\"\"\n",
+ "I_N=Is*(2/(2+1j*3))\n",
+ "Z_N=1.0/((1.0/(2+1j*3))+(1.0/(-1j*5)))\n",
+ "I_R=I_N*(Z_N/(Z_N+4))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)By current divider rule,\"\n",
+ "print \" The current I_R is %.2f A at an angle of %.2f degrees.\" %(abs(I_R_div),degrees(phase(I_R_div)))\n",
+ "print \"(a)By Norton's theorem,\"\n",
+ "print \" The current I_R is %.2f A at an angle of %.2f degrees.\" %(abs(I_R),degrees(phase(I_R)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)By current divider rule,\n",
+ " The current I_R is 6.85 A at an angle of -6.95 degrees.\n",
+ "(a)By Norton's theorem,\n",
+ " The current I_R is 6.85 A at an angle of -6.95 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.23,Page number: 294\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage by Thevenin's theorem.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import radians,degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vs=rect(200,radians(30.0))\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z2=((40)*(20+1j*50))/(40+(20+1j*50))\n",
+ "V2=(Vs*Z2)/(Z2-1j*20)\n",
+ "V_div=V2*(20/(20+1j*50))\n",
+ "V_Th=Vs*(40/(40-1j*20))\n",
+ "Z_Th=(1j*50)+1.0/((1.0/(-1j*20))+(1.0/40))\n",
+ "V=(V_Th*20)/(Z_Th+20)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)V using voltage divider rule is %.2f V at an angle of %.2f degrees.\" %(abs(V_div),degrees(phase(V_div)))\n",
+ "print \"(b)The voltage V using Thevenin's theorem is %.2f V at an angle of %.2f degrees.\" %(abs(V),degrees(phase(V)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)V using voltage divider rule is 81.23 V at an angle of 6.04 degrees.\n",
+ "(b)The voltage V using Thevenin's theorem is 81.23 V at an angle of 6.04 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter11.ipynb b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter11.ipynb
new file mode 100755
index 00000000..e9007ce3
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter11.ipynb
@@ -0,0 +1,929 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11: RESONANCE IN AC CIRCUITS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.1,Page number: 315"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resonant frequency,quality factor,voltage across each element in a series RLC circuit.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=12.0 #Resistance of resistor(in Ohms)\n",
+ "L=0.15 #Self-inductance of inductor(in Henry)\n",
+ "C=100e-06 #Capacitance of capacitor(in Farads) \n",
+ "V=100.0 #Voltage(rms) of ac source(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "resonant_freq=1/(2.0*pi*sqrt(L*C))\n",
+ "I_max=V/R\n",
+ "freq_c=(sqrt((1.0/(L*C))-(0.5*pow((R/L),2))))/(2.0*pi)\n",
+ "freq_l=1.0/(sqrt((L*C)-(0.5*pow((R*C),2)))*2*pi)\n",
+ "cap_rea=1.0/(2.0*pi*freq_l*C)\n",
+ "ind_rea=2.0*pi*round(freq_l,2)*L\n",
+ "Q=cap_rea/R\n",
+ "Vr=V\n",
+ "Vl=Q*V\n",
+ "Vc=Vl\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The Resonant frequency(at which the circuit current becomes maximum) is %.2f Hz.\" %(resonant_freq)\n",
+ "print \"(b)The maximum current supplied by the source is %.2f A.\" %(I_max)\n",
+ "print \"(c)The frequency at which voltage across the capacitor is maximum is %.2f Hz.\" %(freq_c)\n",
+ "print \"(d)The frequency at which voltage across the inducttor is maximum is %.2f Hz.\" %(freq_l)\n",
+ "print \"(e)The inductive reactance is %.2f Ohms.\" %(ind_rea)\n",
+ "print \"(f)The capacitive reactance is %.2f Ohms.\" %(cap_rea)\n",
+ "print \"(g)The quality factor of the circiut is %.2f.\" %(Q)\n",
+ "print \"(h)The voltage drop across resistor is %.2f V.\" %(Vr)\n",
+ "print \" The voltage drop across inductor is %.2f V.\" %(Vl)\n",
+ "print \" The voltage drop across capacitor is %.2f V.\" %(Vc) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The Resonant frequency(at which the circuit current becomes maximum) is 41.09 Hz.\n",
+ "(b)The maximum current supplied by the source is 8.33 A.\n",
+ "(c)The frequency at which voltage across the capacitor is maximum is 40.10 Hz.\n",
+ "(d)The frequency at which voltage across the inducttor is maximum is 42.12 Hz.\n",
+ "(e)The inductive reactance is 39.70 Ohms.\n",
+ "(f)The capacitive reactance is 37.79 Ohms.\n",
+ "(g)The quality factor of the circiut is 3.15.\n",
+ "(h)The voltage drop across resistor is 100.00 V.\n",
+ " The voltage drop across inductor is 314.91 V.\n",
+ " The voltage drop across capacitor is 314.91 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.2,Page number: 316"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the capacitance value to give resonance in a series RLC circuit. \"\"\"\n",
+ "\n",
+ "from math import pi,sqrt,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "res_freq=50.0 #Resonant frequency(in Hertz)\n",
+ "L=0.5 #Self-inductance of inductor(in Henry)\n",
+ "R=4.0 #Resistance of resistor(in Ohms)\n",
+ "V=100.0 #Voltage of the supply(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1/(pow((2*pi*res_freq),2)*L)\n",
+ "I_max=V/R\n",
+ "V_L=I_max*(2*pi*res_freq*L)\n",
+ "V_C=V_L\n",
+ "Q=(2.0*pi*res_freq*L)/R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The capacitance to give resonance is %e F.\" %(C)\n",
+ "print \"(b)The voltage across the inductor is %.2f V.\" %(V_L)\n",
+ "print \" The voltage across the capacitor is %.2f V.\" %(V_C)\n",
+ "print \"(c)The quality factor of the circuit is %.2f.\" %(Q)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The capacitance to give resonance is 2.026424e-05 F.\n",
+ "(b)The voltage across the inductor is 3926.99 V.\n",
+ " The voltage across the capacitor is 3926.99 V.\n",
+ "(c)The quality factor of the circuit is 39.27.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.3,Page number: 317 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the inductance,the circuit current and the voltage across the capacitor under resonance.\"\"\"\n",
+ "\n",
+ "from math import pi,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "res_freq=175e03 #Resonant frequency(in Hertz) \n",
+ "V=0.85 #Voltage applied(in Volts)\n",
+ "Q=50.0 #Quality factor of the coil\n",
+ "C=320e-012 #Capacitance of the capacitor(in Farads)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L=1/(pow((2*pi*res_freq),2)*C)\n",
+ "ind_rea=2*pi*res_freq*L\n",
+ "R=ind_rea/Q\n",
+ "Io=V/R\n",
+ "Vc=Q*V\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of inductance is %e H.\" %(L)\n",
+ "print \"The circuit current is %e A.\" %(Io)\n",
+ "print \"The voltage across the capacitor under resonance is %.2f V.\" %(Vc)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of inductance is 2.584724e-03 H.\n",
+ "The circuit current is 1.495398e-02 A.\n",
+ "The voltage across the capacitor under resonance is 42.50 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.4,Page number: 317"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current at the resonant frequency and the energy stored by inductor.\"\"\"\n",
+ "\n",
+ "from math import pow,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "res_freq=5e03 #Resonant frequency(in Hertz)\n",
+ "L=1e-03 #Self-inductance of the inductor(in Henry)\n",
+ "V=120.0 #Voltage of the supply(in Volts)\n",
+ "R=2.0 #Resistance of the coil(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1/(pow((2*pi*res_freq),2)*L)\n",
+ "I_max=V/R\n",
+ "\"\"\" U=0.5*L*I*I=L*Irms*Irms\"\"\"\n",
+ "U=L*I_max*I_max\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required value of capacitance is %e F.\" %(C)\n",
+ "print \"(a)The current at the resonance frequency is %.2f A.\" %(I_max)\n",
+ "print \"(b)The maximum instantaneous energy is %.2f J.\" %(U)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required value of capacitance is 1.013212e-06 F.\n",
+ "(a)The current at the resonance frequency is 60.00 A.\n",
+ "(b)The maximum instantaneous energy is 3.60 J.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.5,Page number: 318"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resonance frequency and the quality factor for the overall circuit.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R1=0.51 #Resistor of the resistor-1(in Ohms) \n",
+ "R2=1.3 #Resistor of the resistor-2(in Ohms) \n",
+ "R3=0.24 #Resistor of the resistor-3(in Ohms)\n",
+ "L1=32e-03 #Self-inductance of the inductor-1(in Henry)\n",
+ "L2=15e-03 #Self-inductance of the inductor-2(in Henry)\n",
+ "C1=25e-06 #Capacitance of the capacitor-1(in Farads)\n",
+ "C2=62e-06 #Capacitance of the capacitor-2(in Farads)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Req=R1+R2+R3\n",
+ "Leq=L1+L2\n",
+ "Ceq=(C1*C2)/(C1+C2)\n",
+ "res_freq=1/(2*pi*sqrt(Leq*Ceq))\n",
+ "Q=(sqrt(Leq/Ceq))/Req\n",
+ "Q1=(2*pi*res_freq*L1)/R1\n",
+ "Q2=(2*pi*res_freq*L2)/R2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The resonance frequency is %.2f Hz.\" %(res_freq)\n",
+ "print \"(b)The quality factor of the overall circuit is %.2f.\" %(Q)\n",
+ "print \"(c)The quality factor of coil-1 is %.2f.\" %(Q1)\n",
+ "print \"(d)The quality factor of coil-2 is %.2f.\" %(Q2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The resonance frequency is 173.93 Hz.\n",
+ "(b)The quality factor of the overall circuit is 25.05.\n",
+ "(c)The quality factor of coil-1 is 68.57.\n",
+ "(d)The quality factor of coil-2 is 12.61.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.6,Page number: 320"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the half-power frequencies of a series ac circuit.\"\"\"\n",
+ "\n",
+ "from math import pow,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "bandwidth=75e03 #Bandwidth of the resonant circuit(in Hertz) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "pro=pow((150e03),2)\n",
+ "sum=sqrt(pow(bandwidth,2)+(4*pro))\n",
+ "f2=(sum+bandwidth)/2.0\n",
+ "f1=(sum-bandwidth)/2.0\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"Lower Half-power frequency is %e Hz.\" %(f1)\n",
+ "print \"Upper Half-power frequency is %e Hz.\" %(f2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Lower Half-power frequency is 1.171165e+05 Hz.\n",
+ "Upper Half-power frequency is 1.921165e+05 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.7,Page number: 324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the line current,quality factor and the dynamic impedance of a series-parallel ac circuit.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=200e-06 #Self-inductance of the inductor coil(in Henry) \n",
+ "res_freq=1e06 #Resonant frequency(in Hertz)\n",
+ "R=20.0 #Resistance of the coil(in Ohms)\n",
+ "Rs=8e03 #Series resistance(in Ohms)\n",
+ "V=230.0 #Voltage(rms) of the supply(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1/(pow((2*pi*res_freq),2)*L)\n",
+ "XL=2*pi*res_freq*L\n",
+ "Q=XL/R\n",
+ "Zo=L/(C*R)\n",
+ "Z=Zo+Rs\n",
+ "I=V/Z\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The value of capacitance to cause resonance is %e F.\" %(C)\n",
+ "print \"(b)The Q factor of the circuit is %.5f.\" %(Q)\n",
+ "print \"(c)The dynamic impedance of the parallel resonant circuit is %.2f Ohms.\" %(Zo)\n",
+ "print \"(d)The total line current is %e A.\" %(I) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The value of capacitance to cause resonance is 1.266515e-10 F.\n",
+ "(b)The Q factor of the circuit is 62.83185.\n",
+ "(c)The dynamic impedance of the parallel resonant circuit is 78956.84 Ohms.\n",
+ "(d)The total line current is 2.644990e-03 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.8,Page number: 325"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resonant frequency,Q-factor and bandwidth of a practical parallel resonant circuit.\"\"\"\n",
+ "\n",
+ "from math import pow,sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=150.0 #Resistance of the coil(in Ohms)\n",
+ "L=0.24 #Self-inductance of the coil(in Henry)\n",
+ "C=3e-06 #Capacitance of the capacitor(in Farads)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "res_freq=(sqrt(1-((R*R*C)/L)))/(2*pi*sqrt(L*C))\n",
+ "Q=(2*pi*res_freq*L)/R\n",
+ "BW=res_freq/Q\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resonant frequency is %.2f Hz.\" %(res_freq)\n",
+ "print \"The quality factor is %.2f.\" %(Q)\n",
+ "print \"The bandwidth is %.2f Hz.\" %(BW)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resonant frequency is 159.02 Hz.\n",
+ "The quality factor is 1.60.\n",
+ "The bandwidth is 99.47 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.9,Page number: 326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the source frequency and the current supplied by the source.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi,pow,degrees\n",
+ "from cmath import phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=125.0 #Voltage of the source(in Volts)\n",
+ "C=20.5e-06 #Capacitance of the capacitor(in Farads)\n",
+ "R=1.06 #Resistance of the coil(in Ohms)\n",
+ "L=25.4e-03 #Inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "fo=1.0/(2*pi*sqrt(L*C))\n",
+ "Io=V/R\n",
+ "V_L=Io*(2*pi*fo*L)\n",
+ "V_C=V_L\n",
+ "X_L=(2*pi*fo*L)\n",
+ "Z_coil=R+(1j*X_L)\n",
+ "V_coil=Io*Z_coil\n",
+ "I=300.0/X_L\n",
+ "R_new=V/I\n",
+ "Rx=R_new-R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a) (i)The source frequency is %.2f Hz, and\\n (ii)The current supplied by the source is %.2f A.\\n\" %(fo,Io)\n",
+ "print \"(b) (i)The voltage across the capacitor is %.2f V and\" %(V_C)\n",
+ "print \" (ii)The voltage across the coil is %.2f V at an angle of %.2f degrees.\\n\" %(abs(V_coil),degrees(phase(V_coil)))\n",
+ "print \"(c)The resistance that must be connected in series with the circuit to limit the capacitor voltage to 300V is %.3f Ohms.\" %(Rx)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) (i)The source frequency is 220.56 Hz, and\n",
+ " (ii)The current supplied by the source is 117.92 A.\n",
+ "\n",
+ "(b) (i)The voltage across the capacitor is 4150.92 V and\n",
+ " (ii)The voltage across the coil is 4152.80 V at an angle of 88.28 degrees.\n",
+ "\n",
+ "(c)The resistance that must be connected in series with the circuit to limit the capacitor voltage to 300V is 13.607 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.10,Page number: 326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the maximum instantaneous energy stored in the inductor.\"\"\"\n",
+ "\n",
+ "from math import pow,pi,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=3.0 #Resistance of the coil(in Ohms)\n",
+ "L=12e-03 #Self-inductance of the coil(in Henry)\n",
+ "fo=9e03 #Resonant frequency(in Hertz)\n",
+ "V=240.0 #Supply voltage(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1.0/(pow((2*pi*fo),2)*L)\n",
+ "Io=V/R\n",
+ "ener=0.5*L*Io*Io\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of capacitance to be connected in series with the coil is %e F.\" %(C)\n",
+ "print \"The maximum instantaneous energy stored in the inductor is %.2f J.\" %(ener)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of capacitance to be connected in series with the coil is 2.605998e-08 F.\n",
+ "The maximum instantaneous energy stored in the inductor is 38.40 J.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.11,Page number: 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the parameters of a series RLC circuit.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "fo=10e03 #Resonant frequency(in Hertz)\n",
+ "BW=1e03 #Bandwidth(in HErtz)\n",
+ "P=15.3 #Power drawn(in Watts)\n",
+ "V=200.0 #Voltage of generator(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_R=V\n",
+ "R=(V_R*V_R)/P\n",
+ "\"\"\" Q=fo/BW=(2*pi*fo*L)/R; Q=Quality factor of the circuit. \"\"\"\n",
+ "L=R/(2*pi*BW)\n",
+ "C=1.0/(pow((2*pi*fo),2)*L)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The parameters of the circuit are:\\n R=%.2f Ohms,\\n L=%.3f H,\\n C=%e F.\" %(R,L,C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The parameters of the circuit are:\n",
+ " R=2614.38 Ohms,\n",
+ " L=0.416 H,\n",
+ " C=6.087677e-10 F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.12,Page number: 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the half-power frequencies and the circuit current.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "fo=200.0 #Resonant frequency(in Hertz)\n",
+ "V=400.0 #Voltage of the source(in Volts)\n",
+ "R=20e-03 #Resistance of the coil(in Ohms)\n",
+ "L=6e-03 #Inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1.0/(pow((2*pi*fo),2)*L)\n",
+ "Io=V/R\n",
+ "X_C=1.0/(2*pi*fo*C)\n",
+ "V_C=Io*X_C\n",
+ "Im=sqrt(2)*Io\n",
+ "U_max=0.5*L*Im*Im\n",
+ "Q=(2*pi*fo*L)/R\n",
+ "BW=fo/Q\n",
+ "f1=fo-(BW/2.0)\n",
+ "f2=fo+(BW/2.0)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The capacitance of the capacitor is %e F.\" %(C)\n",
+ "print \"(b)The circuit current is %.2f kA.\" %(Io/1000)\n",
+ "print \"(c)The voltage across the capacitor is %.2f kV.\" %(V_C/1000)\n",
+ "print \"(d)The maximum energy stored in the coil is %.2f MJ.\" %(U_max/1000000)\n",
+ "print \"(e)The lower half-power frequency is %.3f Hz and the upper half-power frequency is %.3f Hz.\" %(f1,f2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The capacitance of the capacitor is 1.055429e-04 F.\n",
+ "(b)The circuit current is 20.00 kA.\n",
+ "(c)The voltage across the capacitor is 150.80 kV.\n",
+ "(d)The maximum energy stored in the coil is 2.40 MJ.\n",
+ "(e)The lower half-power frequency is 199.735 Hz and the upper half-power frequency is 200.265 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.13,Page number: 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the bandwidth,resonant frequency,inductance and capacitance.\"\"\"\n",
+ "\n",
+ "from math import pi,pow,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=1e03 #Resistance of the resistor(in Ohms)\n",
+ "f1=20e03 #Lower half-power frequency(in Hertz) \n",
+ "f2=100e03 #Upper half-power frequency(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "BW=f2-f1\n",
+ "res_freq=sqrt(f1*f2)\n",
+ "Q=res_freq/BW\n",
+ "L=(Q*R)/(2*pi*res_freq)\n",
+ "C=1.0/(pow((2*pi*res_freq),2)*L)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The bandwidth is %.2f kHz.\" %(BW/1000.0)\n",
+ "print \"(b)The resonant frequency is %.2f kHz.\" %(res_freq/1000.0)\n",
+ "print \"(c)The inductance is %e H.\" %(L)\n",
+ "print \"(d)The capacitance is %e F.\" %(C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The bandwidth is 80.00 kHz.\n",
+ "(b)The resonant frequency is 44.72 kHz.\n",
+ "(c)The inductance is 1.989437e-03 H.\n",
+ "(d)The capacitance is 6.366198e-09 F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.14,Page number: 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power at half-power frequencies.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=5.0 #Resistance of resistor(in Ohms)\n",
+ "V=20.0 #Voltage of the source(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Zo=R\n",
+ "Io=V/Zo\n",
+ "Po=(Io*Io)*R\n",
+ "P_half=Po/2.0\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The power at half-power frequencies is %.2f W.\" %(P_half) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power at half-power frequencies is 40.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.15,Page number: 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the half-power frequencies and the quality factor.\"\"\"\n",
+ "\n",
+ "from math import pi,pow,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "res_freq=100.0 #Resonant frequency(in Hertz)\n",
+ "V=240.0 #Voltage of the source(in Volts)\n",
+ "R=55e-03 #Resistance of the coil(in Ohms)\n",
+ "L=7e-03 #Self-inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=1.0/(pow((2*pi*res_freq),2)*L)\n",
+ "Q=(2*pi*res_freq*L)/R\n",
+ "BW=res_freq/Q\n",
+ "f1=res_freq-(BW/2.0)\n",
+ "f2=res_freq+(BW/2.0)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The value of the capacitance is %e F.\" %(C)\n",
+ "print \"(b)The quality factor of the circuit is %.2f.\" %(Q)\n",
+ "print \"(c)The lower half-power frequency is %.2f Hz and The upper half-power frequency is %.2f Hz.\" %(f1,f2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The value of the capacitance is 3.618614e-04 F.\n",
+ "(b)The quality factor of the circuit is 79.97.\n",
+ "(c)The lower half-power frequency is 99.37 Hz and The upper half-power frequency is 100.63 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.16,Page number: 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resonance frequency and the effective resistance at resonance.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=20.0 #Resistance of the coil(in Ohms)\n",
+ "L=0.2 #Inductance of the coil(in Henry)\n",
+ "C=100e-06 #Capacitance of the capacitor(in Farads)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "res_freq=sqrt(1-((R*R*C)/L))/(2*pi*sqrt(L*C))\n",
+ "Zo=L/(C*R)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The frequency at which the circuit behaves as a non-inductive reactance is %.2f Hz.\" %(res_freq)\n",
+ "print \"The effective resistance at resonance is %.2f Ohms.\" %(Zo) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency at which the circuit behaves as a non-inductive reactance is 31.83 Hz.\n",
+ "The effective resistance at resonance is 100.00 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.17,Page number: 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the quality factor at the upper tuning frequency.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pow,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=20e-06 #Self-inductance of the coil(in Henry)\n",
+ "fo_1=570e03 #Lower tuning frequency(in Hertz) \n",
+ "fo_2=1560e03 #Upper tuning frequency(in Hertz)\n",
+ "Q1=50.0 #Quality factor at the lower tuning frequency\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C1=1.0/(pow((2*pi*fo_1),2)*L)\n",
+ "C2=1.0/(pow((2*pi*fo_2),2)*L)\n",
+ "R=(2*pi*fo_1*L)/Q1\n",
+ "BW=fo_1/Q1\n",
+ "Q2=(2*pi*fo_2*L)/R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The range of tuning capacitor is from %.3f nF to %.3f nF.\" %((C2*1e09),(C1*1e09))\n",
+ "print \"(b)The resistance of the coil is %.3f Ohms and the bandwidth of the circuit is %.3f kHz.\" %(R,(BW/1000))\n",
+ "print \"(c)The quality factor of the circuit at the upper tuning frequency is %.3f.\" %(Q2) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The range of tuning capacitor is from 0.520 nF to 3.898 nF.\n",
+ "(b)The resistance of the coil is 1.433 Ohms and the bandwidth of the circuit is 11.400 kHz.\n",
+ "(c)The quality factor of the circuit at the upper tuning frequency is 136.842.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter12.ipynb b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter12.ipynb
new file mode 100755
index 00000000..eb96a9e1
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter12.ipynb
@@ -0,0 +1,1251 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12: THREE-PHASE CIRCUITS AND SYSTEMS "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.1,Page number: 347"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current drawn from the power mains by a balanced three-phase load.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=32 #Resistance of the load(in Ohms)\n",
+ "X_L=24 #Inductive reactance of the load(in Ohms) \n",
+ "V_L=400 #Line Voltage(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z=R + X_L *1j\n",
+ "Z_mod=abs(Z)\n",
+ "V_ph_star=V_L/(sqrt(3))\n",
+ "I_ph_star=V_ph_star/Z_mod\n",
+ "I_L_star=I_ph_star\n",
+ "V_ph_delta=V_L\n",
+ "I_ph_delta=V_ph_delta/Z_mod\n",
+ "I_L_delta=I_ph_delta*(sqrt(3))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)For star connection:\"\n",
+ "print \"The current drawn from the power mains is %.3f A.\" %(I_L_star)\n",
+ "print \"(b)For delta connection:\"\n",
+ "print \"The current drawn from the power mains is %.3f A.\" %(I_L_delta)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)For star connection:\n",
+ "The current drawn from the power mains is 5.774 A.\n",
+ "(b)For delta connection:\n",
+ "The current drawn from the power mains is 17.321 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.2,Page number: 347"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in each line and the current in the nuetral conductor for a star-connected three-phase system.\"\"\"\n",
+ "\n",
+ "from math import sqrt,cos,sin,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=415 #Line voltage(in Volts)\n",
+ "P_R=10e03 #Load in Red line(in kilo-Watts)\n",
+ "P_Y=8e03 #Load in Yellow line(in kilo-Watts)\n",
+ "P_B=5e03 #Load in Blue line(in kilo-Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vph=V_L/sqrt(3)\n",
+ "I_R=P_R/Vph\n",
+ "I_Y=P_Y/Vph\n",
+ "I_B=P_B/Vph\n",
+ "I_H=(I_Y*cos(pi/6))-(I_B*cos(pi/6))\n",
+ "I_V=I_R-(I_Y*sin(pi/6))-(I_B*sin(pi/6))\n",
+ "I_N=sqrt((I_H*I_H)+(I_V*I_V))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current taken by the 10-kW load is %.2f A.\" %(I_R) \n",
+ "print \" The current taken by the 8-kW load is %.2f A.\" %(I_Y) \n",
+ "print \" The current taken by the 5-kW load is %.2f A.\" %(I_B)\n",
+ "print \"(b)The current in the nuetral conductor is %.2f A.\" %(I_N)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current taken by the 10-kW load is 41.74 A.\n",
+ " The current taken by the 8-kW load is 33.39 A.\n",
+ " The current taken by the 5-kW load is 20.87 A.\n",
+ "(b)The current in the nuetral conductor is 18.19 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.3,Page number: 348"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the phase currents and the line currents.\"\"\"\n",
+ "\n",
+ "from math import cos,pi,atan,radians,degrees,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50 #Frequency of the source(in Hertz)\n",
+ "V_L=415 #Line Voltage(in Volts)\n",
+ "R1=100 #Resistance of the first load(in Ohms)\n",
+ "R2=20.0 #Resistance of the second load(in Ohms)\n",
+ "L2=191e-03 #Self-inductance of the second load(in Henry)\n",
+ "R3=0.0 #Resistance of the third load(in Ohms)\n",
+ "C3=30e-06 #Capacitance of the third load(in Farads)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z1=R1\n",
+ "angle_1=0.0\n",
+ "X2=2*pi*f*L2\n",
+ "Z2=sqrt((R2*R2)+(X2*X2))\n",
+ "angle_2=atan(X2/R2)\n",
+ "Z3=1/(2*pi*f*C3)\n",
+ "angle_3=pi/2\n",
+ "Vph=V_L\n",
+ "I1=Vph/Z1\n",
+ "I2=Vph/Z2\n",
+ "I3=Vph/Z3\n",
+ "I_R=sqrt((I1*I1)+(I3*I3)+(2*I1*I3*cos(pi/6)))\n",
+ "angle_Y=radians(degrees(angle_2)-60)\n",
+ "I_Y=sqrt((I1*I1)+(I2*I2)+(2*I1*I2*cos(angle_Y)))\n",
+ "angle_B=pi-angle_Y-(pi/6)\n",
+ "I_B=sqrt((I2*I2)+(I3*I3)+(2*I2*I3*cos(angle_B)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The phase current I1 in the load RY is %.2f A in phase with V_RY.\" %(I1) \n",
+ "print \" The phase current I2 in load YB is %.2f A lagging V_YB by %.2f degrees.\" %(I2,degrees(angle_2)) \n",
+ "print \" The phase current I3 in load BR is %.2f A leading V_BR by %.2f degrees.\" %(I3,degrees(angle_3))\n",
+ "print \"(b)The line current I_R is %.2f A.\" %(I_R)\n",
+ "print \" The line current I_Y is %.2f A.\" %(I_Y) \n",
+ "print \" The line current I_B is %.2f A.\" %(I_B)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The phase current I1 in the load RY is 4.00 A in phase with V_RY.\n",
+ " The phase current I2 in load YB is 6.56 A lagging V_YB by 71.57 degrees.\n",
+ " The phase current I3 in load BR is 3.91 A leading V_BR by 90.00 degrees.\n",
+ "(b)The line current I_R is 7.64 A.\n",
+ " The line current I_Y is 10.51 A.\n",
+ " The line current I_B is 4.47 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.4,Page number: 350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the line current,the power factor and the total power for a balanced three-phase system.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R_ph=20.0 #Resistance of each phase(in Ohms)\n",
+ "X_L_ph=15.0 #Inductive reactance of each phase(in Ohms)\n",
+ "V_L=400.0 #Line Voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z_ph=R_ph + X_L_ph *1j\n",
+ "Z_mod=abs(Z_ph)\n",
+ "V_ph_star=V_L/(sqrt(3))\n",
+ "I_ph_star=V_ph_star/Z_mod\n",
+ "I_L_star=I_ph_star\n",
+ "pf_star=R_ph/Z_mod\n",
+ "P_active_star=sqrt(3)*V_L*I_L_star*pf_star\n",
+ "V_ph_delta=V_L\n",
+ "I_ph_delta=V_ph_delta/Z_mod\n",
+ "I_L_delta=I_ph_delta*(sqrt(3))\n",
+ "pf_delta=R_ph/Z_mod\n",
+ "P_active_delta=sqrt(3)*V_L*I_L_delta*pf_delta\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)For star connected load:\"\n",
+ "print \"(i)The line current is %.2f A.\" %(I_L_star)\n",
+ "print \"(ii)The power factor is %.2f lagging.\" %(pf_star)\n",
+ "print \"(iii)The total active power is %.2f kW.\" %(P_active_star/1000)\n",
+ "print \"\\n(b)For delta connection:\"\n",
+ "print \"(i)The line current is %.2f A.\" %(I_L_delta)\n",
+ "print \"(ii)The power factor is %.2f lagging.\" %(pf_delta)\n",
+ "print \"(iii)The total active power is %.2f kW.\" %(P_active_delta/1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)For star connected load:\n",
+ "(i)The line current is 9.24 A.\n",
+ "(ii)The power factor is 0.80 lagging.\n",
+ "(iii)The total active power is 5.12 kW.\n",
+ "\n",
+ "(b)For delta connection:\n",
+ "(i)The line current is 27.71 A.\n",
+ "(ii)The power factor is 0.80 lagging.\n",
+ "(iii)The total active power is 15.36 kW.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.5,Page number: 355"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Fidning the total power consumed and the power factor of a balanced three-phase circuit.\"\"\"\n",
+ "\n",
+ "from math import atan,cos,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "W1=3e03 #Reading of wattmeter-1(in Watts)\n",
+ "W2=1.5e03 #Reading of wattmeter-2(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "P=W1+W2\n",
+ "pf_angle=atan(sqrt(3)*((W1-W2)/(W1+W2)))\n",
+ "pf=cos(pf_angle)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total power consumed is %e W.\" %(P)\n",
+ "print \"The power factor of the balanced three-phase circuit is %.3f.\" %(pf)\n",
+ "print \"NOTE:From the given data it is impossible to state whether the power factor is leading or lagging.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total power consumed is 4.500000e+03 W.\n",
+ "The power factor of the balanced three-phase circuit is 0.866.\n",
+ "NOTE:From the given data it is impossible to state whether the power factor is leading or lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.6,Page number: 355"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the total power,the power factor and the line current for a balanced three-phase circuit.\"\"\"\n",
+ "\n",
+ "from math import atan,cos,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=415 #Line voltage(in Volts)\n",
+ "W1=5.2e03 #Reading of wattmeter-1(in Watts)\n",
+ "W2=-1.7e03 #Reading of wattmeter-2(in Watts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "P=W1+W2\n",
+ "pf_angle=atan(sqrt(3)*((W1-W2)/(W1+W2)))\n",
+ "pf=cos(pf_angle)\n",
+ "I_L=P/(sqrt(3)*V_L*pf)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total power consumed is %e W.\\n\" %(P)\n",
+ "print \"The power factor of the balanced three-phase circuit is %.3f.\" %(pf)\n",
+ "print \"NOTE:From the given data it is impossible to state whether the power factor is leading or lagging.\"\n",
+ "print \"\\nThe line current is %.2f A.\" %(I_L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total power consumed is 3.500000e+03 W.\n",
+ "\n",
+ "The power factor of the balanced three-phase circuit is 0.281.\n",
+ "NOTE:From the given data it is impossible to state whether the power factor is leading or lagging.\n",
+ "\n",
+ "The line current is 17.32 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.7,Page number: 356"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the total power consumed in a star-connected three-phase network.\"\"\"\n",
+ "\n",
+ "from math import sqrt,radians,degrees\n",
+ "from cmath import rect,phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=6.0 #Resistance per phase(in Ohms)\n",
+ "X_L=8.0 #Inductive reactance per phase(in Ohms)\n",
+ "V_L=220.0 #Line voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z=6+ (1j*8)\n",
+ "Vph=V_L/sqrt(3.0)\n",
+ "V_RN=rect(Vph,0)\n",
+ "V_YN=rect(Vph,radians(-120.0))\n",
+ "V_BN=rect(Vph,radians(120.0))\n",
+ "V_RY=V_RN-V_YN\n",
+ "V_YB=V_YN-V_BN\n",
+ "V_BR=V_BN-V_RN\n",
+ "I_R=V_RN/Z\n",
+ "I_Y=V_YN/Z\n",
+ "I_B=V_BN/Z\n",
+ "P=sqrt(3.0)*V_L*abs(I_R)*cos(phase(Z))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The phase voltages are:\"\n",
+ "print \" V_RN=%.2f V at an angle of %.3f degrees.\" %(abs(V_RN),degrees(phase(V_RN))) \n",
+ "print \" V_YN=%.2f V at an angle of %.3f degrees.\" %(abs(V_YN),degrees(phase(V_YN)))\n",
+ "print \" V_BN=%.2f V at an angle of %.3f degrees.\" %(abs(V_BN),degrees(phase(V_BN)))\n",
+ "print \"(b)The line voltages are:\"\n",
+ "print \" V_RY=%.2f V at an angle of %.3f degrees.\" %(abs(V_RY),degrees(phase(V_RY))) \n",
+ "print \" V_YB=%.2f V at an angle of %.3f degrees.\" %(abs(V_YB),degrees(phase(V_YB)))\n",
+ "print \" V_BR=%.2f V at an angle of %.3f degrees.\" %(abs(V_BR),degrees(phase(V_BR)))\n",
+ "print \"(c)The line currents(same as phase currents) are:\"\n",
+ "print \" I_R=%.2f A at an angle of %.3f degrees.\" %(abs(I_R),degrees(phase(I_R))) \n",
+ "print \" I_Y=%.2f A at an angle of %.3f degrees.\" %(abs(I_Y),degrees(phase(I_Y)))\n",
+ "print \" I_B=%.2f A at an angle of %.3f degrees.\" %(abs(I_B),degrees(phase(I_B)))\n",
+ "print \"(d)The total power consumed is %.2f W.\" %(round(P,2)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The phase voltages are:\n",
+ " V_RN=127.02 V at an angle of 0.000 degrees.\n",
+ " V_YN=127.02 V at an angle of -120.000 degrees.\n",
+ " V_BN=127.02 V at an angle of 120.000 degrees.\n",
+ "(b)The line voltages are:\n",
+ " V_RY=220.00 V at an angle of 30.000 degrees.\n",
+ " V_YB=220.00 V at an angle of -90.000 degrees.\n",
+ " V_BR=220.00 V at an angle of 150.000 degrees.\n",
+ "(c)The line currents(same as phase currents) are:\n",
+ " I_R=12.70 A at an angle of -53.130 degrees.\n",
+ " I_Y=12.70 A at an angle of -173.130 degrees.\n",
+ " I_B=12.70 A at an angle of 66.870 degrees.\n",
+ "(d)The total power consumed is 2904.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.8,Page number: 356"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the total power consumed in a delta-connected three-phase network.\"\"\"\n",
+ "\n",
+ "from math import sqrt,radians,degrees\n",
+ "from cmath import rect,phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=6.0 #Resistance per phase(in Ohms)\n",
+ "X_L=8.0 #Inductive reactance per phase(in Ohms)\n",
+ "V_L=220.0 #Line voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z=6+ (1j*8)\n",
+ "Vph=V_L\n",
+ "V_RY=rect(Vph,0)\n",
+ "V_YB=rect(Vph,radians(-120.0))\n",
+ "V_BR=rect(Vph,radians(120.0))\n",
+ "I_RY=V_RY/Z\n",
+ "I_YB=V_YB/Z\n",
+ "I_BR=V_BR/Z\n",
+ "I_R=I_RY-I_BR\n",
+ "I_Y=I_YB-I_RY\n",
+ "I_B=I_BR-I_YB\n",
+ "P=sqrt(3.0)*V_L*abs(I_R)*cos(phase(Z))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The phase voltages(same as line voltages) are:\"\n",
+ "print \" V_RY=%.2f V at an angle of %.3f degrees.\" %(abs(V_RY),degrees(phase(V_RY))) \n",
+ "print \" V_YB=%.2f V at an angle of %.3f degrees.\" %(abs(V_YB),degrees(phase(V_YB)))\n",
+ "print \" V_BR=%.2f V at an angle of %.3f degrees.\" %(abs(V_BR),degrees(phase(V_BR)))\n",
+ "print \"(b)The phase currents in the three load impedances are:\"\n",
+ "print \" I_RY=%.2f A at an angle of %.3f degrees.\" %(abs(I_RY),degrees(phase(I_RY))) \n",
+ "print \" I_YB=%.2f A at an angle of %.3f degrees.\" %(abs(I_YB),degrees(phase(I_YB)))\n",
+ "print \" I_BR=%.2f A at an angle of %.3f degrees.\" %(abs(I_BR),degrees(phase(I_BR)))\n",
+ "print \"(c)The line currents are:\"\n",
+ "print \" I_R=%.2f A at an angle of %.3f degrees.\" %(abs(I_R),degrees(phase(I_R))) \n",
+ "print \" I_Y=%.2f A at an angle of %.3f degrees.\" %(abs(I_Y),degrees(phase(I_Y)))\n",
+ "print \" I_B=%.2f A at an angle of %.3f degrees.\" %(abs(I_B),degrees(phase(I_B)))\n",
+ "print \"(d)The total power consumed is %.2f W.\" %(round(P,2)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The phase voltages(same as line voltages) are:\n",
+ " V_RY=220.00 V at an angle of 0.000 degrees.\n",
+ " V_YB=220.00 V at an angle of -120.000 degrees.\n",
+ " V_BR=220.00 V at an angle of 120.000 degrees.\n",
+ "(b)The phase currents in the three load impedances are:\n",
+ " I_RY=22.00 A at an angle of -53.130 degrees.\n",
+ " I_YB=22.00 A at an angle of -173.130 degrees.\n",
+ " I_BR=22.00 A at an angle of 66.870 degrees.\n",
+ "(c)The line currents are:\n",
+ " I_R=38.11 A at an angle of -83.130 degrees.\n",
+ " I_Y=38.11 A at an angle of 156.870 degrees.\n",
+ " I_B=38.11 A at an angle of 36.870 degrees.\n",
+ "(d)The total power consumed is 8712.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.9,Page number: 357"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the line current and the total power supplied by a three-phase system.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import radians,degrees,sqrt,cos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Z_A_delta=rect(12.0,radians(30.0))\n",
+ "Z_star=rect(5.0,radians(45.0))\n",
+ "V_L=400.0\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z_A_star=Z_A_delta/3.0\n",
+ "Zeq=(Z_A_star*Z_star)/(Z_A_star+Z_star)\n",
+ "Vph=V_L/sqrt(3.0)\n",
+ "I_L=Vph/Zeq\n",
+ "P=sqrt(3.0)*I_L*V_L*cos(phase(Zeq))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The line current is %.3f A.\" %(round((abs(I_L)),3))\n",
+ "print \"(b)The power suppiled is %e W.\" %(abs(P))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The line current is 103.045 A.\n",
+ "(b)The power suppiled is 5.726843e+04 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.10,Page number: 357"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the constants of the load per phase.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I_L=100.0 #Line current(in Amperes)\n",
+ "V_L=1100.0 #Line voltage(in Volts)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "P=150e03 #Power delivered by the three-phase system(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R=P/(3*I_L*I_L)\n",
+ "Vph=V_L/sqrt(3.0)\n",
+ "Iph=I_L\n",
+ "Z=Vph/Iph\n",
+ "X_C=sqrt((Z*Z)-(R*R))\n",
+ "C=1/(2*pi*f*X_C)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The constants of the load per phase are:\"\n",
+ "print \"R=%.3f Ohms and C=%e F.\" %(R,C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The constants of the load per phase are:\n",
+ "R=5.000 Ohms and C=8.128901e-04 F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.11,Page number: 358"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the impedance in each branch and the power factor in a balanced delta-connected three-phase circuit.\"\"\"\n",
+ "\n",
+ "from math import sqrt,cos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=400.0 #Line voltage(in Volts)\n",
+ "I_L=20.0 #Line current(in Amperes)\n",
+ "P=10e03 #Total power absorbed by the load(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_ph=V_L\n",
+ "I_ph=I_L/sqrt(3.0)\n",
+ "Z_ph=V_ph/I_ph\n",
+ "pf=P/(sqrt(3.0)*V_L*I_L)\n",
+ "V_ph_star=V_L/sqrt(3.0)\n",
+ "I_L_star=V_ph_star/Z_ph\n",
+ "I_ph_star=I_L_star\n",
+ "P=sqrt(3.0)*V_L*I_L_star*pf\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The impedance in each branch is %.2f Ohms.\" %(round(Z_ph,2))\n",
+ "print \"(b)The power factor is %.4f lagging.\" %(pf)\n",
+ "print \"(c)The total power consumed if the same impedances are star-connected is %.2f kW.\" %(round((P/1000.0),2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The impedance in each branch is 34.64 Ohms.\n",
+ "(b)The power factor is 0.7217 lagging.\n",
+ "(c)The total power consumed if the same impedances are star-connected is 3.33 kW.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.12,Page number: 358"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the total power in the three-phase system.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import pi,sin,radians,degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R1=100.0 #Resistance of the first phase(in Ohms)\n",
+ "R2=200.0 #Resistance of the second phase(in Ohms)\n",
+ "L3=0.3 #Inductance of the third phase(in Henry)\n",
+ "V_L=100.0 #Line voltage(in Volts)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vab=rect(V_L,0)\n",
+ "Vbc=rect(V_L,radians(-120))\n",
+ "Vca=rect(V_L,radians(120))\n",
+ "Zab=R1\n",
+ "Zca=R2\n",
+ "Zbc=1j*(2*pi*f*L3)\n",
+ "Iab=Vab/Zab\n",
+ "Ibc=Vbc/Zbc\n",
+ "Ica=Vca/Zca\n",
+ "Pab=(abs(Vab)*abs(Vab))/R1\n",
+ "Pbc=0\n",
+ "Pca=(abs(Vca)*abs(Vca))/R2\n",
+ "act_P=Pab+Pbc+Pca\n",
+ "rea_P=abs(Vbc)*abs(Ibc)*sin(phase(Zbc))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The total active power in the system is %.2f W.\" %round(act_P,2)\n",
+ "print \"(b)The total reactive power in the system is %.2f VAr.\" %round(rea_P,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The total active power in the system is 150.00 W.\n",
+ "(b)The total reactive power in the system is 106.10 VAr.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.13,Page number: 359"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the load circuit parameters per phase.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt,sin,acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I_L=160.0 #Line current(in Amperes)\n",
+ "V_L=1.1e03 #Line voltage(in Volts)\n",
+ "P=210e03 #Total power load(in kilo-Watts)\n",
+ "f=50.0 #Frequency of the supply voltage(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "pf=P/(sqrt(3.0)*V_L*I_L)\n",
+ "V_ph=V_L/sqrt(3.0)\n",
+ "I_ph=I_L\n",
+ "Z_ph=V_ph/I_ph\n",
+ "R_ph=Z_ph*pf\n",
+ "X_C=Z_ph*sin(acos(pf))\n",
+ "C=1.0/(2*pi*f*X_C)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The load circuit parameters per phase are:\"\n",
+ "print \"R=%.3f Ohms.\" %(round(R_ph,3))\n",
+ "print \"C=%e F.\" %(C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The load circuit parameters per phase are:\n",
+ "R=2.734 Ohms.\n",
+ "C=1.106310e-03 F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.14,Page number: 359"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\"\"\"Finding the resistance and the inductance of the load per phase.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt,sin,acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=400.0 #Line voltage(in Volts)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "Iph=25.0 #Phase current(in Amperes)\n",
+ "P=13.856e03 #Total active power absorbed by the load(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_L=Iph\n",
+ "pf=P/(sqrt(3.0)*V_L*I_L)\n",
+ "Vph=V_L/sqrt(3.0)\n",
+ "Zph=Vph/Iph\n",
+ "Rph=Zph*pf\n",
+ "Xph=Zph*sin(acos(pf))\n",
+ "L=Xph/(2*pi*f)\n",
+ "Q=3*Vph*Iph*sin(acos(pf))\n",
+ "S=3*Vph*Iph\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The resistance of the load per phase is %.3f Ohms and the inductance of the load per phase is %e H.\" %(Rph,L)\n",
+ "print \"(b)The total reactive power is %e VAR.\" %(Q)\n",
+ "print \"(c)The total apparent power is %e VA.\" %(S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The resistance of the load per phase is 7.390 Ohms and the inductance of the load per phase is 1.764344e-02 H.\n",
+ "(b)The total reactive power is 1.039285e+04 VAR.\n",
+ "(c)The total apparent power is 1.732051e+04 VA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.15,Page number: 360"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the line current,the power factor and the total kVA.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi,cos\n",
+ "from cmath import phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Z1=100+(1j*0) #First impedance(in Ohms)\n",
+ "C=32e-06 #Capacitance of the capacitor(in Farads)\n",
+ "V_L=415.0 #Line voltage(in Volts)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z2=-(1j*(1/(2*pi*f*C)))\n",
+ "Zph=(Z1*Z2)/(Z1+Z2)\n",
+ "Vph=V_L/sqrt(3.0)\n",
+ "Iph=Vph/Zph\n",
+ "I_L=Iph\n",
+ "pf=cos(phase(Zph))\n",
+ "P=sqrt(3.0)*V_L*I_L*pf\n",
+ "kVA=sqrt(3.0)*V_L*I_L\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The line current is %.3f A.\" %(abs(I_L))\n",
+ "print \"(b)The power factor is %.4f leading.\" %(pf)\n",
+ "print \"(c)The power absorbed is %e W.\" %(abs(P))\n",
+ "print \"(d)The total kVA is %e kVA.\" %(abs(kVA))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The line current is 3.397 A.\n",
+ "(b)The power factor is 0.7052 leading.\n",
+ "(c)The power absorbed is 1.722250e+03 W.\n",
+ "(d)The total kVA is 2.442104e+03 kVA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.16,Page number: 360"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the line current,input and output power in a three-phase motor.\"\"\"\n",
+ "\n",
+ "from math import sqrt,atan,cos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "effi=0.86 #Efficiency of the motor\n",
+ "W1=255e03 #Reading of the first wattmeter(in Watts)\n",
+ "W2=85e03 #Reading of the second wattmeter(in Watts)\n",
+ "V_L=1.6e03 #Line voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "P=W1+W2\n",
+ "phi=atan(sqrt(3.0)*((W1-W2)/(W1+W2)))\n",
+ "pf=cos(phi)\n",
+ "I_L=P/(sqrt(3.0)*V_L*pf)\n",
+ "Po=P*effi\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The input power is %.2f kW.\" %(round((P/1000.0),2))\n",
+ "print \"(b)The power factor is %.3f lagging.\" %(round(pf,3))\n",
+ "print \"(c)The line current is %.2f A.\" %(round(I_L,2))\n",
+ "print \"(d)The output power is %.2f kW.\" %(round((Po/1000.0),2)) \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The input power is 340.00 kW.\n",
+ "(b)The power factor is 0.756 lagging.\n",
+ "(c)The line current is 162.30 A.\n",
+ "(d)The output power is 292.40 kW.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.17,Page number: 360"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the readings of the two wattmeters.\"\"\"\n",
+ "\n",
+ "from math import sqrt,acos,tan \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=25e03 #Total input power(in Watts)\n",
+ "pf=0.8 #Power factor\n",
+ "V_L=400.0 #Line voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"W1-W2=(1.0/sqrt(3.0))*(W1+W2)*tan(phi);\"\"\"\n",
+ "eq_1=P\n",
+ "eq_2=(1.0/sqrt(3.0))*P*tan(acos(pf))\n",
+ "W1=(eq_1+eq_2)/2.0\n",
+ "W2=P-W1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The readings of the wattmeters are:\" \n",
+ "print \"W1=%.4f kW.\" %(round((W1/1000.0),4))\n",
+ "print \"W2=%.4f kW.\" %(round((W2/1000.0),4))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The readings of the wattmeters are:\n",
+ "W1=17.9127 kW.\n",
+ "W2=7.0873 kW.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.18,Page number: 361"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the total active power consumed by the load.\"\"\"\n",
+ "\n",
+ "from cmath import phase,rect\n",
+ "from math import radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_RY=rect(200,0) #Line Voltage V_RY(in Volts)\n",
+ "V_YB=rect(200,radians(-120)) #Line Voltage V_YB(in Volts)\n",
+ "V_BR=rect(200,radians(120)) #Line Voltage V_BR(in Volts)\n",
+ "Z1=rect(10,radians(60)) #Impedance of the first phase(in Ohms) \n",
+ "Z2=rect(10,radians(0)) #Impedance of the second phase(in Ohms)\n",
+ "Z3=rect(10,radians(60)) #Impedance of the third phase(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=V_RY/Z1\n",
+ "I2=V_YB/Z2\n",
+ "I3=V_BR/Z3\n",
+ "IR=I1-I3\n",
+ "IB=I3-I2\n",
+ "W1=abs(V_RY)*abs(IR)*cos(phase(IR))\n",
+ "W2=-abs(V_YB)*abs(IB)*cos(phase(IB)-phase(V_YB))\n",
+ "P=W1+W2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The readings of the wattmeters are: W1=%.2f W and W2=%.2f W.\" %(W1,W2)\n",
+ "print \"(b)The total active power consumed by the load is %.2f W.\" %(P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The readings of the wattmeters are: W1=0.00 W and W2=8000.00 W.\n",
+ "(b)The total active power consumed by the load is 8000.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.19,Page number: 361"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the total active power consumed by the load.\"\"\"\n",
+ "\n",
+ "from cmath import phase,rect\n",
+ "from math import radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_RY=rect(200,0) #Line Voltage V_RY(in Volts)\n",
+ "V_YB=rect(200,radians(-120)) #Line Voltage V_YB(in Volts)\n",
+ "V_BR=rect(200,radians(120)) #Line Voltage V_BR(in Volts)\n",
+ "Z1=rect(10,radians(60)) #Impedance of the first phase(in Ohms) \n",
+ "Z2=rect(10,radians(0)) #Impedance of the second phase(in Ohms)\n",
+ "Z3=rect(10,radians(60)) #Impedance of the third phase(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=V_RY/Z1\n",
+ "I2=V_YB/Z2\n",
+ "I3=V_BR/Z3\n",
+ "IR=I1-I3\n",
+ "IY=I2-I1\n",
+ "W1=-abs(V_BR)*abs(IR)*cos(phase(IR)-phase(V_BR))\n",
+ "W2=abs(V_YB)*abs(IY)*cos(phase(IY)-phase(V_YB))\n",
+ "P=W1+W2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The readings of the wattmeters are: W1=%.2f W and W2=%.2f W.\" %(W1,W2)\n",
+ "print \"(b)The total active power consumed by the load is %.2f W.\" %(P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The readings of the wattmeters are: W1=6000.00 W and W2=2000.00 W.\n",
+ "(b)The total active power consumed by the load is 8000.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.20,Page number: 362"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the reading of the wattmeter.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import radians,cos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_RY=rect(440.0,0) #Line voltage in RY line(in Volts)\n",
+ "V_YB=rect(440.0,radians(-120)) #Line voltage in YB line(in Volts)\n",
+ "V_BR=rect(440.0,radians(120)) #Line voltage in BR line(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_RB=rect(440.0,radians(120-180)) \n",
+ "I1=V_RY/(60.0+(1j*45.0))\n",
+ "I2=V_RB/(-(1j*56.0))\n",
+ "I_AB=I1+I2\n",
+ "V_CD=V_YB\n",
+ "P=abs(I_AB)*abs(V_CD)*cos(phase(V_CD))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The reading of the wattmeter is %.4f W.\" %(round(P,4))\n",
+ "print \"Note: There is a calculation error in the textbook.\"\n",
+ "print \"I_AB=11.50 A at an angle of 2.035 degrees and not 11.05 A. Therefore P=-2531.1166 W.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reading of the wattmeter is -2531.1166 W.\n",
+ "Note: There is a calculation error in the textbook.\n",
+ "I_AB=11.50 A at an angle of 2.035 degrees and not 11.05 A. Therefore P=-2531.1166 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.21,Page number: 363"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the line and phase current in a motor.\"\"\"\n",
+ "\n",
+ "from cmath import phase,rect\n",
+ "from math import acos,sqrt,radians,cos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_RY=rect(440,0) #Line voltage in RY line(in Volts)\n",
+ "Zph=3+1j*4 #Phase Impedance(in Ohms)\n",
+ "pf=0.8 #Lagging power factor\n",
+ "P=75e03 #Total active power(in Watts)\n",
+ "V_L=440.0 #Line voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_L_mod=P/(sqrt(3.0)*V_L*pf)\n",
+ "phi=acos(pf)\n",
+ "I_L_delta=rect(I_L_mod,(radians(-30-degrees(phi))))\n",
+ "Iph=rect((I_L_mod/sqrt(3.0)),-phi)\n",
+ "Vph=rect((V_L/sqrt(3.0)),radians(-30))\n",
+ "I_L_star=Vph/Zph\n",
+ "I_L=I_L_delta+I_L_star\n",
+ "P1=sqrt(3.0)*abs(V_L)*abs(I_L_delta)*pf\n",
+ "P2=sqrt(3.0)*abs(V_L)*abs(I_L_star)*cos(phase(Zph))\n",
+ "P_tot=P1+P2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The line current in the motor is %.2f A at a phase angle of %.2f degrees.\" %(abs(I_L_delta),degrees(phase(I_L_delta)))\n",
+ "print \" The phase current in the motor is %.2f A at a phase angle of %.2f degrees.\" %(abs(Iph),degrees(phase(Iph)))\n",
+ "print \"(b)The line current and phase current in the load is %.2f A at a phase angle of %.2f degrees.\" %(abs(I_L_star),degrees(phase(I_L_star)))\n",
+ "print \"(c)The total line current is %.2f A at a phase angle of %.2f degrees.\" %(abs(I_L),degrees(phase(I_L)))\n",
+ "print \"(d)The total power consumed is %.3f W.\" %(P_tot) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The line current in the motor is 123.01 A at a phase angle of -66.87 degrees.\n",
+ " The phase current in the motor is 71.02 A at a phase angle of -36.87 degrees.\n",
+ "(b)The line current and phase current in the load is 50.81 A at a phase angle of -83.13 degrees.\n",
+ "(c)The total line current is 172.38 A at a phase angle of -71.60 degrees.\n",
+ "(d)The total power consumed is 98232.000 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter13.ipynb b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter13.ipynb
new file mode 100755
index 00000000..163431b5
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter13.ipynb
@@ -0,0 +1,1498 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 13: TRANSFORMERS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.1,Page number: 374"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across the secondary of the transformer.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "E_p=6400 #Primary voltage(in Volts) \n",
+ "f=50 #Frequency of primary supply(in Hertz)\n",
+ "N1=480 #Number of turns in the primary of the transformer\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "flux_m=E_p/(4.44*f*N1)\n",
+ "N2=20.0\n",
+ "Es=4.44*f*N2*flux_m\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The peak value of the flux produced in the core is %.2f Wb.\" %(flux_m)\n",
+ "print \"(b)The voltage across the secondary winding if it has 20 turns is %.2f V.\" %(Es)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The peak value of the flux produced in the core is 0.06 Wb.\n",
+ "(b)The voltage across the secondary winding if it has 20 turns is 266.67 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.2,Page number: 377"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the peak value of the flux density in the core.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50.0 #Operating frequency of the transformer(in Hertz)\n",
+ "N1=30.0 #Number of turns in the primary of transformer\n",
+ "N2=350.0 #Number of turns in the secondary of transformer\n",
+ "A=250e-04 #Cross-sectional area of the core(in square-metres)\n",
+ "E1=230.0 #Voltage of the supply(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "flux_m=E1/(4.44*f*N1)\n",
+ "B_m=flux_m/A\n",
+ "E2=E1*(N2/N1)\n",
+ "I2=100.0\n",
+ "I1=I2*(N2/N1)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The peak value of flux density in the core is %.2f T.\" %(B_m)\n",
+ "print \"(b)The voltage induced in the secondary winding is %e V.\" %(E2)\n",
+ "print \"(c)The primary current when the secondary current is 100 A is %e A.\" %(I1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The peak value of flux density in the core is 1.38 T.\n",
+ "(b)The voltage induced in the secondary winding is 2.683333e+03 V.\n",
+ "(c)The primary current when the secondary current is 100 A is 1.166667e+03 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.3,Page number: 377"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the turns-ratio of the transformer.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Req=50.0 #Output resistance of the source(in Ohms) \n",
+ "R_L=800.0 #Load resistance(in Ohms) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "K=sqrt(R_L/Req)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The turns-ratio of the transformer to be used for maximising the load power is %d.\" %(K)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The turns-ratio of the transformer to be used for maximising the load power is 4.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.4,Page number: 378"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the load current in the ac circuit.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import degrees\n",
+ "\n",
+ "#Calculations:\n",
+ "V=rect(30,0)\n",
+ "Ip=V/(20+20*1j+(pow(2,2)*(2-10*1j)))\n",
+ "I_L=2.0*Ip\n",
+ "\n",
+ "#Result:\n",
+ "print \"The load current is %.3f A at a phase angle of %.3f degrees.\" %(abs(I_L),degrees(phase(I_L)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The load current is 1.744 A at a phase angle of 35.538 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.5,Page number: 378 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the output of the transformer in kVA.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "B_m=1.1 #Maximum magnetic flux density(in Weber per square-metre)\n",
+ "A=150e-04 #Cross-sectional area of the core(in square-metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "flux_m=B_m*A\n",
+ "N2=66\n",
+ "f=50\n",
+ "Z_L=4.0\n",
+ "E2=4.44*N2*f*flux_m\n",
+ "V2=E2\n",
+ "I2=V2/Z_L\n",
+ "output=(I2*V2)/1000.0\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The output when connected to a load of 4 Ohms impedance is %.3f kVA.\" %(output)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The output when connected to a load of 4 Ohms impedance is 14.612 kVA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.6,Page number: 378 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of turns in each winding of the transformer.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "A=9e-04 #Cross-sectional area of the core(in square-metre) \n",
+ "E1=230.0 #Primary Voltage(in Volts)\n",
+ "E2=110.0 #Secondary Voltage(in Volts)\n",
+ "E3=6.0 #Tertiary Voltage(in Volts)\n",
+ "f=50.0 #Operating frequency of the transformer(in Hertz)\n",
+ "Bm=1.0 #Maximum magnetic flux density(in Tesla) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "flux_m=Bm*A\n",
+ "N3_half=E3/(4.44*f*flux_m)\n",
+ "N3=2*N3_half\n",
+ "N1=N3_half*(E1/E3)\n",
+ "N2=N3_half*(E2/E3)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total number of turns on the primary winding is %d turns.\" %(N1)\n",
+ "print \"The total number of turns on the secondary winding is %d turns.\" %(N2)\n",
+ "print \"The total number of turns on the tertiary winding is %d turns.\" %(N3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total number of turns on the primary winding is 1151 turns.\n",
+ "The total number of turns on the secondary winding is 550 turns.\n",
+ "The total number of turns on the tertiary winding is 60 turns.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.7,Page number: 380"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the no-load power factor of the transformer.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=350.0 #Input at no-load(in Volt-Amperes) \n",
+ "V1=230.0 #Primary voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Io=VA/V1\n",
+ "Pi=110.0\n",
+ "pf=Pi/(V1*Io)\n",
+ "Iw=Io*pf\n",
+ "Im=sqrt(pow(Io,2)-pow(Iw,2))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The loss component of no-load current is given as %.4f A.\" %(Iw)\n",
+ "print \"The magnetising component of no-load current is %.4f A.\" %(Im)\n",
+ "print \"The no-load power factor is %.4f.\" %(pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The loss component of no-load current is given as 0.4783 A.\n",
+ "The magnetising component of no-load current is 1.4446 A.\n",
+ "The no-load power factor is 0.3143.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.8,Page number: 382"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the hysterisis and eddy-current losses of the transformer.\"\"\"\n",
+ "\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50.0 #Operating frequency of the transformer(in Hertz)\n",
+ "eq1=100.0 #Iron loss at 60 Hz(in Watts)\n",
+ "eq2=60.0 #Iron loss at 40 Hz(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" P_h=A*f ; P_e=B*f*f ; \n",
+ " \n",
+ " P_i=P_h+P_e=(A*f)+(B*f*f); \"\"\"\n",
+ "\n",
+ "A=((eq2*36)-(eq1*16))/((40*36)-(60*16))\n",
+ "B=((eq1*4)-(eq2*6))/((3600*4)-(1600*6))\n",
+ "P_h=A*f\n",
+ "P_e=B*f*f\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The Hysteresis loss at 50 Hz is %.2f W.\" %(P_h) \n",
+ "print \"The Eddy-current loss at 50 Hz is %.2f W.\" %(P_e) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Hysteresis loss at 50 Hz is 58.33 W.\n",
+ "The Eddy-current loss at 50 Hz is 20.83 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.9,Page number: 385"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the primary current snd the primary power factor.\"\"\"\n",
+ "\n",
+ "from math import acos,degrees,cos\n",
+ "from cmath import phase,rect\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V1=440.0 #Primary voltage(in Volts)\n",
+ "V2=110.0 #Secondary voltage(in Volts)\n",
+ "I_0_mod=5.0 #No-load current(in Amperes) \n",
+ "I2=120.0 #Secondary current(in Amperes) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "phi_0=acos(0.2)\n",
+ "phi_2=acos(0.8)\n",
+ "K=V2/V1\n",
+ "I1_load_mod=K*I2\n",
+ "I1_load=rect(I1_load_mod,-phi_2)\n",
+ "I0=rect(I_0_mod,-phi_0)\n",
+ "I1_total=I0+I1_load\n",
+ "pf_primary=cos(phase(I1_total))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The primary current is %.2f A at a phase angle of %.2f degrees.\" %(abs(I1_total),degrees(phase(I1_total)))\n",
+ "print \"The primary power factor is %.3f lagging.\" %(pf_primary)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The primary current is 33.90 A at a phase angle of -42.49 degrees.\n",
+ "The primary power factor is 0.737 lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.10,Page number: 390"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the equivalent resistance as referred to the primary and secondary.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=50e03 #Power rating of the transformer(in Volt-Amperes) \n",
+ "V1=4400.0 #Primary voltage(in Volts) \n",
+ "V2=220.0 #Secondary voltage(in Volts)\n",
+ "R1=3.45 #Primary resistance(in Ohms)\n",
+ "R2=0.009 #Secondary resistance(in Ohms)\n",
+ "X1=5.2 #Leakage reactance of primary(in Ohms)\n",
+ "X2=0.015 #Leakage reactance of secondary(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=VA/V1\n",
+ "I2=VA/V2\n",
+ "K=V2/V1\n",
+ "Re1=R1+(R2/(K*K))\n",
+ "Re2=(K*K*R1)+R2\n",
+ "Xe1=X1+(X2/(K*K))\n",
+ "Xe2=(K*K*X1)+X2\n",
+ "Ze1=sqrt((Re1*Re1)+(Xe1*Xe1))\n",
+ "Ze2=sqrt((Re2*Re2)+(Xe2*Xe2))\n",
+ "tot_copp_loss=(I1*I1*R1)+(I2*I2*R2)\n",
+ "tot_copp_eq_p=I1*I1*Re1\n",
+ "tot_copp_eq_s=I2*I2*Re2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The equivalent resistance as referred to the primary is %.2f Ohms.\" %(Re1)\n",
+ "print \"(b)The equivalent resistance as referred to the secondary is %.4f Ohms.\" %(Re2)\n",
+ "print \"(c)The equivalent reactance as referred to the primary is %.2f Ohms.\" %(Xe1)\n",
+ "print \"(d)The equivalent reactance as referred to the secondary is %.3f Ohms.\" %(Xe2)\n",
+ "print \"(e)The equivalent impedance as referred to the primary is %.2f Ohms.\" %(Ze1)\n",
+ "print \"(f)The equivalent impedance as referred to the secondary is %.4f Ohms.\" %(Ze2)\n",
+ "print \"(g)The total copper loss by using the individual resistances of the two windings is %.2f W.\" %(tot_copp_loss)\n",
+ "print \" By considering equivalent resistances,\"\n",
+ "print \" Total copper loss(referred to primary equivalent resistance)=%.2f W.\" %(tot_copp_eq_p) \n",
+ "print \" Total copper loss(referred to secondary equivalent resistance)=%.2f W\" %(tot_copp_eq_s)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The equivalent resistance as referred to the primary is 7.05 Ohms.\n",
+ "(b)The equivalent resistance as referred to the secondary is 0.0176 Ohms.\n",
+ "(c)The equivalent reactance as referred to the primary is 11.20 Ohms.\n",
+ "(d)The equivalent reactance as referred to the secondary is 0.028 Ohms.\n",
+ "(e)The equivalent impedance as referred to the primary is 13.23 Ohms.\n",
+ "(f)The equivalent impedance as referred to the secondary is 0.0331 Ohms.\n",
+ "(g)The total copper loss by using the individual resistances of the two windings is 910.38 W.\n",
+ " By considering equivalent resistances,\n",
+ " Total copper loss(referred to primary equivalent resistance)=910.38 W.\n",
+ " Total copper loss(referred to secondary equivalent resistance)=910.38 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.11,Page number: 393"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the full-load regulation for different load power factors.\"\"\"\n",
+ "\n",
+ "from math import cos,acos,sin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=40e03 #Power rating of the transformer(in Volt-Amperes) \n",
+ "V1=6600.0 #Primary voltage(in Volts) \n",
+ "V2=250.0 #Secondary voltage(in Volts)\n",
+ "R1=10.0 #Primary resistance(in Ohms)\n",
+ "R2=0.02 #Secondary resistance(in Ohms)\n",
+ "Xe1=35.0 #Equivalent leakage reactance as referred to the primary(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "K=V2/V1\n",
+ "I2=VA/V2\n",
+ "Re2=(K*K*R1)+R2\n",
+ "Xe2=(K*K*Xe1)\n",
+ "pf=1\n",
+ "phi=acos(pf)\n",
+ "per_reg_a=(((I2*Re2*pf)+(I2*Xe2*sin(phi)))/V2)*100\n",
+ "pf=0.8\n",
+ "phi=acos(pf)\n",
+ "per_reg_b=(((I2*Re2*pf)+(I2*Xe2*sin(phi)))/V2)*100\n",
+ "pf=0.8\n",
+ "phi=acos(pf)\n",
+ "per_reg_c=(((I2*Re2*pf)-(I2*Xe2*sin(phi)))/V2)*100\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)For unity power factor of the load:\"\n",
+ "print \"The full-load percentage regulation is %.3f percent.\" %(per_reg_a)\n",
+ "print \"\\n(b)For power factor of the load=0.8 lagging:\"\n",
+ "print \"The full-load percentage regulation is %.3f percent.\" %(per_reg_b)\n",
+ "print \"\\n(c)For power factor of the load=0.8 leading:\"\n",
+ "print \"The full-load percentage regulation is %.3f percent.\" %(per_reg_c)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)For unity power factor of the load:\n",
+ "The full-load percentage regulation is 2.198 percent.\n",
+ "\n",
+ "(b)For power factor of the load=0.8 lagging:\n",
+ "The full-load percentage regulation is 3.687 percent.\n",
+ "\n",
+ "(c)For power factor of the load=0.8 leading:\n",
+ "The full-load percentage regulation is -0.170 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.12,Page number: 396"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of turns in each winding.\"\"\"\n",
+ "\n",
+ "from math import sqrt \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50.0 #Operating frequency of the transformer(in Hertz)\n",
+ "E1=5000.0 #Primary voltage at no-load(in Volts)\n",
+ "E2=250.0 #Secondary voltage at no-load(in Volts)\n",
+ "VA_full=150e03 #Power rating of the transformer(in Volt-Ampere) \n",
+ "flux=0.06 #Maximum core flux(in Weber)\n",
+ "Pi=1500.0 #Core losses(in Watts)\n",
+ "Pc_FL=1800.0 #Full-load copper losses(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "N2=E2/(4.44*f*flux)\n",
+ "N1=(E1/E2)*round(N2,0)\n",
+ "pf=1\n",
+ "Po=0.5*VA_full*pf\n",
+ "Pc=0.5*0.5*Pc_FL\n",
+ "effi_b=(Po/(Po+Pi+Pc))*100\n",
+ "pf=0.8\n",
+ "Po=VA_full*pf\n",
+ "Pc=Pc_FL\n",
+ "effi_c=(Po/(Po+Pi+Pc))*100\n",
+ "x=sqrt(Pi/Pc_FL)\n",
+ "VA_load=VA_full*x\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The number of turns in the primary winding is %d.\" %(round(N1,0)) \n",
+ "print \" The number of turns in the secondary winding is %d.\" %(round(N2,0))\n",
+ "print \"(b)The efficiency at half rated kVA and unity power factor is %.3f percent\" %(effi_b)\n",
+ "print \"(c)The efficiency at full load and 0.8 power factor lagging is %.3f percent.\" %(effi_c)\n",
+ "print \"(d)The kVA load for maximum efficiency is %d kVA.\" %(round((VA_load/1000),0))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The number of turns in the primary winding is 380.\n",
+ " The number of turns in the secondary winding is 19.\n",
+ "(b)The efficiency at half rated kVA and unity power factor is 97.466 percent\n",
+ "(c)The efficiency at full load and 0.8 power factor lagging is 97.324 percent.\n",
+ "(d)The kVA load for maximum efficiency is 137 kVA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.13,Page number: 397"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the all-day efficiency of a distribution transformer.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "kVA_FL=200.0 #Power rating of transformer at full-load(in Volt-Ampere) \n",
+ "Pc_FL=3.02 #Full-load copper losses(in kilo-Watts) \n",
+ "Pi=1.6 #Iron-losses(in kilo-Watts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Pi_24_hrs=24.0*Pi\n",
+ "\"\"\" For 80 kW load at unity power factor in 6 hrs:\"\"\"\n",
+ "Po_1=80\n",
+ "t1=6\n",
+ "pf_1=1\n",
+ "output_ene_1=Po_1*t1\n",
+ "kVA_1=Po_1/pf_1\n",
+ "Pc_1=pow((kVA_1/kVA_FL),2)*Pc_FL*t1\n",
+ "\"\"\" For 160 kW load at 0.8 power factor in 8 hrs:\"\"\"\n",
+ "Po_2=160\n",
+ "t2=8\n",
+ "pf_2=0.8\n",
+ "output_ene_2=Po_2*t2\n",
+ "kVA_2=Po_2/pf_2\n",
+ "Pc_2=pow((kVA_2/kVA_FL),2)*Pc_FL*t2\n",
+ "\"\"\" For no load period of 10 hrs:\"\"\"\n",
+ "Po_3=0\n",
+ "t3=10\n",
+ "output_ene_3=0\n",
+ "Pc_3=0\n",
+ "Po_total=output_ene_1+output_ene_2+output_ene_3\n",
+ "Pc_total=Pc_1+Pc_2+Pc_3\n",
+ "all_day_effi=Po_total/(Po_total+Pc_total+Pi_24_hrs)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The all day efficiency of the distribution transformer is %.3f percent.\" %(all_day_effi*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The all day efficiency of the distribution transformer is 96.414 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.14,Page number: 398"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the apparent power rating of an autotransformer.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_rated=120.0 #Voltage rating of the transformer(in Volts)\n",
+ "VA=12e03 #Power rating of the transformer(in Volt-Ampere)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=VA/V_rated\n",
+ "I2=I1\n",
+ "input_app_pow=240*I1\n",
+ "output_app_pow=120*2*I1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"In auto-tranformer mode, the input apparent power is %d kVA and the output apparent power is %d kVA.\" %(round((input_app_pow/1000),0),round((output_app_pow/1000),0))\n",
+ "print \"Thus, the apparent power capacity of the 12-kVA transformer is doubled by the auto-transformer connection.\"\n",
+ "print \"In effect,half the apparent power is transformed and half is conducted directly to the secondary side.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In auto-tranformer mode, the input apparent power is 24 kVA and the output apparent power is 24 kVA.\n",
+ "Thus, the apparent power capacity of the 12-kVA transformer is doubled by the auto-transformer connection.\n",
+ "In effect,half the apparent power is transformed and half is conducted directly to the secondary side.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.15,Page number: 401"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the secondary line voltage on no load when the windings are connected(a)star/delta,(b)delta/star.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L1=3300.0 #Supply voltage(in Volts)\n",
+ "Np=840.0 #Number of turns in the primary\n",
+ "Ns=72.0 #Number of turns in the secondary\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vph_1a=V_L1/sqrt(3)\n",
+ "Vph_2a=Vph_1a*(Ns/Np)\n",
+ "V_L2a=Vph_2a\n",
+ "Vph_1b=V_L1\n",
+ "Vph_2b=Vph_1b*(Ns/Np)\n",
+ "V_L2b=Vph_2b*sqrt(3)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print(\"(a)For star/delta connection: \")\n",
+ "print \"The secondary line voltage on no load is %.2f V.\" %(V_L2a)\n",
+ "print(\"(b)For delta/star connection: \")\n",
+ "print \"The secondary line voltage on no load is %.2f V.\" %(V_L2b)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)For star/delta connection: \n",
+ "The secondary line voltage on no load is 163.31 V.\n",
+ "(b)For delta/star connection: \n",
+ "The secondary line voltage on no load is 489.92 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.16,Page number: 403"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the magnetising current and the core-loss current in a single-phase transformer.\"\"\" \n",
+ " \n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=12e03 #Power rating of the transformer(in Volt-Ampere) \n",
+ "Vp=400.0 #Primary voltage(in Volts)\n",
+ "Vs=200.0 #Secondary voltage(in Volts)\n",
+ "Wo=120.0 #Power in open-circuit test(in Watts) \n",
+ "V1=200.0 #Voltage in open-circuit test(in Volts)\n",
+ "I_0=1.3 #Current in open-circuit test(in Amperes)\n",
+ "Isc=30.0 #Current in short-circuit test(in Amperes)\n",
+ "Wsc=200.0 #Power in short-circuit test(in Watts)\n",
+ "Vsc=22.0 #Voltage in short-circuit test(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Iw=Wo/V1\n",
+ "Im=sqrt((I_0*I_0)-(Iw*Iw))\n",
+ "R_0=V1/Iw\n",
+ "X_0=V1/Im\n",
+ "K=Vs/Vp\n",
+ "I_FL=VA/Vp\n",
+ "Re1=Wsc/(Isc*Isc)\n",
+ "Ze1=Vsc/Isc\n",
+ "Xe1=sqrt((Ze1*Ze1)-(Re1*Re1))\n",
+ "Re2=K*K*Re1\n",
+ "Xe2=K*K*Xe1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The magnetising current is %.2f A and the core-loss current is %.2f A\" %(Im,Iw)\n",
+ "print \"(b)The parameters of equivalent circuit as referred to the low voltage winding(secondary winding) are: \\n Re2=%.4f ohm \\n Xe2=%.4f ohm\" %(Re2,Xe2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The magnetising current is 1.15 A and the core-loss current is 0.60 A\n",
+ "(b)The parameters of equivalent circuit as referred to the low voltage winding(secondary winding) are: \n",
+ " Re2=0.0556 ohm \n",
+ " Xe2=0.1747 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.17,Page number: 404"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the secondary emf in a transformer.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=25.0e03 #Power rating of the transformer(in VA)\n",
+ "N1=500.0 #Number of turns in the primary winding \n",
+ "N2=40.0 #Number of turns in the secondary winding\n",
+ "V1=3e03 #Voltage of the supply connected to primary(in Volts)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "K=N2/N1\n",
+ "E2=K*V1\n",
+ "I1=VA/V1\n",
+ "I2=I1/K\n",
+ "flux=V1/(4.44*f*N1)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The secondary emf is %.2f V.\" %(E2)\n",
+ "print \"(b)The primary current on full-load is %.2f A and the secondary current on full-load is %.2f A.\" %(I1,I2)\n",
+ "print \"(c)The maximum flux in the core is %.4f Wb.\" %(flux)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The secondary emf is 240.00 V.\n",
+ "(b)The primary current on full-load is 8.33 A and the secondary current on full-load is 104.17 A.\n",
+ "(c)The maximum flux in the core is 0.0270 Wb.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.18,Page number: 404"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the active cross-sectional area of the core.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N1=50.0 #Number of turns in the primary winding\n",
+ "B=1.0 #Maximum flux density(in Tesla)\n",
+ "f=50.0 #Frequency rating of the transformer(in Hertz)\n",
+ "V=230.0 #Voltage rating of the transformer(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "E1=V\n",
+ "flux=E1/(4.44*f*N1)\n",
+ "A=flux/B\n",
+ "\"\"\"Due to the insulation of laminations from each other,the gross area is about 10% greater than the active area.\"\"\" \n",
+ "gross=1.1*A\n",
+ "a=sqrt(gross)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The active cross sectional area of the core is %.5f square m.\" %(A)\n",
+ "print \"(b)The side of a square core is %.2f m.\" %(a)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The active cross sectional area of the core is 0.02072 square m.\n",
+ "(b)The side of a square core is 0.15 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.19,Page number: 405"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the output of the transformer in kVA.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "A=150e-04 #Cross-sectional area of the core(in square metres)\n",
+ "Bm=1.1 #Maximum flux density(in Tesla)\n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "N2=66.0 #Number of turns in the secondary winding\n",
+ "Z_L=4.0 #Load impedance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "flux=Bm*A\n",
+ "E2=4.44*flux*f*N2\n",
+ "I2=E2/Z_L\n",
+ "kVA=(E2*I2)/1000.0\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The output in kVA when connected to a 4 Ohms load impedance is %.2f kVA.\" %(kVA)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The output in kVA when connected to a 4 Ohms load impedance is 14.61 kVA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.20,Page number: 405"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the magnetising current and the iron loss.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I0=1.0 #No-load primary current(in Amperes)\n",
+ "pf=0.24 #Power factor\n",
+ "V1=11e03 #Primary voltage(in Volts)\n",
+ "V2=400 #Secondary voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Iw=I0*pf\n",
+ "Im=sqrt((I0*I0)-(Iw*Iw))\n",
+ "Pi=V1*I0*pf\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The core-loss current is %.2f A.\" %(Iw) \n",
+ "print \"(b)The magnetising current is %.3f A.\" %(Im)\n",
+ "print \"(c)The iron loss is %.2f W.\" %(Pi)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The core-loss current is 0.24 A.\n",
+ "(b)The magnetising current is 0.971 A.\n",
+ "(c)The iron loss is 2640.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.21,Page number: 405"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the supply voltage and the power factor.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import degrees,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "K=0.5 #Turns ratio of the step-down transformer\n",
+ "R1=2.5 #Resistance of the primary winding(in Ohms)\n",
+ "X1=6.0 #Reactance of the primary winding(in Ohms)\n",
+ "R2=0.25 #Resistance of the secondary winding(in Ohms)\n",
+ "X2=1 #Reactance of the secondary winding(in Ohms)\n",
+ "Im=51.5e-03 #Magnetising current(in Amperes)\n",
+ "Iw=20.6e-03 #Core-loss current(in Amperes)\n",
+ "Z_L=rect(25,radians(30)) #Load impedance(in Ohms)\n",
+ "Vo=50.0 #Output voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z1=R1+1j*X1\n",
+ "Z2=R2+1j*X2\n",
+ "V2=rect(Vo,0)\n",
+ "I2=V2/Z_L\n",
+ "E2=V2+(I2*Z2)\n",
+ "E1=E2/K\n",
+ "E1_minus=-E1\n",
+ "I1_a=-I2*K\n",
+ "\"\"\"Im lags -E1 by 90 degrees and Iw is in phase with -E1.\"\"\"\n",
+ "Im_com=rect(Im,(phase(E1_minus)-radians(90)))\n",
+ "Iw_com=rect(Iw,phase(E1_minus))\n",
+ "I1=I1_a+Im_com+Iw_com\n",
+ "V1=E1_minus+(I1*Z1)\n",
+ "pf_ang=phase(V1)-phase(I1)\n",
+ "pf=cos(pf_ang)\n",
+ "\n",
+ "\n",
+ "#Result:I\n",
+ "print \"The supply voltage is %.4f V at a phase angle of %.2f degrees.\" %(abs(V1),degrees(phase(V1)))\n",
+ "print \"The current drawn from the supply is %.4f A at a phase angle of %.2f degrees.\" %(abs(I1),degrees(phase(I1)))\n",
+ "print \"The power factor is %.3f lagging.\" %(pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The supply voltage is 108.6120 V at a phase angle of -176.35 degrees.\n",
+ "The current drawn from the supply is 1.0451 A at a phase angle of 148.19 degrees.\n",
+ "The power factor is 0.815 lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.22,Page number: 406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the copper loss in the transformer.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "K=0.25 #Turns ratio of the step-down transformer\n",
+ "R1=1.4 #Resistance of the primary(in Ohms)\n",
+ "X1=5.5 #Reactance of the primary(in Ohms)\n",
+ "R2=0.06 #Resistance of the secondary(in Ohms)\n",
+ "X2=0.04 #Reactance of the secondary(in Ohms)\n",
+ "Vsc=24.0 #Voltage of the HV winding(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Re1=R1+(R2/(K*K))\n",
+ "Xe1=X1+(X2/(K*K))\n",
+ "Ze1=sqrt((Re1*Re1)+(Xe1*Xe1))\n",
+ "Isc=Vsc/Ze1\n",
+ "I1=Isc\n",
+ "I2=I1/K\n",
+ "P=I1*I1*Re1\n",
+ "pf=P/(Vsc*I1)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current in the LV winding is %.3f A.\" %(I2)\n",
+ "print \"(b)The copper loss in the transformer is %.2f W.\" %(P)\n",
+ "print \"(c)The power factor is %.4f.\" %(pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current in the LV winding is 14.594 A.\n",
+ "(b)The copper loss in the transformer is 31.42 W.\n",
+ "(c)The power factor is 0.3588.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.23,Page number: 406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the regulation and efficiency.\"\"\"\n",
+ "\n",
+ "from math import acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=20e03 #Power rating of the transformer(in Volt-Amperes)\n",
+ "V1=2200.0 #Voltage of the primary winding(in Volts)\n",
+ "V2=220.0 #Voltage of the secondary winding(in Volts)\n",
+ "f=50.0 #Frequency rating of the transformer(in Hertz)\n",
+ "Vsc=86.0 #Voltage measured during short-circuit test(in Volts)\n",
+ "Isc=10.5 #Current measured during short-circuit test(in Amperes)\n",
+ "Psc=360.0 #Power measured during short-circuit test(in Watts)\n",
+ "Voc=220.0 #Voltage measured during open-circuit test(in Volts)\n",
+ "Ioc=4.2 #Current measured during open-circuit test(in Amperes)\n",
+ "Poc=148.0 #Power measured during open-circuit test(in Watts)\n",
+ "pf=0.8 #Lagging power factor\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ze1=Vsc/Isc\n",
+ "Re1=Psc/(Isc*Isc)\n",
+ "Xe1=sqrt((Ze1*Ze1)-(Re1*Re1))\n",
+ "I1=VA/V1\n",
+ "reg=(I1*((Re1*pf)+(Xe1*sin(acos(pf)))))/V1\n",
+ "Pc=(I1/Isc)*(I1/Isc)*Psc\n",
+ "Pi=Poc\n",
+ "Po=VA*pf\n",
+ "effi=Po/(Po+Pc+Pi)\n",
+ "pf_sc=Re1/Ze1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The regulation at 0.8 pf lagging at full load is %.2f per cent.\" %(reg*100) \n",
+ "print \" The efficiency is %.2f per cent.\" %(effi*100)\n",
+ "print \"(b)The power factor on short circuit is %.3f lagging.\" %(pf_sc)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The regulation at 0.8 pf lagging at full load is 2.94 per cent.\n",
+ " The efficiency is 97.45 per cent.\n",
+ "(b)The power factor on short circuit is 0.399 lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.24,Page number: 407"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the efficiency at half of full-load current.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=200e03 #Power rating of the transformer(in VA)\n",
+ "effi_FL=0.98 #Full-load efficiency of the transformer\n",
+ "pf=0.8 #Lagging power factor\n",
+ "x=0.75 #Fraction of load at which maximum efficiency occurs\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Po=VA*pf\n",
+ "Pin=Po/effi_FL\n",
+ "tot_loss=Pin-Po\n",
+ "Pc=tot_loss/(1+(x*x))\n",
+ "Pi=tot_loss-Pc\n",
+ "x_new=0.5\n",
+ "P1=(x_new*x_new*Pc)+Pi\n",
+ "effi_half=(Po/2.0)/((Po/2.0)+P1)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The efficiency at half of full-load current is %.3f per cent.\" %(effi_half*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The efficiency at half of full-load current is 97.922 per cent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.25,Page number: 408"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the efficiency at different rated kVAs.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=150e03 #Power rating of the transformer(in Volt-Amperes)\n",
+ "V1=5000.0 #Voltage of the primary winding(in Volts)\n",
+ "V2=250.0 #Voltage of the secondary winding(in Volts)\n",
+ "f=50.0 #Frequency rating of the transformer(in Hertz)\n",
+ "Pc=1.8e03 #Full-load copper losses(in Watts)\n",
+ "Pi=1.5e03 #Core losses(in Watts)\n",
+ "flux=60e-03 #Maximum core flux(in Webers)\n",
+ "pf=0.8 #Lagging power factor\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "N2=V2/(4.44*f*flux)\n",
+ "N1=round(N2,0)*(V1/V2)\n",
+ "\"\"\"Case 1:\"\"\"\n",
+ "Po=(VA*pf)\n",
+ "effi_a=Po/(Po+Pi+Pc)\n",
+ "\"\"\"Case 2:\"\"\"\n",
+ "pf=1.0\n",
+ "Po=0.5*VA*pf\n",
+ "Pc_new=0.5*0.5*Pc\n",
+ "effi_b=Po/(Po+Pi+Pc_new)\n",
+ "\n",
+ "x=sqrt(Pi/Pc)\n",
+ "VA_max_effi=x*VA\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The number of turns in the primary winding is %d turns.\" %(round(N1,0))\n",
+ "print \" The number of turns in the secondary winding is %d turns.\" %(round(N2,0))\n",
+ "print \"(b)The efficiency at full rated kVA with 0.8 pf lagging is %.2f percent.\" %(effi_a*100) \n",
+ "print \"(c)The efficiency at half rated kVA with unity pf is %.2f percent.\" %(effi_b*100)\n",
+ "print \"(d)The kVA load for maximum efficieny is %d kVA.\" %(round((VA_max_effi/1000),0)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The number of turns in the primary winding is 380 turns.\n",
+ " The number of turns in the secondary winding is 19 turns.\n",
+ "(b)The efficiency at full rated kVA with 0.8 pf lagging is 97.32 percent.\n",
+ "(c)The efficiency at half rated kVA with unity pf is 97.47 percent.\n",
+ "(d)The kVA load for maximum efficieny is 137 kVA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.26,Page number: 409 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the impedance on the high voltage side.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=50e03 #Power rating of the transformer(in VA)\n",
+ "V1=2400.0 #Voltage of primary winding(in Volts)\n",
+ "V2=240.0 #Voltage of secondary winding(in Volts)\n",
+ "f=50.0 #Frequency rating of the transformer(in Hertz)\n",
+ "LV=240.0 #Low tension voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I2=VA/V2\n",
+ "Z_L=V2/I2\n",
+ "K=V2/V1\n",
+ "Zeq=Z_L/(K*K)\n",
+ "I_high=K*I2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The load impedance connected to the LV side is %.3f Ohms.\" %(Z_L)\n",
+ "print \"(b)The load impedance referred to to the high voltage side is %.2f Ohms.\" %(Zeq)\n",
+ "print \"(c)The current referred to the high voltage side is %.3f A.\" %(I_high) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The load impedance connected to the LV side is 1.152 Ohms.\n",
+ "(b)The load impedance referred to to the high voltage side is 115.20 Ohms.\n",
+ "(c)The current referred to the high voltage side is 20.833 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.27,Page number: 409"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the kVA output of the transformer.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "VA=10e03 #Power rating of the transformer(in VA)\n",
+ "V1=2300.0 #Voltage of HT winding(in Volts)\n",
+ "V2=230.0 #Voltage of LT winding(in Volts)\n",
+ "f=50.0 #Frequency rating of the transformer(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_HT=VA/V1\n",
+ "I_LT=VA/V2\n",
+ "I2=I_HT+I_LT\n",
+ "I1=I_LT\n",
+ "kVA_out=(V1*I2)/1000.0\n",
+ "VA_c=(V1*I1)\n",
+ "VA_i=V1*(I2-I1)\n",
+ "K=V1/(V1+V2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current distribution in the windings: load current=%.2f A and the input current is %.2f A.\" %(I2,I1)\n",
+ "print \"(b)The kVA output is %.2f kVA.\" %(kVA_out)\n",
+ "print \"(c)The volt-amperes transferred conductively is %.2f kVA\" %(VA_c/1000.0) \n",
+ "print \" The volt-amperes transferred inductively is %.2f kVA\" %(VA_i/1000.0)\n",
+ "print \"(d)The saving in copper as compared to the two-winding transformer is %.2f per cent.\" %(K*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current distribution in the windings: load current=47.83 A and the input current is 43.48 A.\n",
+ "(b)The kVA output is 110.00 kVA.\n",
+ "(c)The volt-amperes transferred conductively is 100.00 kVA\n",
+ " The volt-amperes transferred inductively is 10.00 kVA\n",
+ "(d)The saving in copper as compared to the two-winding transformer is 90.91 per cent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter14.ipynb b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter14.ipynb
new file mode 100755
index 00000000..8d806acc
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter14.ipynb
@@ -0,0 +1,1213 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 14: ALTERNATORS AND SYNCHRONOUS MOTORS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.1,Page number: 433"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of poles on the generator if the frequency of the generated voltage is decreased.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=60 #Frequency of ac-generator(in Hertz)\n",
+ "P=6 #Number of poles\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ns=(120*f)/P\n",
+ "f=20\n",
+ "P=(120*f)/Ns\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The speed of rotation of the generator is %d rpm.\" %(Ns)\n",
+ "print \"If the frequency is reduced to 20Hz,the required number of poles is %d.\" %(P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of rotation of the generator is 1200 rpm.\n",
+ "If the frequency is reduced to 20Hz,the required number of poles is 2.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.2,Page number: 441\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the distribution factor for a machine.\"\"\"\n",
+ "\n",
+ "from math import radians,degrees,sin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "slots=9 #Number of slots\n",
+ "slot_angle=radians(180/9) #Slot angle(in radians)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "q_a=120.0/degrees(slot_angle)\n",
+ "k_d_a=sin(q_a*(slot_angle/2.0))/(q_a*sin(slot_angle/2.0))\n",
+ "q_b=60.0/degrees(slot_angle)\n",
+ "k_d_b=sin(q_b*(slot_angle/2.0))/(q_b*sin(slot_angle/2.0))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The distribution factor for a machine for a three phase winding with 120 degrees phase group is %.3f.\" %(k_d_a)\n",
+ "print \"(b)The distribution factor for a machine for a three phase winding with 60 degrees phase group is %.3f.\" %(k_d_b)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The distribution factor for a machine for a three phase winding with 120 degrees phase group is 0.831.\n",
+ "(b)The distribution factor for a machine for a three phase winding with 60 degrees phase group is 0.960.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.3,Page number: 441"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed,the generated emf per phase,and the line emf of a three-phase alternator.\"\"\"\n",
+ "\n",
+ "from math import radians,degrees,sqrt,sin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "phase=3 #Number of phases\n",
+ "f=50 #Frequency rating(in Hertz)\n",
+ "P=20 #Number of poles \n",
+ "slots=180 #Number of slots on the stator\n",
+ "cond_per_slot=8 #Number of conductors per slot\n",
+ "flux=25e-03 #Flux per pole(in Weber) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z=slots*cond_per_slot\n",
+ "T=(Z/2)/phase\n",
+ "Ns=(120*f)/P\n",
+ "k_p=1\n",
+ "slots_per_pole=slots/P\n",
+ "slot_angle=radians(180/slots_per_pole)\n",
+ "q=slots_per_pole/phase\n",
+ "k_d=sin(q*(slot_angle/2))/(q*sin(slot_angle/2))\n",
+ "E=4.44*f*flux*T*k_p*k_d\n",
+ "line_emf=sqrt(3.0)*E\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The speed of the alternator is %d rpm.\" %(round(Ns,0))\n",
+ "print \"(b)The rms value of generated EMF per phase is %.2f V.\" %(E)\n",
+ "print \"(c)The line EMF is %.2f V.\" %(line_emf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The speed of the alternator is 300 rpm.\n",
+ "(b)The rms value of generated EMF per phase is 1278.45 V.\n",
+ "(c)The line EMF is 2214.34 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.4,Page number: 446\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage regulation for full-load for a three-phase alternator.\"\"\"\n",
+ "\n",
+ "from math import sqrt,cos,acos \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=600e06 #Power rating of the alternator(in VA) \n",
+ "V_L=22e03 #Rated terminal voltage(in Volts) \n",
+ "sync_imp=0.16 #Synchronous impedance per phase(in Ohms)\n",
+ "res_phase=0.014 #Resistance per phase(in Ohms) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_L=P/(sqrt(3)*V_L)\n",
+ "Iph=I_L\n",
+ "V=V_L/sqrt(3)\n",
+ "Vz=Iph*sync_imp\n",
+ "theta=acos(res_phase/sync_imp)\n",
+ "pf=0.8\n",
+ "phi=acos(pf)\n",
+ "alpha=theta-phi\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "vol_reg_a=(E-V)/V\n",
+ "pf=1\n",
+ "phi=acos(pf)\n",
+ "alpha=theta-phi\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "vol_reg_b=(E-V)/V\n",
+ "pf=0.8\n",
+ "phi=acos(pf)\n",
+ "alpha=theta+phi\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "vol_reg_c=(E-V)/V\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)For a power factor of 0.8 lagging:\"\n",
+ "print \"The voltage regulation for full load is %.2f percent.\" %(vol_reg_a*100)\n",
+ "print \"(b)For unity power factor:\"\n",
+ "print \"The voltage regulation for full load is %.2f percent.\" %(vol_reg_b*100)\n",
+ "print \"(c)For a power factor of 0.8 leading:\" \n",
+ "print \"The voltage regulation for full load is %.2f percent.\" %(vol_reg_c*100)\n",
+ "print \"\\nNote:The voltage regulation for leading power-factor load is negative.\"\n",
+ "print \"It means that on removing the load, the terminal voltage decreases.\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)For a power factor of 0.8 lagging:\n",
+ "The voltage regulation for full load is 14.20 percent.\n",
+ "(b)For unity power factor:\n",
+ "The voltage regulation for full load is 3.64 percent.\n",
+ "(c)For a power factor of 0.8 leading:\n",
+ "The voltage regulation for full load is -8.90 percent.\n",
+ "\n",
+ "Note:The voltage regulation for leading power-factor load is negative.\n",
+ "It means that on removing the load, the terminal voltage decreases.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.5,Page number: 450\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the synchronous reactance per phase and the voltage regulation for a three-phase star-connected alternator.\"\"\"\n",
+ "\n",
+ "from math import acos,sqrt,cos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=900 #Open-circuit voltage(line to line)(in Volts)\n",
+ "V_L_rated=3.3e03 #Rated voltage of the alternator(in Volts)\n",
+ "I_f=100 #Full-load current(in Amperes)\n",
+ "R=0.9 #Armature Resistance(in Ohm/phase)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_oc=V_L/sqrt(3)\n",
+ "I_sc=I_f\n",
+ "sync_imp=V_oc/I_sc\n",
+ "sync_rea=sqrt((sync_imp*sync_imp)-(R*R))\n",
+ "theta=acos(R/sync_imp)\n",
+ "V=V_L_rated/sqrt(3)\n",
+ "Vz=I_f*sync_imp\n",
+ "pf=0.8\n",
+ "phi=acos(pf)\n",
+ "alpha=theta-phi\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "vol_reg_a=(E-V)/V\n",
+ "pf=0.8\n",
+ "phi=acos(pf)\n",
+ "alpha=theta+phi\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "vol_reg_b=(E-V)/V\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The synchronous reactance per phase is %.3f Ohms.\" %(sync_rea)\n",
+ "print \"(a) For a power factor of 0.8 lagging:\"\n",
+ "print \"The voltage regulation for full load is %.2f percent\" %(vol_reg_a*100)\n",
+ "print \"(b) For a power factor of 0.8 leading:\"\n",
+ "print \"The voltage regulation for full load is %.2f percent.\" %(vol_reg_b*100)\n",
+ "print \"\\nNote: The voltage regulation for leading power-factor load is negative.\"\n",
+ "print \"It means that on removing the load, the terminal voltage decreases.\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The synchronous reactance per phase is 5.118 Ohms.\n",
+ "(a) For a power factor of 0.8 lagging:\n",
+ "The voltage regulation for full load is 21.34 percent\n",
+ "(b) For a power factor of 0.8 leading:\n",
+ "The voltage regulation for full load is -9.03 percent.\n",
+ "\n",
+ "Note: The voltage regulation for leading power-factor load is negative.\n",
+ "It means that on removing the load, the terminal voltage decreases.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.6,Page number: 455\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the angle of retard of a synchronous motor.\"\"\"\n",
+ "\n",
+ "from math import sqrt,acos,cos,pi,asin,sin,degrees\n",
+ "from cmath import phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Po=9e03 #Power rating of synchronous motor(in Watts) \n",
+ "V_L=400 #Voltage rating of synchronous motor(in Watts)\n",
+ "Zs=0.4+3*1j #Synchronous impedance per phase(in Ohms) \n",
+ "pf=0.8 #Power factor(leading) \n",
+ "effi=0.9 #Efficiency of the motor\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Pin=Po/effi\n",
+ "I_L=Pin/(sqrt(3)*V_L*pf)\n",
+ "I=I_L\n",
+ "phi=acos(pf)\n",
+ "mod_Zs=abs(Zs)\n",
+ "theta=phase(Zs)\n",
+ "V=V_L/sqrt(3)\n",
+ "Er=I*mod_Zs\n",
+ "E=sqrt((V*V)+(Er*Er)+(2*V*Er*cos(pi-(theta+phi))))\n",
+ "E_L=sqrt(3)*E\n",
+ "angle_retard=asin((Er*sin(theta+phi))/E)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The angle of retard of the rotor is %.2f degrees.\" %(degrees(angle_retard))\n",
+ "print \"The excitation emf E to which the motor has to be excited to give a full-load output at 0.8 leading power factor is %.2f V.\" %(E_L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The angle of retard of the rotor is 10.47 degrees.\n",
+ "The excitation emf E to which the motor has to be excited to give a full-load output at 0.8 leading power factor is 453.81 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.7,Page number: 459"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the line emf generated by the alternator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "S=24.0 #Number of slots in the alternator\n",
+ "C=12.0 #Number of conductors per slot\n",
+ "flux=0.1 #Flux per pole(in Weber)\n",
+ "P=4.0 #Number of poles in the alternator\n",
+ "Ns=1500.0 #Synchronous speed of the alternator(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Zph=S*C/3.0\n",
+ "T=Zph/2.0\n",
+ "S_pole=S/P\n",
+ "slot_ang=180.0/S_pole\n",
+ "q=S_pole/3.0\n",
+ "kd=sin((q*radians(slot_ang)/2))/(q*sin(radians(slot_ang/2)))\n",
+ "f=(P*Ns)/120.0\n",
+ "kp=1.0\n",
+ "E=4.44*flux*f*T*kp*kd\n",
+ "E_L=sqrt(3.0)*E\n",
+ " \n",
+ " \n",
+ "#Result:\n",
+ "print \"The line emf generated when the alternator runs at 1500 rpm is %.2f V.\" %(E_L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The line emf generated when the alternator runs at 1500 rpm is 1782.78 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.8,Page number: 460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the net emf induced in the 6 coil in series constituting the alternator winding.\"\"\"\n",
+ "\n",
+ "from math import radians,sin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "q=6.0 #Number of slots per pole per phase\n",
+ "angle=30.0 #Electrical angle between two consecutive slotss(in degrees) \n",
+ "e=10.0 #Emf of each coil(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "kd=sin(q*(radians(angle/2.0)))/(q*sin(radians(angle/2.0)))\n",
+ "arith_sum=6*e\n",
+ "Er=kd*arith_sum\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The net emf induced in the six coils in series is %.3f V.\" %(round(Er,3)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The net emf induced in the six coils in series is 38.637 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.9,Page number: 460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of poles and the current rating of an alternator.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=120.0 #Speed of the alternator(in rpm)\n",
+ "f=50.0 #Frequency of the alternator(in Hertz)\n",
+ "VA=100e06 #VA rating of the alternator(in Volt-Ampere)\n",
+ "pf=1.0 #Power factor\n",
+ "V_L=11e03 #Line voltage(in Volts)\n",
+ "effi=0.97 #Efficiency of the alternator \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "P=(120.0*f)/N\n",
+ "Po=VA*pf\n",
+ "I_L=VA/(sqrt(3.0)*V_L)\n",
+ "Pin=Po/effi\n",
+ "tor=Pin/(2*pi*N/60.0)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The number of poles is %d.\" %(P)\n",
+ "print \"(b)The current rating is %.2f A.\" %(I_L)\n",
+ "print \"(c)The input power is %.2f MW.\" %(round((Pin/1000000),2))\n",
+ "print \"(d)The prime-mover torque applied to the genrator shaft is %e Nm.\" %(tor)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The number of poles is 50.\n",
+ "(b)The current rating is 5248.64 A.\n",
+ "(c)The input power is 103.09 MW.\n",
+ "(d)The prime-mover torque applied to the genrator shaft is 8.203863e+06 Nm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.10,Page number: 460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the percentage regulation for a load.\"\"\"\n",
+ "\n",
+ "from math import atan,radians,acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=11e03 #Line voltage of the star-connected alternator(in Volts)\n",
+ "VA=800e03 #Power rating of the alternator(in Volt-Amperes)\n",
+ "Rs=1.5 #Resistance per phase(in Ohms)\n",
+ "Xs=25.0 #Synchronous reactance(in Ohms)\n",
+ "pf=0.8 #Leading power factor\n",
+ "Po=600e03 #Output power(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vph=V_L/sqrt(3.0)\n",
+ "V=Vph\n",
+ "Iph=Po/(sqrt(3.0)*V_L*pf)\n",
+ "Zs=sqrt((Rs*Rs)+(Xs*Xs))\n",
+ "theta=atan(Xs/Rs)\n",
+ "Vz=Iph*Zs\n",
+ "pf_ang=acos(pf)\n",
+ "alpha=theta+pf_ang\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "reg=(E-V)/V\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The percentage regulation is %.3f per cent.\" %(reg*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The percentage regulation is -7.641 per cent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.11,Page number: 461"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the full-load voltage regulation of the alternator.\"\"\"\n",
+ "\n",
+ "from math import atan,acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=6e03 #Line voltage of the alternator(in Volts)\n",
+ "VA=6000e03 #Power rating of the alternator(in Volt-Amperes)\n",
+ "R=0.2 #Winding resistance per phase(in Ohms)\n",
+ "pf=0.8 #Lagging power factor\n",
+ "V_L_OC=480.0 #Line voltage in open-circuit test(in Volts)\n",
+ "I_f_OC=10.0 #Field current in open-circuit test(in Amperes)\n",
+ "I_L_SC=105.0 #Line current in short-circuit test(in Amperes)\n",
+ "I_f_SC=5.0 #Field current in short-circuit test(in Amperes) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"In the short-circuit test,the currents are small compared to the full-load current.\"\"\"\n",
+ "V=V_L/sqrt(3.0)\n",
+ "I=VA/(3*V)\n",
+ "V_ph_OC=V_L_OC/sqrt(3.0)\n",
+ "\"\"\"Since the field current of 5 A gives an armature current of 105 A,a field current of 10 A will give an armature \n",
+ " current of (105*2)=210 A.\"\"\"\n",
+ "I_ph=I_L_SC*2\n",
+ "Zs=V_ph_OC/I_ph\n",
+ "Xs=sqrt((Zs*Zs)-(R*R))\n",
+ "theta=atan(Xs/R)\n",
+ "Vz=I*Zs\n",
+ "pf_ang=acos(pf)\n",
+ "alpha=theta-pf_ang\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "reg=(E-V)/V\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The full-load voltage regulation of the alternator at 0.8 lagging power factor is %.2f per cent.\" %(reg*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The full-load voltage regulation of the alternator at 0.8 lagging power factor is 16.73 per cent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.12,Page number: 462"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the terminal voltage of the generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50.0 #Frequency rating of the generator(in Hertz)\n",
+ "Z_p=96.0 #Number of conductors per phase\n",
+ "flux=0.1 #Flux per pole(in Webers)\n",
+ "Xs=5.0 #Synchronous reactance per phase(in Ohms)\n",
+ "kd=0.96 #Distribution factor for the stator winding\n",
+ "Z_L=10.0 #Load impedance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Zs=1j*Xs\n",
+ "kp=1.0\n",
+ "T=Z_p/2.0\n",
+ "E=4.44*f*flux*kp*kd*T\n",
+ "V=E/(1+(Zs/Z_L))\n",
+ "V_L=sqrt(3.0)*abs(V)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The terminal voltage of the generator is %.2f V.\" %(V_L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The terminal voltage of the generator is 1584.79 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.13,Page number: 462"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the percentage change of voltage.\"\"\"\n",
+ "\n",
+ "from math import atan,radians,acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=6.6e03 #Line voltage of the star-connected alternator(in Volts)\n",
+ "VA=1500e03 #Power rating of the alternator(in Volt-Amperes)\n",
+ "Rs=0.5 #Resistance per phase(in Ohms)\n",
+ "Xs=5.0 #Synchronous reactance(in Ohms)\n",
+ "pf=0.8 #Lagging power factor\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vph=V_L/sqrt(3.0)\n",
+ "V=Vph\n",
+ "Iph=VA/(3.0*Vph)\n",
+ "Zs=sqrt((Rs*Rs)+(Xs*Xs))\n",
+ "theta=atan(Xs/Rs)\n",
+ "Vz=Iph*Zs\n",
+ "pf_ang=acos(pf)\n",
+ "alpha=theta-pf_ang\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "reg=(E-V)/V\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The percentage change in voltage is %.3f per cent.\" %(reg*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The percentage change in voltage is 12.432 per cent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14,Page number: 463"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the terminal voltage and load regulation.\"\"\"\n",
+ "\n",
+ "from math import atan,radians,acos,asin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=6599.0 #Line voltage of the star-connected alternator(in Volts)\n",
+ "Rs=0.5 #Resistance per phase(in Ohms)\n",
+ "Xs=5.0 #Synchronous reactance(in Ohms)\n",
+ "I=130.0 #Full-load current(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "E=V_L/sqrt(3.0)\n",
+ "Zs=Rs+1j*Xs\n",
+ "theta=atan(Xs/Rs)\n",
+ "Vz=I*abs(Zs)\n",
+ "pf=0.8\n",
+ "pf_ang=acos(pf)\n",
+ "alpha=theta-pf_ang\n",
+ "tor_ang=asin((Vz*sin(alpha))/E)\n",
+ "V_a=(E*cos(tor_ang))-(Vz*cos(alpha))\n",
+ "reg_a=(E-V_a)/V_a\n",
+ "pf=0.6\n",
+ "pf_ang=acos(pf)\n",
+ "alpha=theta+pf_ang\n",
+ "beta=pi-alpha\n",
+ "tor_ang=asin((Vz*sin(beta))/E)\n",
+ "V_b=(E*cos(tor_ang))+(Vz*cos(beta))\n",
+ "reg_b=(E-V_b)/V_b\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The terminal voltage when the power factor is 0.8 lagging is %.2f V.\" %(V_a)\n",
+ "print \" The load regulation is %.2f per cent.\" %(reg_a*100) \n",
+ "print \"(b)The terminal voltage when the power factor is 0.6 leading is %.2f V.\" %(V_b)\n",
+ "print \" The load regulation is %.2f per cent.\" %(reg_b*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The terminal voltage when the power factor is 0.8 lagging is 3337.45 V.\n",
+ " The load regulation is 14.16 per cent.\n",
+ "(b)The terminal voltage when the power factor is 0.6 leading is 4265.21 V.\n",
+ " The load regulation is -10.67 per cent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.15,Page number: 464"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the percentage load regulation.\"\"\"\n",
+ "\n",
+ "from math import acos,atan\n",
+ "\n",
+ "#Variable Declration:\n",
+ "VA=1.5e06 #Power rating of the synchronous generator(in Volt-Amperes)\n",
+ "V_L=11e03 #Line voltage(in Volts)\n",
+ "Rs=1.2 #Armature resistance(in Ohms)\n",
+ "Xs=25.0 #Synchronous reactance per phase(in Ohms)\n",
+ "P_L=1.4375e06 #Load to be delivered(in Volt-Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V=V_L/sqrt(3.0)\n",
+ "I=P_L/(3*V)\n",
+ "Zs=sqrt((Rs*Rs)+(Xs*Xs))\n",
+ "Vz=I*Zs\n",
+ "pf=0.8\n",
+ "pf_ang=acos(pf)\n",
+ "theta=atan(Xs/Rs)\n",
+ "alpha=theta-pf_ang\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "reg_a=(E-V)/V\n",
+ "alpha=theta+pf_ang\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "reg_b=(E-V)/V\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The percentage load regulation for a power factor of 0.8 lagging is %.2f per cent.\" %(reg_a*100)\n",
+ "print \"(b)The percentage load regulation for a power factor of 0.8 leading is %.2f per cent.\" %(reg_b*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The percentage load regulation for a power factor of 0.8 lagging is 21.15 per cent.\n",
+ "(b)The percentage load regulation for a power factor of 0.8 leading is -13.12 per cent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.16,Page number: 465"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the torque angle of the alternator.\"\"\"\n",
+ "\n",
+ "from math import acos,degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=0.5 #Effective resistance per phase of the alternator(in Ohms)\n",
+ "V_L=2200.0 #Line voltage of the alternator(in Volts)\n",
+ "I_FL=200.0 #Full-load current(in Amperes)\n",
+ "If=30.0 #Field current(in Amperes)\n",
+ "V_L_oc=1100.0 #Line-to-line voltage on open circuit(in Volts)\n",
+ "pf=0.8 #Lagging power factor \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Zs=V_L_oc/(sqrt(3.0)*I_FL)\n",
+ "theta=acos(R/Zs)\n",
+ "Vz=I_FL*Zs\n",
+ "V=V_L/sqrt(3.0)\n",
+ "pf_ang=acos(pf)\n",
+ "alpha=theta-pf_ang\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "Po=V*I_FL*pf\n",
+ "tor_ang=theta-acos((Po+(V*V*cos(theta)/Zs))*(Zs/(E*V)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The torque angle of the alternator is %.2f degrees.\" %(degrees(tor_ang))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The torque angle of the alternator is 14.35 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.17,Page number: 465"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"\"Finding the synchronising power of the alternator.\"\"\"\n",
+ "\n",
+ "from math import acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=6.0 #Number of poles\n",
+ "VA=3e06 #Power rating of the alternator(in Volt-Amperes)\n",
+ "Ns=1000.0 #Speed of operation of the alternator(in rpm)\n",
+ "V_L=3.3e03 #Line voltage of the load(in Volts)\n",
+ "pf=0.8 #Lagging power factor\n",
+ "\n",
+ "#Calculations:\n",
+ "V=V_L/sqrt(3.0)\n",
+ "I=VA/(sqrt(3.0)*V_L)\n",
+ "IXs=0.25*V\n",
+ "Xs=IXs/I\n",
+ "rotor_dis=radians(1*(P/2.0))\n",
+ "Vz=I*Xs\n",
+ "theta=pi/2\n",
+ "pf_ang=acos(0.8)\n",
+ "alpha=theta-pf_ang\n",
+ "E=sqrt((V*V)+(Vz*Vz)+(2*V*Vz*cos(alpha)))\n",
+ "Psy=(3*E*V*sin(rotor_dis))/(Xs)\n",
+ "tor=(3*Psy)/(2*pi*Ns/60)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The synchronising power is %.2f kW.\" %(Psy/1000)\n",
+ "print \"(b)The synchronising torque per mechanical degree is %.2f kNm.\" %(tor/1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The synchronising power is 733.08 kW.\n",
+ "(b)The synchronising torque per mechanical degree is 21.00 kNm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.18,Page number: 466"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the armature current and power factor.\"\"\"\n",
+ "\n",
+ "from math import radians,degrees\n",
+ "from cmath import rect,phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=2300.0 #Line voltage of the winding(in Volts)\n",
+ "f=50.0 #Operating frequency of the synchronous motor(in Hertz)\n",
+ "Psh=205.0 #Power delivered by the motor(in Horse Power)\n",
+ "ang=15.0 #Power angle(in degrees)\n",
+ "Xs=11.0 #Synchronous reactance(in Ohms)\n",
+ "effi=0.90 #Efficiency of the motor\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V=V_L/sqrt(3.0)\n",
+ "Psh=Psh*746.0\n",
+ "Pd=Psh/effi\n",
+ "E=(Pd*Xs)/(3.0*V*sin(radians(ang)))\n",
+ "I=(rect(V,0)-rect(E,radians(-ang)))/(1j*Xs)\n",
+ "pf=cos(phase(I))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The excitation voltage per phase is %.2f V per phase.\" %(E)\n",
+ "print \"(b)The armature current is %.2f A at a phase angle of %.2f degrees.\" %(abs(I),degrees(phase(I)))\n",
+ "print \"(c)The power factor is %.4f leading.\" %(pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The excitation voltage per phase is 1812.83 V per phase.\n",
+ "(b)The armature current is 57.44 A at a phase angle of 42.05 degrees.\n",
+ "(c)The power factor is 0.7426 leading.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.19,Page number: 466"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the line current and the power factor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=6600.0 #Line voltage(in Volts)\n",
+ "Xs=20.0 #Synchronous reactance per phase(in Ohms)\n",
+ "Pin=915e03 #Power consumed by the motor(in Watts)\n",
+ "E_L=8942.0 #Induced line emf per phase(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V=V_L/sqrt(3.0)\n",
+ "E=E_L/sqrt(3.0)\n",
+ "I_cos=Pin/(sqrt(3.0)*V_L)\n",
+ "BN=Xs*I_cos\n",
+ "NA=sqrt((E*E)-(BN*BN))\n",
+ "NO=NA-V\n",
+ "Er=sqrt((NO*NO)+(BN*BN))\n",
+ "I_L=Er/Xs\n",
+ "pf=I_cos/I_L\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The line current is %.2f A.\" %(I_L)\n",
+ "print \"(b)The power factor is %.4f leading.\" %(pf) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The line current is 97.05 A.\n",
+ "(b)The power factor is 0.8247 leading.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.20,Page number: 467"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power factor when the load on the motor increases.\"\"\"\n",
+ "\n",
+ "from math import acos,asin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=6600.0 #Line voltage(in Volts)\n",
+ "Xs=15.0 #Synchronous reactance per phase(in Ohms)\n",
+ "Pin=500e03 #Power consumed by the motor(in Watts)\n",
+ "pf=0.8 #Leading power factor\n",
+ "Pin_new=800e03 #New Input power(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V=V_L/sqrt(3.0)\n",
+ "Zs=Xs\n",
+ "I_L=Pin/(sqrt(3.0)*V_L*pf)\n",
+ "Er=I_L*Zs\n",
+ "pf_ang=acos(pf)\n",
+ "alpha=(pi/2)-pf_ang\n",
+ "E=sqrt((V*V)+(Er*Er)+(2*V*Er*cos(alpha)))\n",
+ "I1_cos=Pin_new/(sqrt(3.0)*V_L)\n",
+ "sin_tor=(Pin_new*Xs)/(E*V)\n",
+ "AN=V*sin_tor\n",
+ "NB=E-(V*cos(asin(sin_tor)))\n",
+ "Er1=sqrt((AN*AN)+(NB*NB))\n",
+ "I1=Er1/Xs\n",
+ "pf=I1_cos/I1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The power factor when the load on the motor increases is %.4f leading.\" %(pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power factor when the load on the motor increases is 0.3229 leading.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.21,Page number: 469"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power factor and kVA rating of the synchronous motor.\"\"\"\n",
+ "\n",
+ "from math import atan,acos\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Si=500e03 #Load supplied by the three-phase system(in Volt-Amperes)\n",
+ "pf_i=0.5 #Lagging power factor of three-phase system\n",
+ "Po=100.0 #Load supplied by the synchronous motor(in Horse-Power)\n",
+ "pf_t=0.9 #Overall lagging power factor \n",
+ "effi=0.87 #Efficiency of the synchronous motor\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Pi=Si*pf_i\n",
+ "Qi=Si*sin(acos(pf_i))\n",
+ "Ps=(Po*746)/effi\n",
+ "Pt=Pi+Ps\n",
+ "St=Pt/pf_t\n",
+ "Qt=St*sin(acos(pf_t))\n",
+ "Qs=Qt-Qi\n",
+ "pf_ang=atan(Qs/Ps)\n",
+ "pf_s=cos(pf_ang)\n",
+ "Ss=sqrt((Ps*Ps)+(Qs*Qs))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The power faactor of the synchronous motor is %.2f leading.\" %(pf_s)\n",
+ "print \"(b)The kVA rating of the synchronous motor is %.2f kVA.\" %(Ss/1000.0)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The power faactor of the synchronous motor is 0.30 leading.\n",
+ "(b)The kVA rating of the synchronous motor is 283.67 kVA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter15.ipynb b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter15.ipynb
new file mode 100755
index 00000000..f49bd253
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter15.ipynb
@@ -0,0 +1,957 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 15: INDUCTION MOTORS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.1,Page number: 480"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the synchronous speed of an induction motor and the frequency of rotor currents at standstill.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=6.0 #Number of poles \n",
+ "f=50.0 #Operating frequency of the induction motor(in Hertz)\n",
+ "s_no_load=0.01 #Slip at no-load \n",
+ "s_full_load=0.03 #Slip at full-load\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ns=(120.0*f)/P\n",
+ "N_no_load=Ns*(1-s_no_load)\n",
+ "N_full_load=Ns*(1-s_full_load)\n",
+ "s_standstill=1.0\n",
+ "fr_standstill=s_standstill*f\n",
+ "fr_full_load=s_full_load*f\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The synchronous speed is %d rpm.\" %(Ns) \n",
+ "print \"(b)The no-load speed is %d rpm.\" %(N_no_load) \n",
+ "print \"(c)The full-load speed is %d rpm.\" %(N_full_load) \n",
+ "print \"(d)The frequency of rotor-currents at standstill is %.2f Hz.\" %(fr_standstill)\n",
+ "print \"(e)The frequency of rotor-currents at full-load is %.2f Hz.\" %(fr_full_load)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The synchronous speed is 1000 rpm.\n",
+ "(b)The no-load speed is 990 rpm.\n",
+ "(c)The full-load speed is 970 rpm.\n",
+ "(d)The frequency of rotor-currents at standstill is 50.00 Hz.\n",
+ "(e)The frequency of rotor-currents at full-load is 1.50 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.2,Page number: 480"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the frequency of rotor-current in an induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=12.0 #Number of poles \n",
+ "f=50.0 #Operating frequency of induction motor(in Hertz)\n",
+ "N=485.0 #Speed of the motor(in rpm) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ns=(120.0*f)/P\n",
+ "s=(Ns-N)/Ns\n",
+ "fr=s*f\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The frequency of the rotor-currents is %.2f Hz.\" %(fr) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency of the rotor-currents is 1.50 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.3,Page number: 481 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the full-load slip and speed of an induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "fr=2.0 #Frequency of thr rotoremf at full-load(in Hertz) \n",
+ "f=50.0 #Frequency of the supply(in Hertz)\n",
+ "P=6.0 #Number of poles \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "s=fr/f\n",
+ "Ns=(120*f)/P\n",
+ "N=Ns*(1-s)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The slip at full-load is %.2f percent.\" %(s*100)\n",
+ "print \"The full-load speed is %d rpm.\" %(N) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The slip at full-load is 4.00 percent.\n",
+ "The full-load speed is 960 rpm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.4,Page number: 481 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the synchronous speed and the rotor frequency of an induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50.0 #Frequency of the supply(in Hertz) \n",
+ "P=4.0 #Number of poles\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ns=(120*f)/P\n",
+ "s1=0.04\n",
+ "N1=Ns*(1-s1) \n",
+ "N2=600\n",
+ "s2=(Ns-N2)/Ns\n",
+ "fr=s2*f\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The synchronous speed is %d rpm.\" %(Ns)\n",
+ "print \"(b)The speed of the rotor when the slip is 0.04 is %d rpm.\" %(N1)\n",
+ "print \"(c)The rotor frequency when the speed of the rotor is 600 rpm is %.2f Hz.\" %(fr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The synchronous speed is 1500 rpm.\n",
+ "(b)The speed of the rotor when the slip is 0.04 is 1440 rpm.\n",
+ "(c)The rotor frequency when the speed of the rotor is 600 rpm is 30.00 Hz.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.5,Page number: 484 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rotor current of a three-phase induction motor.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pow,acos,radians,degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "E_L=100.0 #Induced EMF(in Volts)\n",
+ "R2=0.05 #Resistance of rotor windings(in Ohms) \n",
+ "X_20=0.1 #Standstill reactance of rotor windings(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "E_20=E_L/sqrt(3.0)\n",
+ "s_a=0.04\n",
+ "E2_a=s_a*E_20\n",
+ "Z2_a=sqrt((R2*R2)+pow((s_a*X_20),2))\n",
+ "I2_a=E2_a/Z2_a\n",
+ "angle_a=acos(R2/Z2_a)\n",
+ "s_b=1.0\n",
+ "E2_b=s_b*E_20\n",
+ "Z2_b=sqrt((R2*R2)+pow((s_b*X_20),2))\n",
+ "I2_b=E2_b/Z2_b\n",
+ "angle_b=acos(R2/Z2_b)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)At 4% slip : \"\n",
+ "print \" The rotor current is %.2f A.\" %(round(I2_a,2))\n",
+ "print \" The phase difference between the rotor voltage and the rotor current is %.2f degrees.\" %(round(degrees(angle_a),2))\n",
+ "print \"\\n(b)At 100% slip :\"\n",
+ "print \" The rotor current is %.2f A.\" %(round(I2_b,2))\n",
+ "print \" The phase difference between the rotor voltage and the rotor current is %.2f degrees.\" %(round(degrees(angle_b),2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)At 4% slip : \n",
+ " The rotor current is 46.04 A.\n",
+ " The phase difference between the rotor voltage and the rotor current is 4.57 degrees.\n",
+ "\n",
+ "(b)At 100% slip :\n",
+ " The rotor current is 516.40 A.\n",
+ " The phase difference between the rotor voltage and the rotor current is 63.43 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.6,Page number: 485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the developed power,air-gap power,rotor copper loss,and stator loss in an induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "HP=746.0 #Value of Horse-Power(in Watts) \n",
+ "f=50.0 #Operating frequency of the induction motor(in Hertz)\n",
+ "N=1470.0 #Speed of the motor(in rpm)\n",
+ "P=4.0 #Number of poles\n",
+ "phase=3.0 #Number of phases \n",
+ "effi=87.5e-02 #Efficiency of the motor at full-load \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Po=5.0*HP\n",
+ "Pin=Po/effi\n",
+ "total_loss=Pin-Po\n",
+ "mech_loss=0.05*total_loss\n",
+ "elec_loss=total_loss-mech_loss\n",
+ "dev_pow=Po+mech_loss\n",
+ "Ns=(120*f)/P\n",
+ "s=(Ns-N)/Ns\n",
+ "Pg=dev_pow/(1-s)\n",
+ "P_R=s*Pg\n",
+ "P_S=Pin-Pg\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The developed power is %.2f W.\" %(round(dev_pow,2))\n",
+ "print \"The air-gap power is %.2f W.\" %(round(Pg,2))\n",
+ "print \"The rotor copper loss is %.2f W.\" %(round(P_R,2))\n",
+ "print \"The stator loss is %.2f W.\" %(round(P_S,2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The developed power is 3756.64 W.\n",
+ "The air-gap power is 3833.31 W.\n",
+ "The rotor copper loss is 76.67 W.\n",
+ "The stator loss is 429.55 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.7,Page number: 490 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rotor speed,the stator current,the power factor and the efficiency of an induction motor. \"\"\"\n",
+ "\n",
+ "from math import sqrt,cos,degrees\n",
+ "from cmath import rect,phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_L=400.0 #Operating voltage of the induction motor(in Volts)\n",
+ "P=4.0 #Number of poles\n",
+ "f=50.0 #Operating frequency of the motor(in Hertz)\n",
+ "s=0.02 #Slip at rated load \n",
+ "rot_loss=0.34e03 #Rotational losses(in Watts)\n",
+ "R1=0.641 #Impedance per phase on the stator side(in Ohms) \n",
+ "X1=1.106 #Impedance per phase on the stator side(in Ohms) \n",
+ "R2_eq=0.332 #Impedance per phase on the stator side(in Ohms)\n",
+ "X_20_eq=0.464 #Impedance per phase on the stator side(in Ohms) \n",
+ "Xg=26.3 #Impedance per phase on the stator side(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V1_mod=V_L/sqrt(3)\n",
+ "V1=rect(V1_mod,0)\n",
+ "Ns=(120*f)/P\n",
+ "N=Ns*(1-s)\n",
+ "V_Th=V1*((Xg/(R1+(X1+Xg)*1j))*1j)\n",
+ "Z_Th=((Xg*(R1+X1*1j))/(R1+(X1+Xg)*1j))*1j\n",
+ "R_L_eq=((1-s)/s)*R2_eq\n",
+ "I1=V_Th/(Z_Th +(R2_eq+X_20_eq*1j)+R_L_eq)\n",
+ "angle=phase(I1)\n",
+ "pf=cos(angle)\n",
+ "Po=(3*abs(I1)*abs(I1)*R_L_eq)-rot_loss\n",
+ "Pi=3*abs(V1)*abs(I1)*cos(phase(I1))\n",
+ "effi=(Po/Pi)*100\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The rotor speed is %d rpm.\" %(round(N,0))\n",
+ "print \"(b)The stator current is %.2f A at a phase angle of %.2f degrees.\" %(abs(I1),degrees(phase(I1))) \n",
+ "print \"(c)The power factor is %.3f lagging.\" %(pf)\n",
+ "print \"(d)The output power is %.2f W.\" %(Po)\n",
+ "print \" The input power is %.2f W.\" %(Pi)\n",
+ "print \"(e)The efficiency of the motor is %.2f percent.\" %(effi)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The rotor speed is 1470 rpm.\n",
+ "(b)The stator current is 12.84 A at a phase angle of -3.78 degrees.\n",
+ "(c)The power factor is 0.998 lagging.\n",
+ "(d)The output power is 7703.00 W.\n",
+ " The input power is 8874.78 W.\n",
+ "(e)The efficiency of the motor is 86.80 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.8,Page number: 495"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the standstill rotor reactance of an induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50.0 #Operating frequency of induction motor(in Hertz)\n",
+ "P=6.0 #Number of poles\n",
+ "N=940.0 #Speed of motor(in rpm)\n",
+ "R2=0.1 #Resistance per phase(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ns=(120*f)/P\n",
+ "s=(Ns-N)/Ns\n",
+ "X_20=R2/s\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The standstill rotor resistance is %.3f Ohms.\" %(X_20)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The standstill rotor resistance is 1.667 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.9,Page number: 498"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the full-load slip of an induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P_motor=6.0 #Number of poles in the induction motor\n",
+ "N_motor=960.0 #Full-load speed of the induction motor(in rpm)\n",
+ "P_alt=4.0 #Number of poles in the alternator\n",
+ "N_alt=1500.0 #Speed of the alternator(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "f=(N_alt*P_alt)/120.0\n",
+ "Ns=(120.0*f)/P_motor\n",
+ "s=(Ns-N_motor)/Ns\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The full-load slip of the motor is %.2f percent.\" %(s*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The full-load slip of the motor is 4.00 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.10,Page number: 498"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rotor input,motor input and the efficiency of an induction motor.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=4.0 #Number of poles in the induction motor\n",
+ "useful_tor=160.0 #Useful torque(in Newton-metre)\n",
+ "s=0.05 #Slip\n",
+ "P_S=1000.0 #Stator losses(in Watts)\n",
+ "Pm=500.0 #Frictional and windage losses(in Watts)\n",
+ "f=50.0 #Frequency of induction motor(in Hertz)\n",
+ "#Calculations:\n",
+ "Ns=(120.0*f)/P\n",
+ "N=(1-s)*Ns\n",
+ "Po=(2*pi*useful_tor*N)/60.0\n",
+ "Pd=Po+Pm\n",
+ "Pg=Pd/(1-s)\n",
+ "Pin=Pg+P_S\n",
+ "effi=Po/Pin\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The rotor input is %.4f kW.\" %(Pg/1000.0)\n",
+ "print \"(b)The motor input is %.4f W.\" %(Pin)\n",
+ "print \"(c)The efficiency is %.4f percent.\" %(effi*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The rotor input is 25.6591 kW.\n",
+ "(b)The motor input is 26659.0570 W.\n",
+ "(c)The efficiency is 89.5609 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.11,Page number: 499"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the slip of an induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "effi=0.9 #Efficiency of the induction motor\n",
+ "Po=50e03 #Load driven by the motor(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Pin=Po/effi\n",
+ "P_tot=Pin-Po\n",
+ "\"\"\"The no-load losses comprise of the stator iron loss(Pi) and mechanical losses(Pm)\n",
+ " (since the stator and rotor copper losses are negligible).These two losses are independent of the load.\n",
+ " \n",
+ " Given,the mechanical loss,Pm=(no-load loss)/3.0=((Pi+Pm)/3.0).\n",
+ " \n",
+ " Therefore,Pm=(Pi/2.0).\n",
+ " \n",
+ " Total loss=(Stator copper loss)+(Stator iron loss)+(Rotor copper loss)+(Mechanical loss).\"\"\"\n",
+ "Pi=(2.0/7.0)*P_tot\n",
+ "P_R=Pi\n",
+ "Pm=Pi/2.0\n",
+ "Pd=Po+Pm\n",
+ "Pg=Pd+P_R\n",
+ "s=P_R/Pg\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The slip of the induction motor is %.2f percent.\" %(s*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The slip of the induction motor is 3.03 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.12,Page number: 499"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rotor current in an induction motor.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V2=100.0 #Induced emf between slip ring terminals(in Volts)\n",
+ "R2=0.4 #Resistance per phase of star-connected rotor windings(in Ohms)\n",
+ "s=0.04 #Slip of rotor\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "E20=V2/sqrt(3.0)\n",
+ "\"\"\"The rotor reactance X2=(s*X20) is negligible for small values of sand hence cam be ignored.\"\"\"\n",
+ "I2=(s*E20)/R2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The rotor current is %.3f A.\" %(I2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rotor current is 5.774 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.13,Page number: 499"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of poles and the slip of an induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=285.0 #Full-load speed of an induction motor(in rpm)\n",
+ "f=50.0 #Frequency of supply(in Hertz)\n",
+ "P_R=250.0 #Original rotor losses(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "P=(120.0*f)/N\n",
+ "\"There has to be even number of poles,such that Ns>N.Thus,the actual number of poles is 20.\"\"\"\n",
+ "P=round((P-1),0)\n",
+ "Ns=(120.0*f)/P\n",
+ "s=(Ns-N)/Ns\n",
+ "\"\"\"For small values of s,the reactance of (s*X20) is much smaller than the resistance R2,hence\n",
+ " torque is directly proportional to (s/R2).\n",
+ " \n",
+ " It means that the to keep the torque same,the (s/R2) ratio should remain the same.If R2 is doubled,then s also has to be \n",
+ " doubled.\"\"\" \n",
+ "s_new=2*s\n",
+ "\"\"\"Since the full-load current remains the same,on doubling the rotor resistance,the copper loss(I*I*R) is also doubled.\"\"\"\n",
+ "P_R_new=2*P_R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The number of poles is %d.\" %(P)\n",
+ "print \"(b)The slip is %.2f percent.\" %(s*100)\n",
+ "print \"(c)The slip for full-load torque if the rotor resistance is doubled is %.2f percent.\" %(s_new*100)\n",
+ "print \"(d)The rotor copper losses with added rotor resistance is %.2f W.\" %(P_R_new)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The number of poles is 20.\n",
+ "(b)The slip is 5.00 percent.\n",
+ "(c)The slip for full-load torque if the rotor resistance is doubled is 10.00 percent.\n",
+ "(d)The rotor copper losses with added rotor resistance is 500.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.14,Page number: 500"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the slip and the power output of an induction motor when external resistances are inserted in each rotor phase.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "s=0.02 #Full-load slip of the induction motor\n",
+ "Po=500 #Power rating of the motor(in HorsePower)\n",
+ "R2=0.25 #Resistance per phase of the rotor(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R2_new=2.0+R2\n",
+ "s_new=(s/R2)*(R2_new)\n",
+ "\"\"\"If Ns is the synchronous speed of the motor,then the speed of the rotor before inserting external resistance,\n",
+ " N=(1-s)*Ns;\n",
+ " \n",
+ " The speed of the rotor after inserting external resistance is N_new=(1-s_new)*Ns;\"\"\"\n",
+ "\n",
+ "Po_new=((1-s_new)/(1-s))*Po\n",
+ " \n",
+ "\n",
+ "#Result:\n",
+ "print \"The new slip is %.2f percent.\" %(s_new*100)\n",
+ "print \"The new power output is %.2f HP.\" %(Po_new)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The new slip is 18.00 percent.\n",
+ "The new power output is 418.37 HP.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.15,Page number: 500"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the full-load speed of an induction motor.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=4.0 #Number of poles in the induction motor\n",
+ "f=50.0 #Rated frequency of the induction motor(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" Starting torque(tor_st)=1.6*(tor_fl) where tor_fl=full-load torque;\n",
+ " Maximum torque(tor_max)=2.0*(tor_fl);\n",
+ " \n",
+ " tor_st/tor_max=0.8;\n",
+ " \n",
+ " (tor_st/tor_max)=(2*s_m)/((s_m*s_m)+1))\n",
+ " \n",
+ " (s_m*s_m)-(2.5*s_m)+1=0 is a quadratic equation whose roots are 2 and 0.5 \n",
+ " \n",
+ " s_m has to be less than 1. Therefore, s_m=0.5; \n",
+ " \n",
+ " Similarly,\n",
+ " (tor_fl)/(tor_max)=0.5; \n",
+ " \n",
+ " (tor_fl)/(tor_max)=(2*s_fl*s_m)/((s_m*s_m)+(s_fl*s_fl))\n",
+ " \n",
+ " Substituting s_m=0.5,we get a quadratic equation,\n",
+ " \n",
+ " (s_fl*s_fl)-(s_fl)+0.125=0 whose roots are 0.8535,0.1465.\n",
+ " \n",
+ " s_fl=0.1465 as s_fl should be less than s_m. \"\"\"\n",
+ "\"\"\"Finding the roots:\"\"\"\n",
+ "s_m,s_fl= symbols('s_m s_fl')\n",
+ "a=solve(s_m**2-(2.5*s_m)+1.0,s_m)\n",
+ "b=solve(s_fl**2-s_fl+0.125, s_fl)\n",
+ "Ns=(120*f)/P\n",
+ "Nfl=Ns*(1-b[0])\n",
+ "Nm=Ns*(1-a[0])\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The full-load speed is %.2f rpm.\" %(Nfl)\n",
+ "print \"(b)The speed at maximum torque is %.2f rpm.\" %(Nm)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The full-load speed is 1280.33 rpm.\n",
+ "(b)The speed at maximum torque is 750.00 rpm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.16,Page number: 501"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rotor copper loss and the gross torque for an induction motor.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "s=0.04 #Full-load slip\n",
+ "P=4.0 #Number of poles\n",
+ "f=50.0 #Frequency of the induction motor(in Hertz)\n",
+ "Po=18.65e03 #Power output(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Pm=0.025*Po\n",
+ "Pd=Pm+Po\n",
+ "P_R=Pd*(s/(1-s))\n",
+ "Pg=P_R/s\n",
+ "Ns=(120*f)/P\n",
+ "N=Ns*(1-s)\n",
+ "sh_tor=Po/(2*pi*(N/60.0))\n",
+ "gross_tor=Pd/(2*pi*(N/60.0))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The rotor copper loss is %.2f W.\" %(P_R)\n",
+ "print \"(b)The rotor input is %.2f W.\" %(Pg)\n",
+ "print \"(c)The output(shaft) torque is %.2f Nm.\" %(sh_tor)\n",
+ "print \"(d)The gross torque is %.2f Nm.\" %(gross_tor)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The rotor copper loss is 796.51 W.\n",
+ "(b)The rotor input is 19912.76 W.\n",
+ "(c)The output(shaft) torque is 123.68 Nm.\n",
+ "(d)The gross torque is 126.77 Nm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.17,Page number: 501"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rotor current and the rotor power factor for an induction motor.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pow,cos,atan\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=4.0 #Number of poles in the induction motor\n",
+ "E1=1100.0 #Line voltage(in Volts) \n",
+ "f=50.0 #Operating frequency of the motor(in Hertz)\n",
+ "K=1.0/3.8 #Transformation ratio\n",
+ "R2=0.012 #Rotor resistance per phase(in Ohms)\n",
+ "X20=0.25 #Rotor stanstill reactance per phase(in Ohms) \n",
+ "N=1440.0 #Full-load speed of the motor(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ns=(120.0*f)/P\n",
+ "s=(Ns-N)/Ns\n",
+ "E20=K*E1\n",
+ "Z20=sqrt((R2*R2)+(X20*X20))\n",
+ "Z2=sqrt((R2*R2)+(s*X20*s*X20))\n",
+ "I20=E20/Z20\n",
+ "pf_20=cos(atan(X20/R2))\n",
+ "I2=(s*E20)/Z2\n",
+ "pf=R2/Z2\n",
+ "I1=100.0/sqrt(3.0)\n",
+ "I_20=I1/K\n",
+ "Z2_rot=E20/I_20\n",
+ "r=sqrt((Z2_rot*Z2_rot)-(X20*X20))-R2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The rotor current at starting with slip-rings shorted is %.2f A.\" %(I20)\n",
+ "print \"(b)The rotor power factor at starting with slip-rings shorted is %.5f,lagging.\" %(pf_20)\n",
+ "print \"(c)The rotor current while running at full load with slip-rings shorted is %.3f A.\" %(I2)\n",
+ "print \"(d)The rotor power factor while running at full-load with slip-rings shorted is %.5f,lagging.\" %(pf)\n",
+ "print \"(e)The external rotor resistance is %.4f Ohms.\" %(r)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The rotor current at starting with slip-rings shorted is 1156.56 A.\n",
+ "(b)The rotor power factor at starting with slip-rings shorted is 0.04794,lagging.\n",
+ "(c)The rotor current while running at full load with slip-rings shorted is 741.266 A.\n",
+ "(d)The rotor power factor while running at full-load with slip-rings shorted is 0.76822,lagging.\n",
+ "(e)The external rotor resistance is 1.2835 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter16.ipynb b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter16.ipynb
new file mode 100755
index 00000000..7078e036
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter16.ipynb
@@ -0,0 +1,1654 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 16: DC MACHINES "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.1,Page number: 518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the terminal voltage,output current and total power generated by a dc generator.\"\"\" \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "e=2.1 #Average emf generated in each conductor(in Volts) \n",
+ "full_load_I=200.0 #Full-load current(in Amperes) \n",
+ "Z=480.0 #Number of conductors in armature\n",
+ "P=8.0 #Number of poles\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "A_1=P\n",
+ "E_1=e*(Z/A_1)\n",
+ "I_L_1=full_load_I*A_1\n",
+ "Po_1=E_1*I_L_1\n",
+ "A_2=2\n",
+ "E_2=e*(Z/A_2)\n",
+ "I_L_2=full_load_I*A_2\n",
+ "Po_2=E_2*I_L_2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print(\"(a) When the armature is lap wound \\n \")\n",
+ "print \"The terminal voltage on no load is %.2f V\" %(E_1)\n",
+ "print \"The output current on full load is %.2f A\" %(I_L_1) \n",
+ "print \"The total power generated on full load is %e W\" %(Po_1)\n",
+ "print(\"\\n(b)When the armature is wave wound \\n \")\n",
+ "print \"The terminal voltage on no load is %.2f V\" %(E_2)\n",
+ "print \"The output current on full load is %.2f A\" %(I_L_2) \n",
+ "print \"The total power generated on full load is %e W\" %(Po_2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) When the armature is lap wound \n",
+ " \n",
+ "The terminal voltage on no load is 126.00 V\n",
+ "The output current on full load is 1600.00 A\n",
+ "The total power generated on full load is 2.016000e+05 W\n",
+ "\n",
+ "(b)When the armature is wave wound \n",
+ " \n",
+ "The terminal voltage on no load is 504.00 V\n",
+ "The output current on full load is 400.00 A\n",
+ "The total power generated on full load is 2.016000e+05 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.2,Page number: 520"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the emf induced in the armature of a dc generator. \"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "slots=65.0 #Number of slots\n",
+ "cond_per_slot=12.0 #Number of conductors per slot\n",
+ "A=4.0 #Number of parallel paths\n",
+ "P=4.0 #Number of poles\n",
+ "flux=0.02 #Flux per pole(in Webers) \n",
+ "N=1200.0 #Speed of operation of the dc generator(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z=slots*cond_per_slot\n",
+ "E=(flux*Z*N*P)/(60*A)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The emf induced in the armature is %.2f V\" %(E)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The emf induced in the armature is 312.00 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.3,Page number: 520"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\" Finding the induced emf in a dc machine.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N1=500.0 #Initial speed of operation of dc machine(in rpm) \n",
+ "E1=180.0 #Induced emf at 500rpm(in Volts)\n",
+ "N2=600.0 #New speed of operation(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "E2=(N2/N1)*E1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The induced emf when the machine runs at 600 rpm is %.2f V\" %(E2) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The induced emf when the machine runs at 600 rpm is 216.00 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.4,Page number: 520"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"\"Finding the percentage increase in the field flux in a dc generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N1=750.0 #Initial speed of operation of dc machine(in rpm)\n",
+ "E1=220.0 #Induced emf at 750 rpm(in Volts) \n",
+ "E2_a=250.0 #New emf(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations and Result:\n",
+ "N2_a=(E2_a/E1)*N1\n",
+ "E2_b=250.0\n",
+ "N2_b=600.0\n",
+ "flux_ratio=(E2_b/E1)*(N1/N2_b)\n",
+ " \n",
+ " \n",
+ "#Result:\n",
+ "print \"(a)The speed at which the induced emf is 250V(assuming the flux to be constant) is %d rpm \" %(round(N2_a,0))\n",
+ "print \"(b)The required percentage increase in the field flux so that the induced emf is 250V,while the speed is only 600rpm is %d percent\" %(round(((flux_ratio-1)*100),0))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The speed at which the induced emf is 250V(assuming the flux to be constant) is 852 rpm \n",
+ "(b)The required percentage increase in the field flux so that the induced emf is 250V,while the speed is only 600rpm is 42 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.5,Page number: 525 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\" Finding the emf induced in the armature.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=440.0 #Load voltage(in Volts) \n",
+ "Rsh=110.0 #Resistance of shunt field coil(in Ohms)\n",
+ "Ra=0.02 #Armature resistance(in Ohms)\n",
+ "I_L=496.0 #Load current(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ish=V/Rsh\n",
+ "Ia=I_L+Ish\n",
+ "Eg=V+(Ia*Ra)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The emf induced in the armature is %.2f V\" %(Eg)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The emf induced in the armature is 450.00 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.6,Page number: 525 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\" Finding the total armature current and the generated emf.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "no_of_lamps=100.0 #Number of lamps\n",
+ "P=60.0 #Power rating of each lamp(in Watts) \n",
+ "V=200 #Voltage rating of each lamp(in Volts)\n",
+ "Ra=0.2 #Armature resistance(in Ohms)\n",
+ "Rsh=50 #Shunt field resistance(in Ohms)\n",
+ "Poles=4.0 #Number of poles\n",
+ "no_of_brushes=2.0 #Number of brushes\n",
+ "brush_drop_per_brush=1.0 #Brush drop at each brush(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=P/V\n",
+ "I_L=no_of_lamps*I1\n",
+ "Ish=V/Rsh\n",
+ "Ia=Ish+I_L\n",
+ "A=Poles\n",
+ "Ic=Ia/A\n",
+ "brush_drop=no_of_brushes*brush_drop_per_brush\n",
+ "Eg=V+(Ia*Ra)+brush_drop\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total armature current is %.2f A\" %(Ia)\n",
+ "print \"The current per path is %.2f A\" %(Ic)\n",
+ "print \"The generated emf is %.2f V\" %(Eg)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total armature current is 34.00 A\n",
+ "The current per path is 8.50 A\n",
+ "The generated emf is 208.80 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.7,Page number: 525"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the emf generated in a compound-wound dc generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=250.0 #Load voltage(in Volts)\n",
+ "Rsh=130.0 #Shunt field resistance(in Ohms)\n",
+ "Ra=0.1 #Armature resistance(in Ohms)\n",
+ "Rse=0.1 #Series field resistance(in Ohms)\n",
+ "I_L=100.0 #Load current(in Amperes)\n",
+ "no_of_brushes=2 #Number of brushes \n",
+ "brush_drop_per_brush=1.0 #Brush drop at each brush(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ise=I_L\n",
+ "Vse=Ise*Rse\n",
+ "Vsh=V+Vse\n",
+ "Ish=Vsh/Rsh\n",
+ "Ia=I_L+Ish\n",
+ "brush_drop=no_of_brushes*brush_drop_per_brush\n",
+ "Eg=V+Vse+(Ia*Ra)+brush_drop\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The emf generated is %.2f V.\" %(Eg)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The emf generated is 272.20 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.8,Page number: 528 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the emf generated,the copper losses,and efficiency of a shunt generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Po=30e03 #Full-load output power(in Watts)\n",
+ "V=200.0 #Terminal voltage(in Volts)\n",
+ "Ra=0.05 #Armature resistance(in Ohms)\n",
+ "Rsh=50.0 #Shunt field resistance(in Ohms)\n",
+ "loss=1000.0 #Friction losses(in Watts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_L=Po/V\n",
+ "Ish=V/Rsh\n",
+ "Ia=Ish+I_L\n",
+ "Eg=V+(Ia*Ra)\n",
+ "copper_loss=(pow(Ish,2)*Rsh)+(pow(Ia,2)*Ra)\n",
+ "effi=Po/(Po+copper_loss+loss)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The emf generated is %.2f V\" %(Eg)\n",
+ "print \"(b)The copper loss is %.2f W\" %(copper_loss)\n",
+ "print \"(c)The efficiency is %.2f percent\" %(effi*100)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The emf generated is 207.70 V\n",
+ "(b)The copper loss is 1985.80 W\n",
+ "(c)The efficiency is 90.95 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.9,Page number:529 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding armature resistance and the load-current corresponding to maximum efficiency of dc shunt generator.\"\"\"\n",
+ "\n",
+ "from math import sqrt,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=210.0 #Full-load voltage(in Volts)\n",
+ "I_L=195.0 #Full-load current(in Amperes)\n",
+ "Rsh=52.5 #Shunt field resistance(in Ohms)\n",
+ "effi=0.90 #Full-load efficiency\n",
+ "stray_loss=710.0 #Stray losses(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Po=V*I_L\n",
+ "Pin=Po/effi\n",
+ "total_loss=Pin-Po\n",
+ "Ish=V/Rsh\n",
+ "Ia=I_L+Ish\n",
+ "sh_copp_loss=pow(Ish,2)*Rsh\n",
+ "const_loss=sh_copp_loss+stray_loss\n",
+ "arma_copp_loss=total_loss-const_loss\n",
+ "Ra=arma_copp_loss/(pow(Ia,2))\n",
+ "Ia_max_effi=sqrt(const_loss/Ra)\n",
+ "I_L_max_effi=Ia_max_effi-Ish\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The armature resistance is %.5f ohm \" %(Ra)\n",
+ "print \"The load current corresponding to maximum efficiency is %.2f A\" %(I_L_max_effi)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The armature resistance is 0.07576 ohm \n",
+ "The load current corresponding to maximum efficiency is 139.04 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.10,Page number: 534 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of series turns required per pole for a level-compounded generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I_full_load=100.0 #Full-load current(in Amperes)\n",
+ "sh_turns=1500.0 #Number of turns in the shunt winding \n",
+ "Ish_no_load=4.0 #Shunt current at no-load(in Amperes) \n",
+ "Ish_full_load=6.0 #Shunt current at full-load(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "At_no_load=Ish_no_load*sh_turns\n",
+ "At_full_load=Ish_full_load*sh_turns\n",
+ "At_series=At_full_load-At_no_load\n",
+ "Nse=At_series/I_full_load\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The number of series turns required per pole is %d \" %(Nse)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The number of series turns required per pole is 30 \n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.11,Page number: 536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the back emf generated in a dc shunt motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I_L=41.0 #Full-load current(in Amperes)\n",
+ "V=250.0 #Full-load voltage(in Volts) \n",
+ "Ra=0.1 #Armature resistance(in Ohms) \n",
+ "Rsh=250.0 #Shunt field resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ish=V/Rsh\n",
+ "Ia=I_L-Ish\n",
+ "Eb=V-(Ia*Ra)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The back emf generated in the motor is %.2f V\" %(Eb)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The back emf generated in the motor is 246.00 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.12,Page number: 536 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed of a dc motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "A=2.0 #Number of parallel paths\n",
+ "P=4.0 #Number of poles \n",
+ "Z=888.0 #Number of conductors \n",
+ "flux=23e-03 #Flux per pole(in Webers) \n",
+ "Ia=50.0 #Armature current(in Amperes)\n",
+ "Ra=0.28 #Armature resistance(in Ohms) \n",
+ "V=440.0 #Rated voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Eb=V-(Ia*Ra)\n",
+ "N=(60*A*Eb)/(flux*Z*P)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The speed of the motor is %d rpm\" %(round(N,0)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of the motor is 626 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.13,Page number: 536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed of a dc motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V1=460.0 #Initial supply voltage(in Volts)\n",
+ "N1=900.0 #Speed of motor at 460-V(in rpm)\n",
+ "V2=200.0 #Final supply voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "kflux=V1/N1\n",
+ "N2=V2/(0.7*kflux)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "ans_N2=\"The approximate speed of the motor when the motor is connected across a 200V supply is %d rpm\" %(round(N2,0))\n",
+ "print(ans_N2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The approximate speed of the motor when the motor is connected across a 200V supply is 559 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.14,Page number: 537"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed and the gross torque developed by the armature of a dc motor.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=480.0 #Rated voltage(in Volts) \n",
+ "Ia=110.0 #Armature current at rated voltage(in Amperes)\n",
+ "Ra=0.2 #Armature resistance(in Ohms) \n",
+ "flux=50e-03 #Flux per pole(in Webers) \n",
+ "A=6.0 #Number of parallel paths\n",
+ "P=6.0 #Number of poles \n",
+ "Z=864.0 #Number of conductors\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Eb=V-(Ia*Ra)\n",
+ "N=(60*A*Eb)/(flux*Z*P)\n",
+ "torque=((flux*Z)/(2*pi))*(P/A)*Ia\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The speed of the motor is %d rpm \" %(round(N,0))\n",
+ "print \"(b)The gross torque developed by the armature is %.2f Nm\" %(torque)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The speed of the motor is 636 rpm \n",
+ "(b)The gross torque developed by the armature is 756.30 Nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.15,Page number: 538 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power generated in the armature winding of a dc generator.\"\"\"\n",
+ "\n",
+ "from math import pi \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=900.0 #Operating speed of generator(in rpm)\n",
+ "torque=2e03 #Torque(in N-metre) \n",
+ "P_losses=8e03 #Power losses(in Watts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Pin=(2*pi*torque*N)/60.0\n",
+ "Pd=Pin-P_losses\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The power generated in the armature winding is %e W\" %(Pd)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power generated in the armature winding is 1.804956e+05 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.16,Page number: 540"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed of a series motor when the current changes.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=230.0 #Supply voltage(in Volts)\n",
+ "Ra=0.12 #Armature resistance(in Ohms) \n",
+ "Rse=0.03 #Series field resistance(in Ohms)\n",
+ "Ia1=110.0 #Current at 230 V(in Amperes)\n",
+ "flux1=24e-03 #Flux per pole at 110 A(in Webers)\n",
+ "N1=600.0 #Speed at 230 V(in rpm) \n",
+ "Ia2=50.0 #Armature current(in Amperes) \n",
+ "flux2=16e-03 #Flux per pole at 50 A(in Webers) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Eb1=V-Ia1*(Ra+Rse)\n",
+ "k=Eb1/(N1*flux1)\n",
+ "Eb2=V-Ia2*(Ra+Rse)\n",
+ "N2=Eb2/(k*flux2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The speed of the motor when the currenthas fallen to 50 A is %d rpm\" %(round(N2,0))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of the motor when the currenthas fallen to 50 A is 938 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.17,Page number: 540"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current drawn by the machine.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=250.0 #Supply voltage(in Volts)\n",
+ "Ra=0.2 #Armature resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Eb_1=0\n",
+ "Ia_1=(V-Eb_1)/Ra\n",
+ "Eb_2=200\n",
+ "Ia_2=(V-Eb_2)/Ra\n",
+ "Eb_3=250\n",
+ "Ia_3=(V-Eb_3)/Ra\n",
+ "Eb_4=-250\n",
+ "Ia_4=(V-Eb_4)/Ra\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)When the machine is at rest,\"\n",
+ "print \"The current drawn by the machine is %.2f A\" %(Ia_1)\n",
+ "print \"(b)When the machine is generating an emf of 200V and is connected to the supply with correct polarities,\"\n",
+ "print \"The current drawn by the machine is %.2f A\" %(Ia_2)\n",
+ "print \"(c)When the machine is generating an emf of 250V and is connected to the supply with correct polarities,\"\n",
+ "print \"The current drawn by the machine is %.2f A\" %(Ia_3)\n",
+ "print \"(d)When the machine is generating an emf of 250V and is connected to the supply with reversed polarities,\"\n",
+ "print \"The current drawn by the machine is %.2f A\" %(Ia_4) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)When the machine is at rest,\n",
+ "The current drawn by the machine is 1250.00 A\n",
+ "(b)When the machine is generating an emf of 200V and is connected to the supply with correct polarities,\n",
+ "The current drawn by the machine is 250.00 A\n",
+ "(c)When the machine is generating an emf of 250V and is connected to the supply with correct polarities,\n",
+ "The current drawn by the machine is 0.00 A\n",
+ "(d)When the machine is generating an emf of 250V and is connected to the supply with reversed polarities,\n",
+ "The current drawn by the machine is 2500.00 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.18,Page number: 541"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed and the gross torque developed by the armature of a dc series motor.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=6.0 #Number of poles\n",
+ "A=6.0 #Number of parallel paths \n",
+ "Z=864.0 #Number of conductors \n",
+ "flux=50e-03 #Flux per pole(in Webers)\n",
+ "Ia=110.0 #Armature current(in Amperes)\n",
+ "V=480.0 #Load voltage(in Volts)\n",
+ "Ra=0.18 #Armature resistance(in Ohms) \n",
+ "Rse=0.02 #Series field resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Eb=V-Ia*(Ra+Rse)\n",
+ "N=(60*A*Eb)/(flux*Z*P)\n",
+ "torque=(60*Eb*Ia)/(2*pi*N)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The speed of the motor is %d rpm\" %(round(N,0))\n",
+ "print \"(b)The gross torque developed by the armature is %.2f Nm \" %(torque) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The speed of the motor is 636 rpm\n",
+ "(b)The gross torque developed by the armature is 756.30 Nm \n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.19,Page number: 541"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the series resistance to reduce the speed of a shunt motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=220.0 #Rated voltage of the motor(in Volts)\n",
+ "Ia=22.0 #Armature current(in Amperes)\n",
+ "Ra=0.45 #Armature resistance(in Ohms)\n",
+ "N1=700.0 #Initial speed of motor(in rpm)\n",
+ "N2=450.0 #Final speed of motor(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "E1=V-(Ia*Ra)\n",
+ "E2=(N2/N1)*E1\n",
+ "R=((V-E2)/Ia)-Ra\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance that should be placed in series with the armature to reduce the speed to 450 rpm is %.3f ohm \" %(R)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance that should be placed in series with the armature to reduce the speed to 450 rpm is 3.411 ohm \n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.20,Page number: 541"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed of a dc series motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=230.0 #Rated voltage of the dc series motor(in Volts) \n",
+ "Ra=0.2 #Armature resistance(in Ohms) \n",
+ "Rse=0.1 #Series field resistance(in Ohms) \n",
+ "Ia1=40.0 #Line current at rated voltage(in Amperes)\n",
+ "N1=1000.0 #Speed of motor at rated voltage(in rpm)\n",
+ "Ia2=20.0 #Line current at 230 V(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Eb1=V-Ia1*(Ra+Rse)\n",
+ "Eb2=V-Ia2*(Ra+Rse)\n",
+ "\"\"\" Eb=k*flux*N \"\"\"\n",
+ "N2=(Eb2*N1)/(Eb1*0.6)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The speed of the motor for a line current of 20A at 230V is %d rpm\" %(round(N2,0)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of the motor for a line current of 20A at 230V is 1713 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.21,Page number: 543 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the terminal voltage of a dc shunt generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=4 #Number of poles\n",
+ "turns=260 #Number of turns in the armature winding\n",
+ "R=0.006 #Resistance of each turn of armature(in Ohms)\n",
+ "flux=0.08 #Useful flux per pole(in Webers)\n",
+ "I_L=55 #Load current(in Amperes)\n",
+ "N=1000 #Speed of the generator(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Z=2*turns\n",
+ "A=P\n",
+ "Eg=(flux*Z*N*P)/(60.0*A)\n",
+ "Rw=turns*R\n",
+ "R1=Rw/4.0\n",
+ "Ra=R1/4\n",
+ "V=Eg-(I_L*Ra)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The terminal voltage of the generator when it is running at 1000 rpm and supplying load current of 55 A is %.3f V.\" %(V)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The terminal voltage of the generator when it is running at 1000 rpm and supplying load current of 55 A is 687.971 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.22,Page number: 544"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the armature current,the emf induced and the flux per pole for a dc shunt generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=8.0 #Number of poles\n",
+ "A=2.0 #Number of parallel paths\n",
+ "Z=778 #Number of conductors\n",
+ "V=250.0 #Load voltage(in Volts)\n",
+ "R_L=12.5 #Load resistance(in Ohms)\n",
+ "Ra=0.24 #Armature resistance(in Ohms)\n",
+ "Rsh=250.0 #Shunt field resistance(in Ohms)\n",
+ "N=500 #Speed of the dc shunt generator(in rpm) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_L=V/R_L\n",
+ "Ish=V/Rsh\n",
+ "Ia=I_L+Ish\n",
+ "Eg=V+(Ia*Ra)\n",
+ "flux=(60.0*A*Eg)/(Z*N*P)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The armature current is %.2f A.\" %(Ia)\n",
+ "print \"The emf induced is %.2f V.\" %(Eg)\n",
+ "print \"The flux per pole is %e Wb.\" %(flux)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The armature current is 21.00 A.\n",
+ "The emf induced is 255.04 V.\n",
+ "The flux per pole is 9.834447e-03 Wb.\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.23,Page number: 544"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the percentage reduction in speed of dynamo.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Po_1=500e03 #Initial power output(in Watts)\n",
+ "Po_2=250e03 #Final power output(in Watts)\n",
+ "V=500.0 #Constant excitation voltage(in Volts)\n",
+ "Ra=0.015 #Resistance between the terminals of dynamo(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ia_1=Po_1/V\n",
+ "E1=V+(Ia_1*Ra)\n",
+ "Ia_2=Po_2/V\n",
+ "E2=V+(Ia_2*Ra)\n",
+ "\"\"\" Since excitation emf remains constant in the two cases,we have \n",
+ "\n",
+ " E=(flux*Z*N*P)/(60*A) where E=emf generated;Z=number of conductors;N=speed of motor(in rpm);P=number of poles;A=number of parallel paths;\n",
+ " flux=useful flux per pole(in Wb).\n",
+ " \n",
+ " N=KE, where K is a constant.\n",
+ " \n",
+ " Hence,fractional reduction in speed is given as,\n",
+ " \n",
+ " (N1-N2)/N1=((K*(E1-E2))/(K*E1)). \"\"\"\n",
+ "\n",
+ "fract=((E1-E2)/E1)*100\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The percentage reduction in speed of the dynamo is %.3f percent.\" %(fract) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The percentage reduction in speed of the dynamo is 1.456 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.24,Page number: 545 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage between the far end of the feeder and the bus-bar of a dc series generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Rt=0.3 #Resistance of transmission line(in Ohms) \n",
+ "I_L_1=160.0 #Load current in first case(in Amperes) \n",
+ "I_L_2=50.0 #Load current in second case(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vt_1=I_L_1*Rt\n",
+ "Vb_1=(50.0/200.0)*I_L_1\n",
+ "Vd_1=Vt_1-Vb_1\n",
+ "Vt_2=I_L_2*Rt\n",
+ "Vb_2=(50.0/200.0)*I_L_2\n",
+ "Vd_2=Vt_2-Vb_2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The voltage between far end of the feeder and the bus-bar at a cusrrent of 160 A is %.2f V.\" %(Vd_1)\n",
+ "print \"(b)The voltage between far end of the feeder and the bus-bar at a cusrrent of 50 A is %.2f V.\" %(Vd_2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The voltage between far end of the feeder and the bus-bar at a cusrrent of 160 A is 8.00 V.\n",
+ "(b)The voltage between far end of the feeder and the bus-bar at a cusrrent of 50 A is 2.50 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.25,Page number: 545"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\" Finding the emf generated and the armature current in a dc long-shunt compound generator. \"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I_L=50 #Load current(in Amperes)\n",
+ "V=500 #Terminal voltage(in Volts)\n",
+ "Ra=0.05 #Armature resistance(in Ohms)\n",
+ "Rse=0.03 #Series field resistance(in Ohms)\n",
+ "Rsh=250 #Shunt field resistance(in Ohms)\n",
+ "brush_drop=1.0 #Brush contact drop(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ish=V/Rsh\n",
+ "Ia=Ish+I_L\n",
+ "Eg=V+(Ia*(Ra+Rse))+brush_drop\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The armature current is %.2f A.\" %(Ia)\n",
+ "print \"The emf generated is %.2f V\" %(Eg)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The armature current is 52.00 A.\n",
+ "The emf generated is 505.16 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.26,Page number: 545"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\" Finding the voltage and the power generated by a dc generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=8 #Number of poles\n",
+ "Z=500 #Number of conductors on the armature\n",
+ "flux =0.02 #Magnetic flux per pole(in Webers)\n",
+ "N=1800 #Speed of the generator(in rpm)\n",
+ "I=5.0 #Allowable current per path(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "A_1=2\n",
+ "Eg_1=(flux*Z*N*P)/(60*A_1)\n",
+ "A_2=P\n",
+ "Eg_2=(flux*Z*N*P)/(60*A_2)\n",
+ "Ia_1=A_1*I\n",
+ "Pd_1=Eg_1*Ia_1\n",
+ "Ia_2=A_2*I\n",
+ "Pd_2=Eg_2*Ia_2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"When the armature is wave wound:\"\n",
+ "print \"(a)The generated voltage is %.2f V.\" %(Eg_1)\n",
+ "print \"(b)The kW generated by the machine is %.2f kW.\" %(Pd_1/1000.0)\n",
+ "print \"\\nWhen the armature is lap wound:\"\n",
+ "print \"(a)The generated voltage is %.2f V.\" %(Eg_2)\n",
+ "print \"(b)The kW generated by the machine is %.2f kW.\" %(Pd_2/1000.0)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "When the armature is wave wound:\n",
+ "(a)The generated voltage is 1200.00 V.\n",
+ "(b)The kW generated by the machine is 12.00 kW.\n",
+ "\n",
+ "When the armature is lap wound:\n",
+ "(a)The generated voltage is 300.00 V.\n",
+ "(b)The kW generated by the machine is 12.00 kW.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.27,Page number: 546"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the emf generated and the copper losses in a dc shunt generator.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=250.0 #Terminal voltage(in Volts)\n",
+ "I_L=195 #Load current(in Amperes)\n",
+ "Ra=0.02 #Armature resistance(in Ohms)\n",
+ "Rsh=50.0 #Shunt-field resistance(in Ohms)\n",
+ "loss=950.0 #Iron and frictional losses(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ish=V/Rsh\n",
+ "Ia=I_L+Ish\n",
+ "Eg=V+(Ia*Ra)\n",
+ "copp=(Ia*Ia*Ra)+(V*Ish)\n",
+ "Po=V*I_L\n",
+ "tot_loss=copp+loss\n",
+ "Pin=Po+tot_loss\n",
+ "Pe=Pin-loss\n",
+ "mech_effi=Pe/Pin\n",
+ "ele_effi=Po/Pe\n",
+ "comm_effi=Po/Pin\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The emf generated is %.2f V.\" %(Eg)\n",
+ "print \"(b)The copper losses is %.2f W.\" %(copp)\n",
+ "print \"(c)The output of the prime mover is %.3f kW.\" %(Pin/1000.0)\n",
+ "print \"(d)The commercial efficiency is %.2f.\\n The mechanical efficiency is %.2f.\" %((comm_effi*100),(mech_effi*100))\n",
+ "print \" The electrical efficiency is %.2f.\" %(ele_effi*100) \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The emf generated is 254.00 V.\n",
+ "(b)The copper losses is 2050.00 W.\n",
+ "(c)The output of the prime mover is 51.750 kW.\n",
+ "(d)The commercial efficiency is 94.20.\n",
+ " The mechanical efficiency is 98.16.\n",
+ " The electrical efficiency is 95.96.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.28,Page number: 547"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the back emf generated by a dc shunt motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=250.0 #Terminal Voltage(in Volts)\n",
+ "I_L1=2.0 #No-load current(in Amperes)\n",
+ "N1=1000.0 #No-load speed(in rpm)\n",
+ "Ra=0.2 #Armature resistance(in Ohms)\n",
+ "Rsh=250.0 #Field resistance(in Ohms)\n",
+ "I_L2=51.0 #Current after loading(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ish=V/Rsh\n",
+ "Ia1=I_L1-Ish\n",
+ "E1=V-(Ia1*Ra)\n",
+ "Ia2=I_L2-Ish\n",
+ "E2=V-(Ia2*Ra)\n",
+ "\"\"\"As the motor is shunt-wound,the flux remains constant.The emf generated is directly proportional to the speed.\"\"\"\n",
+ "N2=(E2/E1)*N1\n",
+ "speed_drop=(N1-N2)/N1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The back emf generated at no-load is %.3f V.\" %(E1)\n",
+ "print \"(b)On loading,\\n The back emf generated is %.2f V.\\n The speed of the motor is %d rpm.\" %(E2,round(N2,0))\n",
+ "print \" The percentage speed drop is %.3f percent.\" %(speed_drop*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The back emf generated at no-load is 249.800 V.\n",
+ "(b)On loading,\n",
+ " The back emf generated is 240.00 V.\n",
+ " The speed of the motor is 961 rpm.\n",
+ " The percentage speed drop is 3.923 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.29,Page number: 547"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of starting resistance for a shunt motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Po=14920.0 #Output power(in Watts)\n",
+ "V=240.0 #Supply voltage(in Volts)\n",
+ "Ra=0.25 #Armature resistance(in Ohms)\n",
+ "effi=0.86 #Efficiency at full-load\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Pin=Po/effi\n",
+ "I_L=Pin/V\n",
+ "Ist=1.5*I_L\n",
+ "Rt=V/Ist\n",
+ "Rst=Rt-Ra\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The starting resistance for the shunt motor is %.3f Ohms.\" %(Rst)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The starting resistance for the shunt motor is 1.963 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.30,Page number: 548"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed and efficiency of a dc shunt motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I_L1=4.0 #No-load current(in Amperes)\n",
+ "N1=1000 #No-load speed(in rpm)\n",
+ "V=500.0 #Voltage rating of the dc shunt motor(in Volts)\n",
+ "Ra=0.2 #Armature resistance(in Ohms)\n",
+ "Ish=1.0 #Field current(in Amperes)\n",
+ "I_L2=100.0 #Full-load current(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ia1=I_L1-Ish\n",
+ "E1=V-(Ia1*Ra)\n",
+ "Ia2=I_L2-Ish\n",
+ "E2=V-(Ia2*Ra)\n",
+ "\"\"\" For a shunt motor,the flux remains constant and hence E is directly proportional to speed of the motor(N).\n",
+ " \n",
+ " E=kN where k is a constant. \"\"\"\n",
+ "N2=(E2/E1)*N1\n",
+ "\"\"\"At no-load,the power taken by the motor mainly meets the constant losses(iron and frictional losses).\"\"\"\n",
+ "Pc=V*I_L1\n",
+ "\"\"\"On loading,the copper loss in shunt field winding is negligible compared to the copper loss in armature winding.\"\"\"\n",
+ "Pv=Ia2*Ia2*Ra\n",
+ "Pin=V*I_L2\n",
+ "effi=(Pin-(Pv+Pc))/Pin\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The speed of the dc shunt motor on loading is %d rpm.\" %(round(N2,0))\n",
+ "print \"The efficiency of the motor is %.2f percent.\" %(effi*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of the dc shunt motor on loading is 962 rpm.\n",
+ "The efficiency of the motor is 92.08 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.31,Page number: 548"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the speed of a dc generator running as a shunt motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Ra=0.02 #Armature resistance(in Ohms)\n",
+ "Rsh=50.0 #Shunt-field resistance(in Ohms)\n",
+ "V=250.0 #Terminal voltage(in Volts)\n",
+ "Po=50e03 #Output power(in Watts)\n",
+ "N1=500.0 #Speed of the dc generator(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ish=V/Rsh\n",
+ "\"\"\" When working as a generator,the machine supplies a load of 50 kW at 250 V. \"\"\"\n",
+ "I_L=Po/V\n",
+ "Ia1=I_L+Ish\n",
+ "E1=V+(Ia1*Ra)\n",
+ "\"\"\"When working as a motor,the machine takes a power of 50 kW at 250 V. \"\"\"\n",
+ "Ia2=I_L-Ish\n",
+ "E2=V-(Ia2*Ra)\n",
+ "N2=(E2/E1)*N1\n",
+ "\"\"\" NOTE: The field current and the flux per pole is same in both cases.\"\"\"\n",
+ "\n",
+ "#Result:\n",
+ "print \"The speed of the machine running as a shunt motor is %d rpm.\" %(round(N2,0)) \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of the machine running as a shunt motor is 484 rpm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.32,Page number: 548"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the applied voltage and the current to run the motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Ra=0.6 #Resistance of the armature(in Ohms)\n",
+ "Rse=0.4 #Series field resistance(in Ohms)\n",
+ "Ia1=20.0 #Initial armature current(in Amperes)\n",
+ "V1=400.0 #Initial terminal voltage(in Volts)\n",
+ "N1=250.0 #Initial speed of the motor(in rpm)\n",
+ "N2=350.0 #Final speed of the motor(in rpm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" In a series motor,torque is directly proprtional to the square of the armature current(Ia).\n",
+ " \n",
+ " Given: Torque is directly proprtional to the square of the speed(N).\n",
+ " \n",
+ " Therefore, Ia is directly proportional to N. Ia=kN where k is a constant. \"\"\"\n",
+ "Ia2=(N2/N1)*Ia1\n",
+ "E1=V1-(Ia1*(Ra+Rse))\n",
+ "\"\"\"In a series motor,as the flux is directly proportional to Ia,the back emf is proportional to (Ia*N). \"\"\"\n",
+ "E2=E1*((Ia2*N2)/(Ia1*N1))\n",
+ "V2=E2+(Ia2*(Ra+Rse))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The applied voltage is %.2f V and the current is %.2f A to run the motor at 350 rpm.\" %(V2,Ia2) \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The applied voltage is 772.80 V and the current is 28.00 A to run the motor at 350 rpm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter17.ipynb b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter17.ipynb
new file mode 100755
index 00000000..e240ccf5
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter17.ipynb
@@ -0,0 +1,332 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 17: FRACTIONAL HORSE POWER MOTORS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.1,Page number: 570\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the slip and efficiency of induction motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=50 #Frequency rating of the induction motor(in Hertz) \n",
+ "P=4 #Number of poles in the induction motor \n",
+ "N=1410 #Speed of the motor(in rpm)\n",
+ "Po=375 #Output Power(in Watts)\n",
+ "V=230 #Voltage rating of the induction motor(in Volts) \n",
+ "I=2.9 #Input current(in Amperes)\n",
+ "pf=0.71 #Power factor(lagging) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ns=(120.0*f)/P\n",
+ "slip=(Ns-N)/Ns\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"Slip is %.2f percent.\" %(slip*100)\n",
+ "Pin=V*I*pf\n",
+ "efficiency=Po/Pin\n",
+ "print \"The efficiency is %.2f percent.\" %(efficiency*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Slip is 6.00 percent.\n",
+ "The efficiency is 79.19 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.2,Page number: 570\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\n",
+ "\"\"\"Finding the currents and the power factor in the induction motor.\"\"\"\n",
+ "\n",
+ "from cmath import phase,rect,polar\n",
+ "from math import radians,degrees,cos\n",
+ "\n",
+ "#Variable Declartion:\n",
+ "V=rect(230,0) #Voltage rating of the split-phase induction motor(in Volts) \n",
+ "Z_M=5+ 12*1j #Impedance of the main winding(in Ohms)\n",
+ "Z_A=12+ 5*1j #Start-winding impedance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "mod_Z_M=abs(Z_M)\n",
+ "mod_Z_A=abs(Z_A)\n",
+ "phi_M=phase(Z_M)\n",
+ "phi_A=phase(Z_A)\n",
+ "I_M=V/Z_M\n",
+ "mod_I_M=abs(I_M)\n",
+ "phi_I_M=degrees(phase(I_M))\n",
+ "I_A=V/Z_A\n",
+ "mod_I_A=abs(I_A)\n",
+ "phi_I_A=degrees(phase(I_A))\n",
+ "I_L=I_M+I_A\n",
+ "mod_I_L=abs(I_L)\n",
+ "phi_I_L=degrees(phase(I_L))\n",
+ "phi=phi_I_A-phi_I_M\n",
+ "pf=cos(radians(phi_I_L))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current in the main winding is %.2f A at a phase angle of %.2f degrees.\" %(mod_I_M,phi_I_M)\n",
+ "print \"(b)The current in the starting winding is %.2f A at a phase angle of %.2f degrees.\" %(mod_I_A,phi_I_A)\n",
+ "print \"(c)The line current is %.2f A at a phase angle of %.2f degrees.\" %(mod_I_L,phi_I_L)\n",
+ "print \"(d)The phase displacement between the two winding currents is %.2f degrees.\" %(phi)\n",
+ "print \"(e)The power factor is %.4f lagging.\" %(pf) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current in the main winding is 17.69 A at a phase angle of -67.38 degrees.\n",
+ "(b)The current in the starting winding is 17.69 A at a phase angle of -22.62 degrees.\n",
+ "(c)The line current is 32.72 A at a phase angle of -45.00 degrees.\n",
+ "(d)The phase displacement between the two winding currents is 44.76 degrees.\n",
+ "(e)The power factor is 0.7071 lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.3,Page number: 571\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the capacitance in series with the auxiliary winding to maximize starting torque.\"\"\"\n",
+ "\n",
+ "from math import radians,degrees,atan,pi,tan\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "X_M=20 #Inductive reactance of the main winding(in Ohm)\n",
+ "R_M=2 #Resistance of the main winding(in Ohm)\n",
+ "X_A=5 #Inductive reactance of the auxiliary winding(in Ohm)\n",
+ "R_A=25 #Resistance of the auxiliary winding(in Ohm)\n",
+ "f=50 #Frequency rating of the split-phase induction motor(in Hertz) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "angle_M=atan(X_M/R_M)\n",
+ "angle_A=degrees(angle_M)-90\n",
+ "Xc=X_A-(R_A*tan(radians(angle_A)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "C=1/(2*pi*f*Xc)\n",
+ "print \"The value of capacitance connected in series with the auxiliary winding to obtain maximum starting torque is %e F.\" %(C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of capacitance connected in series with the auxiliary winding to obtain maximum starting torque is 4.244132e-04 F.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.4,Page number: 576\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resolution and shaft speed of a stepper motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "beta=2.5 #Step-angle of a stepper motor(in degrees)\n",
+ "step_freq=3600 #Stepping frequency(in pps)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "res=360/beta\n",
+ "number_steps=res*25\n",
+ "shaft_speed=(beta*step_freq)/360\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The resolution is %d steps per revolution.\" %(res)\n",
+ "print \"(b)The number of steps required for the shaft to make 25 revolutions=%d.\" %(number_steps)\n",
+ "print \"(c)The shaft speed is %.2f rps.\" %(shaft_speed)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The resolution is 144 steps per revolution.\n",
+ "(b)The number of steps required for the shaft to make 25 revolutions=3600.\n",
+ "(c)The shaft speed is 25.00 rps.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.5,Page number:577\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of stator and rotor poles in a VR motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "m=3 #Number of phases\n",
+ "beta=15 #Step angle(in degrees)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Nr=360/(m*beta)\n",
+ "Ns1=(Nr*360)/(360-(beta*Nr))\n",
+ "Ns2=(Nr*360)/(360+(beta*Nr))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a) The number of rotor poles is %d.\" %(Nr)\n",
+ "print \"(b)\"\n",
+ "print \" Case 1: Ns>Nr\"\n",
+ "print \" The number of stator poles is %d. \\n\" %(Ns1)\n",
+ "print \" Case 2: Ns<Nr\"\n",
+ "print \" The number of stator poles is %d.\" %(Ns2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The number of rotor poles is 8.\n",
+ "(b)\n",
+ " Case 1: Ns>Nr\n",
+ " The number of stator poles is 12. \n",
+ "\n",
+ " Case 2: Ns<Nr\n",
+ " The number of stator poles is 6.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.6,Page number: 579\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of rotor and stator teeth in VR stepper motor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "m=4 #Number of stacks\n",
+ "beta=1.8 #Step angle(in degrees)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Nr=360/(m*beta)\n",
+ "Ns=Nr\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The number of rotor teeth is %d.\" %(Nr)\n",
+ "print \"The number of stator teeth is %d.\" %(Ns)\n",
+ "print \"\\nNOTE: In a multistack stepper motor the number of stator teeth is same as that of the rotor teeth.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The number of rotor teeth is 50.\n",
+ "The number of stator teeth is 50.\n",
+ "\n",
+ "NOTE: In a multistack stepper motor the number of stator teeth is same as that of the rotor teeth.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter18.ipynb b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter18.ipynb
new file mode 100755
index 00000000..99017984
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter18.ipynb
@@ -0,0 +1,542 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 18: ELECTRICAL MEASURING INSTRUMENTS\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.1,Page number: 598\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the deflecting torque in Newton-metres for a PMMC instrument.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=15e-03 #Current flowing through the coil(in Amperes) \n",
+ "B=0.2 #Flux density in the air gap(in Tesla)\n",
+ "l=2e-02 #Length of the magnetic field(in m)\n",
+ "d=2.5e-02 #Mean width of the coil(in m) \n",
+ "r=d/2 #Radius of the coil(in cm) \n",
+ "n1=42 #Number of turns(lower limit) \n",
+ "n2=43 #Number of turns(upper limit)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "F1=I*B*l*n1\n",
+ "F2=I*B*l*n2\n",
+ "net_torque=(F1+F2)*r\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The deflecting torque is %e Nm.\" %(net_torque)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The deflecting torque is 6.375000e-05 Nm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.2,Page Number: 604\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the shunt resistance for measuring a maximum current of 10 mA.\"\"\" \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Ifsd=10e-03 #Maximum current(in Amperes)\n",
+ "Im=100e-06 #Full-scale deflection current(in Amperes) \n",
+ "Rm=100 #Meter Resistance(in Ohms) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ish=Ifsd-Im\n",
+ "Rsh=(Im*Rm)/Ish\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The shunt resistance needed is %.6f Ohms.\" %(Rsh)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The shunt resistance needed is 1.010101 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.3,Page number: 605"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Designing an universal shunt for a multi-range ammeter.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Im=100e-06 #Full-scale deflection current(in Amperes)\n",
+ "Rm=100.0 #Internal resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"For 1-mA range,the required shunt can be calculated as follows.\"\"\"\n",
+ "Ifsd=1e-03\n",
+ "Rsh=(Im*Rm)/(Ifsd-Im)\n",
+ "\n",
+ "Rm=900.0\n",
+ "R=100.0\n",
+ "\"\"\"(a)Range-switch at 1 mA:\"\"\"\n",
+ "Rm1=Rm\n",
+ "Ish1=(1e-03)-(0.1e-03)\n",
+ "Rsh1=(Rm1*Im)/(Ish1)\n",
+ "\n",
+ "\"\"\"(b)Range-switch at 10 mA:\"\"\"\n",
+ "\"\"\"Rm2=Rm+R1\"\"\"\n",
+ "Ish2=(10e-03)-(0.1e-03)\n",
+ "\"\"\"Rsh2=R2+R3+R4+R5=R-R1=100-R1;\"\"\"\n",
+ "\"\"\"Rsh2=(Rm2*Im)/Ish2;\"\"\"\n",
+ "R1=(9900.0-900.0)/100.0\n",
+ "\n",
+ "\"\"\"(c)Range-switch at 100 mA:\"\"\"\n",
+ "\"\"\"Rm3=Rm+R1+R2\"\"\"\n",
+ "Ish3=(100e-03)-(0.1e-03)\n",
+ "\"\"\"Rsh3=R3+R4+R5=R-R1-R2=100-90-R2=90-R2;\"\"\"\n",
+ "\"\"\"Rsh3=(Rm3*Im)/Ish3;\"\"\"\n",
+ "R2=(9990.0-990.0)/1000.0\n",
+ "\n",
+ "\"\"\"(d)Range-switch at 500 mA:\"\"\"\n",
+ "\"\"\"Rm4=Rm+R1+R2+R3\"\"\"\n",
+ "Ish3=(500e-03)-(0.1e-03)\n",
+ "\"\"\"Rsh4=R4+R5=R-R1-R2-R3=100-90-9-R3=1-R3;\"\"\"\n",
+ "\"\"\"Rsh4=(Rm4*Im)/Ish4;\"\"\"\n",
+ "R3=(4999.0-999.0)/5000.0\n",
+ "\n",
+ "\n",
+ "\"\"\"(e)Range-switch at 1 A:\"\"\"\n",
+ "\"\"\"Rm5=Rm+R1+R2+R3+R4\"\"\"\n",
+ "Ish3=(1000e-03)-(0.1e-03)\n",
+ "\"\"\"Rsh5=R5=R-R1-R2-R3-R4=100-90-9-0.8-R4=0.2-R4;\"\"\"\n",
+ "\"\"\"Rsh5=(Rm5*Im)/Ish5;\"\"\"\n",
+ "R4=(1999.8-999.8)/10000.0\n",
+ "R5=R-R1-R2-R3-R4\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistor values are: \"\n",
+ "print \"R1=%.2f Ohms.\" %(R1)\n",
+ "print \"R2=%.2f Ohms.\" %(R2)\n",
+ "print \"R3=%.2f Ohms.\" %(R3)\n",
+ "print \"R4=%.2f Ohms.\" %(R4)\n",
+ "print \"R5=%.2f Ohms.\" %(R5)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistor values are: \n",
+ "R1=90.00 Ohms.\n",
+ "R2=9.00 Ohms.\n",
+ "R3=0.80 Ohms.\n",
+ "R4=0.10 Ohms.\n",
+ "R5=0.10 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.4,Page number: 609"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"To convert a d'Arsonval meter movement into a voltmeter.\"\"\" \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Im=100e-06 #Current sensitivity(in Amperes)\n",
+ "Rm=100 #Resistance of the coil(in Ohms)\n",
+ "Vfsd=100 #Full-scale deflection of voltmeter(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Rs=(Vfsd/Im)-Rm\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"To convert the d'Arsonval meter movement into a voltmeter of range 100V, we connect a resistor Rs in series.\"\n",
+ "print \"Rs = %.3f kilo Ohms. \" %(Rs/1000)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "To convert the d'Arsonval meter movement into a voltmeter of range 100V, we connect a resistor Rs in series.\n",
+ "Rs = 999.900 kilo Ohms. \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.5,Page number: 609\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the multipiler resistance and the voltage mutiplyiing factor of a dc voltmeter.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Im=50e-06 #Full-scale deflection current(in Amperes) \n",
+ "Rm=1e03 #Meter Resistance(in Ohms) \n",
+ "Vfsd=50 #Full-scale deflection of voltmeter(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Rs=(Vfsd/Im)-Rm\n",
+ "n=Vfsd/(Im*Rm)\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The multiplier resistance needed is %.2f kilo Ohms.\" %(Rs/1000)\n",
+ "print \"(b)The voltage multiplying factor is %d.\" %(round(n,0))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The multiplier resistance needed is 999.00 kilo Ohms.\n",
+ "(b)The voltage multiplying factor is 1000.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.6,Page number: 612"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the reading and error in measurement of voltmeter.\"\"\"\n",
+ " \n",
+ "\"\"\" NOTE: All resistances expressed in kilo Ohms.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "range_A=50 #Range of voltmeter-A(in Volts)\n",
+ "range_B=50 #Range of voltmeter-B(in Volts)\n",
+ "sens_A=1000 #Sensitivity of voltmeter-A(in Ohm/Volts) \n",
+ "sens_B=20000 #Sensitivity of voltmeter-B(in Ohm/Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vt=150.0*(50.0/(100.0+50.0))\n",
+ "R_i1=(range_A*sens_A)/1000.0\n",
+ "Req=1/((1/R_i1)+(1.0/50))\n",
+ "V1=(150.0)*(Req/(100+Req))\n",
+ "R_i2=(range_B*sens_B)/1000.0\n",
+ "Req=1/((1/R_i2)+(1.0/50))\n",
+ "V2=(150.0)*(Req/(Req+100))\n",
+ "err_A=((Vt-V1)/Vt)*100.0\n",
+ "err_B=((Vt-V2)/Vt)*100.0\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The reading of voltmeter-A is %.2f V\\nThe reading of voltmeter-B is %.2f V.\" %(V1,V2)\n",
+ "print \"\\nThe error in the reading of voltmeter-A is %.2f percent.\" %(err_A)\n",
+ "print \"The error in the reading of voltmeter-B is %.2f percent.\" %(err_B)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reading of voltmeter-A is 30.00 V\n",
+ "The reading of voltmeter-B is 48.39 V.\n",
+ "\n",
+ "The error in the reading of voltmeter-A is 40.00 percent.\n",
+ "The error in the reading of voltmeter-B is 3.23 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.7,Page number: 617"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the deflection in an ammeter.\"\"\"\n",
+ "\n",
+ "from math import sin,asin,degrees,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I1=20.0 #Initial current(in Amperes) \n",
+ "I2=12.0 #Final current(in Amperes)\n",
+ "angle1=60 #Initial deflection(in degrees)\n",
+ "\"\"\" Given: Deflecting torque is directly proportional to the current.\"\"\"\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"For spring control: Controlling torque is directly proportional to deflection.\n",
+ " For steady state deflection, controlling torque=deflecting torque.\n",
+ " Therefore,deflection is directly proportional to current. \"\"\"\n",
+ "angle2_a=(I2/I1)*angle1\n",
+ "\"\"\"For gravity control: Controlling torque is directly proportional to sine of the deflection angle.\n",
+ " For steady state deflection, controlling torque=deflecting torque.\n",
+ " Therefore,sine of the angle of deflection is directly proportional to the current. \"\"\" \n",
+ "angle2_b=asin((I2/I1)*sin(radians(angle1)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The deflection for a current of 12A when the instrument is spring controlled is %.2f degrees.\" %(angle2_a) \n",
+ "print \"(b)The deflection for a current of 12A when the instrument is gravity controlled is %.2f degrees.\" %(degrees(angle2_b)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The deflection for a current of 12A when the instrument is spring controlled is 36.00 degrees.\n",
+ "(b)The deflection for a current of 12A when the instrument is gravity controlled is 31.31 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.8,Page number: 618"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the deflection in degrees in a gravity-controlled instrument.\"\"\"\n",
+ "\n",
+ "from math import asin,degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "W=0.005 #Controlling weight(in kilograms)\n",
+ "l=2.4e-02 #Distance of controlling weight from the axis(in metres)\n",
+ "torque=1.05e-04 #Deflecting torque(in kg-m)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "angle=asin(torque/(W*l))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The deflection corresponding to a deflecting torque of 1.05e-04 kg-m is %.2f degrees.\" %(degrees(angle))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The deflection corresponding to a deflecting torque of 1.05e-04 kg-m is 61.04 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.9,Page number: 618"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the deflection in an ammeter.\"\"\"\n",
+ "\n",
+ "from math import sin,asin,degrees,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I1=10.0 #Initial current(in Amperes) \n",
+ "I2=5.0 #Final current(in Amperes)\n",
+ "angle1=90 #Initial deflection(in degrees)\n",
+ "\"\"\" Given: Deflecting torque is directly proportional to square of the current.\"\"\"\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"For spring control: Controlling torque is directly proportional to deflection.\n",
+ " For steady state deflection, controlling torque=deflecting torque.\n",
+ " Therefore,deflection is directly proportional to square of the current. \"\"\"\n",
+ "angle2_a=pow((I2/I1),2)*angle1\n",
+ "\"\"\"For gravity control: Controlling torque is directly proportional to sine of the deflection angle.\n",
+ " For steady state deflection, controlling torque=deflecting torque.\n",
+ " Therefore,sine of the angle of deflection is directly proportional to square of the current. \"\"\" \n",
+ "angle2_b=asin((pow((I2/I1),2))*sin(radians(angle1)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The deflection for a current of 5A when the instrument is spring controlled is %.2f degrees.\" %(angle2_a) \n",
+ "print \"(b)The deflection for a current of 5A when the instrument is gravity controlled is %.2f degrees.\" %(degrees(angle2_b)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The deflection for a current of 5A when the instrument is spring controlled is 22.50 degrees.\n",
+ "(b)The deflection for a current of 5A when the instrument is gravity controlled is 14.48 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.10,Page number: 619 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current required to produce a deflection of 60 degrees in a moving coil instrument.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "w=4e-02 #Width of the coil(in metres)\n",
+ "l=5e-02 #Length of the coil(in metres)\n",
+ "N=80.0 #Number of turns in the coil\n",
+ "torque_control=0.5e-07 #Controlling torque per degree deflection of the coil(in Nm)\n",
+ "B=0.1 #Magnetic flux density in the air gap(in Wb per square-metre)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "A=w*l\n",
+ "torque_c=torque_control*60.0\n",
+ "I=torque_c/(B*N*A)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current required to give a deflection of 60 degrees is %e A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current required to give a deflection of 60 degrees is 1.875000e-04 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter2.ipynb b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter2.ipynb
new file mode 100755
index 00000000..496486a8
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter2.ipynb
@@ -0,0 +1,1532 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2:OHM'S LAW"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1,Page number: 16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Calculating the resistance of a wire.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "\n",
+ "\"\"\" R=(rho*L)/A\n",
+ " R=Resistance of conductor;\n",
+ " L=Length of conductor;\n",
+ " d=diameter of conductor;\n",
+ " A=Area of Cross Section of conductor=(pi*d*d)/4; \"\"\"\n",
+ "\n",
+ "R1=5 #Resistance of conductor(in Ohms)\n",
+ "\n",
+ "\"\"\" L2=4L1;\n",
+ " d2=0.5d1;\n",
+ " A1=(pi*d1*d1)/4;\n",
+ " A2=(pi*d2*d2)/4=(pi*d1*d1)/16 ; \n",
+ " rho1=rho2=rho(As both the conductors are made of the same material);\n",
+ " R1=(rho*L1)/A1;\n",
+ " R2=(rho*L2)/L2; \n",
+ " R2/R1=(rho*(L2/A2)/(rho*(L1/A1)) \"\"\"\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R2=R1*(4/1)*(2/1)*(2/1)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required value of resistance is: %d Ohms.\" % (R2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required value of resistance is: 80 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2,Page number: 16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding resistance of Copper wire.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "\"\"\" R=(rho*L)/A\n",
+ " R=Resistance of conductor;\n",
+ " L=Length of conductor;\n",
+ " d=diameter of conductor;\n",
+ " A=Area of Cross Section of conductor=(pi*d*d)/4; \"\"\"\n",
+ "\n",
+ "R1=10 #Resistance of Copper Wire(in Ohms)\n",
+ "\n",
+ "\"\"\" L2=3L1;\n",
+ " d2=0.5d1;\n",
+ " A2=A1/3;(If the length of the wire is made three times by drawing it,its area of cross section must \n",
+ " decrease three times as the volume of the wire remains same in the drawing process.) \n",
+ " rho1=rho2=rho(As both the conductors are made of the same material);\n",
+ " R1=(rho*L1)/A1;\n",
+ " R2=(rho*L2)/L2; \n",
+ " R2/R1=(rho*(L2/A2)/(rho*(L1/A1))\n",
+ " R2=R1*(L2/L1)*(A1/A2) \"\"\"\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R2=R1*(3/1)*(3/1)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required value of resistance is: %d Ohms.\" % (R2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required value of resistance is: 90 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3,Page number: 19 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across the four resistors.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "\"\"\" Req=(4+4)||(8+4) \"\"\"\n",
+ "\n",
+ "Req=(8.0*12)/(8+12) #Equivalent Resistance of the circuit(in Ohms)\n",
+ "I=5 #Current in the circuit(in Amperes) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V=I*Req\n",
+ "V1=(4.0*V)/(4+4)\n",
+ "V2=(4.0*V)/(4+4)\n",
+ "V3=(8.0*V)/(8+4)\n",
+ "V4=(4.0*V)/(8+4)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage across resistor 1 is: %d V.\" % (V1)\n",
+ "print \"The voltage across resistor 2 is: %d V.\" % (V2)\n",
+ "print \"The voltage across resistor 3 is: %d V.\" % (V3)\n",
+ "print \"The voltage across resistor 4 is: %d V.\" % (V4)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage across resistor 1 is: 12 V.\n",
+ "The voltage across resistor 2 is: 12 V.\n",
+ "The voltage across resistor 3 is: 16 V.\n",
+ "The voltage across resistor 4 is: 8 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4,Page number:20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the currents through and voltage across the resistors.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=2.0 #Current in Circuit(in Amperes)\n",
+ "R1=2.0 #Resistance of resistor 1(in Ohms) \n",
+ "R2=4.0 #Resistance of resistor 2(in Ohms)\n",
+ "R3=6.0 #Resistance of resistor 3(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Rp=1/((1/R2)+(1/R3))\n",
+ "Req=R1+Rp\n",
+ "Vs=I*Req\n",
+ "v1=Vs*(R1/(R1+Rp))\n",
+ "v2=Vs*(Rp/(R1+Rp))\n",
+ "v3=v2\n",
+ "i1=I\n",
+ "i2=v2/R2\n",
+ "i3=v3/R3\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current i1= %.2f A.\\nThe current i2= %.2f A.\\nThe current i3= %.2f A.\" %(i1,i2,i3)\n",
+ "print \"The voltage v1= %.2f V.\\nThe voltage v2= %.2f V.\\nThe voltage v3= %.2f V.\\n\" %(v1,v2,v3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current i1= 2.00 A.\n",
+ "The current i2= 1.20 A.\n",
+ "The current i3= 0.80 A.\n",
+ "The voltage v1= 4.00 V.\n",
+ "The voltage v2= 4.80 V.\n",
+ "The voltage v3= 4.80 V.\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5,Page number: 23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the effective resistance.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "Rp=1.0/((1.0/20)+(1.0/10)+(1.0/20))\n",
+ "R_AB_1=15+Rp\n",
+ "R = symbols('R')\n",
+ "R1=1.0/((1.0/2.0)+1.0)+ 1.0\n",
+ "R2=R1\n",
+ "R_AB_2= 1.0/((1/R1)+(1/R2)+(1))\n",
+ "R_AB_b=round(R_AB_2,4)*R\n",
+ "R3=1.0/((1.0/3)+(1.0/6)) + 18\n",
+ "R_AB_3= 1.0/((1.0/20)+(1/R3)) + 5\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The effective resistance between points A and B for the combination of resistances is R_AB = %.2f Ohms.\" %(R_AB_1)\n",
+ "print \"(b)The effective resistance between points A and B for the combination of resistances is R_AB = %s Ohms.\" %(R_AB_b)\n",
+ "print \"(c)The effective resistance between points A and B for the combination of resistances is R_AB = %.2f Ohms.\" %(R_AB_3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The effective resistance between points A and B for the combination of resistances is R_AB = 20.00 Ohms.\n",
+ "(b)The effective resistance between points A and B for the combination of resistances is R_AB = 0.4545*R Ohms.\n",
+ "(c)The effective resistance between points A and B for the combination of resistances is R_AB = 15.00 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6,Page number: 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding currents in parallel branches.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=100 #Voltage of the DC source(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Reff= 2+ (1.0/((1.0/12)+(1.0/20)+(1.0/30)))+2\n",
+ "I=V/Reff\n",
+ "\n",
+ "\"\"\" Applying Ohm's Law, we have 12*I1=20*I2=30*I3;\n",
+ " \n",
+ " I2=0.6*I1; I3=0.4*I1 \"\"\"\n",
+ "\n",
+ "\"\"\" I=I1+I2+I3; \"\"\"\n",
+ "I1=I/(0.6+0.4+1)\n",
+ "I2=0.6*I1\n",
+ "I3=0.4*I1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current I1= %.2f A.\\nThe current I2= %.2f A.\\nThe current I3= %.2f A.\" %(I1,I2,I3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I1= 5.00 A.\n",
+ "The current I2= 3.00 A.\n",
+ "The current I3= 2.00 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7,Page number: 25 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the supply current I.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=20.0 #Power dissipated by resistor(in Watts)\n",
+ "RL=5.0 #Resistance of the load resistor(in Ohms)\n",
+ "R=10.0 #Resistance of resistor(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=sqrt(P/RL)\n",
+ "I=(I1*(R+RL))/R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The supply current( I ) is %d A.\"%(I)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The supply current( I ) is 3 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8,Page number:25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding voltage and the total power dissipated.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=120.0 #Voltage of the power line(in Volts)\n",
+ "P_bulb=60.0 #Power rating of the bulb(in Watts)\n",
+ "V_bulb=120.0 #Voltage rating of the bulb(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R=(V_bulb*V_bulb)/P_bulb\n",
+ "R_A=R\n",
+ "R_B=R\n",
+ "R_C=R\n",
+ "R_BC=1.0/((1.0/R)+(1.0/R))\n",
+ "V_B=V*(R_BC/(R_BC+R_A)) \n",
+ "V_C=V*(R_BC/(R_BC+R_A))\n",
+ "V_A=V-V_B\n",
+ "P_A=(V_A*V_A)/R_A \n",
+ "P_B=(V_B*V_B)/R_B\n",
+ "P_C=(V_C*V_C)/R_C\n",
+ "P=P_A+P_B+P_C\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage across bulb A is %.2f V. \\nThe voltage across bulb B is %.2f V. \\nThe voltage across bulb C is %.2f V.\" %(V_A,V_B,V_C)\n",
+ "print \"The total power dissipated in the three bulbs is %.2f W.\" %(P)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage across bulb A is 80.00 V. \n",
+ "The voltage across bulb B is 40.00 V. \n",
+ "The voltage across bulb C is 40.00 V.\n",
+ "The total power dissipated in the three bulbs is 40.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9,Page number: 26\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Designing a variable resistor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R1=30.0 #Resistance of the resistor(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R2=75-R1\n",
+ "Req=(30+75)/2.0\n",
+ "Rp=Req-R1\n",
+ "R=1/((1/Rp)-(1/R2))\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)Minimum value of Req is obtained when R=0(i.e.,a short circuit,because the parallel combination of R2 and R is reduced to 0).\" \n",
+ "print \" Maximum value of Req is obtained when R is an open ciruit.\\n Hence, R1 = %.2f Ohms and R2 = %.2f Ohms. \\n \" %(R1,R2)\n",
+ "print \"(b)The resistance R to give Req=(30+75)/2 ohm is R = %.2f Ohms.\" %(R)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)Minimum value of Req is obtained when R=0(i.e.,a short circuit,because the parallel combination of R2 and R is reduced to 0).\n",
+ " Maximum value of Req is obtained when R is an open ciruit.\n",
+ " Hence, R1 = 30.00 Ohms and R2 = 45.00 Ohms. \n",
+ " \n",
+ "(b)The resistance R to give Req=(30+75)/2 ohm is R = 45.00 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.10,Page number: 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\n",
+ "\"\"\"Finding the equivalent resistance for the infinite ladder network.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "\"\"\" If we remove the first two resistances(i.e. the first rung of the ladder), the remaining circuit across the terminals C and D \n",
+ " has an equivalent resistance ,which must be double of the original ladder. If R_AB=Rx, then R_CD=2*Rx; \"\"\" \n",
+ "\"\"\" Rx=R + (R || (2*Rx)) ; (2*Rx*Rx)-(3*Rx*R)-(R*R);\"\"\"\n",
+ "\"\"\" The roots of the above quadratic equation is solved using Shreedharacharya's Formula\"\"\"\n",
+ "\"\"\" We ignore the negative root as Resistance cannot be negative\"\"\" \n",
+ "a=2.0 #Coefficient of squared term in a quadratic equation\n",
+ "b=-3.0 #Coefficient of first degree term in a quadratic equation \n",
+ "c=-1.0 #Constant term in a quadratic equation \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Rx=((-b)+sqrt((b*b)-(4*a*c)))/(2*a)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The equivalent resistance between terminals A and B in terms of resistance R,for the infinite ladder network is %.2fR Ohms.\" %(Rx)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The equivalent resistance between terminals A and B in terms of resistance R,for the infinite ladder network is 1.78R Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.11,Page number: 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Converting the pi-section into equivalent T-section.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R1=3.0 #First resistance of pi-section(in Ohms)\n",
+ "R2=9.0 #Second resistance of pi-section(in Ohms) \n",
+ "R3=6.0 #Third resistance of pi-section(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ra=(R2*R3)/(R1+R2+R3)\n",
+ "Rb=(R1*R3)/(R1+R2+R3)\n",
+ "Rc=(R1*R2)/(R1+R2+R3)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance Ra is %.2f Ohms.\" %(Ra)\n",
+ "print \"The resistance Rb is %.2f Ohm.\" %(Rb)\n",
+ "print \"The resistance Rc is %.2f Ohms.\" %(Rc)\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance Ra is 3.00 Ohms.\n",
+ "The resistance Rb is 1.00 Ohm.\n",
+ "The resistance Rc is 1.50 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.12,Page number: 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance of the coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "\"\"\" Reff is the effective resistance of the two coils. \"\"\"\n",
+ "V=100.0 #Voltage of the dc supply(in Volts)\n",
+ "I=10.0 #Current drawn from the supply(in Amperes)\n",
+ "P=600.0 #Power dissipated in one coil(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Reff=V/I\n",
+ "R1=(V*V)/P\n",
+ "R2=(Reff*R1)/(R1-Reff)\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance of first coil is: %.2f Ohms.\" %(R1)\n",
+ "print \"The resistance of second coil is: %.2f Ohms.\" %(R2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance of first coil is: 16.67 Ohms.\n",
+ "The resistance of second coil is: 25.00 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.13,Page number: 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the cost of the boiler operation.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=12.0 #Current drawn by the electric boiler(in Amperes) \n",
+ "V=115.0 #Operating voltage of the electric boiler(in Volts)\n",
+ "t=6.0 #Time of operation of the electric boiler(in hours) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "W=(V*I*t)/1000\n",
+ "Rate=2.50\n",
+ "cost=W*Rate\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The cost of boiler operation is Rs. %.2f.\" %(cost)\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The cost of boiler operation is Rs. 20.70.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.14,Page number: 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"To find the effect of supply on the rating of toaster.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_rated=240.0 #Voltage rating of the toaster(in Volts)\n",
+ "P_rated=1000.0 #Power rating of the toaster(in Watts) \n",
+ "V=220.0 #Voltage of the supply(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R_toaster=(V_rated*V_rated)/P_rated\n",
+ "I_rated=P_rated/V_rated \n",
+ "I=V/R_toaster\n",
+ "P_consumed=V*I\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The rated current is %.2f A.\" %(I_rated)\n",
+ "print \"The power rating is %.2f W.\" %(P_rated)\n",
+ "print \"The current drawn is %.2f A.\" %(I)\n",
+ "if (I>I_rated): print(\"The toaster will be damaged as the current is greater than the rated current. \\n\")\n",
+ "elif(I<I_rated): print(\"The toaster will not be damaged as the current is lesser than the rated current. \\n\")\n",
+ "else: print(\"The toaster will not be damaged as the current is equal to the rated current. \\n\")\n",
+ "\n",
+ "print \"The power consumed is %.2f W.\" %(P_consumed) \n",
+ "\n",
+ "if (P_consumed>P_rated): print(\"The rating will be affected as the power consumed is greater than the power rating. \\n\")\n",
+ "elif(P_consumed<P_rated): print(\"The rating will not be affected as the power consumed is lesser than the power rating. \\n\") \n",
+ "else: print(\"The rating will not be affected as the power consumed is equal to the power rating. \\n\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rated current is 4.17 A.\n",
+ "The power rating is 1000.00 W.\n",
+ "The current drawn is 3.82 A.\n",
+ "The toaster will not be damaged as the current is lesser than the rated current. \n",
+ "\n",
+ "The power consumed is 840.28 W.\n",
+ "The rating will not be affected as the power consumed is lesser than the power rating. \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.15,Page number: 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"To find the range of resistance of a colour coded resistor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Yellow=4.0 #Mutilplier corresponding to yellow band\n",
+ "Violet=7.0 #Mutilplier corresponding to violet band\n",
+ "Orange=1.0e03 #Mutilplier corresponding to orange band \n",
+ "Gold=5.0/100 #Mutilplier corresponding to gold band\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R=((Yellow*10)+Violet)*Orange\n",
+ "Rmin=R-(Gold*R)\n",
+ "Rmax=R+(Gold*R)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance should be between %.2f kilo Ohms and %.2f kilo Ohms.\" %(Rmin/1000,Rmax/1000) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance should be between 44.65 kilo Ohms and 49.35 kilo Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.16,Page number: 30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"To find the range of resistance of a colour coded resistor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Gray=8.0 #Mutilplier corresponding to gray band\n",
+ "Blue=6.0 #Mutilplier corresponding to blue band\n",
+ "Gold_3=1.0e-01 #Mutilplier corresponding to first gold band\n",
+ "Gold_4=5.0/100 #Mutilplier corresponding to second gold band \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R=((Gray*10.0)+Blue)*Gold_3\n",
+ "Rmin=R-(Gold_4*R)\n",
+ "Rmax=R+(Gold_4*R)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance should be between %.2f Ohms and %.2f Ohms.\" %(Rmin,Rmax) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance should be between 8.17 Ohms and 9.03 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.17,Page number: 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance at a given temperature.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R1=126 #Resistance of transmission at 20 degrees Celsius(in Ohms)\n",
+ "T1=20 #Initial temperature(in degrees Celsius) \n",
+ "T2=-35 #Final temperature(in degrees Celsius)\n",
+ "temp_coeff=0.00426 #Temperature coefficient of the material of transmission(in Ohm per degree per Ohm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R2=(1+(temp_coeff*T2))*(R1/(1+(temp_coeff*T1)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance of the line at -35 degree Celsius is %.2f Ohms.\" %(R2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance of the line at -35 degree Celsius is 98.80 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.18,Page number: 32 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the temperature rise for change in resistance value.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R1=3.42 #Resistance of Copper winding at room temperature(in Ohms) \n",
+ "T1=20 #Room temperature(in degrees Celsius)\n",
+ "R2=4.22 #Resistance of Copper winding after an extended operation of motor(in Ohms)\n",
+ "temp_coeff=0.00426 #Temperature coefficient of Copper(in Ohm per degree per Ohm)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "T2=(((R2*(1+(temp_coeff*T1)))/R1)-1)/temp_coeff\n",
+ "temp_rise=T2-T1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The temperature rise is %.2f degree Celsius.\" %(temp_rise)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature rise is 59.59 degree Celsius.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.19,Page number: 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the ratio of resistances and lengths of two wires.\"\"\" \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "k=1.0 #Resistance per metre of the metallic wire(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" x is the length of the wire 'P'.\n",
+ "\n",
+ " R_P=k*x;\n",
+ " R_Q=k*(1-x);\n",
+ " \n",
+ " R_R=4*R_P;(because length of 'R' is two times length of 'P',the area of cross-section reduces to half.Resistance is directly \n",
+ " proportional to length and inversely proportional to area of cross-section.) \"\"\"\n",
+ "\n",
+ "x=1.0/(1+4)\n",
+ "R_P=k*x\n",
+ "R_Q=(1.0-x)*k\n",
+ "R_R=R_Q\n",
+ "ratio_res=R_P/R_R\n",
+ "ratio_len=x/(1-x)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The ratio of resistances of P and R is %.2f:1. \" %(ratio_res) \n",
+ "print \"(b)The ratio of lengths of P and Q is %.2f:1. \" %(ratio_len)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The ratio of resistances of P and R is 0.25:1. \n",
+ "(b)The ratio of lengths of P and Q is 0.25:1. \n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.20,Page number: 32 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the equivalent resistance.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "\n",
+ "#Calculations:\n",
+ "R1=1.0/((1.0/5)+(1.0/6))\n",
+ "R2=1.0/((1.0/4)+(1.0/3))\n",
+ "R_AB_1=R1+R2\n",
+ "R3=6+(1.0/((1.0/6)+(1.0/12)))\n",
+ "R4=1.0/((1.0/R3)+(1.0/10))\n",
+ "R_AB_2=2+R4+3\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The resistance between terminals A and B is %.2f Ohms.\" %(R_AB_1)\n",
+ "print \"(b)The resistance between terminals A and B is %.2f Ohms.\" %(R_AB_2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The resistance between terminals A and B is 4.44 Ohms.\n",
+ "(b)The resistance between terminals A and B is 10.00 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.21,Page number: 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the pd between two corners.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=20e-03 #Current entering the cube(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Rp1=12/3\n",
+ "Rp2=12/6\n",
+ "Rp3=Rp1\n",
+ "R_AG=Rp1+Rp2+Rp3\n",
+ "V_AG=R_AG*I\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The potential difference across the corners A and G is %.2f V.\" %(V_AG)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The potential difference across the corners A and G is 0.20 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.22,Page number: 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding equivalent resistance between points E and F.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "#The delta connection between points A,B and C is first converted into its equivalent star connection by creating a new node 'O'.\n",
+ "R_AO=(4.0*6.0)/(2.0+4.0+6.0)\n",
+ "R_BO=(2.0*6.0)/(2.0+4.0+6.0)\n",
+ "R_CO=(2.0*4.0)/(2.0+4.0+6.0)\n",
+ "R_EF=(8.0*(8+(32.0/3)))/(8.0+(8.0+(32.0/3)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The equivalent resistance between points E and F is %.2f Ohms.\" %(R_EF)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The equivalent resistance between points E and F is 5.60 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.23,Page number: 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Find the current drawn from the 5-V supply.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=5 #Voltage from the battery(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" The star connection between A,C and D can be converted into its equivalent delta connection. \"\"\"\n",
+ "R1=((2*3)+(3*2)+(2*2))/3.0\n",
+ "R2=((2*3)+(3*2)+(2*2))/2.0\n",
+ "R3=((2*3)+(3*2)+(2*2))/2.0\n",
+ "\n",
+ "\"\"\"It is important to note that point B is lost during the process of star-to-delts transformation. \"\"\"\n",
+ "\n",
+ "R4=((16.0/3)*(32.0/9))/((16.0/3)+(32.0/9))\n",
+ "R5=R4+3\n",
+ "I=V/R5\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current I drawn from the battery is %.4f A.\" %(I)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I drawn from the battery is 0.9740 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.24,Page number: 36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current and the pd between A and B.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=488.0 #Total power dissipated(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R_CD=1.0/((1.0/5)+(1.0/20)+(1.0/2.5))\n",
+ "R_AB=R_CD+10\n",
+ "V=sqrt(P*R_AB)\n",
+ "I=V/R_AB\n",
+ "V_CD=V-(10*I)\n",
+ "I1=V_CD/5.0\n",
+ "I2=V_CD/20.0\n",
+ "I3=V_CD/2.5\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \" The current I1= %.2f A.\" %(I1) \n",
+ "print \" The current I2= %.2f A.\" %(I2)\n",
+ "print \" The current I3= %.2f A.\" %(I3)\n",
+ "print \" The pd between A and B is %.2f V.\" %(V)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The current I1= 2.00 A.\n",
+ " The current I2= 0.50 A.\n",
+ " The current I3= 4.00 A.\n",
+ " The pd between A and B is 75.04 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.25,Page number: 36 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance R.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_AB=5 #Voltage between points A and B(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_AC=15*(10.0/(10+5))\n",
+ "V_BA=-V_AB\n",
+ "V_BC=V_BA+V_AC\n",
+ "\"\"\" V_BC=15.0*(R/(2+R));\n",
+ " 10+(5*R)=(15*R); \"\"\"\n",
+ "R=10/10\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of resistance R is %.2f Ohm.\" %(R)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of resistance R is 1.00 Ohm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.26,Page number: 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding current supplied by the source.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=100 #Voltage of the supply(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R1=1.0/((1.0/6)+(1.0/3))\n",
+ "R2=5+3+R1\n",
+ "R_BC=1.0/((1.0/10)+(1/R2))\n",
+ "R3=5+R_BC\n",
+ "R_AD=1.0/((1.0/R3)+(1.0/10))\n",
+ "R_total=R_AD+5\n",
+ "I=V/R_total\n",
+ "\"\"\"The concept of current divider is used to find current I1 through the 6 Ohm resistance.At A,the 10 A current divides into \n",
+ " two parts: I_AD and I_AB.The current I_AB depends on the total resistance on the right of point A(which is 10 Ohms).Thus the two\n",
+ " currents will be equal.\n",
+ " \n",
+ " I_AB= I_AD= 5 A.\n",
+ " \n",
+ " I_AB divides equally into I_BC and I_BE. \n",
+ " I_BC= I_BE= 2.5 A. I_BE divides into I1 and I2. \"\"\"\n",
+ "\n",
+ "I_AB=I/2.0\n",
+ "I_AD=I_AB\n",
+ "I_BC=I_AB/2.0\n",
+ "I_BE=I_BC\n",
+ "I1=I_BE*(3.0/(3.0+6.0))\n",
+ "V_6=I1*6\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current supplied by the 100-V source is %.2f A.\" %(I)\n",
+ "print \"(b)The voltage across the 6-Ohms resistance is %.2f V.\" %(V_6)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current supplied by the 100-V source is 10.00 A.\n",
+ "(b)The voltage across the 6-Ohms resistance is 5.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.27,Page number: 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance R.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=80 #Power dissipated(in Watts)\n",
+ "V=20 #Applied voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Rp=1.0/((1.0/8)+(1.0/12)+(1.0/24))\n",
+ "\"\"\" R_total=R+Rp \"\"\"\n",
+ "R_total=(V*V)/P\n",
+ "R=R_total-Rp\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance R is %.2f Ohm.\" %(R)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance R is 1.00 Ohm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.28,Page number: 38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance R2.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=100.0 #Voltage of the supply(in Volts)\n",
+ "I=10.0 #Current drawn from the mains(in Amperes)\n",
+ "P=600.0 #Power dissipated in the resistor R1(in Watts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R1=(V*V)/P\n",
+ "I1=V/R1\n",
+ "I2=I-I1\n",
+ "R2=V/I2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resistance R2 is %.2f Ohms.\" %(R2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance R2 is 25.00 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.29,Page number: 38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the electrical energy generated per tonne of the fuel.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P_out=50 #Output power(in kilo-Watts)\n",
+ "effi=0.35 #Efficiency of the diesel generating set\n",
+ "cal=12500 #Calorific value of the fuel(in kcal/kg)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "P_in=P_out/effi\n",
+ "Heat_per_hour=P_in*860\n",
+ "Fuel=Heat_per_hour/cal\n",
+ "ener=(P_out/Fuel)*1000\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The quantity of oil needed per hour is %.2f kg.\" %(Fuel)\n",
+ "print \"(b)The electrical energy generated per tonne of the fuel is %.2f kWh.\" %(ener)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The quantity of oil needed per hour is 9.83 kg.\n",
+ "(b)The electrical energy generated per tonne of the fuel is 5087.21 kWh.\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.30,Page number: 38 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the resistance of the heater and quantity of heat generated.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R_A=10.0 #Resistance of heater A(in Ohms)\n",
+ "t_A=20 #Time of operation of heater-A(in minutes) \n",
+ "t_B=10 #Time of operation of heater-B(in minutes)\n",
+ "H_A=500 #Heat produced by heater-A in time t_A(in kcal) \n",
+ "H_B=1000 #Heat produced by heater-B in time t_B(in kcal)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V=sqrt((H_A*4.2*1000*R_A)/(t_A*60))\n",
+ "R_B=(V*V*t_B*60)/(H_B*4.2*1000)\n",
+ "R=R_A+R_B\n",
+ "t=5*60\n",
+ "H=(((V*V)*t)/R)/(4.2*1000)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The resistance of heater-B is %.2f Ohms.\" %(R_B)\n",
+ "print \"(b)The heat produced in 5 minutes when the two heaters are connected in series across the same supply voltage is %.2f kcal.\" %(H)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The resistance of heater-B is 2.50 Ohms.\n",
+ "(b)The heat produced in 5 minutes when the two heaters are connected in series across the same supply voltage is 100.00 kcal.\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.31,Page number: 39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding total current taken from the supply and energy consumed in a day.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "lamps=8 #Number of lamps\n",
+ "P_lamp=100 #Power rating of the lamp(in Watts)\n",
+ "fans=3 #Number of fans\n",
+ "P_fan=80 #Power rating of the fan(in Watts)\n",
+ "P_fridge=0.5 #Power rating of the fridge(in HP)\n",
+ "P_heater=1000 #Power rating of the Heater(in Watts)\n",
+ "V=230 #Voltage of the supply(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "total_load=(lamps*P_lamp)+(fans*P_fan)+(P_fridge*746)+P_heater\n",
+ "I=total_load/V\n",
+ "ener=(total_load*(1.0/4)*24)/1000\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The total current taken from the supply is %.2f A.\" %(I)\n",
+ "print \"(b)The energy consumed in a day, if on an average only a quarter of the above load persists all the time is %.4f kWh.\" %(ener)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The total current taken from the supply is 10.49 A.\n",
+ "(b)The energy consumed in a day, if on an average only a quarter of the above load persists all the time is 14.4780 kWh.\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter3.ipynb b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter3.ipynb
new file mode 100755
index 00000000..a6211207
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter3.ipynb
@@ -0,0 +1,2116 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3: NETWORK ANALYSIS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1,Page number: 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of capacitance parameter.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "per_free_space=8.854e-12 #Permittivity of free space(in Farad per metre)\n",
+ "A=0.113 #Total area(in square metre) \n",
+ "rel_per=10.0 #Relative permittivity of mica layer\n",
+ "d=0.1e-03 #Thickness of mica layer(in metre)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C1=(per_free_space*rel_per*A)/d\n",
+ "W=0.05\n",
+ "V=100.0\n",
+ "C2=(2*W)/(V*V)\n",
+ "i=5e-03\n",
+ "dv=100\n",
+ "dt=0.1\n",
+ "C3=i/(dv/dt)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(i)The value of capacitance is %.2f micro Farad.\" %(C1*1000000)\n",
+ "print \"(ii)The value of capacitance is %.2f micro Farad.\" %(C2*1000000)\n",
+ "print \"(iii)The value of capacitance is %.2f micro Farad.\" %(C3*1000000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)The value of capacitance is 0.10 micro Farad.\n",
+ "(ii)The value of capacitance is 10.00 micro Farad.\n",
+ "(iii)The value of capacitance is 5.00 micro Farad.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2,Page number: 54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the inductance of the coil for different cases.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "W=0.2 #Energy stored in magnetic field(in Joules) \n",
+ "i=0.2 #Current producing magnetic field(in Amperes) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L1=(2*W)/(i*i)\n",
+ "v=10\n",
+ "di=0.1\n",
+ "dt=0.2\n",
+ "L2=v/(di/dt)\n",
+ "p=2.5\n",
+ "di=0.5\n",
+ "dt=1\n",
+ "i=0.1\n",
+ "L3=p/(i*(di/dt))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(i)The inductance of the coil is %.2f H.\" %(L1)\n",
+ "print \"(ii)The inductance of the coil is %.2f H.\" %(L2)\n",
+ "print \"(iii)The inductance of the coil is %.2f H.\" %(L3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)The inductance of the coil is 10.00 H.\n",
+ "(ii)The inductance of the coil is 20.00 H.\n",
+ "(iii)The inductance of the coil is 50.00 H.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3,Page number: 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the inductance of 2 coils.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Leq=0.7 #Equivalent self-inductance(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" Leq=0.7 H; \n",
+ " \n",
+ " Leq=((L1*L2)/(L1+L2))+0.5 ;\n",
+ "\n",
+ " L1=(2*L2); \"\"\"\n",
+ "L2=(Leq-0.5)*(3.0/2)\n",
+ "L1=2*L2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"L1=%.2f H. \\nL2=%.2f H.\" %(L1,L2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "L1=0.60 H. \n",
+ "L2=0.30 H.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4,Page number: 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the equivalent capacitance of the network and the voltage drop across each capacitor. \"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=220.0 #Voltage of the DC source(in Volts)\n",
+ "C1=0.05e-06 #Capacitance of the capacitor 1(in Farad)\n",
+ "C2=0.10e-06 #Capacitance of the capacitor 2(in Farad)\n",
+ "C3=0.20e-06 #Capacitance of the capacitor 3(in Farad)\n",
+ "C4=0.05e-06 #Capacitance of the capacitor 4(in Farad) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Cs=1/((1/C1)+(1/C2)+(1/C3)+(1/C4))\n",
+ "Q=Cs*V\n",
+ "V1=Q/C1\n",
+ "V2=Q/C2\n",
+ "V3=Q/C3\n",
+ "V4=Q/C4\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The equivalent capacitance of the network is %.4f micro Farad.\" %(Cs*1000000)\n",
+ "print \"The voltage across capacitor C1= %.2f V.\" %(V1)\n",
+ "print \"The voltage across capacitor C2= %.2f V.\" %(V2)\n",
+ "print \"The voltage across capacitor C3= %.2f V.\" %(V3)\n",
+ "print \"The voltage across capacitor C4= %.2f V.\" %(V4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The equivalent capacitance of the network is 0.0182 micro Farad.\n",
+ "The voltage across capacitor C1= 80.00 V.\n",
+ "The voltage across capacitor C2= 40.00 V.\n",
+ "The voltage across capacitor C3= 20.00 V.\n",
+ "The voltage across capacitor C4= 80.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5,Page number: 55\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across each capacitor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Q1=400e-06 #Charge on the capacitor 1(in Coulombs)\n",
+ "Q2=200e-06 #Charge on the capacitor 2(in Coulombs) \n",
+ "C1=2e-06 #Capacitance of the capacitor 1(in Farad)\n",
+ "C2=10e-06 #Capacitance of the capacitor 2(in Farad) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Q=Q1+Q2\n",
+ "C=C1+C2\n",
+ "V=Q/C\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"After the switch is closed, the voltage that exists across each capacitor is %.2f V.\" %(V)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "After the switch is closed, the voltage that exists across each capacitor is 50.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6,Page number: 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\" A series combination of 2 capacitances C1=2 micro-F and C2=8 micro-F is connected across a dc-supply of 300-V.Determine(a)the charge,\n",
+ " (b)the voltage,and(c)the energy stored in each capacitor. \"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "C1=2e-06 #Capacitance of the capacitor 1(in Farad) \n",
+ "C2=8e-06 #Capacitance of the capacitor 2(in Farad)\n",
+ "V=300.0 #Voltage of Dc supply(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C=(C1*C2)/(C1+C2)\n",
+ "Q=C*V\n",
+ "V1=Q/C1\n",
+ "V2=Q/C2\n",
+ "W1=(1.0/2)*C1*(V1*V1) \n",
+ "W2=(1.0/2)*C2*(V2*V2)\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)When connected in series,the charge on each capacitor is the same.The charge on each capacitor is %.2f micro Coulomb.\" %(Q*1000000)\n",
+ "print \"(b)The voltage across the capacitor C1= %.2f V.\\n The voltage across the capacitor C2= %.2f V.\" %(V1,V2)\n",
+ "print \"(c)The energy stored in the capacitor C1= %.2f milli Joule.\" %(W1*1000)\n",
+ "print \" The energy stored in the capacitor C2= %.2f milli Joule.\" %(W2*1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)When connected in series,the charge on each capacitor is the same.The charge on each capacitor is 480.00 micro Coulomb.\n",
+ "(b)The voltage across the capacitor C1= 240.00 V.\n",
+ " The voltage across the capacitor C2= 60.00 V.\n",
+ "(c)The energy stored in the capacitor C1= 57.60 milli Joule.\n",
+ " The energy stored in the capacitor C2= 14.40 milli Joule.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.7,Page number: 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of capacitance.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "C_eq=1e-06 #Equivalent capacitance of the network(in Farad)\n",
+ "C1=1e-06 #Capacitance of the capacitor 1(in Farad)\n",
+ "C2=8e-06 #Capacitance of the capacitor 2(in Farad)\n",
+ "C3=2e-06 #Capacitance of the capacitor 3(in Farad)\n",
+ "C4=2e-06 #Capacitance of the capacitor 4(in Farad)\n",
+ "C5=6e-06 #Capacitance of the capacitor 5(in Farad)\n",
+ "C6=12e-06 #Capacitance of the capacitor 6(in Farad)\n",
+ "C7=4e-06 #Capacitance of the capacitor 7(in Farad) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "C8=C3+C4\n",
+ "C9=1/((1/C5)+(1/C6))\n",
+ "C10=1/((1/C2)+(1/C8))\n",
+ "C11=C7+C9\n",
+ "C12=1/((1/C1)+(1/C11))\n",
+ "C13=C12+C10\n",
+ "C=1/((1/C_eq)-(1/C13))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of capacitance C is %.2f micro Farad.\" %(C*1e06)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of capacitance C is 1.39 micro Farad.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.8,Page number: 59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the % change in V_L and I_L.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "E=3.0 #EMF of the battery(in Volts) \n",
+ "Ri=1.0 #Internal resistance of the battery(in Ohms)\n",
+ "R_L_min=100.0 #Minimum value of variable load resistance(in Ohms)\n",
+ "R_L_max=1000.0 #Maximum value of variable load resistance(in Ohms) \n",
+ "\n",
+ "\n",
+ "#Calculations and Result: \n",
+ "I_L1=E/(R_L_min+Ri)\n",
+ "I_L2=E/(R_L_max+Ri)\n",
+ "V_L1=E-(I_L1*Ri)\n",
+ "V_L2=E-(I_L2*Ri)\n",
+ "\n",
+ "if I_L1>I_L2 :\n",
+ " change_I_L= ((I_L1-I_L2)/I_L1)*100\n",
+ " ans=\"(a)The percentage decrease in I_L is %.2f percent\" %(round(change_I_L,2))\n",
+ " print(ans)\n",
+ "elif I_L2>IL1 : \n",
+ " change_I_L= ((I_L2-I_L1)/I_L1)*100\n",
+ " ans=\"(a)The percentage increase in I_L is %.2f percent\" %(round(change_I_L,2))\n",
+ " print(ans)\n",
+ "else: print(\"(a)The percentage change in I_L is 0 percent.\")\n",
+ "\n",
+ "if V_L2>V_L1 :\n",
+ " change_V_L= ((V_L2-V_L1)/V_L1)*100\n",
+ " ans=\" The percentage increase in V_L is %.2f percent\" %(round(change_V_L,2))\n",
+ " print(ans)\n",
+ "elif V_L1>V_L2 :\n",
+ " change_V_L= ((V_L1-V_L2)/V_L1)*100\n",
+ " ans=\" The percentage decrease in V_L is %.2f percent\" %(round(change_V_L,2))\n",
+ " print(ans)\n",
+ "else : print(\" The percentage change in V_L is 0\",\"%\")\n",
+ "\n",
+ "R_L_min=1e-03\n",
+ "R_L_max=10e-03\n",
+ "I_L1=E/(R_L_min+Ri)\n",
+ "I_L2=E/(R_L_max+Ri)\n",
+ "V_L1=round((E-(I_L1*Ri)),3)\n",
+ "V_L2=round((E-(I_L2*Ri)),2)\n",
+ "\n",
+ "if I_L1>I_L2 :\n",
+ " change_I_L= ((I_L1-I_L2)/I_L1)*100\n",
+ " ans=\"(b)The percentage decrease in I_L is %.2f percent\" %(round(change_I_L,2))\n",
+ " print(ans) \n",
+ "\n",
+ "elif I_L2>I_L1 :\n",
+ " change_I_L= ((I_L2-I_L1)/I_L1)*100\n",
+ " ans=\"(b)The percentage increase in I_L is %.2f percent\" %(round(change_I_L,2))\n",
+ " print(ans)\n",
+ "\n",
+ "else : print(\"(b) The percentage change in I_L is 0 percent\")\n",
+ "\n",
+ "if V_L2>V_L1 :\n",
+ " change_V_L= ((V_L2-V_L1)/V_L1)*100\n",
+ " ans=\" The percentage increase in V_L is %.3f percent\" %(change_V_L)\n",
+ " print(ans)\n",
+ "\n",
+ "elif V_L1>V_L2 :\n",
+ " change_V_L= ((V_L1-V_L2)/V_L1)*100\n",
+ " ans=\" The percentage decrease in V_L is %.2f percent\" %(change_V_L)\n",
+ " print(ans)\n",
+ "\n",
+ "else: print(\" The percentage change in V_L is 0 percent\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The percentage decrease in I_L is 89.91 percent\n",
+ " The percentage increase in V_L is 0.90 percent\n",
+ "(b)The percentage decrease in I_L is 0.89 percent\n",
+ " The percentage increase in V_L is 900.000 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.9,Page number: 61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power delivered by the ideal part of the sources.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R_S=2.0 #Resistance of the current source(in Ohms)\n",
+ "I_S=3.0 #Current from the current source(in Amperes) \n",
+ "R_L=4.0 #Resistance of the load(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_S=R_S*I_S\n",
+ "I_L1=I_S*(R_S/(R_S+R_L))\n",
+ "V_L1=I_L1*R_L\n",
+ "R1=1/((1/R_S)+(1/R_L))\n",
+ "P_S1=I_S*I_S*R1\n",
+ "I_L2=V_S/(R_S+R_L)\n",
+ "V_L2=V_S*(R_L/(R_S+R_L))\n",
+ "R2=R_S+R_L\n",
+ "P_S2=(V_S*V_S)/R2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"Case 1:\"\n",
+ "print \"I_L=%.2f A. \\nV_L=%.2f V. \\nP_S=%.2f W.\" %(I_L1,V_L1,P_S1)\n",
+ "print \"\\nCase 2:\"\n",
+ "print \"I_L=%.2f A. \\nV_L=%.2f V. \\nP_S=%.2f W.\" %(I_L2,V_L2,P_S2) \n",
+ "print \"\\nWe find that the two energy sources are equivalent as regards the terminal relationships. But, the total power delivered by the ideal part of the two sources is different.\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Case 1:\n",
+ "I_L=1.00 A. \n",
+ "V_L=4.00 V. \n",
+ "P_S=12.00 W.\n",
+ "\n",
+ "Case 2:\n",
+ "I_L=1.00 A. \n",
+ "V_L=4.00 V. \n",
+ "P_S=6.00 W.\n",
+ "\n",
+ "We find that the two energy sources are equivalent as regards the terminal relationships. But, the total power delivered by the ideal part of the two sources is different.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.10,Page number: 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the currents through the two resistors in the circut.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "I_2_ohm1=16.0*(6.0/(6+2))\n",
+ "I_6_ohm1=16-I_2_ohm1\n",
+ "V_eq=16*2\n",
+ "I_2_ohm2=V_eq/(2+6)\n",
+ "I_6_ohm2=I_2_ohm2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current through the 2 ohm resistor is %.2f A.\" %(I_2_ohm1) \n",
+ "print \"The current through the 6 ohm resistor is %.2f A. \\n\" %(I_6_ohm1) \n",
+ "print \"After transformation,\\nThe current through the 2 ohm resistor is %.2f A.\" %(I_2_ohm2) \n",
+ "print \"The current through the 6 ohm resistor is %.2f A.\" %(I_6_ohm2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current through the 2 ohm resistor is 12.00 A.\n",
+ "The current through the 6 ohm resistor is 4.00 A. \n",
+ "\n",
+ "After transformation,\n",
+ "The current through the 2 ohm resistor is 4.00 A.\n",
+ "The current through the 6 ohm resistor is 4.00 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.11,Page number: 64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the reduced network using source transformation.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"First all the voltage sources are transformed to equivalent current sources.\"\"\"\n",
+ "I1=8.0/2.0\n",
+ "I2=6.0/1.0\n",
+ "I3=6.0/2.0\n",
+ "I4=3.0/1.0\n",
+ "I5=I1+I2\n",
+ "I6=I3+I4\n",
+ "R1=1.0/((1.0/2.0)+(1.0/1.0))\n",
+ "R2=1.0/((1.0/2.0)+(1.0/1.0))\n",
+ "V5=I5*R1\n",
+ "V6=I6*R2\n",
+ "V_tot=V5+V6\n",
+ "R_tot=R1+R2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The network is equivalent to a voltage source of %.3f V with an internal resistance of %.2f Ohms.\" %(V_tot,R_tot)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The network is equivalent to a voltage source of 10.667 V with an internal resistance of 1.33 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.12,Page number: 65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across 3 Ohms resistor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I1=4.0 #Current delivered by source 1(in Amperes)\n",
+ "R1=1.0 #Resitance of resistor parallel to current source 1(in Ohms) \n",
+ "V2=6.0 #Voltage of the voltage source 2(in Volts)\n",
+ "I2=5.0 #Current delivered by source 2(in Amperes)\n",
+ "R2=2.0 #Resistance of resistor 2(in Ohms) \n",
+ "R3=3.0 #Resistance of resistor 3(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V1=I1*R1\n",
+ "V3=V1+V2\n",
+ "I3=V3/R1\n",
+ "I4=I3-I2\n",
+ "V4=I4*R1\n",
+ "V_res=V4*(R3/(R1+R2+R3))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage across 3 Ohms resistor is %.2f Volts.\" %(V_res)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage across 3 Ohms resistor is 2.50 Volts.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.13,Page number: 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in the circuit.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=24.0 #Supply voltage(in Volts)\n",
+ "R1=4.0 #Resistance of resistor 1(in Ohms) \n",
+ "R2=2.0 #Resistance of resistor 2(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" V1=4*I;\n",
+ " Applying Kirchoff's Voltage Law to the closed loop, 24-(4*I)-(2*I)-(4.5*4*I)=0 ; \"\"\"\n",
+ "I=24/((R1+R2)-(4.5*R1))\n",
+ "P=-4.5*R1*I*I\n",
+ "R=V/I\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The value of the current I is %.2f A.\" %(abs(I))\n",
+ "print \"(b)The power absorbed by the dependent source is %.2f W.\" %(P)\n",
+ "print \"(c)The resistance 'seen' by the independent voltage source is %.2f Ohms.\" %(R) \n",
+ "print \"\\nNOTE: The negative sign of the resistance is a result of the action of the dependent source.\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The value of the current I is 2.00 A.\n",
+ "(b)The power absorbed by the dependent source is -72.00 W.\n",
+ "(c)The resistance 'seen' by the independent voltage source is -12.00 Ohms.\n",
+ "\n",
+ "NOTE: The negative sign of the resistance is a result of the action of the dependent source.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.14,Page number: 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage in the circuit.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=100.0 #Supply voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Appling KVL in the closed loop, +100-(40*I)-(60*I)=0.\"\"\"\n",
+ "I=V/(40.0+60.0)\n",
+ "V1=I*60.0\n",
+ "\"\"\"Appling KVL in the open loop, -10+V1+(0*10)+30-Vab=0.\"\"\"\n",
+ "Vab=30+V1-10\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage Vab in the circuit is %.2f V.\" %(Vab)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage Vab in the circuit is 80.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.15,Page number: 69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the unknown voltages Vx and Vcd.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=10.0 #Supply voltage(in Volts)\n",
+ "Vca=4.0 #Voltage between points c and a(in Volts) \n",
+ "V1=6.0 #Voltage across resistor R1(in Volts) \n",
+ "V2=-4.0 #Voltage across resistor R2(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vx=Vca-V2\n",
+ "Vcd=Vca-V1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage Vx in the circuit is %.2f V.\" %(Vx)\n",
+ "print \"The voltage Vcd in the circuit is %.2f V.\" %(Vcd)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage Vx in the circuit is 8.00 V.\n",
+ "The voltage Vcd in the circuit is -2.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.16,Page number: 71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the currents in the network.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"KVL equations for loops 1,2 and 3 are written and the equations are solved using SymPy.\"\"\" \n",
+ "print \"Note: All currents are expressed in Amperes.\"\n",
+ "Ix, Iy, I1 = symbols('Ix Iy I1');\n",
+ "solve([(5*Ix)+(0*Iy)+(10*I1)-100,(7*Ix)+(2*Iy)+(-2*I1)+50,(3*Ix)+(-5*Iy)+(-3*I1)+50], [Ix,Iy,I1])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Note: All currents are expressed in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 20,
+ "text": [
+ "{I1: 585/49, Ix: -190/49, Iy: 25/49}"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.17,Page number: 71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the currents using Kirchoff's laws.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"KCL equations at nodes B and C,we get\n",
+ " \n",
+ " I1+I2=20;\n",
+ " \n",
+ " I3-I2=30;\"\"\"\n",
+ "\"\"\"KVL equation for the outer loop ABCDEFGHA, I1-(3*I2)-(2*I3)=-100; \"\"\"\n",
+ "print \"All the currents are expressed in Amperes.\"\"\"\n",
+ "print \"Resistances R1 and R2 are in Ohms.\"\"\"\n",
+ "I1, I2,I3,R1,R2 = symbols('I1 I2 I3 R1 R2')\n",
+ "solve([I1+I2+(0*I3)-20,(0*I1)-I2+I3-30,I1+(-3*I2)+(-2*I3)+100,(110-(0.1*I1))-(20*R1),(120-(0.2*I3))-(30*R2)],[I1,I2,I3,R1,R2])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the currents are expressed in Amperes.\n",
+ "Resistances R1 and R2 are in Ohms.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 42,
+ "text": [
+ "{I1: 10.0000000000000,\n",
+ " I2: 10.0000000000000,\n",
+ " I3: 40.0000000000000,\n",
+ " R1: 5.45000000000000,\n",
+ " R2: 3.73333333333333}"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.18,Page number: 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current through resistor in the circuit.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=2.0 #Loop current(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"KVL Equation: 10-(5*(I1-2))-(8*I1)=0.\"\"\"\n",
+ "I1=(10.0+10.0)/(8.0+5.0)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current through the 8 Ohms resistor is %.3f A.\" %(I1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current through the 8 Ohms resistor is 1.538 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.19,Page number: 75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the unknown voltage.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Writing the KVL equation around the loop of I, -(2*I)+(3*I)+6-(1*(I+5-4))=0.\"\"\"\n",
+ "I=(6.0-1.0)/(2+3+1)\n",
+ "v=3*I\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The unknown voltage in the circuit is %.2f V.\" %(v)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The unknown voltage in the circuit is 2.50 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.20,Page number: 79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current drawn by the source.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KVL for the loops 1, 2 and 3 and solving for currents.\"\"\"\n",
+ "print \"All the currents are expressed in Amperes.\"\"\"\n",
+ "print \"The current delivered by the source is I1.\"\n",
+ "I1, I2,I3,Is = symbols('I1 I2 I3 Is')\n",
+ "solve([(19*I1)+(-12*I2)+(0*I3)-60,(-12*I1)+(18*I2)+(-6*I3),(0*I1)+(-6*I2)+(18*I3),Is-I1], [I1,I2,I3,Is]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the currents are expressed in Amperes.\n",
+ "The current delivered by the source is I1.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 4,
+ "text": [
+ "{I1: 6, I2: 9/2, I3: 3/2, Is: 6}"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.21,Page number: 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mesh currents using mesh analysis.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KVL for the loops 1, 2 and 3 and solving for currents.\"\"\"\n",
+ "print \"All the currents are expressed in Amperes.\"\"\"\n",
+ "I1, I2, I3 = symbols('I1 I2 I3')\n",
+ "solve([(7*I1)+(-4*I2)+(0*I3)-13,(-4*I1)+(15*I2)+(-6*I3)-12,(0*I1)+(-6*I2)+(13*I3)-1], [I1,I2,I3]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the currents are expressed in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 34,
+ "text": [
+ "{I1: 3, I2: 2, I3: 1}"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.22,Page number: 81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across resistor using node-voltage analysis.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KCL at nodes a and b and finding the nodal voltages.\"\"\"\n",
+ "print \"All the voltages are expressed in Volts.\"\"\"\n",
+ "Va,Vb,Vab = symbols('Va Vb Vab')\n",
+ "solve([(Va/2)+((Va-Vb)/3)-5,((Vb-Va)/3)+(Vb/4)+6,Va-Vb-Vab], [Va,Vb,Vab])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the voltages are expressed in Volts.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 43,
+ "text": [
+ "{Va: 22/9, Vab: 34/3, Vb: -80/9}"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.23,Page number: 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current through resistor.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Applying KCL at node 1,\n",
+ "\n",
+ " ((V1-0)/12.0)+((V1-60.0)/7.0)+((V1-0)/4.0)=0; \"\"\"\n",
+ "V1=(60.0/7.0)/((1.0/12.0)+(1.0/7.0)+(1.0/4.0))\n",
+ "I1=V1/12.0\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current I1 through the 12 Ohms resistor is %.2f A.\" %(I1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I1 through the 12 Ohms resistor is 1.50 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.24,Page number: 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current through a resistor.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KCL for supernode (a,b) and for node c and finding the nodal voltages.\"\"\"\n",
+ "print \"All the voltages are expressed in Volts.\"\"\"\n",
+ "print \"The current I is in Amperes.\"\n",
+ "Va,Vb,Vc,I = symbols('Va Vb Vc I')\n",
+ "solve([Va-Vb-6,(Va/3)+((Vb-Vc)/4)-2,((Vc-Vb)/4)+(Vc/5)+7,((Vb-Vc)/4)-I], [Va,Vb,Vc,I])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the voltages are expressed in Volts.\n",
+ "The current I is in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 47,
+ "text": [
+ "{I: 35/12, Va: -11/4, Vb: -35/4, Vc: -245/12}"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.25,Page number: 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across resistor by nodal-voltage method.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Applying KCL at node a,\n",
+ " \n",
+ " ((Va-6.0)/1.0)+((Va-0.0)/5.0)=-4.0+5.0 ; \"\"\"\n",
+ "\n",
+ "Va=(6.0-1.0)/1.2\n",
+ "v=Va*(3.0/(2.0+3.0))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage across 3 Ohms resistor is %.2f V.\" %(v)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage across 3 Ohms resistor is 2.50 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.26,Page number: 84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current through resistor.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Applying KCL at nodes 1 and 2 and solving for nodal voltages.\"\"\"\n",
+ "print \"All the voltages are expressed in Volts.\"\"\"\n",
+ "print \"The current I is in Amperes.\"\n",
+ "V1,V2,I = symbols('V1 V2 I')\n",
+ "solve([(0.7*V1)+(-0.2*V2)-3,(-0.2*V1)+(1.2*V2)-2,((V1-V2)/5.0)-I],[V1,V2,I])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the voltages are expressed in Volts.\n",
+ "The current I is in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 16,
+ "text": [
+ "{I: 0.500000000000000, V1: 5.00000000000000, V2: 2.50000000000000}"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.27,Page number: 85 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current through a resistor.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Applying KCL at node 1,\n",
+ "\n",
+ " ((V-10.0)/2.0)+((V-0.0)/(1.0+3.0))+((V-8.0)/6.0)=0 ; \"\"\"\n",
+ "\n",
+ "V=((10.0/2.0)+(8.0/6.0))/((1.0/2.0)+(1.0/4.0)+(1.0/6.0))\n",
+ "I=V/(1.0+3.0)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current I is %.2f A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I is 1.73 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.28,Page number: 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the values of capacitances.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vs=200.0 #Voltage of the dc supply(in Volts)\n",
+ "V1=120.0 #Potential difference across C1(in Volts)\n",
+ "V_new=140.0 #Potential difference across C1 when a capacitor is added(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Case 1: The charge on each capacitor is the same.\n",
+ "\n",
+ " (C1*V1)=(C2*V2);\n",
+ " (120*C1)=(80*C2);\"\"\"\n",
+ "\"\"\"Case 2: The capacitance of 3 micro Farad in parallel with C2 gives an equivalent capacitance of (C2+3) micro Farad.\n",
+ " \n",
+ " (140*C1)=(60*(C2+3)) ;\"\"\"\n",
+ "print \"Note:The capacitances are expressed in Farads.\" \n",
+ "C1,C2 = symbols('C1 C2')\n",
+ "solve([(120*C1)-(80*C2),(140*C1)-(60*(C2+(3e-06)))],[C1,C2])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Note:The capacitances are expressed in Farads.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 31,
+ "text": [
+ "{C1: 3.60000000000000e-6, C2: 5.40000000000000e-6}"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.29,Page number: 86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in each branch.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=20.0/10.0\n",
+ "I4=10.0/5.0\n",
+ "I5=10.0/2.0\n",
+ "I2=(20.0-(10.0+9.0))/1.0\n",
+ "I3=(20.0-50.0-10.0)/20.0\n",
+ "Ia=I1+I2+I3\n",
+ "Ib=I4+I5-I2-I3\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The currents are:\" \n",
+ "print \" I1=%.2f A \\n I2=%.2f A \\n I3=%.2f A \\n I4=%.2f A \\n I5=%.2f A \\n Ia=%.2f A \\n Ib=%.2f A\" %(I1,I2,I3,I4,I5,Ia,Ib)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The currents are:\n",
+ " I1=2.00 A \n",
+ " I2=1.00 A \n",
+ " I3=-2.00 A \n",
+ " I4=2.00 A \n",
+ " I5=5.00 A \n",
+ " Ia=1.00 A \n",
+ " Ib=8.00 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.30,Page number: 86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the currents through resistors.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KVL for the loops 1 and 2 and solving for currents.\"\"\"\n",
+ "print \"All the currents are expressed in Amperes.\"\"\"\n",
+ "print \"Current through R1= Current through R2=I1\"\n",
+ "print \"Current through R3=I3\"\n",
+ "print \"Current through R4=I2\"\n",
+ "I1, I2, I3 = symbols('I1 I2 I3')\n",
+ "solve([(4.5*I1)+(-3*I2)-2,(-3*I1)+(4*I2)-5,I1-I2-I3], [I1,I2,I3]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the currents are expressed in Amperes.\n",
+ "Current through R1= Current through R2=I1\n",
+ "Current through R3=I3\n",
+ "Current through R4=I2\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 54,
+ "text": [
+ "{I1: 2.55555555555556, I2: 3.16666666666667, I3: -0.611111111111111}"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.31,Page number: 87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current through each resistor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "E1=4.0 #EMF of cell 1(in Volts)\n",
+ "E2=8.0 #EMF of cell 2(in Volts)\n",
+ "R1=0.5 #Internal resistance of cell 1(in Ohms)\n",
+ "R2=1.0 #Internal resistance of cell 2(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R3=1.0/((1.0/3.0)+(1.0/6.0))\n",
+ "Rt=R1+R2+R3+4.5\n",
+ "E=E2-E1\n",
+ "I=E/Rt\n",
+ "I_3=I*(6.0/(3.0+6.0))\n",
+ "I_6=I*(3.0/(3.0+6.0))\n",
+ "V1=E1+(I*R1)\n",
+ "V2=E2-(I*R2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current the 3 Ohms resistor is %.2f A.\" %(I_3)\n",
+ "print \" The current the 6 Ohms resistor is %.2f A.\" %(I_6)\n",
+ "print \" The current the 4.5 Ohms resistor is %.2f A.\" %(I)\n",
+ "print \"(b)The potential difference across cell 1 is %.2f V and across cell 2 is %.2f V.\" %(V1,V2)\n",
+ "print \" Note that the pd of cell E1 is greater than its EMF.This is so because the cell is working as a load.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current the 3 Ohms resistor is 0.33 A.\n",
+ " The current the 6 Ohms resistor is 0.17 A.\n",
+ " The current the 4.5 Ohms resistor is 0.50 A.\n",
+ "(b)The potential difference across cell 1 is 4.25 V and across cell 2 is 7.50 V.\n",
+ " Note that the pd of cell E1 is greater than its EMF.This is so because the cell is working as a load.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.32,Page number: 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the potential of point A.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "E1=8.0 #EMF of first source(in Volts)\n",
+ "E2=6.0 #EMF of second source(in Volts)\n",
+ "E3=4.0 #EMF of third source(in Volts)\n",
+ "R1=5.0 #Resistance of resistor 1(in Ohms) \n",
+ "R2=9.0 #Resistance of resistor 2(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_A=E3+E2-E1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The potential of point A is %.2f V.\" %(V_A)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The potential of point A is 2.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.33,Page number: 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the energy stored in a capacitor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "C=4e-06 #Capacitance of the capacitor(in Farad)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" Applying KCL to the node at the top of the capacitor, current through 5 Ohms resistance is 1+2=3 A. \n",
+ " Applying KCL to the node at the bottom of the capacitor, current through 2 Ohms resistance is 2-1=1 A.\"\"\"\n",
+ "V=(3*5)+(3*1)+(1*2)\n",
+ "W=0.5*C*V*V\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The energy stored in the capacitor is %e J.\" %(W)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The energy stored in the capacitor is 8.000000e-04 J.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.34,Page number: 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the potential differnce between two points.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "E1=3.0 #EMF of cell 1(in Volts)\n",
+ "E2=2.0 #EMF of cell 2in Volts)\n",
+ "E3=1.0 #EMF of cell 3in Volts)\n",
+ "r1=1.0 #Internal resistance of cell 1(in Ohms)\n",
+ "r2=1.0 #Internal resistance of cell 2(in Ohms)\n",
+ "r3=1.0 #Internal resistance of cell 3(in Ohms) \n",
+ "R=1.0 #Resistance of resistor R(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Assigning loop currents as I1 and I2 and writing KVL equations for the two loops,\n",
+ "\n",
+ " E1-(I1*r1)-((I1-I2)*r2)-E2=0; which is (-2*I1)+I2+1=0; \n",
+ " \n",
+ " E2-(I2*r3)-((I2-I1)*r2)-E3=0; which is (-2*I2)+I1+1=0; \"\"\"\n",
+ "\n",
+ "eq1=-1\n",
+ "eq2=-1\n",
+ "I1=((2*eq1)+eq2)/(-3.0)\n",
+ "I2=((2*eq2)+eq1)/(-3.0)\n",
+ "Vab=E2+((I1-I2)*r2)+(0*R)\n",
+ "\n",
+ "V_CB=E2\n",
+ "V_B=0.0\n",
+ "V_C=V_CB+V_B\n",
+ "I3=(V_C-E1)/r1\n",
+ "I4=(V_C-E3)/r3\n",
+ "I6=V_C/R\n",
+ "I5=I3+I4+I6\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The potential difference between points A and B is %.2f V.\" %(Vab) \n",
+ "print \" The current through r1 is %.2f A,the current through r2=%.2f A.\" %(I1,(I1-I2)) \n",
+ "print \" The current through r3=%.2f A and the current through R is 0(no closed loop).\" %(I2)\n",
+ "print \"(b)The current through E1 is %.2f A.\" %(I3) \n",
+ "print \" The current through E2 is %.2f A.\" %(I5)\n",
+ "print \" The current through E3 is %.2f A.\" %(I4)\n",
+ "print \" The current through R is %.2f A.\" %(I6)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The potential difference between points A and B is 2.00 V.\n",
+ " The current through r1 is 1.00 A,the current through r2=0.00 A.\n",
+ " The current through r3=1.00 A and the current through R is 0(no closed loop).\n",
+ "(b)The current through E1 is -1.00 A.\n",
+ " The current through E2 is 2.00 A.\n",
+ " The current through E3 is 1.00 A.\n",
+ " The current through R is 2.00 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.35,Page number: 89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the potential diiference between two points.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "pd_9=0.0\n",
+ "pd_13=0.0\n",
+ "pd_10=6.0*10.0\n",
+ "pd_5=5.0*8.0\n",
+ "pd_18=15.0\n",
+ "Vab=pd_5-pd_10-pd_18\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage drop Vab is %.2f V.\" %(Vab)\n",
+ "print \"The resistors 4 Ohms,11 Ohms,9 Ohms,18 Ohms and 13 Ohms have no effect on the voltage drop Vab.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage drop Vab is -35.00 V.\n",
+ "The resistors 4 Ohms,11 Ohms,9 Ohms,18 Ohms and 13 Ohms have no effect on the voltage drop Vab.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.36,Page number: 90 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage of dependent voltage source.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KVL for the loops 1 and 2.\"\"\"\n",
+ "print \"The current I1 is expressed in Amperes and the voltage V1 is expressed in Volts.\"\"\"\n",
+ "V1,I1 = symbols('V1 I1')\n",
+ "solve([V1+(2*I1),24-(16*I1)-(4*V1)], [V1,I1]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I1 is expressed in Amperes and the voltage V1 is expressed in Volts.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 33,
+ "text": [
+ "{I1: 3, V1: -6}"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.37,Page number: 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage V.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KCL at the upper node and KVL equation for the left loop.\"\"\"\n",
+ "print \"The currents I1 and I2 are expressed in Amperes and the voltage V is expressed in Volts.\"\"\"\n",
+ "I1,I2,V = symbols('I1 I2 V')\n",
+ "solve([I1-I2+(10*I2),36-(20e03*I1),V+(10*I2*(5e03))], [I1,I2,V]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The currents I1 and I2 are expressed in Amperes and the voltage V is expressed in Volts.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 37,
+ "text": [
+ "{I1: 0.00180000000000000, I2: -0.000200000000000000, V: 10.0000000000000}"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.38,Page number: 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the loop currents.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KVL for the loops 1 and 2.\"\"\"\n",
+ "print \"The loop currents i1 and i2 are expressed in Amperes.\"\n",
+ "i1,i2 = symbols('i1 i2')\n",
+ "solve([(3*i2)-((i2-i1)*1)-(i2*2)-3,4-(i1*1)-((i1-i2)*1)-(3*i2)], [i1,i2]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The loop currents i1 and i2 are expressed in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 16,
+ "text": [
+ "{i1: 3, i2: -1}"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.39,Page number: 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the nodal voltages.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Applying KCL at top node and solving for nodal voltages.\"\"\"\n",
+ "print \"All the voltages are expressed in Volts.\"\"\"\n",
+ "print \"The current I is in Amperes.\"\n",
+ "V1,V2,I = symbols('V1 V2 I')\n",
+ "solve([9-I-(V1/10)+(3*I),9-(4*V1/5)-(V1/10),V2-V1-108],[V1,V2,I])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the voltages are expressed in Volts.\n",
+ "The current I is in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 40,
+ "text": [
+ "{I: -4, V1: 10, V2: 118}"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.40,Page number: 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current I by nodal analysis.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KCL at the nodes 1 and 2.\"\"\"\n",
+ "print \"The nodal voltages V1 and V2 are expressed in Volts.\"\n",
+ "print \"The current I is expressed in Amperes.\"\n",
+ "V1,V2,I = symbols('V1 V2 I')\n",
+ "solve([(2*V1)-(V2)-12,(-2*V1)+(4*V2)-6,I-((V1-V2)/3)], [V1,V2,I]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The nodal voltages V1 and V2 are expressed in Volts.\n",
+ "The current I is expressed in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 15,
+ "text": [
+ "{I: 1, V1: 9, V2: 6}"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.41,Page number: 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current I in the circuit.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KCL at the nodes 1 and 2.\"\"\"\n",
+ "print \"The nodal voltages V1 and V2 are expressed in Volts.\"\n",
+ "print \"The current I is expressed in Amperes.\"\n",
+ "V1,V2,I = symbols('V1 V2 I')\n",
+ "solve([(1*V1)-(0.5*V2)-6,(-0.5*V1)+(0.625*V2)-3,I-((V1-V2)/2)], [V1,V2,I]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The nodal voltages V1 and V2 are expressed in Volts.\n",
+ "The current I is expressed in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 14,
+ "text": [
+ "{I: -1.00000000000000, V1: 14.0000000000000, V2: 16.0000000000000}"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.42,Page number: 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current through resistor.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Apply KCL at the nodes 1,2. and 3\"\"\"\n",
+ "print \"The nodal voltages V1,V2 and V3 are expressed in Volts.\"\n",
+ "print \"The current I flowing through the 2 Ohms resistor is expressed in Amperes.\" \n",
+ "V1,V2,V3,I = symbols('V1 V2 V3 I')\n",
+ "solve([(7*V1)-(3*V2)-(4*V3)+11,(-3*V1)+(6*V2)-(2*V3)-3,(-4*V1)-(2*V2)+(11*V3)-25,I-(2*(V2-V3))], [V1,V2,V3,I]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The nodal voltages V1,V2 and V3 are expressed in Volts.\n",
+ "The current I flowing through the 2 Ohms resistor is expressed in Amperes.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 12,
+ "text": [
+ "{I: -2, V1: 1, V2: 2, V3: 3}"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.43,Page number: 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the nodal voltages in the circuit.\"\"\"\n",
+ "\n",
+ "from sympy import *;\n",
+ "\n",
+ "#Calculations:\n",
+ "Ieq=13.0*5.0 #Equivalent current source\n",
+ "\"\"\"Apply KCL at the nodes 1 and 2.\"\"\"\n",
+ "print \"The nodal voltages V1 and V2 are expressed in Volts.\"\n",
+ "V1,V2 = symbols('V1 V2')\n",
+ "solve([(9*V1)-(5*V2)-10,(-5*V1)+(11*V2)-52], [V1,V2]) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The nodal voltages V1 and V2 are expressed in Volts.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 11,
+ "text": [
+ "{V1: 5, V2: 7}"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter4.ipynb b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter4.ipynb
new file mode 100755
index 00000000..04c5c889
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter4.ipynb
@@ -0,0 +1,1106 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:3cfae8c34ec0891b928806727193cd8cb859809240d182673d6b8dcfad3eeded"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4: NETWORK THEOREMS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1,Page number: 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current I in the circuit using superposition theorem.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=-0.5*(0.3/(0.1+0.3))\n",
+ "I2=80e-03/(0.1+0.3)\n",
+ "I=I1+I2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current I in the circuit is %.3f A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I in the circuit is -0.175 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2,Page number: 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding current I_x in the network using superposition theorem.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=10.0/(50+150)\n",
+ "I2=40*(150.0/(50+150))\n",
+ "I3=-120*(50.0/(150+50))\n",
+ "Ix=I1+I2+I3\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current Ix determined using superposition principle is %.2f A.\" %(Ix)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current Ix determined using superposition principle is 0.05 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3,Page number: 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across resistor by applying the principle of superposition.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "i=4.0*(1.0/(1.0+(2+3)))\n",
+ "R=3.0\n",
+ "v_4=i*R\n",
+ "v_5=(-5*(1.0/(1+(2+3))))*R\n",
+ "v_6=6.0*(3.0/(1+2+3))\n",
+ "v=+v_4+v_5+v_6\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total voltage(v) across the 3 ohm resistor is %.2f V.\" %(v)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total voltage(v) across the 3 ohm resistor is 2.50 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4,Page number: 108 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of I_s to reduce the voltage across the 4-ohm resistor to zero. \"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_source=10.0 #Voltage of the source(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=V_source/(2+4+6)\n",
+ "\n",
+ "\"\"\" I2(from top to bottom in the 4 ohm resistor) = -Is*((2+6)/(2+6+4)) = -(2/3)*Is ;\n",
+ " \n",
+ " The voltage across the 4 ohm resistor can be zero,only if the current through this resistor is zero. \n",
+ " \n",
+ " I1+I2=0; \"\"\"\n",
+ "\n",
+ "Is=I1*(3.0/2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current Is to reduce the voltage across the 4 ohm resistor to zero is %.2f A.\" %(Is) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current Is to reduce the voltage across the 4 ohm resistor to zero is 1.25 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5,Page number: 110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question: \n",
+ "\"\"\"Finding the voltage across the load resistor using Thevenin's theorem.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=(50.0-10.0)/(10+10+20)\n",
+ "I2=1.5*(10.0/(10.0+(10+20)))\n",
+ "I=I1+I2\n",
+ "V_Th=I*20\n",
+ "R_Th=1.0/((1.0/20)+(1.0/(10+10)))\n",
+ "R_L=5.0\n",
+ "V_L=V_Th*(R_L/(R_L+R_Th))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage across the load resistor R_L is %.2f V.\" %(V_L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage across the load resistor R_L is 9.17 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6,Page number: 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across the resistor by applying Thevenin's theorem.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "V_Th=5.0*1.0\n",
+ "R_Th=3.0\n",
+ "R_L=3.0\n",
+ "V_L=V_Th*(R_L/(R_L+R_Th))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage across the resistor by applying Thevenin's Theorem is %.2f V.\" %(V_L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage across the resistor by applying Thevenin's Theorem is 2.50 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.7,Page number: 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding Norton's equivalent circuit with respect to terminals AB.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=10.0/5\n",
+ "I2=5.0/10\n",
+ "I_N=I1+I2\n",
+ "R_N=1.0/((1.0/5)+(1.0/10))\n",
+ "I_L=I_N*((10.0/3)/((10.0/3)+5))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"When terminals AB are shorted, the current I_N is %.2f A.\" %(I_N)\n",
+ "print \"The value of current that would flow through a load resistor of 5 ohm if it were connected across terminals AB is %.2f A.\" %(I_L) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "When terminals AB are shorted, the current I_N is 2.50 A.\n",
+ "The value of current that would flow through a load resistor of 5 ohm if it were connected across terminals AB is 1.00 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.8,Page number: 114 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the available power from the battery.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Voc=12.6 #Open-circuit voltage(in Volts)\n",
+ "Isc=300.0 #Short-circuit voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ro=Voc/Isc\n",
+ "P_avl=(Voc*Voc)/(4*Ro)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The available power from the battery is %.2f W.\" %(P_avl)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The available power from the battery is 945.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.9,Page number: 115 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the available power from the battery.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "no_of_cells=8 #Number of dry cells in the battery\n",
+ "emf=1.5 #EMF of each cell(in Volts)\n",
+ "int_res=0.75 #Internal resistanceof each cell(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Voc=no_of_cells*emf\n",
+ "Ro=no_of_cells*int_res\n",
+ "P_avl=(Voc*Voc)/(4.0*Ro)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The available power from the battery is %.2f W.\" %(P_avl)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The available power from the battery is 6.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.10,Page number: 115 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Plotting a curve showing the variation of the output power Po with the load resistance R_L.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P=25.0 #Power to be delivered to the speaker(in Watts)\n",
+ "Ro=8.0 #Resistance of the speaker(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_Th=sqrt(P*4*Ro)\n",
+ "Vo=V_Th/2.0\n",
+ "R_Th=Ro\n",
+ "R_L=0.0\n",
+ "P1=(V_Th*V_Th*R_L)/((R_Th+R_L)*(R_Th+R_L))\n",
+ "R_L=2.0\n",
+ "P2=(V_Th*V_Th*R_L)/((R_Th+R_L)*(R_Th+R_L))\n",
+ "R_L=4.0\n",
+ "P3=(V_Th*V_Th*R_L)/((R_Th+R_L)*(R_Th+R_L))\n",
+ "R_L=6.0\n",
+ "P4=(V_Th*V_Th*R_L)/((R_Th+R_L)*(R_Th+R_L))\n",
+ "R_L=8.0\n",
+ "P5=(V_Th*V_Th*R_L)/((R_Th+R_L)*(R_Th+R_L))\n",
+ "R_L=16.0\n",
+ "P6=(V_Th*V_Th*R_L)/((R_Th+R_L)*(R_Th+R_L))\n",
+ "R_L=32.0\n",
+ "P7=(V_Th*V_Th*R_L)/((R_Th+R_L)*(R_Th+R_L))\n",
+ "P8=0.0\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The voltage provided by this amplifier to to the speaker is %.2f V.\" %(Vo)\n",
+ "print \"(b)(i)If the load is a short circuit(R_L=0),the output voltage Vo would be zero and hence the output power,Po= Vo*I_L = 0*I_L =0.\"\n",
+ "print \" (ii) If the load is an open circuit(R_L=0),the load current I_L would be zero and hence the output power,Po= Vo*I_L = Vo*0 = 0.\"\n",
+ "print \"(c)(i) For R_L = 0 , Po = %.2f W. \\n (ii) For R_L = 2 Ohms, Po = %.2f W.\" %(P1,P2) \n",
+ "print \" (iii) For R_L = 4 Ohms, Po = %.2f W. \\n (iv) For R_L = 6 Ohms, Po = %.2f W.\" %(P3,P4) \n",
+ "print \" (v) For R_L = 8 Ohms, Po = %.2f W. \\n (vi) For R_L = 16 Ohms, Po = %.2f W.\" %(P5,P6) \n",
+ "print \" (vii) For R_L = 32 Ohms, Po = %.2f W. \\n (viii) For R_L = infinity, Po = %.2f W.\" %(P7,P8)\n",
+ "print \"Note: Po is the power delivered to the speaker (in Watts) and R_L is the speaker resistance(in Ohms).\" \n",
+ "\n",
+ "\n",
+ "from __future__ import division\n",
+ "from pylab import *\n",
+ "from matplotlib import *\n",
+ "import numpy as np\n",
+ "%matplotlib inline\n",
+ "\n",
+ "\n",
+ "#Variable declaration:\n",
+ "Rdata=[0.0, 2.0, 4.0, 6.0, 8.0, 16.0] #(in ohm)\n",
+ "Podata=[0, 16, 22.22, 24.49, 25, 22.22] #(in Watt)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R=np.array(Rdata)\n",
+ "Po=np.array(Podata)\n",
+ "length=len(R)\n",
+ "Rmax=R[length-1]\n",
+ "a=polyfit(R,Po,4)\n",
+ "Rfit=[0]*100\n",
+ "Pofit=[0]*100\n",
+ "for n in range(1,100,1):\n",
+ " Rfit[n-1]=Rmax*(n-1)/100\n",
+ " Pofit[n-1]=a[0]*Rfit[n-1]**4+a[1]*Rfit[n-1]**3+a[2]*Rfit[n-1]**2+a[3]*Rfit[n-1]+a[4]\n",
+ "\n",
+ "#Plot the data and then the fit to compare (convert xfit to cm and Lfit to mH)\n",
+ "plot(Rdata,Podata,'o')\n",
+ "plot(np.array(Rfit),np.array(Pofit),'g.') \n",
+ "xlabel('R_L (in ohm) ')\n",
+ "ylabel('Po (in Watt) ')\n",
+ "title('Ouput power(Po) vs. Speaker Resistance(R_L)')\n",
+ "grid()\n",
+ "print \"\\n\\nThe required plot is shown below: \"\n",
+ "show()\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The voltage provided by this amplifier to to the speaker is 14.14 V.\n",
+ "(b)(i)If the load is a short circuit(R_L=0),the output voltage Vo would be zero and hence the output power,Po= Vo*I_L = 0*I_L =0.\n",
+ " (ii) If the load is an open circuit(R_L=0),the load current I_L would be zero and hence the output power,Po= Vo*I_L = Vo*0 = 0.\n",
+ "(c)(i) For R_L = 0 , Po = 0.00 W. \n",
+ " (ii) For R_L = 2 Ohms, Po = 16.00 W.\n",
+ " (iii) For R_L = 4 Ohms, Po = 22.22 W. \n",
+ " (iv) For R_L = 6 Ohms, Po = 24.49 W.\n",
+ " (v) For R_L = 8 Ohms, Po = 25.00 W. \n",
+ " (vi) For R_L = 16 Ohms, Po = 22.22 W.\n",
+ " (vii) For R_L = 32 Ohms, Po = 16.00 W. \n",
+ " (viii) For R_L = infinity, Po = 0.00 W.\n",
+ "Note: Po is the power delivered to the speaker (in Watts) and R_L is the speaker resistance(in Ohms).\n",
+ "\n",
+ "\n",
+ "The required plot is shown below: "
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "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\nNktHWACI0dbWLtu8efPWFStWHLp+/fr4+vp6ZT6fz50xY0aYubl5JtmtzdnZOfHq1ateAoFAJy8v\nz2j//v2BosshCIL1ww8/LMvOzjYtKSnR3bFjxxezZs06DwDg5OT097Nnz/r//fffTjU1NapbtmzZ\nIvpeDoeT/88///RqK+uePXvWlpaWsjMzM80PHjy4ktw5z549+9y+ffs+5fP53MrKSs2NGzfunDVr\n1nnyyMrDwyP28OHDy0eOHHkHoKmr4OHDh5ePGDHiLvlPu3jx4p9+/PHHpY8ePRpIEATr7du3Gleu\nXJlUWVmp2VIeLy+vq7GxsR7tWc+zZ88+9/XXX39ZVFSkX1RUpL9t27avRLsMxsbGenh6et5SVlau\nb+79ysrK9dOnT7+wdu3aPQKBQGfs2LE3AADq6+uVz549+1FZWZm2oqJio5aWVoWiomJjezKtX79+\n17Nnz/o3NDQoVVRUaB05cuSTPn36vNbR0RGQr/n666+/rK6uVnv27Fn/4OBgf3KdL1269MeNGzfu\nJAuIwsJCg0uXLk0BaDp4UFFRqdXV1S15+/atxsaNG3eKfi65Azx8+PByGxubV97e3hE1NTWqkyZN\nupKSktL3zJkzc+vr65Xr6+uV//rrL3eyC2Z7dpzi/Pz8QqqqqtQvXLgwffLkyZdbWn5712NKSkrf\n27dvj66trVVRUVGpVVVVrSFfZ2RklMfn87lkzrq6uh51dXU99PX1ixQUFISRkZETo6KixrUnt4KC\ngnDhwoUnVq9e/V1ubq5xY2Oj4oMHD4bU1dX1mDt37pmIiAjvqKiocY2NjYo1NTWqMTExvOzsbFOA\n9m2XGzZsCDp06NAK0QOzltTV1fWoqalRJafGxkZFgLa3WVqSdx0UXafjx48vtLe3T1ZTU6vicDh5\nS5cuPUI2RhFEU4PbzJkzz/fs2bPMyckpcd++fYHm5uYZ5PNcLjctKChovZ2d3TM2my3w9/c/SdZR\nEwQBO3bs2Kivr19oYWGRfubMmY8UFBQayTaA169f93Z2dk5gs9mCDz744Lfm8rFYLOGhQ4eW9+rV\n642enl7R2rVrd5N1p0KhkLVt27ZN5ubmGQYGBgXz5s07JZr95cuXNiwWS3jq1Kl5BNHUwKekpFT/\n7bfffib6GdeuXRvv7u7+iM1mC4yNjXNmzJjxS2VlpQb5/cTrQouKivTMzMwyye8ZHR3NE10nolNN\nTY3KypUrDxgbG+cYGxvnrFq1ar9oLyAvL68rERERk1v7je7evTucxWIJly9ffoh8rK6uTnnChAmR\nOjo6JT179iwbOHDgw3v37g0liKYGSk1NzYrMzEyz5pa3YsWKg3369EnR1NSsMDAwKPD29r708uVL\nG4L4t974p59++tjExCTbyMgoV7TXiFAoZH333Xef2tjYvNTS0iq3trZO/eKLL74miKbG1qlTp17U\n0tIq53K5aadOnZon+nuLNvoLhULW/PnzQ8aPH3+tpqZG5dWrV30nTZp02cDAoEBPT6/I09PzJtlT\nqT2dBcR7AREEAbt27Vo3YMCAJwTR1D7U3PJbW4+iv2tSUpLDwIEDH2ppaZXr6uoWe3t7XyIbhIuL\ni3WHDx9+V0dHp8TV1fUxQTT1QuJwOHlsNlswb968U7Nnzw4lv0Nz24vodlZdXa0aGBi4z9TUNEtb\nW7vUw8MjhtzWHj58ONDDwyNGV1e32MDAoGDy5MkRGRkZ5uQ2YWFhkZ6Tk2NM/pYKCgqN4u0z/fv3\nf0q2R7Q0cbncNBaLJRSdyPzt2WbpNsk9QFed2mos6uwk2mhMp2njxo079u/fv6ozy/j7778dhw4d\nek/e30V0aq7rIE7MmY4dO7Y4MDBwn7SWT8dttj0TiyCkc0ewmpoaVQ8Pj9ja2lqVurq6HlOnTv3j\nm2+++bykpER35syZv6Snp1tyuVx+WFjYDCY1mrSXlZVV2vHjxxeNHj36tjSWr6CgIExNTe3dq1ev\nf6SxfPQ+Pp/P7dWr1z8NDQ1Koo2UCDGZ1NoAVFVVa6Kjo0clJiY6JyUlOUZHR4/6888/hwcFBW0Y\nO3bsjZSUlL6enp63goKCNkgrQ1cmraEDUMtwnXd9GRkZFuQQEaJTz549yzs7hAYdSe0MQFRVVZU6\n2dPE19c3PDY21oPD4eTn5eUZ8Xi8mPaMK4IQQohi0qxfamxsVHByckrU1NSs+Oyzz74lCALYbLaA\nfF4oFLJE5/9XGBE44YQTTjh1fOroPlqq3UAVFBSEiYmJzllZWWZ37twZGR0dPUr0+ZYGVpJ3w0h7\nps2bN8s9A+bEnJgTM5KTRPtoCfftHaKtrV02adKkK0+ePHElq34Amq5YNTQ0LJBFBqrx+Xx5R2gX\nzEktzEktJuRkQkZJSa0AKCoq0i8tLWUDAFRXV6vduHFjrIuLS8KUKVMukWOsh4SE+Ilfao8QQkg2\nlKS14NzcXGM/P78QoVCoIBQKFebNm3fa09PzlouLS8KMGTPCjh8/vojsBiqtDNLk7+8v7wjtgjmp\nhTmpxYScTMgoKZn0AuoIFotF0C0TQgjRHYvFAqKDw4PgWEASiomJkXeEdsGc1MKc1GJCTiZklBQW\nAAgh1E1hFRBCCHUBWAWEEEKo3bAAkBBT6gUxJ7UwJ7WYkJMJGSWFBQBCCHVT2AaAEEJdALYBIIQQ\najcsACTElHpBzEktzEktJuRkQkZJYQGAEELdFLYBIIRQFyBJG4DUBoNDCCEqBEQEQEpxCqgrq4Oh\nhiHwS/n/+TvUNxTW3VjX4deF+oYCW5Ut768oN3gGIKGYmBjg8XjyjtEmzEktzEktMmdLO/lQ31Dw\nOe8DsemxAABgoG4AhVWF//l7ut10KHhb0OHXWbGtwELbotXCgCnrEs8AEEK0JbqTJ4/EH917BCbZ\nJlBeWw73Mu8BwPs77ICIAFBXVgcAAHcTd9BW1Yab/9z8z9/HvI/BnPA5HX5dD8Ue7wqDAUcHvFcY\nkGcK1anVcH3w9S55poBnAAghqRHd6Yvu5MWPxI00jCDvbd5/dthR86LeLeeY97EW/2arsqG0prTD\nr5sTPgciUyPfFQYt5ZtuNx3CpofJaK1JRpIzACwAEEKd0tyRfXM7fdGdfNS8qPd2vhemX4DPbnzW\n7A5bmloqDMTz2RnYvVctRcezASwAZIgp9YKYk1qYs4kkR/aiO3nySNwnyAcubrhIix2qaGEgeqYw\nX3s+7MnZ06F2A3nANgCEkFSIH+WnFKe8t5MHgGbr2MV3+qLVKGxVNmzhbaHNDrS5fGHTwyAmJua9\ndgjRdoOAiABgq7IZ26sIzwAQQs1q7Si/sq6y2eob8Tp2Ju0MW9NaVZFoLyV5thVgFRBCqEMkrb8n\n39uVdvLtJV7AeZ31okVbAQ4GJ0NMGR8Ec1KrK+QMiAgAXjAPvM56wfPC5xCbHguRqZHvCgNy/k3J\nGwBoqvaI+zgOpttNh6h5UcBWZb+rHunsDo4J61M8o/h3D/UNfbdu+KX899Yn3WEbAELdQEvVOZLW\n36N/ia4b0bYCdWV14AXzaN02gFVACHVB4lU7ovXUbfXM6a5VO1QQXX+ybhvANgCEupmWhlDoSKMt\nkg7RtgGy6kyasACQIewPTi3M2T6tHdmLDqGgm6cLJUYltG+0lff6bA9JM4qfTYn/dlT/DngdAEJd\nRHuO7FsbJ2eN6xoIrw5/b4ePdfiyJd5uInrtREBEAC1+DzwDQIgG2ntk31p3TNG/6XSUj5pIu0oI\nq4AQojlJ6uxFj+yx/p65RKuEpHFPAkkKACAIQipTRkaGOY/Hi7azs3vWv3//pwcOHFhJEARs3rx5\ni6mpaZazs3OCs7NzQmRk5ATR9zVFor/o6Gh5R2gXzEmNy5djiXHjviCcnPyIceO+IC5fjm3xtYsv\nLSY8TnoQE89MJPx+93v3t6BaQHic9CBgCxCwBQiDbw3e/W2024iALUC4H3MnBNUCQlAtIKaHTf/P\n3+1F9/VJYkJOaWQU3Q6mh02nZJn/23d2aD8ttTYAZWXl+n379n3q7OycWFlZqenq6vpk7NixN1gs\nFrF69ervVq9e/Z20PhshKl25cgdWrboOb97sAIAYAODBA30X4L4CMOMYt3oFbXvHtm/uyF60jpgO\n9cWIOqLbAVl9Jw8yqwLy8fG5uHz58sP37t0bpqmpWblmzZq9zQbCKiAkR80NjfBr9HUQFPQHeGsI\nwOYD1KsDqJQDWFA3tj1W53Qv0ughRNteQHw+n5uQkOAyePDguHv37g07dOjQilOnTs13c3N7vHfv\n3jVsNrtU9PX+/v7A5XIBAIDNZoOzs/O7bljkZdk4j/OSzu+5vwcqTSpBXVkdlhksgx8f//huPvPv\nTHha+BSA+7/C4EkKCAQZAH0yAN4aABQWAigDgE7TFbQ2FTYwX3s+/FD3w7v5ra5b3/XA+fPOn1D/\nph4uzmsa8jgmJgaWGSx79w++zGAZJMYl0mr94Lxs5smRRgFEegjxAXxe+0DMlpg23x8TEwPBwcEA\nAO/2lx0l9TOAyspKTR6PF/Pll19+7ePjc7GgoMDQwMCgEABg06ZN23Nzc42PHz++6F0ghpwBxDCg\n/zIA/XNeuXIHDh6Mgvz8LOBwzGDlynEwadJIiZbV2sBmrTW4tnT0LnpTEMh2B6jRBlC8CaDsDhB2\nATjzJsLL3fdpeQUt3X93EhNyyiIjFT2EaHcGUF9fr+zr6xs+d+7cMz4+PhcBAAwNDQvI5z/++OOf\nvb29I6SZAdFXc3Xrb958AQDwXiEgyY49ICKgxZuEd2T8m1DfUPA+9gFknR8AfP4mgEE+AA8vgrXp\nt3Bgwo/v/lFxrBzUGaG+oVLtIdQSqZ0BEATB8vPzC9HT0yvet2/fp+Tjubm5xsbGxrkAAPv27fv0\nr7/+cg8NDZ3zLhBDzgBQ540f/yVERX397wPeAQB6KaCvnQWTeMPbdcTeWh950XHbW2twbc/R+5Ur\nd+DQoRtQU6MIqqqNsGLFWInPVBBqDS+YJ9EYQrS6DuDPP/8cPnLkyDuOjo5JLBaLAADYuXPnxnPn\nzs1OTEx0ZrFYhJWVVdrRo0eXcDic/HeBsADoNowDXCGvXqupUTU8FGCWDwBXOjt2AGxwRcwgaXUQ\nrQoASTGlAGBC3SUAPXK2dPHTg/hkKO2Z1fSiaA8AM3WAPpHQs8IYBjr1p+WOnQ7rsz0wJ3VknVHS\n9iTatQGg7qm1+8eKHtnr6OoCNEBTA+uDtQAKw0Fj1hA45rMHxo8f9t4/QXP3aiVh3TvqSkS3b6kP\nIEe3o22mnAGg97X3/rHiVTZzT/lDj+tu0PhWA+vWERLTkfYAPANAMtXeu0yRr22uyubuymiAlfLJ\njxDdSfuKYbwnsITICzLojsqcoveSLa0plej+sS3dS7Y7rk9pwpzUkWdG0fsNS6ONC88AUKtaOsoX\nH9cG7x+LEPXE/5eobhPANgD0H61V7bQ0Fj12rURI+lprE8A2AEQJ0V47ovX5bY1YiRCSLqrbBLAN\nQEJMqLsEaF9O8bp90Y1MtD7fkm3ZbP29rHLSAeakFhNy0ikj1W0CeAbQTbVWty86LgnW5yNEH1T/\nP2IbQDclWpcoXreP9fkIMQ+2AaBWiR71KysqA0DLdfsIoa4P2wAkRKd6wdaI5hTtt6+hrCGTun1J\nctIZ5qQWE3IyIaOk8Aygi7py5Q4subwKSgtzQfV3Tfh+9IH3GneDfYLxaB+hLoC8qZIksA2gC3p3\no5UR994Nr6zBt4XjPnsgvC4Eq3oQ6iLev6lSx9sAsAqoCzp4MKppg6hvOuKHbHd4e/4BnDwSJ/eq\nHoQQdd79r0sICwAJ0bVeMCAiAB72OwPwkRfA5SNN4+yfjgKoYUNNjaK847WIrutTHOakFhNy0jlj\nbW3navGxDaCLSSlOgTKddACddICxnwH8ugUAmo74VVUb5ZoNIUQtFZWGTr0f2wAYTnxwKPJ2iSpF\nxlD783OAmqadv7X1RjhwYAKOtY9QF9LZNgA8A2A40XF7RK/i9e3hBydf7xW5iTnu/BHqasj/6UOH\nNsH16xIsgCAIWk1NkegvOjpa3hEIgiCIiWcmErAFCPdj7oSgWvCf5+mSsy2Yk1qYkzpMyEgQBPG/\nfWeH9rd4BsBAotU+RyYdwat4EUISwTYABurIfUIRQt2DJGMBYTdQBpL2fUIRQt0DFgASknXfYNEx\n+49MOtJPVOnSAAAfsElEQVTuMcHp3IdZFOakFuakDhMySgrbABhCtLfPZzc+w2ofhFCnYRsAQ3id\n9YLI1Egcsx8h1CxJ2gCwAKAp8Qu8yMewtw9CqDnYCCxD0q4XFB27PyAi4N2t4Dq682dK/SXmpBbm\npA4TMkpKagVAZmam+ahRo6L79+//zN7e/unBgwdXAgCUlJTojh079kbfvn1Txo0bF1VaWoqHs83A\nnj4IIWmTWhVQXl6eUV5enpGzs3NiZWWlpqur65OLFy/6nDx5coG+vn7RunXrvt21a9d6gUCgExQU\ntOFdoG5cBYQXeCGEJEXrNgAfH5+Ly5cvP7x8+fLDsbGxHhwOJz8vL8+Ix+PFvHz50vZdoG5cAOAF\nXgghSdH2pvB8Pp+bkJDgMmjQoIf5+fkcDoeTDwDA4XDy8/PzOeKv9/f3By6XCwAAbDYbnJ2dgcfj\nAcC/9XHynicfo3L56srqAHwAGz2bd9U+nV3+/v37abn+ZLE+pTGP65PaeSasz8TERAgMDKRNHnI+\nJiYGgoODAQDe7S87rKODB3V0qqio0BwwYMCT33//3YcgCGCz2QLR53V0dEpE56EbDwYnqBYQ08Om\nNzuom6SYMpAV5qQW5qQOEzIShGSDwUm1Cqi+vl558uTJlydOnBgZGBi4HwDA1tb2ZUxMDM/IyCgv\nNzfXeNSoUdHduQpIvLsn1vcjhCRBq26gBEGwFi1adNzOzu45ufMHAJgyZcqlkJAQPwCAkJAQPx8f\nn4vSysAE4t09EUJIVqRWANy7d2/YmTNn5kZHR49ycXFJcHFxSbh27dqEDRs2BN24cWNs3759U27f\nvj16w4YNQdLKIE2ida2dIe3unlTllDbMSS3MSR0mZJSU1BqBhw8f/qdQKGy2gLl58+YYaX0u05B3\n8MLungghWcOhIGQM6/wRQtJAqzYA1Dys80cI0QUWABKStF5Q1kM8MKX+EnNSC3NShwkZJYUFgIyF\n+oa2+2YuCCEkTe1qA3j79q1GZmamOYvFIszMzLI0NDTeSi1QF28DQAghaaB0KIiKigqtn376afH5\n8+dnFRUV6XM4nHyCIFj5+fkcPT294o8++ujs4sWLf9LU1KzsfPSuDRt+EUJ01GIVkI+Pz0UtLa2K\nS5cuTfnnn396PXjwYEhcXNzgtLQ0q8uXL0/W0NB4O3Xq1D9kGZZOOlIvKM+GX6bUX2JOamFO6jAh\no6RaPAO4deuWZ0vPGRkZ5QUEBBwLCAjAgerbAcf2RwjRUZttAJ6enrfEC4PmHqMsUBdsAyitKcWL\nvRBCUkVpG0B1dbVaVVWVemFhoUFJSYku+Xh5eXnP7Oxs084E7W7I2zkihBCdtNgGcPTo0SVubm6P\nX716ZePq6vqEnKZMmXJp+fLlh2UZko7aqhcMiAgAXjAPvM56QWlNqWxCNYMp9ZeYk1qYkzpMyCip\nFs8AAgMD9wcGBu4/ePDgypUrVx4Ufa6mpkZV+tGYjWz4BWgqDPAMACFEN222Abi4uCQkJCS4iD42\nYMCA+Pj4+AFSCdRF2gC8znpBZGokuJu440VfCCGpo7QNIDc31zgnJ8ekurpaLT4+fgBBECwWi0WU\nl5f3rKqqUu983K4NR/lECNFdi2cAISEhfsHBwf6PHz92c3Nze0w+rqWlVeHv7x88bdq036QSiCFn\nADExMe/u00lnmJNamJNaTMjJhIwAFJ8B+Pn5hfj5+YX8+uuvH3744Ye/dj5e14ZX+yKEmKZdYwFd\nvnx58vPnz+1EG3+/+uqrbVIJxJAzAHG8YN67Rt/pdtOx0RchJFNSuR/AkiVLjoaFhc04ePDgSoIg\nWGFhYTPS09MtJY/ZNeHVvgghpmmzALh///7QU6dOzdfV1S3ZvHnz1ri4uMGvXr2ykUU4OhPvG0zX\nYZ6Z0ocZc1ILc1KHCRkl1WYBoKamVg0AoK6uXpWdnW2qpKTUkJeXZyT9aMxCXu1Lp50/Qgi1ps02\ngG3btn21YsWKQ7dv3x79f//3f98DACxevPin7du3b5JKIIa2ASCEkDxJ0gbQYgGwb9++T4cNG3Zv\nwIAB8UpKSg0ATVcA19TUqLLZbKmNbUD3AuDKlTtw8GAU1NYqQWq/P0C3D4AZxxh7/iCE5IrSRuCs\nrCyzwMDA/QYGBoUjR468s3Hjxp03b94cIxQKu+1tJK9cuQOrVl2HqKivITaWB9k12pBckUjrG7wz\npf4Sc1ILc1KHCRkl1eJ1AHv37l0DAFBbW6vy+PFjtwcPHgw5ceLEwsWLF//EZrNLX7x40U92Menh\n4MEoePNmx78P1Df1/OlZYYw9fxBCjNNiAUCqrq5WKy8v71lWVqZdVlambWJikuPo6Jgki3B0U1sr\nurp4AOHOAJMDwEHQi7bVP0y4ghEAc1INc1KHCRkl1WIBsHjx4p+eP39up6WlVTFw4MBHQ4cOvb96\n9ervdHR0BLIMSCcqKg3vP1DDBvg1DDTHS6U9HCGEpKrF+vyMjAyL2tpaFSMjozxTU9NsU1PTbGk2\n/jLBypXjwNr6i//NxQAAgLX1RlixYqzcMrWFKfWXmJNamJM6TMgoqRbPAK5fvz5eKBQqPHv2rP+D\nBw+GfPfdd6uTk5Md9PT0igcPHhy3bdu2r2QZlA4mTRoJh/i7oeQNF+r5DTCwdjasXuYNkyaNlHc0\nhBDqsHaNBZSZmWl+//79offu3Rt2+fLlycXFxXplZWXarb1n4cKFJ65cuTLJ0NCwIDk52QEAYMuW\nLVt+/vnnjw0MDAoBAL755pvPJ0yYcO29QDTvBopj/iCE6IjSbqAHDhxYNXPmzF8sLCwyPDw8YiMi\nIrz79ev34vfff/9A9B7BLVmwYMHJa9euTRALSKxevfq7hIQEl4SEBBfxnT8T4Jg/CKGuosUCgM/n\nc2fMmBEWFxc3+J9//ul15syZuZ988skRJyenvxUVFRvbWvCIESPuNtdg3NESim7IMX++svyKtj1/\nRDGl/hJzUgtzUocJGSXVYhvAvn37PpXGBx46dGjFqVOn5ru5uT3eu3fvmuYalv39/YHL5QIAAJvN\nBmdn53ddscgfQ17ziXGJsMxg2bus8s7TZt7ERFrlaWmeRJc8uD5lM8+E9ZmYmEirPOR8TEwMBAcH\nAwC82192VLvaACTF5/O53t7eEWQbQEFBgSFZ/79p06btubm5xsePH1/0XiCatwEghBAdSeV+AFQy\nNDQsYLFYBIvFIj7++OOfHz16NFCWny+JgIgA4AXzwOusF5TWdOtesAihLkamBUBubq4x+ffvv//+\ngYODQ7IsP18SKcUpEJse+5/xfsRPtekKc1ILc1KLCTmZkFFSbQ4FER4e7rthw4ag/Px8Dnl6wWKx\niPLy8p6tvW/27NnnYmNjPYqKivTNzc0zt27dujkmJoaXmJjozGKxCCsrq7SjR48uoeqLSAv2+kEI\ndVVttgFYW1u/uXz58uR+/fq9kEkgmrUBlNaUQkBEABzzPsaIXj8Ioe6J0vsBkIYNG3bv3r17wzqV\nrAPoVgAghBATSKUR2M3N7fHMmTN/OXfu3Ozw8HDf8PBw399++22a5DG7BqbUC2JOamFOajEhJxMy\nSqrNNoCysjJtNTW16qioqHGij0+bNu036cVCCCEkbVK9DkASdKgCCogIgJTiFFBXVsdbPSKEGEGS\nKqAWzwB27dq1fv369btWrFhxqJkPIg4ePLhSkpBMQHb9BGgqDHDAN4RQV9RiG4Cdnd1zAABXV9cn\nbm5uj8nJ1dX1iaur6xPZRZS99nT9ZEq9IOakFuakFhNyMiGjpFo8A/D29o4AAPD39w+WWRqaCPUN\nxa6fCKEur8U2gIULF5745JNPjri7u//V3PMPHz4c9OOPPy49efLkAkoD0aANACGEmIbS6wCSk5Md\ndu/e/VlcXNxgGxubV8bGxrkEQbDy8vKMXr16ZTN06ND7a9eu3WNvb/+UkvRkICwAEEKow6RyIVht\nba1KQkKCS3p6uiWLxSIsLS3TnZyc/lZVVa3pVNqWAjGkAIiJiXk3RCudYU5qYU5qMSEnEzICUNwL\niKSiolI7ePDguMGDB8dJHg0hhBDd4HUA/4N9/xFCTEb7+wHQWUvDPiOEUFfV7gKgsrJSs7KyUlOa\nYeSpo8M+M6VvMOakFuakFhNyMiGjpNosAJKTkx1cXFwS7OzsntvZ2T13dXV98vTpU3tZhJMl8mbv\nUfOisPoHIdQttNkGMGTIkAc7d+7cOGrUqGgAgJiYGN7GjRt33r9/f6hUAjGkFxBCCNGJVNoAqqqq\n1MmdPwAAj8eLefv2rYYkARFCCNFHmwWAlZVV2vbt2zfx+XxuWlqa1ddff/1lr169/pFFODpjSr0g\n5qQW5qQWE3IyIaOk2iwATp48uaCgoMBw2rRpv/n6+oYXFhYanDhxYqEswiGEEJKeFtsAqqur1X78\n8celqampvR0dHZMWLlx4QllZuV7qgWTUBoD9/hFCXQmlbQB+fn4hT548cXVwcEiOjIycuHbt2j2d\nj0gf2O8fIdTdtVgAvHjxot+ZM2fmLl269Mdff/31wzt37oyUZTBp62i/f3FMqRfEnNTCnNRiQk4m\nZJRUiwWAkpJSQ3N/dxXY7x8h1N212AagqKjYqK6uXkXOV1dXq6mpqVUDNNXTl5eX95RKILwOACGE\nOozS0UAbGxsVOx8JIYQQXeFgcBJiSr0g5qQW5qQWE3IyIaOksABACKFuqlvdDwD7/iOEuipa3Q9g\n4cKFJzgcTr6Dg0My+VhJSYnu2LFjb/Tt2zdl3LhxUaWlpTLdA2Pff4QQ+pfUCoAFCxacvHbt2gTR\nx4KCgjaMHTv2RkpKSl9PT89bQUFBG6T1+c3pbN9/UUypF8Sc1MKc1GJCTiZklJTUCoARI0bc1dHR\nEYg+dunSpSl+fn4hAE1XGl+8eNFHWp/fHOz7jxBC/2rzpvBUys/P53A4nHwAAA6Hk5+fn89p7nX+\n/v7A5XIBAIDNZoOzszPweDwA+Lc0lmSercqGZQbLIDEukZLlMWGefIwueZg+Tz5GlzxMnycfo0ue\nluZFs9IhD4/Hg5iYGAgODgYAeLe/7CipNgLz+Xyut7d3RHJysgMAgI6OjkAgEOiQz+vq6paUlJTo\nvhcILwRDCKEOo1UjcHM4HE5+Xl6eEQBAbm6usaGhYYEsP59K4kcGdIU5qYU5qcWEnEzIKCmZFgBT\npky5FBIS4gcAEBIS4ufj43NRlp+PEELoX1KrApo9e/a52NhYj6KiIn0Oh5O/bdu2r6ZOnfrHjBkz\nwjIyMiy4XC4/LCxsBpvNLn0vEFYBIYRQh0lSBdStLgRDCKGuivZtAPIQEBEAvGAeeJ31gtKa0rbf\n0E5MqRfEnNTCnNRiQk4mZJRUly8A8OpfhBBqXpevAvI66wWRqZHgbuKOF4AhhLosbANoRmlNKQRE\nBMAx72O480cIdVnYBtAMtiobwqaHUb7zZ0q9IOakFuakFhNyMiGjpLp8AYAQQqh5Xb4KCCGEugOs\nAkIIIdRuWABIiCn1gpiTWpiTWkzIyYSMkpLpcNCygLd9RAih9ulybQC8YB7EpscCAMB0u+kQNj2M\nqmgIIURb2AYA1N72ESGEurIuVwDI6raPTKkXxJzUwpzUYkJOJmSUVJdrAyAv/EIIIdS6LtcGgBBC\n3RG2ASCEEGo3LAAkxJR6QcxJLcxJLSbkZEJGSWEBgBBC3RS2ASCEUBeAbQAIIYTarUsUANK6729r\nmFIviDmphTmpxYScTMgoqS5RAOB9fxFCqOO6RBsA3vcXIdTdddt7AuN9fxFC3V23bQSW1n1/W8OU\nekHMSS3MSS0m5GRCRkl1iQIAIYRQx3WJKiCEEOruum0VEEIIoY7DAkBCTKkXxJzUwpzUYkJOJmSU\nlFzuB8Dlcvk9e/YsV1RUbFRWVq5/9OjRQHnkQAih7kwubQBWVlZpT548cdXV1S35TyBsA0AIoQ6T\npA1AbncE62hQcQERAZBSnALqyuoQ6huK/f8RQqiD5FIAsFgsYsyYMTcVFRUblyxZcnTx4sU/iT7v\n7+8PXC4XAADYbDY4OzsDj8cDgH/r48jhH4AP4PPaB2K2xLz3vPjrqZ4nH5PV50k6v3///mbXH93m\nycfokgfXp2zmmbA+ExMTITAwkDZ5yPmYmBgIDg4GAHi3v+wwgiBkPuXk5BgTBAEFBQUGTk5OiXfu\n3BlBPtcUqW0Tz0wkYAsQ7sfcCUG1oF3voVJ0dLTMP1MSmJNamJNaTMjJhIwEQRD/23d2aF8s9+sA\ntm7dullTU7NyzZo1ewHa3waAwz8ghNC/GHEdQFVVlXpFRYUWAMDbt281oqKixjk4OCR3dDnyGP4B\nIYS6EpkXAPn5+ZwRI0bcdXZ2Thw0aNDDyZMnXx43blyUrHN0lmhdK51hTmphTmoxIScTMkpK5o3A\nVlZWaYmJic6y/lyEEELvk3sbgDi8DgAhhDqOEW0ACCGE6AELAAkxpV4Qc1ILc1KLCTmZkFFSWAAg\nhFA3xZg2ABz6ASGEWtal2wDIoR8iUyMhICJA3nEQQojxGFMAqCurAwCAu4k7HPM+Juc0zKkXxJzU\nwpzUYkJOJmSUFGMKgFDfUJhuNx2i5kVh9Q9CCFGAMW0ACCGEWtal2wAQQghRCwsACTGlXhBzUgtz\nUosJOZmQUVJYACCEUDeFbQAIIdQFYBsAQgihdsMCQEJMqRfEnNTCnNRiQk4mZJQUFgAIIdRNYRsA\nQgh1AZK0Acj8jmAdgQPAIYSQ9NC6CojOA8AxpV4Qc1ILc1KLCTmZkFFStC4A6DYAHEIIdSW0bgMo\nrSmFgIgAOOZ9DKt/EEKoFZK0AdC6AEAIIdQ+eCGYDDGlXhBzUgtzUosJOZmQUVJYACCEUDeFVUAI\nIdQFYBUQQgihdsMCQEJMqRfEnNTCnNRiQk4mZJQUFgASSkxMlHeEdsGc1MKc1GJCTiZklJRcCoBr\n165NsLW1fdmnT5/Xu3btWi/+/PjxX8KVK3fkEa3dSktL5R2hXTAntTAntZiQkwkZJSXzsYAaGxsV\nly9ffvjmzZtjTE1Ns93d3f+aMmXKpX79+r0gXxMV9TW8efMFAABMmjRS1hERQqhbkPkZwKNHjwb2\n7t07lcvl8pWVletnzZp1/o8//pj63ovWGsCbogA4dOiGrOO1G5/Pl3eEdsGc1MKc1GJCTiZklBhB\nEDKdLly48OHHH3/8Ezl/+vTpucuXLz9EzgMAgRNOOOGEU8enju6PZV4FxGKxiNae72g/VoQQQpKR\neRWQqalpdmZmpjk5n5mZaW5mZpYl6xwIIdTdybwAcHNze/z69es+fD6fW1dX1+OXX36ZOWXKlEuy\nzoEQQt2dzKuAlJSUGg4fPrx8/Pjx1xsbGxUXLVp0XLQHEEIIIRmRdSNwa1NkZOQEGxubl717934d\nFBS0Xt55WpoyMjLMeTxetJ2d3bP+/fs/PXDgwEp5Z2ppamhoUHR2dk6YPHlyhLyztDQJBAK2r6/v\nr7a2ti/69ev3/MGDB4Plnam5aefOnZ/b2dk9s7e3T549e3ZoTU2NirwzEQQBCxYsOGFoaJhvb2+f\nTD5WXFysO2bMmBt9+vRJGTt2bJRAIGDTMefatWt329ravnB0dPz7gw8++K20tFSbbhnJac+ePWtY\nLJawuLhYl47rkiAIOHjw4ApbW9sX/fv3f7pu3bpdbS1Hrl9CdGpoaFC0trZOTUtL49bV1Sk7OTkl\nPn/+vJ+8czU35ebmGiUkJDgTBAEVFRWaffv2fUXXrHv37l09Z86cs97e3pfknaWlaf78+SHHjx9f\nSBAE1NfXK8l7J9DclJaWxrWysvqH3OnPmDHjl+DgYD955yIIAu7cuTMiPj7eRXRn8Nlnn327a9eu\ndQRBQFBQ0Pr169cH0TFnVFTU2MbGRgWCIGD9+vVB8s7ZXEaCaDroGz9+/DUul5tGhwKguZy3b98e\nNWbMmBt1dXXKBEFAQUGBQVvLoc1QEO26PoAmjIyM8pydnRMBADQ1NSv79ev3Iicnx0TeucRlZWWZ\nXb161evjjz/+maBp76qysjLtu3fvjli4cOEJgKYqQm1t7TJ55xLXs2fPcmVl5fqqqir1hoYGpaqq\nKnVTU9NseecCABgxYsRdHR0dgehjly5dmuLn5xcCAODn5xdy8eJFH/mk+1dzOceOHXtDQUFBCAAw\naNCgh1lZWWbySdekuYwAAKtXr/7u22+/XSePTM1pLueRI0c++fzzz79RVlauBwAwMDAobGs5tCkA\nsrOzTc3NzTPJeTMzs6zs7GxTeWZqDz6fz01ISHAZNGjQQ3lnEffpp5/u271792fkPxgdpaWlWRkY\nGBQuWLDg5IABA+IXL178U1VVlbq8c4nT1dUtWbNmzV4LC4sMExOTHDabXTpmzJib8s7Vkvz8fA6H\nw8kHAOBwOPn5+fkceWdqy4kTJxZ6eXldlXcOcX/88cdUMzOzLEdHxyR5Z2nN69ev+9y5c2fk4MGD\n43g8Xszjx4/d2noPbQqAtq4PoKPKykrNDz/88NcDBw6s0tTUrJR3HlGXL1+ebGhoWODi4pJA16N/\nAICGhgal+Pj4AcuWLfshPj5+gIaGxtugoKAN8s4l7s2bN9b79+8P5PP53JycHJPKykrNs2fPfiTv\nXO3BYrEIuv9/7dix44sePXrUzZkzJ1TeWURVVVWp79y5c+PWrVs3k4/R9f+poaFBSSAQ6MTFxQ3e\nvXv3ZzNmzAhr6z20KQCYdn1AfX29sq+vb/jcuXPP+Pj4XJR3HnH3798feunSpSlWVlZps2fPPnf7\n9u3R8+fPPyXvXOLMzMyyzMzMstzd3f8CAPjwww9/jY+PHyDvXOIeP37sNnTo0Pt6enrFSkpKDdOm\nTfvt/v37Q+WdqyUcDic/Ly/PCAAgNzfX2NDQsEDemVoSHBzsf/XqVS86Fqhv3ryx5vP5XCcnp7+t\nrKzSsrKyzFxdXZ8UFBQYyjubODMzs6xp06b9BgDg7u7+l4KCgrC4uFivtffQpgBg0vUBBEGwFi1a\ndNzOzu55YGDgfnnnac7OnTs3ZmZmmqelpVmdP39+1ujRo2+fOnVqvrxziTMyMsozNzfPTElJ6QsA\ncPPmzTH9+/d/Ju9c4mxtbV/GxcUNrq6uViMIgnXz5s0xdnZ2z+WdqyVTpky5FBIS4gcAEBIS4kfH\ngxSAppGBd+/e/dkff/wxVVVVtUbeecQ5ODgk5+fnc9LS0qzS0tKszMzMsuLj4wfQsUD18fG5ePv2\n7dEAACkpKX3r6up66OnpFbf6Jnm3ZotOV69endi3b99X1tbWqTt37vxc3nlamu7evTucxWIJnZyc\nEp2dnROcnZ0TIiMjJ8g7V0tTTEyMB517ASUmJjq5ubn9RZeugC1Nu3btWkd2A50/f34I2dtC3tOs\nWbPOGRsb5ygrK9eZmZllnjhxYkFxcbGup6fnTTp1AxXPefz48YW9e/d+bWFhkU7+H33yySc/0CFj\njx49asl1Kfq8lZXVP3ToBdRczrq6OuW5c+eetre3Tx4wYMCT6OhoXlvLod09gRFCCMkGbaqAEEII\nyRYWAAgh1E1hAYAQQt0UFgAIIdRNYQGAEELdFBYAiJEUFRUbXVxcEhwdHZOmTZv2W2VlpWZLr+Xz\n+VwHB4fktpZ5+PDh5cHBwf4AAJs3b95669Ytz87mDA4O9l+xYsUhSd+flJTkuGjRouOdzYFQc7AA\nQIykrq5elZCQ4JKUlOTYs2fP8qNHjy7pzPIIgmAdP3580dy5c88AAGzdunWzp6fnrc7m7OwQDI6O\njklv3ryxpuOVp4j5sABAjDdkyJAHb968se7MMu7duzfM1tb2pZKSUgMAgL+/f3B4eLgvAACXy+Vv\n2bJli6ur6xNHR8ekV69e2Yi/v6amRnXBggUnHR0dkwYMGBAfExPDI5/LyckxmThxYmTfvn1T1q9f\nv4t8XFNTs3LdunXf2tvbPx07duyNuLi4wR4eHrHW1tZvIiIivMnXTZw4MfLChQvTO/P9EGoOFgCI\n0RobGxWjoqLG2dvbP+3Mcv7888/h5HhEAO8PoMZisQgDA4PCJ0+euH7yySdH9uzZs1b8/d9///3/\nKSoqNiYlJTmeO3dutp+fX0htba0KQRCsxMRE57CwsBnJyckOv/zyy0xylNuqqip1T0/PW0+fPrXX\n0tKq+Oqrr7bdvn179O+///7BV199tY1c9sCBAx/duXNnZGe+H0LNwQIAMVJ1dbWai4tLgrGxcW5m\nZqb50qVLf+zM8jIyMiyMjIzyWnqeHGRrwIAB8Xw+nyv+/L1794aR1Uc2NjavLC0t01NSUvqyWCzC\n09PzlpaWVoWKikqtnZ3d8/T0dEsAgB49etSNHz/+OkDTmDOjRo2KVlRUbLS3t38q+hnGxsa5zX0m\nQp2FBQBiJDU1teqEhASX9PR0S1VV1Roqbh5EtDLMr4qKSi1AU+NzQ0NDs/fSbun95HvF30/euAMA\nQEFBQdijR4868m/RzyAIgkX34ZwRM2EBgBhNTU2t+uDBgyu/+OKLHa3twNtiaWmZTg6fLIkRI0bc\nJYczTklJ6ZuRkWFha2v7sjOZSLm5ucaWlpbpnV0OQuKwAECMJHpE7OzsnNi7d+/UsLCwGS29/tWr\nVzbm5uaZ5EQ28JKGDx/+Z3vuoNTSzVWWLVv2g1AoVHB0dEyaNWvW+ZCQED9lZeX61m7GIv646Lzo\n348ePRo4cuTIO21lQ6ijcDRQhKCpmmXAgAHxDx8+HERWxdAFj8eLCQsLm0HHMegRs+EZAELQdMS9\nePHin+h2V6qkpCTH3r17p+LOH0kDngGgLiM5OdlB/LaXqqqqNQ8ePBgir0wI0RkWAAgh1E1hFRBC\nCHVTWAAghFA3hQUAQgh1U1gAIIRQN4UFAEIIdVP/DwfYb53vcrDdAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x4950910>"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.11,Page number: 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in branch B due to the voltage source of 36 V in branch A.\"\"\"\n",
+ "\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_supply_a=36.0 #Supply voltage in the network shown in figure a(in Volts)\n",
+ "Req_a=2+ 1/((1.0/12)+(1.0/(3+1))) + 4 #Equivalent resistance of network shown in figure a(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_supply_a=V_supply_a/Req_a\n",
+ "I=I_supply_a*(12.0/(12+4))\n",
+ "V_supply_b=36.0\n",
+ "Req_b= 3+ 1.0/((1.0/12)+(1.0/(2+4))) + 1\n",
+ "I_supply_b=V_supply_b/Req_b\n",
+ "I_dash= I_supply_b*(12.0/(12+6))\n",
+ "R_tr=V_supply_a/I\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current I(in figure (a)) is %.2f A and the current I'(in branch A in figure (b)) is %.2f A.\" %(I,I_dash)\n",
+ "if(I==I_dash) : print \"As the two currents I and I' have the same value, the reciprocity theorem is established.\\n \"\n",
+ "else : print \"As the two currents I and I' have different values, the reciprocity theorem is not established.\\n \"\n",
+ "print \"The transfer resistance is %.2f Ohms.\" %(R_tr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I(in figure (a)) is 3.00 A and the current I'(in branch A in figure (b)) is 3.00 A.\n",
+ "As the two currents I and I' have the same value, the reciprocity theorem is established.\n",
+ " \n",
+ "The transfer resistance is 12.00 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.13,Page number: 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current using Thevenin's theorem.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R_L=20.0 #Load resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" KVL equation for the loop bacdeb, V_Th+50-20+10=0.\"\"\"\n",
+ "V_Th=-50.0-10.0+20.0\n",
+ "\"\"\"Shorting all the voltage sources.\"\"\"\n",
+ "R_Th=0.0\n",
+ "I3=V_Th/(R_L+R_Th)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current I3 in the circuit is %.2f A.\" %(I3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I3 in the circuit is -2.00 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.14,Page number: 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current using Thevenin's theorem.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R_L=1.0 #Load resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" KVL equation for the loop bacdeb, V_Th+50-20+10=0.\"\"\"\n",
+ "V_Th=20.0-10.0-9.0\n",
+ "\"\"\"Shorting all the voltage sources.\"\"\"\n",
+ "R_Th=0.0\n",
+ "I2=V_Th/(R_L+R_Th)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current I2 in the circuit is %.2f A.\" %(I2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current I2 in the circuit is 1.00 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.15,Page number: 121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current using superposition theorem.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=0.5 #Load resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I=15.0/(1+0.6)\n",
+ "I1=I*(1/(1+(R+1)))\n",
+ "I2=20/((2/3.0)+2)\n",
+ "I1_20=I2*(2.0/(2.0+(R+R)))\n",
+ "Inet=I1-I1_20\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current flowing through R from A to B is %.2f A.\" %(Inet) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current flowing through R from A to B is -1.25 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.16,Page number: 121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across the resistance using Thevenin's theorem.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"The first step is to remove the 5 Ohms resistance.Then, find the open-circuit voltage Voc across AB. \n",
+ " Using nodal analysis,for node C we can write ((Voc-20)/2)+((Voc+10)/1)+((Voc-12)/4)=10.\"\"\"\n",
+ "Voc=(10+3)/(0.5+1+0.25)\n",
+ "V_Th=Voc\n",
+ "R_Th=1.0/((1.0/2.0)+(1.0)+(1/4.0))\n",
+ "V_AB=V_Th*(5.0/(5.0+R_Th))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage across the 5 Ohms resistance is %.2f V.\" %(V_AB)\n",
+ "print \"Note:There is a calculation error in the textbook.Voc=7.43 V but not 1.74 V. Therefore V_AB=6.67 V.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage across the 5 Ohms resistance is 6.67 V.\n",
+ "Note:There is a calculation error in the textbook.Voc=7.43 V but not 1.74 V. Therefore V_AB=6.67 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.17,Page number: 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current using Norton's theorem.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "Isc=20.0/10.0\n",
+ "I_N=Isc\n",
+ "R_N=1.0/((1.0/10)+(1.0/10))\n",
+ "I=I_N*(R_N/(R_N+2.0))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current through the 2 Ohms resistance when connected across terminals AB is %.2f A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current through the 2 Ohms resistance when connected across terminals AB is 1.43 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.18,Page number: 123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finfing the power consumed by resistor using Norton's theorem.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R_L=2.0 #Resistance of load(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"To determine I_N,short circuit the terminals xy and find the current Isc throgh this short circuit.\n",
+ "\n",
+ " Applying node-voltage analysis to determine the voltage at node 1,\n",
+ " \n",
+ " ((V1-12)/3)+(V1/2)=4;\"\"\"\n",
+ "\n",
+ "V1=(4.0+(12.0/3.0))/((1.0/3.0)+0.5)\n",
+ "Isc=V1/2.0\n",
+ "I_N=Isc\n",
+ "R_N=1.0/((1.0/(3.0+2.0))+(1.0/5.0))\n",
+ "I=I_N*(R_N/(R_N+R_L))\n",
+ "P=I*I*R_L\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The power consumed by the 2 Ohms load reistor is %.3f W.\" %(P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power consumed by the 2 Ohms load reistor is 14.222 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.19,Page number: 124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage across load.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R_L=5.0 #Load resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "R_N=1.0/((1.0/20.0)+(1.0/(10.0+10.0)))\n",
+ "I_N=(65.0-10.0)/(10.0+10.0)\n",
+ "I_L=I_N*(R_N/(R_N+R_L))\n",
+ "V_L=I_L*R_L\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage across the load using Norton's theorem is %.2f V.\" %(V_L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage across the load using Norton's theorem is 9.17 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.20,Page number: 125 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the reading of voltmeter.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=500e03 #Resistance across which voltmeter is connected(in Ohms)\n",
+ "Rm=10e06 #Internal resistance of voltmeter(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_a=10.0*(R/(R+800e03))\n",
+ "R_Th=1.0/((1/R)+(1/800e03))\n",
+ "V_Th=V_a\n",
+ "V_b=V_Th*(Rm/(Rm+R_Th))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The reading of the voltmeter if it assumed to be ideal is %.2f V.\" %(V_a)\n",
+ "print \"(b)The reading of the voltmeter if it has an internal resistance of 10 M Ohms is %.2f V.\" %(V_b)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The reading of the voltmeter if it assumed to be ideal is 3.85 V.\n",
+ "(b)The reading of the voltmeter if it has an internal resistance of 10 M Ohms is 3.73 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.21,Page number: 125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the load resistance for receiving maximum power.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R_L=3e03 #Load resistance(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"First, we remove R_L and then find Voc=V_Th. We transform the 5-mA current source into voltage source.\"\"\"\n",
+ "Voc=(60.0-40.0)*((6e03)/((6e03)+(12e03+18e03)))\n",
+ "V_Th=Voc\n",
+ "R_Th=1.0/((1.0/6e03)+(1.0/(12e03+18e03)))\n",
+ "Vab_b=V_Th*(R_L/(R_L+R_Th))\n",
+ "R_L_c=R_Th\n",
+ "\"\"\" The current required through 6 kilo Ohms resistor is 0.1 mA.\"\"\"\n",
+ "Vab_d=(0.1e-03)*(6e03)\n",
+ "V_30k=20-Vab_d\n",
+ "I_30k=V_30k/(30e03)\n",
+ "I_L=I_30k-(0.1e-03)\n",
+ "R_L_d=Vab_d/I_L\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The Thevenin's equivalent voltage is %.2f V and the Thevenin's resistance is %.2f kilo Ohms.\" %(V_Th,(R_Th/1000.0))\n",
+ "print \"(b)The Vab for R_L=3 kilo Ohms is %.3f V.\" %(Vab_b)\n",
+ "print \"(c)The value of R_L which receives maximum power from the circuit is %.2f kilo Ohms.\" %(R_L_c/1000.0)\n",
+ "print \"(d)The value of R_L which makes the current in the 6 kilo Ohms resistor to be 0.1 mA is %.3f kilo Ohms.\" %(R_L_d/1000.0) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The Thevenin's equivalent voltage is 3.33 V and the Thevenin's resistance is 5.00 kilo Ohms.\n",
+ "(b)The Vab for R_L=3 kilo Ohms is 1.250 V.\n",
+ "(c)The value of R_L which receives maximum power from the circuit is 5.00 kilo Ohms.\n",
+ "(d)The value of R_L which makes the current in the 6 kilo Ohms resistor to be 0.1 mA is 1.098 kilo Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.22,Page number: 127"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of resistance.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=12.0 #Supply voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" To receive maximum power,the resistance R should be equal to the output resistance of the remaining circuit,which is same as \n",
+ " Thevenin's resistance.\"\"\"\n",
+ "R_Th=1.0/((1.0/2.0)+(1.0/6.0))\n",
+ "R=R_Th\n",
+ "\"\"\" Mesh equations to find loop currents I1 and I2, \n",
+ " \n",
+ " (8*I1)-(6*I2)=4 and -(6*I1)+(7.5*I2)=8. Solving these equations, we get I1=3.25 A. \"\"\"\n",
+ "I1=((4*7.5)+(8*6))/((8*7.5)-(6*6))\n",
+ "P=V*I1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The value of R to receive maximum power from the circuit is %.2f Ohms.\" %(R)\n",
+ "print \"(b)The power supplied by the 12 V source is %.2f W.\" %(P) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The value of R to receive maximum power from the circuit is 1.50 Ohms.\n",
+ "(b)The power supplied by the 12 V source is 39.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.23,Page number: 127"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current Is.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=12.0/(80.0+120)\n",
+ "\"\"\" I2=Is*(80/(80+120)); I1+I2=0;\"\"\"\n",
+ "Is=-I1/(80.0/(80+120))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current Is such that the current through 120 Ohms resistor is zero is %.2f A.\" %(Is)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current Is such that the current through 120 Ohms resistor is zero is -0.15 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.24,Page number: 128"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the Thevenin equivalent circuit.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vs=12.0 #Supply voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"The circuit has no independent source.So,the current I in the 12 Ohms resistor will be zero and hence the dependent voltage source\n",
+ " (8*I) will also be zero. Obviously,Thevenin's voltage V_Th=0 V. \"\"\"\n",
+ "V_Th=0.0\n",
+ "I=12.0/12.0\n",
+ "V=8*I\n",
+ "\"\"\"Applying KCL to node a,\"\"\"\n",
+ "Is=(12.0/12.0)+(12.0/6.0)+((12.0-8.0)/4.0)\n",
+ "R_Th=Vs/Is\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The Thevenin's equivalent resistance is %.2f Ohms and the Thevenin's equivalent voltage is %.2f V.\" %(R_Th,V_Th)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Thevenin's equivalent resistance is 3.00 Ohms and the Thevenin's equivalent voltage is 0.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter5.ipynb b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter5.ipynb
new file mode 100755
index 00000000..3a8210b4
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter5.ipynb
@@ -0,0 +1,841 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5: ELECTROMAGNETISM"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1,Page number: 143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current necessary to produce a magnetic field inside the solenoid.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "B=20e-03 #Magnitude of magnetic field inside the solenoid(in Tesla)\n",
+ "n=20e02 #Number of turns per cm in the long solenoid\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "abs_per=(4*pi)*(1e-07)\n",
+ "I=B/(abs_per*n)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required current is %.2f A.\" %(I) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required current is 7.96 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2,Page number: 143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the magnetic field near the centre and the ends of a solenoid.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "abs_per=4*pi*(1e-07) #Absolute permeability of free space(in Henry per metre)\n",
+ "I=6.0 #Current carried by the solenoid(in Amperes)\n",
+ "l=50e-02 #Length of solenoid(in metres)\n",
+ "r=1.4e-02 #Radius of the lowest layer(in metres)\n",
+ "turns_per_layer=350 #Number of turns per layer\n",
+ "number_of_layers=4 #Number of layers\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "n=(turns_per_layer*number_of_layers)/l\n",
+ "B_centre=abs_per*n*I\n",
+ "B_end=(abs_per*n*I)/2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The magnetic field inside the solenois is quite uniform,its strength near the centre on its axis and\" \n",
+ "print \" off its axis is the same and its magnitude is %e T.\" %(B_centre)\n",
+ "print \"(b)The magnetic field strength at the end of the solenoid is %e T.\" %(B_end)\n",
+ "print \"(c)The magnetic field far outside the solenoid near its axis is negligible,compared to the internal field.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The magnetic field inside the solenois is quite uniform,its strength near the centre on its axis and\n",
+ " off its axis is the same and its magnitude is 2.111150e-02 T.\n",
+ "(b)The magnetic field strength at the end of the solenoid is 1.055575e-02 T.\n",
+ "(c)The magnetic field far outside the solenoid near its axis is negligible,compared to the internal field.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3,Page number: 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the force between two long straight parallel wires.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "r=2 #Distance between the parallel current carrying wires(in metres) \n",
+ "abs_per=(4*pi)*(1e-07) #Absolute permeability of free space(in Henry per metre)\n",
+ "I1=80 #Current in the first wire(in Amperes)\n",
+ "I2=30 #Current in the second wire(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "F=(abs_per*I1*I2)/(2*pi*r)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The magnitude of the force between the two wires is %e N/m.\" %(F)\n",
+ "print \"Since the two currents are in the same direction,the force will be attractive.\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magnitude of the force between the two wires is 2.400000e-04 N/m.\n",
+ "Since the two currents are in the same direction,the force will be attractive.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4,Page number: 148 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the force due to current flowing in two straight,parallel wires.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I1=4.0 #Current in the first wire(in Amperes)\n",
+ "I2=6.0 #Current in the second wire(in Amperes)\n",
+ "r=3e-02 #Distance between the parallel current carrying wires(in metres) \n",
+ "abs_per=(4*pi)*(1e-07) #Absolute permeability of free space(in Henry per metre)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "F=(abs_per*I1*I2)/(2*pi*r)\n",
+ "l=15e-02\n",
+ "F_net=F*l\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The net force on 15cm(=0.15 m) section of wire B near its centre is %e N.\" %(F_net)\n",
+ "print \"Since the currents are in opposite directions,the force F_net is repulsive.\"\n",
+ "print \"It means that its direction is normal to wire A away from it.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The net force on 15cm(=0.15 m) section of wire B near its centre is 2.400000e-05 N.\n",
+ "Since the currents are in opposite directions,the force F_net is repulsive.\n",
+ "It means that its direction is normal to wire A away from it.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5,Page number: 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the emf produced in a conductor placed in an uniform magnetic field.\"\"\"\n",
+ "\n",
+ "from math import sin,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "B=0.5 #Magnitude of magnetic field(in Tesla)\n",
+ "l=20e-02 #Active length of the conductor(in metres) \n",
+ "v=5 #Velocity of the conductor(in metres per second)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "angle_a=0\n",
+ "e_a=B*l*v*sin(radians(angle_a))\n",
+ "angle_b=90\n",
+ "e_b=B*l*v*sin(radians(angle_b))\n",
+ "angle_c=30\n",
+ "e_c=B*l*v*sin(radians(angle_c))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The emf induced in the straight conductor when its motion is parallel to the magnetic field is %.2f V.\" %(e_a)\n",
+ "print \"(b)The emf induced in the straight conductor when its motion is perpendicular to the magnetic field is %.2f V.\" %(e_b)\n",
+ "print \"(c)The emf induced in the straight conductor when its motion is at an angle 30 degrees to the magnetic field is %.2f V.\" %(e_c)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The emf induced in the straight conductor when its motion is parallel to the magnetic field is 0.00 V.\n",
+ "(b)The emf induced in the straight conductor when its motion is perpendicular to the magnetic field is 0.50 V.\n",
+ "(c)The emf induced in the straight conductor when its motion is at an angle 30 degrees to the magnetic field is 0.25 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.6,Page number: 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the emf generated between the wing-tips of an aeroplane.\"\"\"\n",
+ "\n",
+ "from math import sin,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "l=52 #Wing span of the aeroplane(in metres)\n",
+ "B=38e-06 #Magnitude of magnetic field(in Tesla)\n",
+ "v=1100.0*(1000.0/3600.0) #Velocity of the aeroplane(in metres per second)\n",
+ "angle=90 #Angle between the magnetic field vector and the velocity vector(in degrees) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "e=B*l*v*sin(radians(angle))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The emf generated between the wing tips is %.5f V.\" %(e)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The emf generated between the wing tips is 0.60378 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7,Page number: 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the emf developed between the centre and the metallic ring.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "\"\"\" A=(1/2)*R*R*theta; where theta is the angle between the rod and the rod OP(in figure) at time t \"\"\"\n",
+ "B=1.0 #Magnitude of magnetic field(in Tesla)\n",
+ "R=1 #Radius of circular ring(in metres)\n",
+ "f=50 #Frequency of rotation(in revolutions per second) \n",
+ "\n",
+ "\"\"\" B=d(flux)/dt= d(B*A)/dt= (1/2)*B*R*R*d(theta)/dt= (1/2)*B*R*R*ang_freq \"\"\"\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "ang_freq=2*pi*f\n",
+ "e=(1.0/2)*B*R*R*ang_freq\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The emf developed between the centre and the metallic ring is %.2f V.\" %(e)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The emf developed between the centre and the metallic ring is 157.08 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.8,Page number: 155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the force needed to pull a rectangular loop placed in an uniform magnetic field.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "B=0.5 #Magnitude of magnetic field(in Tesla)\n",
+ "w=3e-02 #Width of the rectangular loop(in metres)\n",
+ "l=10e-02 #Length of the rectangular loop(in metres)\n",
+ "v=1e-02 #Velocity of the rectangular loop(in metre per second)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "e1=B*w*v\n",
+ "t1=l/v\n",
+ "e2=B*l*v\n",
+ "t2=w/v\n",
+ "R=1e-03\n",
+ "F_a=(pow((B*w),2)*v)/R\n",
+ "F_b=(pow((B*l),2)*v)/R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The induced emf is %e V and the time for which the induced voltage lasts is %.2f secs.\" %(e1,t1)\n",
+ "print \"(b)The induced emf is %e V and the time for which the induced voltage lasts is %.2f secs.\" %(e2,t2)\n",
+ "print \"(c)Because of the gap,no current can flow.Hence there is no heat produced(or no I*I*R losses).\"\n",
+ "print \" If we neglect friction,no force is required to pull the coil.\"\n",
+ "print \"(d)The force required to pull the loop if it has no cut and has a resistance of 1 mill ohm is :\"\n",
+ "print \" For fig (a): F=%e N.\" %(F_a)\n",
+ "print \" For fig (b): F=%e N.\" %(F_b)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The induced emf is 1.500000e-04 V and the time for which the induced voltage lasts is 10.00 secs.\n",
+ "(b)The induced emf is 5.000000e-04 V and the time for which the induced voltage lasts is 3.00 secs.\n",
+ "(c)Because of the gap,no current can flow.Hence there is no heat produced(or no I*I*R losses).\n",
+ " If we neglect friction,no force is required to pull the coil.\n",
+ "(d)The force required to pull the loop if it has no cut and has a resistance of 1 mill ohm is :\n",
+ " For fig (a): F=2.250000e-03 N.\n",
+ " For fig (b): F=2.500000e-02 N.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.9,Page number: 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the magnetic field due to a line caryying current.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=90.0 #Current flowing through the line(in Amperes)\n",
+ "x=1.5 #Distance of point of observation from the line(in metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "abs_per=(4*pi)/(1e07)\n",
+ "B=(abs_per*I)/(2*pi*x)\n",
+ " \n",
+ "\n",
+ "#Result:\n",
+ "print \"The magnetic field due to the current at a point 1.5 m below the line is %e T.\" %(B)\n",
+ "print \"By applying the right-hand thumb rule,we find that the direction of the magnetic field is from north to south.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magnetic field due to the current at a point 1.5 m below the line is 1.200000e-05 T.\n",
+ "By applying the right-hand thumb rule,we find that the direction of the magnetic field is from north to south.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.10,Page number: 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the force per unit length on a current carrying wire.\"\"\"\n",
+ "\n",
+ "from math import sin,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=8.0 #Current flowing through the wire(in Amperes)\n",
+ "B=0.15 #Magnitude of uniform magnetic field(in Tesla)\n",
+ "angle=30 #Angle between the direction of current and the uniform magnetic field(in degrees)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Fu=I*B*sin(radians(angle))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The force per unit length of the wire is %.2f N/m.\" %(Fu)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The force per unit length of the wire is 0.60 N/m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.11,Page number: 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the torque experienced by a square coil.\"\"\"\n",
+ "\n",
+ "from math import sin,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=12.0 #Current flowing through the square coil(in Amperes)\n",
+ "N=20.0 #Number of turns in the square coil\n",
+ "l=10e-02 #Length of each side of the square coil(in metres)\n",
+ "B=0.8 #Magnitude of uniform horizontal magnetic field(in Tesla)\n",
+ "angle=30.0 #Angle made by normal to the plane of the coil with the direction of horizontal magnetic field(in degrees)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "F=I*B*l*N\n",
+ "x=l*sin(radians(angle))\n",
+ "T=F*x\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The torque experienced by the coil is %.3f Nm.\" %(T)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The torque experienced by the coil is 0.960 Nm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.12,Page number: 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the net force on a rectangular loop.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I1=15.0 #Current carried by the rectangular loop(in Amperes)\n",
+ "I2=25.0 #Current carried by the straight conductor(in Amperes)\n",
+ "l=25e-02 #Length of the rectangular loop(in metres)\n",
+ "w=10e-02 #Width of the rectangular loop(in metres)\n",
+ "r=2e-02 #Separation between the nearer side of the loop and the conductor(in metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "abs_per=(4*pi)/(1e07)\n",
+ "\"\"\"Parts AD and BC do not experience any force,since these conductors are at right angles to the long straight conductor.\n",
+ " \n",
+ " The current I1 in AB and the current I2 in the straight conductor are in the same direction.\n",
+ " Hence,the force F_AB is attractive.\"\"\"\n",
+ "\n",
+ "F_AB=((abs_per*I1*I2)/(2*pi*r))*l\n",
+ "\n",
+ "\"\"\" The current I1 in CD and the current I2 in the straight conductor are in opposite directions.\n",
+ " Hence,the force F_CD is repulsive.\"\"\"\n",
+ "\n",
+ "F_CD=((abs_per*I1*I2)/(2*pi*(r+w)))*l\n",
+ "F_net=F_AB-F_CD\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The net force on the rectangular loop is %.5f mN.\" %(F_net*1000.0) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The net force on the rectangular loop is 0.78125 mN.\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.13,Page number: 157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the location of a point where the resultant magnetic field is zero.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=10.0 #Current flowing through the wire(in Amperes)\n",
+ "B=2.0e-03 #Horizontal component of Earth's magnetic field(in Tesla)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" To make the resultant magnetic field zero,the magnetic filed produced by the long vertical wire must be equal and opposite \n",
+ " to the horizontal component of Earth's magnetic field.This is possible at a point P,west of the wire. \"\"\"\n",
+ "\n",
+ "abs_per=(4*pi)/(1e07)\n",
+ "x=(abs_per*I)/(2*pi*B)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The distance between the required point from the wire is %e m,to the west of the wire.\" %(x)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The distance between the required point from the wire is 1.000000e-03 m,to the west of the wire.\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.14,Page number: 157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the force per unit length between two current carrying wires.\"\"\"\n",
+ "\n",
+ "from math import pi \n",
+ "\n",
+ "#Variable Declaration:\n",
+ "I=300.0 #Current flowing through each wire(in Amperes)\n",
+ "r=1.5e-02 #Separation between the wires(in metres)\n",
+ "l=70e-02 #Length of each wire(in metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "abs_per=(4*pi)/(1e07)\n",
+ "\"\"\"Since the length of the wires is 70 cm and their separation is only 1.5 cm(i.e, l>>r),\n",
+ " we can conclude that for the given separation the two wires are infinitely long. \"\"\"\n",
+ "F=(abs_per*I*I)/(2*pi*r)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The force per unit length between the two wires is %.2f N/m.\" %(F)\n",
+ "print \"Since the currents in the two wires are in the opposite directions,the force between them will be repulsive.\"\"\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The force per unit length between the two wires is 1.20 N/m.\n",
+ "Since the currents in the two wires are in the opposite directions,the force between them will be repulsive.\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.15,Page number: 158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the counter torque to prevent a coil from turning.\"\"\"\n",
+ "\n",
+ "from math import pi,sin,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=30.0 #Number of turns in the circular coil\n",
+ "r=8e-02 #Radius of circular coil(in metres)\n",
+ "I=6.0 #Current flowing through the circular coil(in Amperes)\n",
+ "B=1.0 #Magnitude of uniform magnetic field(in Tesla)\n",
+ "angle=60 #Angle made by the field lines with the normal to the coil(in degrees)\n",
+ "\n",
+ " \n",
+ "#Calculations:\n",
+ "\"\"\"The counter torque required to prevent the coil from moving must be equal(and opposite) to the torque developed.\"\"\"\n",
+ "A=pi*r*r\n",
+ "tor=B*I*N*A*sin(radians(angle))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The counter torque that must be applied to prevent the coil from turning is %.2f Nm.\" %(tor) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The counter torque that must be applied to prevent the coil from turning is 3.13 Nm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.16,Page number: 158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the maximum voltage induced in a coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "A=300e-04 #Area of circular coil(in square-m)\n",
+ "N=25.0 #Number of turns in the circular coil\n",
+ "w=40.0 #Angluar frequency(in radians per second)\n",
+ "B=0.05 #Magnitude of uniform magnetic field(in Tesla)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Em=N*B*A*w\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The maximum value of emf induced in the coil is %.2f V.\" %(Em)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum value of emf induced in the coil is 1.50 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.17,Page number: 158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the induces emf in a circular conducting loop.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "B=0.02 #Magnitude of uniform magnetic field(in Tesla)\n",
+ "r=2e-02 #Radius of the circular loop(in metres)\n",
+ "rate=1.0e-03 #Rate of shrinking of the radius(in metre per second)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" flux=B*A; A=(pi*r*r);\n",
+ " e=d(flux)/dt; \n",
+ " \n",
+ " e=(B*pi*2*r)*(dr/dt); \"\"\"\n",
+ "\n",
+ "e=B*pi*2*r*rate\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The emf induced in the loop at an instant when the radius is 2 cm is %e V.\" %(e) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The emf induced in the loop at an instant when the radius is 2 cm is 2.513274e-06 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter6.ipynb b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter6.ipynb
new file mode 100755
index 00000000..fde4f296
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter6.ipynb
@@ -0,0 +1,627 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6: MAGNETIC CIRCUITS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1,Page number: 167\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the magnetic field strength and total flux passing through a coil.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=200 #Number of turns in the coil \n",
+ "l=0.60 #Length(Circumference) of the wooden ring(in metres)\n",
+ "A=500e-06 #Cross-sectional area of the ring(in square-metres)\n",
+ "I=4 #Current through the coil(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "H=(N*I)/l\n",
+ "rel_per=1\n",
+ "per=(4*pi)*(1e-07)\n",
+ "B=per*rel_per*H\n",
+ "flux=B*A\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The magnetic field strength is %.2f A/m.\" %(H)\n",
+ "print \"(b)The flux density is %.2f micro T.\" %(B*1000000)\n",
+ "print \"(c)The total flux is %.5f micro Wb.\" %(flux*1000000)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The magnetic field strength is 1333.33 A/m.\n",
+ "(b)The flux density is 1675.52 micro T.\n",
+ "(c)The total flux is 0.83776 micro Wb.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.2,Page number: 168\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the magnetomotive force(mmf) required to produce flux.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "flux=0.015 #Flux across the air-gap(in Webers)\n",
+ "l=2.5e-03 #Length of the air-fap(in metres)\n",
+ "A=200e-04 #Effective area of the air-gap(in square-metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "B=flux/A\n",
+ "abs_per=(4*pi)*(1e-07)\n",
+ "H=B/abs_per\n",
+ "mmf=H*l\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The magneto motive force(mmf) required is %.2f At.\" %(mmf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magneto motive force(mmf) required is 1492.08 At.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3,Page number: 168\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the reluctance of a mild-steel ring.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=200 #Number of turns in the coil\n",
+ "abs_per=(4*pi)*(1e-07) #Absolute permeability of free space \n",
+ "rel_per=380 #Relative permeability of mild-steel\n",
+ "l=400e-03 #Length(Circumference) of the mild-steel ring(in metres)\n",
+ "A=500e-06 #Cross-sectional area of the mild-steel ring(in square-metres)\n",
+ "flux=800e-06 #Flux in the ring(in Webers) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Rel=l/(abs_per*rel_per*A)\n",
+ "mmf=flux*Rel\n",
+ "I=mmf/N\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The reluctance of the ring is %6e A/Wb.\" %(Rel)\n",
+ "print \"(b)The magnetising current is %.2f A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The reluctance of the ring is 1.675315e+06 A/Wb.\n",
+ "(b)The magnetising current is 6.70 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.4,Page number: 171\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in the coil to produce a flux density of 0.9 T in the air gap.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "B=0.90 #Flux Density in the air gap(in Tesla) \n",
+ "N=4000 #Number of turns in the core\n",
+ "l_core=220e-03 #Length of the core(in metres)\n",
+ "A_core=50e-06 #Cross-sectional area of the core(in square-metres)\n",
+ "H_core=820 #Magnetic field intensity of the core(in Ampere per metre) \n",
+ "l_gap=1e-03 #Length of the air-gap(in metres)\n",
+ "A_gap=50e-06 #Cross-sectional area of the air gap(in square-metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "mmf_core=H_core*l_core\n",
+ "abs_per=(4*pi*(1e-07))\n",
+ "H_gap=B/abs_per\n",
+ "mmf_air_gap=H_gap*l_gap\n",
+ "Total_mmf=mmf_core+mmf_air_gap\n",
+ "I=Total_mmf/N\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The magnetisation current is %.5f A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magnetisation current is 0.22415 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5,Page number: 173"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the magnetising current required to produce a flux across the air gap.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "w=40e-03 #Width of the core(in metres)\n",
+ "d=50e-03 #Depth of the core(in metres)\n",
+ "lg=2.0e-03 #Length of the air gap(in metres)\n",
+ "Ag=2500e-06 #Area of the air gap(in square metres)\n",
+ "N=800 #Number of turns in the coil\n",
+ "flux=2.50e-03 #Flux across the air gap(in Webers)\n",
+ "lf=1.2 #Leakage Factor\n",
+ "abs_per=(4*pi)*(1e-07) #Absolute permeability of free space(Henry per metre) \n",
+ "lc=600e-03 #Length of the core(in metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Ac=w*d\n",
+ "Bg=flux/Ag\n",
+ "Hg=Bg/abs_per\n",
+ "mmf_g=Hg*lg\n",
+ "eff_Ac=0.92*Ac\n",
+ "flux_c=flux*lf\n",
+ "Bc=flux_c/eff_Ac\n",
+ "Hc=4000.0\n",
+ "mmf_c=Hc*lc\n",
+ "mmf=mmf_c+mmf_g\n",
+ "I=mmf/N\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The magnetising current required to produce a flux of 0.0025 Wb across the air gap is %.2f A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magnetising current required to produce a flux of 0.0025 Wb across the air gap is 4.99 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6,Page number: 174"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in the coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "lA=0.3 #Length of silicon steel material(in metres)\n",
+ "lB=0.2 #Length of low-carbon mild steel material(in metres)\n",
+ "lC=0.1 #Length of cast iron material(in metres)\n",
+ "N=100 #Number of turns in the exciting coil\n",
+ "A=0.001 #Cross-sectional area(in square-metres)\n",
+ "flux=600e-06 #Flux in the coil(in Webers)\n",
+ "abs_per=(4*pi)*(1e-07)#Absolute permeability of free space(in Henry per metre)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "B=flux/A\n",
+ "B_A=B\n",
+ "B_C=B\n",
+ "B_C=B\n",
+ "\"\"\"From magnetisation characteristics of ferromagnetic materials,\"\"\"\n",
+ "H_A=20.0\n",
+ "H_B=700.0\n",
+ "H_C=2500.0\n",
+ "\"\"\"According to Kirchoff's magnetomotive force law(KML),the total mmf required, tot_mmf= mmf_A+mmf_B+mmf_C.\"\"\"\n",
+ "tot_mmf=(H_A*lA)+(H_B*lB)+(H_C*lC)\n",
+ "I=tot_mmf/N\n",
+ "rel_A=B/(abs_per*H_A)\n",
+ "rel_B=B/(abs_per*H_B)\n",
+ "rel_C=B/(abs_per*H_C)\n",
+ "R_A=(H_A*lA)/flux\n",
+ "R_B=(H_B*lB)/flux\n",
+ "R_C=(H_C*lC)/flux\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The mmf for setting up a flux of 600 micro Weber is %.2f At.\" %(tot_mmf)\n",
+ "print \"(b)The current in the coil is %.2f A.\" %(I)\n",
+ "print \"(c)The relative permeability of:\\n Material A: %.2f\\n Material B: %.2f\\n Material C: %.2f.\\n\" %(rel_A,rel_B,rel_C)\n",
+ "print \" The reluctances are :\\n R_A=%.2f At/Wb \\n R_B=%.2f At/Wb \\n R_C=%.2f At/Wb.\" %(R_A,R_B,R_C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The mmf for setting up a flux of 600 micro Weber is 396.00 At.\n",
+ "(b)The current in the coil is 3.96 A.\n",
+ "(c)The relative permeability of:\n",
+ " Material A: 23873.24\n",
+ " Material B: 682.09\n",
+ " Material C: 190.99.\n",
+ "\n",
+ " The reluctances are :\n",
+ " R_A=10000.00 At/Wb \n",
+ " R_B=233333.33 At/Wb \n",
+ " R_C=416666.67 At/Wb.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.7,Page number: 175"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in the exciting coil.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=300 #Number of the turns in the exciting coil\n",
+ "flux=600e-06 #Flux in the air gap(in Webers)\n",
+ "lg=1e-03 #Length of the air gap(in metres)\n",
+ "lc=40e-02 #Mean length of the core(in metres)\n",
+ "A=4e-04 #Cross sectional area of the core(in square metres)\n",
+ "abs_per=(4*pi)*1e-07 #Absolute permeability of free space(in Henry per metre)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "B=flux/A\n",
+ "Hg=B/abs_per\n",
+ "mmf_g=Hg*lg\n",
+ "mmf_c=3000*lc\n",
+ "mmf=mmf_g+mmf_c\n",
+ "I=mmf/N\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current in the exciting coil to set up a flux of 600 micro Weber in the air gap is %.2f A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current in the exciting coil to set up a flux of 600 micro Weber in the air gap is 7.98 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.8,Page number: 175 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in the exciting coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "l1=10e-02 #Length of first side of the magnetic circuit(in metres)\n",
+ "l2=18e-02 #Length of second side of the magnetic circuit(in metres)\n",
+ "l3=18e-02 #Length of third side of the magnetic circuit(in metres)\n",
+ "A1=6.25e-04 #Cross sectional area of l1 path(in square-metre) \n",
+ "A2=3.00e-04 #Cross sectional area of l2 path(in square-metre)\n",
+ "A3=3.00e-04 #Cross sectional area of l3 path(in square-metre)\n",
+ "lg=2e-03 #Length of air gap(in metres)\n",
+ "rel_per=800.0 #Relative permeability of core material\n",
+ "N=600 #Number of turns\n",
+ "flux=100e-06 #Flux in the air gap(in Webers)\n",
+ "abs_per=(4*pi)*1e-07 #Absolute permeability of free space(in Farad per metre)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Bg=flux/A1\n",
+ "Hg=Bg/abs_per\n",
+ "mmf_g=Hg*lg\n",
+ "B1=Bg\n",
+ "H1=B1/(rel_per*abs_per)\n",
+ "mmf_1=H1*l1\n",
+ "flux2=flux/2.0\n",
+ "B2=flux2/A2\n",
+ "H2=B2/(rel_per*abs_per)\n",
+ "mmf_2=H2*l2\n",
+ "tot_mmf=mmf_g+mmf_1+mmf_2\n",
+ "I=tot_mmf/N\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current in the 600 turn exciting coil is %.3f A.\" %(I) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current in the 600 turn exciting coil is 0.501 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.9,Page number: 176 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of exciting current.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "A_B=0.01 #Area of cross section of limb B(in square metre)\n",
+ "A_C=0.02 #Area of cross section of limb C(in square metre)\n",
+ "l_B=1e-03 #Length of air gap in limb B(in metres)\n",
+ "l_C=2e-03 #Length of air gap in limb C(in metres)\n",
+ "flux_B=1.5e-03 #Flux in limb B(in Webers)\n",
+ "N=500 #Number of turns in the coil\n",
+ "abs_per=(4*pi)*(1e-07)#Absolute permeability of free space(in Henry per metre) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"The mmf across parallel paths must be same. \n",
+ " (R_B*flux_B)=(R_C*flux_C);\"\"\"\n",
+ "flux_C=flux_B*(l_B/l_C)*(A_C/A_B)\n",
+ "flux=flux_B+flux_C\n",
+ "R_B=l_B/(abs_per*A_B)\n",
+ "R_C=l_C/(abs_per*A_C)\n",
+ "R_net=1.0/((1.0/R_B)+(1.0/R_C))\n",
+ "I=(flux*R_net)/N\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The flux in limb A is %e Wb.\" %(flux)\n",
+ "print \"The current in the exciting coil is %e A.\" %(I) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The flux in limb A is 3.000000e-03 Wb.\n",
+ "The current in the exciting coil is 2.387324e-01 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.10,Page number: 177 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the ampere turns required to produce a flux.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "abs_per=(4*pi)*(1e-07) #Absolute permeability of free space(in Henry per metre)\n",
+ "D=21e-02 #Mean diameter of the ring(in metres)\n",
+ "A=10e-04 #Cross sectional area(in square metre)\n",
+ "flux=0.8e-03 #Flux to be produced(in Webers)\n",
+ "lg=0.4e-03 #Length of the air gap(in metres) \n",
+ "rel_i=166.0 #Relative permeability of iron\n",
+ "rel_s=800.0 #Relative permeability of steel\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "B=flux/A\n",
+ "li=(pi*D)/2.0\n",
+ "ls=(pi*D)/2.0\n",
+ "mmf_g=(B/abs_per)*lg\n",
+ "mmf_i=(B/(abs_per*rel_i))*li\n",
+ "mmf_s=(B/(abs_per*rel_s))*ls\n",
+ "mmf=mmf_g+mmf_i+mmf_s\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The total ampere turns required is %.2f At.\" %(mmf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total ampere turns required is 1782.21 At.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.11,Page number: 177 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the ampere turns of the coil wound on the central limb.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "flux=1e-03 #Flux in the central limb(in Webers)\n",
+ "Ac=8e-04 #Area of the central limb(in square metres)\n",
+ "As=5e-04 #Area of each side limb(in square metres)\n",
+ "l=0.15 #Length of the central limb(in metres)\n",
+ "lg=0.001 #Length of the air gap(in metres)\n",
+ "abs_per=(4*pi)*1e-07 #Absolute permeability of free space(in Henry per metre)\n",
+ "l1=0.34 #Length of the part ABCD(in metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "B=flux/Ac\n",
+ "\"\"\"Corresponding to this value of B, H is 500 At/m from the table.\"\"\"\n",
+ "mmf_DG=500*l\n",
+ "Hg=1.25/abs_per\n",
+ "mmf_g=Hg*lg\n",
+ "B1=(flux/2.0)/As\n",
+ "\"\"\"Corresponding to this value of B, H is 200 At/m from the table.\"\"\"\n",
+ "mmf_1=200*l1\n",
+ "mmf_tot=mmf_DG+mmf_g+mmf_1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The required ampere turns of the coil wound on the central limb is %.2f At.\" %(mmf_tot)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required ampere turns of the coil wound on the central limb is 1137.72 At.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter7.ipynb b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter7.ipynb
new file mode 100755
index 00000000..acf4ea53
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter7.ipynb
@@ -0,0 +1,975 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7: SELF AND MUTUAL INDUCTANCES"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.1,Page number: 184\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the emf induced in a coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=4 #Self inductance of the coil(in Henry) \n",
+ "di=4-10 #Change in current(in Amperes)\n",
+ "dt=0.1 #Time interval(in seconds)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "e=-L*(di/dt)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The emf induced in the coil is %.2f V.\" %(e)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The emf induced in the coil is 240.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2,Page number: 184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the inductance of a coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=150 #Number of turns in the coil \n",
+ "flux=0.01 #Flux linked with the coil(in Webers)\n",
+ "I=10 #Current in the coil(in Amperes) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L=(N*flux)/I\n",
+ "di=-10-(10)\n",
+ "dt=0.01\n",
+ "e=-L*(di/dt)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The inductance of the coil is %.2f H.\" %(L)\n",
+ "print \"The induced emf is %.2f V.\" %(e)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The inductance of the coil is 0.15 H.\n",
+ "The induced emf is 300.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3,Page number: 185"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the inductance of the coil and the emf induced.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=100 #Number of turns in the coil\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "dflux=-0.4-0.4\n",
+ "di=-10-10\n",
+ "L=N*(dflux/di)\n",
+ "dt=0.01\n",
+ "e=-(L*(di/dt))/1000\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The inductance of the coil is %.2f mH.\" %(L)\n",
+ "print \"The induced emf is %.2f V.\" %(e)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The inductance of the coil is 4.00 mH.\n",
+ "The induced emf is 8.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.4,Page number: 185"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the energy stored in an air-cored solenoid.\"\"\"\n",
+ "\n",
+ "from math import pi,pow\n",
+ "\n",
+ "\"\"\" All quantities expresssed in SI System.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "l=0.30 #Length of the solenoid(in metres) \n",
+ "d=0.015 #Internal diameter of the solenoid(in metres) \n",
+ "r=0.0075 #Internal radius of the solenoid(in metres)\n",
+ "N=900 #Number of turns in the coil \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "A=pi*pow(r,2)\n",
+ "L=(pow(N,2)*4*pi*A)/(0.30*10000000)\n",
+ "I=5\n",
+ "W=0.5*L*pow(I,2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The inductance of the air-cored solenoid is %.2f mH.\" %(L*1000)\n",
+ "print \"The amount of energy stored in the air-cored solenoid is %.2f mJ.\" %(W*1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The inductance of the air-cored solenoid is 0.60 mH.\n",
+ "The amount of energy stored in the air-cored solenoid is 7.49 mJ.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.5,Page number: 185"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the relative permeability of iron and the inductance of a coil.\"\"\"\n",
+ "\n",
+ "from math import pow,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "r=0.01 #Radius of circular ring(in metres)\n",
+ "A=pi*pow(r,2) #Area of circular ring(in square metres) \n",
+ "N=3000 #Number of turns in the coil \n",
+ "I=0.5 #Current in the coil(in Amperes)\n",
+ "l=20.0/100 #Length of the iron rod(in metres) \n",
+ "B=1.2 #Magnitude of magnetic field(in Tesla)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "H=(N*I)/l\n",
+ "per=B/H\n",
+ "rel_per=(per*10000000)/(4*pi)\n",
+ "L=(N*B*A)/I\n",
+ "dflux=(0.1-1)*A*B\n",
+ "dt=0.01\n",
+ "e=-N*(dflux/dt)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The permeability of iron is %e Tm/A.\" %(per)\n",
+ "print \"(b)The relative permeability of iron is %d.\" %(rel_per)\n",
+ "print \"(c)The inductance of the coil is %.2f H.\" %(L)\n",
+ "print \"(d)The voltage in the coil is %.2f V.\" %(e)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The permeability of iron is 1.600000e-04 Tm/A.\n",
+ "(b)The relative permeability of iron is 127.\n",
+ "(c)The inductance of the coil is 2.26 H.\n",
+ "(d)The voltage in the coil is 101.79 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.6,Page number: 186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the potential difference across the terminals of a coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=3 #Resistance of the coil(in Ohms)\n",
+ "i=1 #Current in the coil(in Amperes)\n",
+ "di=10000 #Change in current(in Amperes) \n",
+ "dt=1 #Time interval(in seconds)\n",
+ "L=0.1/1000 #Self inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V=(i*R)+(L*(di/dt))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The potential difference that exists across the terminals of the coil is %.2f V.\" %(V) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The potential difference that exists across the terminals of the coil is 4.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7,Page number: 188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mutual inductance and emf induced in a search coil.\"\"\"\n",
+ "\n",
+ "from math import pi,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N1=2000 #Number of turns in the solenoid \n",
+ "N2=500 #Number of turns in the search coil\n",
+ "l=0.70 #Length of the solenoid(in metres) \n",
+ "k=1 #Coefficient of coupling\n",
+ "A=30.0/10000 #Mean area of the search coil(in square metres)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "per=(4*pi)/10000000.0\n",
+ "M=(k*N1*N2*per*A)/l\n",
+ "di1=260.0\n",
+ "dt=1\n",
+ "e=M*(di1/dt)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The mutual inductance is %.4f mH.\" %(M*1000)\n",
+ "print \"(b)The emf induced in the search coil is %.2f V.\" %(e)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The mutual inductance is 5.3856 mH.\n",
+ "(b)The emf induced in the search coil is 1.40 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.8,Page number: 189"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mutual inductance and the coefficient of coupling between two coils.\"\"\"\n",
+ "\n",
+ "from math import pow,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N1=600.0 #Number of turns in the first coil\n",
+ "N2=1700.0 #Number of turns in the second coil \n",
+ "flux2=0.8/1000 #Magnetic flux produced in the second coil(in Webers) \n",
+ "I2=6 #Current in the second coil(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L2=(N2*flux2)/I2\n",
+ "L1=L2*pow((N1/N2),2)\n",
+ "flux21=0.5/1000\n",
+ "k=flux21/flux2\n",
+ "M=k*sqrt(L1*L2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"L1=%.4f H.\" %(L1)\n",
+ "print \"L2=%.4f H.\" %(L2)\n",
+ "print \"The coefficient of coupling(k)=%.4f.\" %(k) \n",
+ "print \"M=%.4f H.\" %(M)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "L1=0.0282 H.\n",
+ "L2=0.2267 H.\n",
+ "The coefficient of coupling(k)=0.6250.\n",
+ "M=0.0500 H.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.9,Page number: 189 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mutual inductance and the coefficient of coupling between two coils.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N1=1200.0 #Number of turns in the first coil \n",
+ "flux1=0.25/1000 #Magnetic flux produced in the first coil(in Webers) \n",
+ "I1=5 #Current in the first coil(in Amperes)\n",
+ "N2=800.0 #Number of turns in the second coil\n",
+ "flux2=0.15/1000 #Magnetic flux produced in the second coil(in Webers)\n",
+ "I2=5 #Current in the second coil(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L1=(N1*flux1)/I1\n",
+ "L2=(N2*flux2)/I2\n",
+ "k=0.6\n",
+ "flux12=k*flux1\n",
+ "M=(N2*flux12)/I1\n",
+ "k_new=M/sqrt(L1*L2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The mutual inductance(M) is %.4f H.\" %(M)\n",
+ "print \"The coefficient of coupling is %.4f.\" %(k_new)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mutual inductance(M) is 0.0240 H.\n",
+ "The coefficient of coupling is 0.6325.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.10,Page number: 192 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mutual inductance and the coefficient of coupling between two coils.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Lsa=1.4/1000 #Net inductance in series-aiding connections(in Henry) \n",
+ "Lso=0.6/1000 #Net inductance in series-opposing connections(in Henry) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "M=(Lsa-Lso)/4\n",
+ "\"\"\"Lsa=L1+L2+2M \n",
+ " L1+L2=1 mH; As the two coils are similar L1=L2=0.5mH \"\"\"\n",
+ "L1=0.5/1000\n",
+ "L2=0.5/1000\n",
+ "k=M/sqrt(L1*L2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The mutual inductance is %.2f mH.\" %(M*1000)\n",
+ "print \"The coefficient of coupling(k) is %.2f.\" %(k)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mutual inductance is 0.20 mH.\n",
+ "The coefficient of coupling(k) is 0.40.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.11,Page number: 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mutual inductance and the self-inductances of two coils. \"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "\"\"\" Equation 1 is L1+L2+(2*M)=1.8;\n",
+ " \n",
+ " Equation 2 is L1+L2-(2*M)=0.8. \"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "k=0.6 #Coefficient of coupling\n",
+ "eq1=1.8 #Net inductance when fluxes are in same direction(in Henry)\n",
+ "eq2=0.8 #Net inductance when fluxes are in opposite direction(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "M=(eq1-eq2)/4\n",
+ "sum=(eq1+eq2)/2\n",
+ "product=(M*M)/(k*k)\n",
+ "diff=sqrt((sum*sum)-(4*product))\n",
+ "L1=(sum+diff)/2\n",
+ "L2=(sum-diff)/2\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The mutual inductance of the two coils is %.3f H.\" %(M)\n",
+ "print \"The self inducatnce of the first coil is %.3f H and the self inductance of the second coil is %.3f H.\" %(L1,L2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mutual inductance of the two coils is 0.250 H.\n",
+ "The self inducatnce of the first coil is 1.149 H and the self inductance of the second coil is 0.151 H.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.12,Page number:195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the equivalent inductance of a combination of inductances connected in parallel.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "k=0.433 #Coefficient of coupling \n",
+ "L1=8 #Self-inductance of the first coil \n",
+ "L2=6 #Self-inductance of the second coil\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "M=k*sqrt(L1*L2)\n",
+ "Lpa=((L1*L2)-(M*M))/(L1+L2-(2*M))\n",
+ "Lpo=((L1*L2)-(M*M))/(L1+L2+(2*M))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The equivalent inductance such that the mutual induction assists the self induction is %.3f H.\" %(Lpa)\n",
+ "print \"(b)The equivalent inductance such that the mutual induction opposes the self induction is %.3f H.\" %(Lpo) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The equivalent inductance such that the mutual induction assists the self induction is 4.875 H.\n",
+ "(b)The equivalent inductance such that the mutual induction opposes the self induction is 1.950 H.\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.13,Page number: 196 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the number of turns in an air-cored coil.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "l=2.5e-02 #Length of the coil(in metres)\n",
+ "A=2e-04 #Average cross-sectional area of the coil(in square-metres)\n",
+ "L=400e-06 #Self-inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "abs_per=(4*pi)/(1e07)\n",
+ "N=sqrt((L*l)/(abs_per*A))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The number of turns in the air-cored coil is %d.\" %(round(N,0)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The number of turns in the air-cored coil is 199.\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.14,Page number: 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mutual inductance between two coils and their self inductances.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "k=0.75 #Coefficient of coupling between two coils\n",
+ "I1=3.0 #Current in the first coil(in Amperes)\n",
+ "N1=250.0 #Number of turns in the first coil\n",
+ "flux1=4e-03 #Flux produced in the first coil(in Webers)\n",
+ "V2=70.0 #Voltage induced in the second coil due to first coil(in Volts)\n",
+ "di1=3.0 #Change in current in the first coil(in Amperes)\n",
+ "dt=3e-03 #Time interval(in seconds)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L1=N1*(flux1/I1)\n",
+ "M=(V2*dt)/di1\n",
+ "L2=(M*M)/(k*k*L1)\n",
+ "N2=N1*sqrt(L2/L1)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"L1=%.4f H.\" %(L1)\n",
+ "print \"L2=%.4f H.\" %(L2)\n",
+ "print \"M=%.4f H.\" %(M)\n",
+ "print \"N2=%d.\" %(round(N2,0))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "L1=0.3333 H.\n",
+ "L2=0.0261 H.\n",
+ "M=0.0700 H.\n",
+ "N2=70.\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.15,Page number: 197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mean value of self inductance of a coil.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N=1000.0 #Number of turns in the coil\n",
+ "A=20e-04 #Cross-sectional area of the coil(in square-metre)\n",
+ "I1=4.0 #First current(in Amperes)\n",
+ "B1=1.0 #Flux density associated with the first current(in Weber per sqyare-metre) \n",
+ "I2=9.0 #Second current(in Amperes)\n",
+ "B2=1.4 #Flux density associated with the first current(in Weber per sqyare-metre)\n",
+ "dt=0.05 #Time interval(in seconds)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L1=(N*B1*A)/I1\n",
+ "L2=(N*B2*A)/I2\n",
+ "L=(L1+L2)/2.0\n",
+ "di=I2-I1\n",
+ "e=L*(di/dt)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The mean value of inductance between the given current limits is %.4f H.\" %(L)\n",
+ "print \"The emf induced in the coil is %.2f V.\" %(e)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mean value of inductance between the given current limits is 0.4056 H.\n",
+ "The emf induced in the coil is 40.56 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.16,Page number: 197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the mutual inductance between two coils and their respective self-inductances.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "N1=100.0 #Number of turns in the first coil\n",
+ "N2=150.0 #Number of turns in the second coil\n",
+ "A=125e-04 #Area of cross-section(in square-metres)\n",
+ "l=200e-02 #Mean length(in metres)\n",
+ "rel_per=2000.0 #Relative permeability of iron\n",
+ "k=1 #Coefficient of coupling\n",
+ "\n",
+ "\"\"\" NOTE: As the two coils are wound side by side,there is tight coupling. Therefore, k=1. \"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "abs_per=(4*pi)/(1e07)\n",
+ "L1=(N1*N1*rel_per*abs_per*A)/l\n",
+ "L2=(N2*N2*rel_per*abs_per*A)/l\n",
+ "M=k*sqrt(L1*L2)\n",
+ "di1=5.0\n",
+ "dt=0.02\n",
+ "e2=M*(di1/dt)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The self inductances of the tow coils are: L1=%.3f mH and L2=%.3f mH.\" %((L1*1000.0),(L2*1000.0))\n",
+ "print \"(b)The mutual inductance between the two coils is %.3f mH.\" %(M*1000.0)\n",
+ "print \"(c)The emf induced in the second coil is %.2f V.\" %(e2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The self inductances of the tow coils are: L1=157.080 mH and L2=353.429 mH.\n",
+ "(b)The mutual inductance between the two coils is 235.619 mH.\n",
+ "(c)The emf induced in the second coil is 58.90 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.17,Page number: 198"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the coeffcient of coupling and the self-inductance of two coils.\"\"\" \n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Lsa=4.0 #Equivalent inductance of series aiding(in Henry)\n",
+ "Lso=0.8 #Equivalent inductance of series opposing(in Henry)\n",
+ "\n",
+ "\"\"\" NOTE: Lsa=L+L+(2*M);\n",
+ " Lso=L+L-(2*M); \"\"\"\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L=(Lsa+Lso)/4.0\n",
+ "M=(Lsa-Lso)/4.0\n",
+ "k=M/sqrt(L*L)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The self inductance of each coil is %.2f H.\" %(L)\n",
+ "print \"The coefficient of coupling is %.3f.\" %(round(k,3))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The self inductance of each coil is 1.20 H.\n",
+ "The coefficient of coupling is 0.667.\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.18,Page number: 198"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the equivalent inductance of different combinations of two coils.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L1=200e-03 #Self-inductance of the first coil(in Henry) \n",
+ "L2=800e-03 #Self-inductance of the second coil(in Henry)\n",
+ "k=0.5 #Coefficient of coupling between two coils\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "M=k*sqrt(L1*L2)\n",
+ "Lsa=L1+L2+(2*M)\n",
+ "Lso=L1+L2-(2*M)\n",
+ "Lpa=((L1*L2)-(M*M))/Lso\n",
+ "Lpo=((L1*L2)-(M*M))/Lsa\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The equivalent inductance of series aiding is %.3f mH.\" %(Lsa*1000.0)\n",
+ "print \"(b)The equivalent inductance of series opposing is %.3f mH.\" %(Lso*1000.0)\n",
+ "print \"(c)The equivalent inductance of parallel aiding is %.3f mH.\" %(Lpa*1000.0)\n",
+ "print \"(d)The equivalent inductance of parallel opposing is %.3f mH.\" %(Lpo*1000.0)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The equivalent inductance of series aiding is 1400.000 mH.\n",
+ "(b)The equivalent inductance of series opposing is 600.000 mH.\n",
+ "(c)The equivalent inductance of parallel aiding is 200.000 mH.\n",
+ "(d)The equivalent inductance of parallel opposing is 85.714 mH.\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.19,Page number: 198"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the exciting current for a horse-shoe magnet.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "l=45e-02 #Length of the iron path(in metres)\n",
+ "A=6e-04 #Cross-sectional area of the wrought iron bar(in square-metres)\n",
+ "N=500.0 #Number of turns in exciting coil\n",
+ "load=60.0 #Load to be lifted(in kilograms)\n",
+ "rel_per=800.0 #Relative permeability of iron\n",
+ "g=9.8 #Accelaration due to gravity(in metre per square-seconds) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "abs_per=(4*pi)/(1e07)\n",
+ "F=(load/2.0)*g\n",
+ "B=sqrt((2*abs_per*F)/A)\n",
+ "H=B/(abs_per*rel_per)\n",
+ "At=H*l\n",
+ "I=At/(N*2)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The exciting current needed for the magnet is %.5f A.\" %(I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The exciting current needed for the magnet is 0.49674 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter8.ipynb b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter8.ipynb
new file mode 100755
index 00000000..b22550d5
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter8.ipynb
@@ -0,0 +1,1188 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8: DC TRANSIENTS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.1,Page number: 207 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current i(0+)=I0.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=24 #Supply voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Req=20+(1.0/((1.0/20)+(1.0/10)))\n",
+ "I=V/Req\n",
+ "I_L=I*(20.0/(20+10))\n",
+ "Io=I_L\n",
+ "i_0_plus=Io\n",
+ "R=20\n",
+ "v_R=(-Io)*R\n",
+ "R1=(20+10)\n",
+ "v_L=Io*R1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current i(0+)=Io=%.2f A.\" %(i_0_plus)\n",
+ "print \"(b)The magnitude of v_R across the 20 Ohms resistor at the instant just after the switch is opened is %.2f V.\" %(v_R)\n",
+ "print \"(c)The magnitude of v_L across the inductor immediately after the switch is opened is %.2f V.\" %(v_L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current i(0+)=Io=0.60 A.\n",
+ "(b)The magnitude of v_R across the 20 Ohms resistor at the instant just after the switch is opened is -12.00 V.\n",
+ "(c)The magnitude of v_L across the inductor immediately after the switch is opened is 18.00 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.2,Page number: 208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding i(0),the power being absorbed by the inductor at t=1 s.\"\"\"\n",
+ "\n",
+ "from math import e,pow,sqrt,log\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=1.6 #Self-inductance of the inductor(in Henry)\n",
+ "R=0.8 #Resistance of the resistor(in Ohms)\n",
+ "t=-1.0 #Instant of time(in seconds) \n",
+ "i_minus_1=20.0 #Current at t=1 seconds(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "time_const=L/R\n",
+ "Io=i_minus_1/pow(e,(-t/time_const))\n",
+ "t=1\n",
+ "i_t=Io*pow(e,(-t/time_const))\n",
+ "p_t=i_t*i_t*R\n",
+ "W=100.0\n",
+ "i_t1=sqrt((2*W)/L)\n",
+ "t=-(log(i_t1/Io))*time_const\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)i(0) = %.3f A.\" %(Io)\n",
+ "print \"(b)The power absorbed by the resistor is %.2f W. \" %(p_t) \n",
+ "print \" The inductor by virtue of the emf induced in it,supplies this power to the resistor.\"\n",
+ "print \" Therefore,the power absorbed by the inductor is %.2f W.\" %(-p_t)\n",
+ "print \"(c)The time at which the energy stored in the inductor is 100J is %.5f seconds.\" %(t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)i(0) = 12.131 A.\n",
+ "(b)The power absorbed by the resistor is 43.31 W. \n",
+ " The inductor by virtue of the emf induced in it,supplies this power to the resistor.\n",
+ " Therefore,the power absorbed by the inductor is -43.31 W.\n",
+ "(c)The time at which the energy stored in the inductor is 100J is 0.16315 seconds.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3,Page number: 210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of current in the circuit at an instant 0.4 s after the switch has been closed.\"\"\"\n",
+ "\n",
+ "from math import e,pow,log\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=14.0 #Self-inductance of the inductor(in Henry)\n",
+ "R=10.0 #Resistance of the resistor(in Ohms)\n",
+ "V=140.0 #Supply Voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "time_const=L/R\n",
+ "t=0.4\n",
+ "Io=V/R\n",
+ "i=Io*(1-pow(e,(-t/time_const)))\n",
+ "i_t=8\n",
+ "t=-time_const*log(i_t/Io)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The value of current in the circuit at an instant 0.4 s after the switch has been closed is %.3f A.\" %(i)\n",
+ "print \"(b)The time taken for the current to drop to 8 A after the switch is opened is %.4f seconds.\" %(t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The value of current in the circuit at an instant 0.4 s after the switch has been closed is 3.479 A.\n",
+ "(b)The time taken for the current to drop to 8 A after the switch is opened is 0.7835 seconds.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4,Page number: 210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the magnitude of the inductor current at t=0- and at t=0+.\"\"\"\n",
+ "\n",
+ "from math import pow,e\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=40e-03 #Self-inductance of the inductor(in Henry)\n",
+ "R=80.0 #Resistance of the resistor(in Ohm) \n",
+ "V1=20.0 #Supply voltage-1(in Volts) \n",
+ "V2=40.0 #Supply voltage-2(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "time_const=L/R\n",
+ "I_01=V1/R\n",
+ "i_0_minus=I_01\n",
+ "i_0_plus=I_01\n",
+ "I_02=(V1+V2)/R\n",
+ "t=1e-03\n",
+ "i_t=I_01+(I_02-I_01)*(1-pow(e,(-t/time_const)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The magnitude of inductor current at t=0- is %.2f A.\" %(i_0_minus)\n",
+ "print \"(b)The magnitude of inductor current at t=0+ is %.2f A.\" %(i_0_plus)\n",
+ "print \"(c)As t tends to infinity,the current approaches its final steady-state value given as %.2f A.\" %(I_02)\n",
+ "print \"(d)The magnitude of inductor current at t=1 ms is %.3f A.\" %(i_t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The magnitude of inductor current at t=0- is 0.25 A.\n",
+ "(b)The magnitude of inductor current at t=0+ is 0.25 A.\n",
+ "(c)As t tends to infinity,the current approaches its final steady-state value given as 0.75 A.\n",
+ "(d)The magnitude of inductor current at t=1 ms is 0.682 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.5,Page number: 211"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding i_L(0-),i2(0-),i_L(0+),i_L(20 ms) and i_2(20 ms).\"\"\"\n",
+ "\n",
+ "from math import e,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=20.0 #Source Voltage(in Volts)\n",
+ "R1=20.0 #Resistance of resistor-1(in Ohms)\n",
+ "R2=40.0 #Resistance of resistor-2(in Ohms)\n",
+ "R3=30.0 #Resistance of resistor-3(in Ohms)\n",
+ "R4=25.0 #Resistance of resistor-4(in Ohms)\n",
+ "R5=5.0 #Resistance of resistor-5(in Ohms)\n",
+ "L=2.0 #Self-inductance of inductor(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Io=V/(R4+R5)\n",
+ "i_L_0_minus=Io\n",
+ "i_2_0_minus=V/R3\n",
+ "i_L_0_plus=Io\n",
+ "R_45=R4+R5\n",
+ "R_12=R1+R2\n",
+ "Req=R_45+(1/((1/R_12)+(1/R3)))\n",
+ "time_const=L/Req\n",
+ "t=20e-03\n",
+ "i_L_t=Io*pow(e,(-t/time_const))\n",
+ "i_2_t=-i_L_t*(R_12/(R_12+R3))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)i_L(0-) = %.3f A.\" %(i_L_0_minus)\n",
+ "print \"(b)i_2(0-) = %.3f A.\" %(i_2_0_minus)\n",
+ "print \"(c)i_L(0+) = %.3f A.\" %(i_L_0_plus)\n",
+ "print \"(d)i_L(20 ms) = %.3f A.\" %(i_L_t)\n",
+ "print \"(e)i_2(20 ms) = %.3f A.\" %(i_2_t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)i_L(0-) = 0.667 A.\n",
+ "(b)i_2(0-) = 0.667 A.\n",
+ "(c)i_L(0+) = 0.667 A.\n",
+ "(d)i_L(20 ms) = 0.404 A.\n",
+ "(e)i_2(20 ms) = -0.270 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.6,Page number: 215"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding v(0+),i(0+) and time constant.\"\"\"\n",
+ "\n",
+ "from math import e,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=1.5e03 #Resistance of the resistor(in Ohms) \n",
+ "C=5e-06 #Capacitance of the capacitor(in Farad)\n",
+ "Vo=3.0 #Source Voltage(in Volts)\n",
+ "v_0_plus=0 #Voltage across capacitor at t=0+(in Volts) \n",
+ "v_0_minus=0 #Voltage across capacitor at t=0-(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Io=Vo/R\n",
+ "i_0_plus=Io\n",
+ "time_const=R*C\n",
+ "t=15e-03\n",
+ "v=Vo*(1-pow(e,(-t/time_const))) \n",
+ "i=Io*pow(e,(-t/time_const))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)Since the voltage across a capacitor cannot change instantaneously, we have, v(0+)=%d V.\" %(v_0_plus)\n",
+ "print \"(b)i(0+)= %.3f mA.\" %(i_0_plus*1000)\n",
+ "print \"(c)The time constant is %.2f ms.\" %(time_const*1000)\n",
+ "print \"(d)At t=15 ms, \\n v=%.5f V. \\n i=%.4f mA.\" %(v,(i*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)Since the voltage across a capacitor cannot change instantaneously, we have, v(0+)=0 V.\n",
+ "(b)i(0+)= 2.000 mA.\n",
+ "(c)The time constant is 7.50 ms.\n",
+ "(d)At t=15 ms, \n",
+ " v=2.59399 V. \n",
+ " i=0.2707 mA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.7,Page number: 216\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding v(0+),i(0+) and time constant.\"\"\"\n",
+ "\n",
+ "from math import e,pow\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=100 #Resistance of the resistor(in Ohms)\n",
+ "C=5e-06 #Capacitance of the capacitor(in Farads) \n",
+ "Vo=3.0 #Source Voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "v_0_plus=Vo\n",
+ "v_0_minus=Vo\n",
+ "Io=Vo/R\n",
+ "i_0_plus=-Io\n",
+ "time_const=R*C\n",
+ "t=1.2e-03\n",
+ "v=Vo*pow(e,(-t/time_const)) \n",
+ "i=-Io*pow(e,(-t/time_const))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)Since the voltage across a capacitor cannot change instantaneously, we have, v(0+)=%d V.\" %(v_0_plus)\n",
+ "print \"(b)At t=0+, the capacitor behaves as a voltage source of emf Vo. Hence, i(0+)= -Io = %.3f mA.\" %(i_0_plus*1000)\n",
+ "print \"(c) The time constant is %.2f ms.\" %(time_const*1000)\n",
+ "print \"(d)At t=1.2 ms, \\n v=%.5f V. \\n i=%.4f mA.\" %(v,(i*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)Since the voltage across a capacitor cannot change instantaneously, we have, v(0+)=3 V.\n",
+ "(b)At t=0+, the capacitor behaves as a voltage source of emf Vo. Hence, i(0+)= -Io = -30.000 mA.\n",
+ "(c) The time constant is 0.50 ms.\n",
+ "(d)At t=1.2 ms, \n",
+ " v=0.27215 V. \n",
+ " i=-2.7215 mA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.8,Page number: 218"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current i(t) for t>0 seconds.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\" R_Th=(1+10)kilo ohm || (1 kiloohm) \"\"\" #Thevenin's Equivalent Resistance(in Ohms) \n",
+ "\n",
+ "print(\"Note: All currents expressed in mA \\n\")\n",
+ "R_Th=1.0/((1.0/11000)+(1.0/1000))\n",
+ "C=10e-06\n",
+ "time_const=R_Th*C\n",
+ "v_C_0_minus=30.0*((1e03)/((1e03)+(1e03)))\n",
+ "\n",
+ "\"\"\" Applying KVL, 30-(i_0_plus*(1 kilo ohm))-15=0 \"\"\"\n",
+ "\n",
+ "i_0_plus=(30-15)/1.0\n",
+ "i_infinity=30.0/(1+1+10)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"i(t)= (%.1f + (%.1f-%.1f)*(e to the power -t/%.2f ms)) mA.\" %(i_infinity,i_0_plus,i_infinity,(time_const*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Note: All currents expressed in mA \n",
+ "\n",
+ "i(t)= (2.5 + (15.0-2.5)*(e to the power -t/9.17 ms)) mA.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.9,Page number: 220"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current at t=1 seconds.\"\"\"\n",
+ "\n",
+ "from math import exp,log\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=3.0 #Resistance of the coil(in Ohms)\n",
+ "time_const=1.8 #Time constant of the coil(in seconds)\n",
+ "V=10.0 #Supply voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "L=time_const*R\n",
+ "i_0_plus=0\n",
+ "I0=V/R\n",
+ "i=I0*(1-exp((-1/time_const)))\n",
+ "t=(log(0.5,e))*(-1.8)\n",
+ "growth=V/L\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current at t=1 seconds is given as %.2f A.\" %(i)\n",
+ "print \"(b)The time at which current attains half of its final value is %.2f seconds.\" %(t)\n",
+ "print \"(c)The initial rate of growth of current is %.2f A/s.\" %(growth)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current at t=1 seconds is given as 1.42 A.\n",
+ "(b)The time at which current attains half of its final value is 1.25 seconds.\n",
+ "(c)The initial rate of growth of current is 1.85 A/s.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.10,Page number: 220"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the value of current during a sudden change.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"If I0 is the final steady-state value of current,at t=1 s, we have\n",
+ " \n",
+ " i=Io*(1-exp(-1/time_const)) or (0.741*Io)=Io*(1-exp(-1/time_const));\n",
+ " \n",
+ " exp(-1/time_const)=0.259;\n",
+ " \n",
+ " During the decay of current,we have i(t)=Io*exp(-1/time_const); \n",
+ " \n",
+ " Therefore, at t=1s, we have\n",
+ " \n",
+ " i1=0.259*Io.\n",
+ " \n",
+ " Therefore the value of current in the circuit is 0.259 times the steady state value.\"\"\"\n",
+ "k=1-0.741\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of current in the circuit is %.3f times the steady state value.\" %(k)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of current in the circuit is 0.259 times the steady state value.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.11,Page number: 220"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in the circuit at t=0.6 s.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=120.0 #Supply dc voltage(in Volts)\n",
+ "R=20.0 #Resistance of the resistor(in Ohms)\n",
+ "L=8.0 #Inductance of the inductor(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "time_const=L/R\n",
+ "Io=V/R\n",
+ "i=Io*(1-exp(-0.6/time_const))\n",
+ "\"\"\"The voltage drop across R,v_R=i*r=Io*(1-exp(-t/time_const))*R;\n",
+ " The voltage drop across L,v_L=L*(di/dt)=((L*Io)/time_const)*exp(-t/time_const); \n",
+ " \n",
+ " We are to find the time at which these two voltage-drops are same. \"\"\"\n",
+ "t=-time_const*log(0.5,e)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current in the circuit at t=0.6 s is %.2f A.\" %(i)\n",
+ "print \"(b)The time at which the voltage drops across R and L are same is %.3f s.\" %(t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current in the circuit at t=0.6 s is 4.66 A.\n",
+ "(b)The time at which the voltage drops across R and L are same is 0.277 s.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.12,Page number: 221"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the energy stored in the magnetic field.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=30.0 #Supply dc voltage(in Volts)\n",
+ "R=12.0 #Resistance of the resistor(in Ohms)\n",
+ "L=18.0 #Inductance of the inductor(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "time_const=L/R\n",
+ "rate_curr=V/L\n",
+ "Io=V/R\n",
+ "i1=(V/R)*(1-exp(-3.0/time_const))\n",
+ "W1=0.5*i1*i1*L\n",
+ "Wlost=(0.5*L*Io*Io)-W1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The time constant is %.2f seconds.\" %(time_const)\n",
+ "print \"(b)The initial rate of change of current is %.3f A/s.\" %(rate_curr)\n",
+ "print \"(c)The current at t=3 s is %.2f A.\" %(i1)\n",
+ "print \"(d)The energy stored in the magnetic field at t=3 s is %.3f J.\" %(W1)\n",
+ "print \"(e)The energy lost as heat till t=3 s is %.3f J.\" %(Wlost)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The time constant is 1.50 seconds.\n",
+ "(b)The initial rate of change of current is 1.667 A/s.\n",
+ "(c)The current at t=3 s is 2.16 A.\n",
+ "(d)The energy stored in the magnetic field at t=3 s is 42.055 J.\n",
+ "(e)The energy lost as heat till t=3 s is 14.195 J.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.13,Page number: 221"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage and current at different time instants.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R1=200.0 #Resistance of resistor 1(in Ohms)\n",
+ "L=5e-03 #Inductance of the coil(in Henry)\n",
+ "R2=17.0 #Resistance of resistor 2(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "i_0_plus=20e-03\n",
+ "v_0_plus=i_0_plus*R2\n",
+ "time_const=L/R1\n",
+ "v_L_0_plus=(L*i_0_plus)/time_const\n",
+ "t=20e-06 \n",
+ "i_20=i_0_plus*exp(-t/time_const)\n",
+ "v_20=v_0_plus\n",
+ "t=50e-06\n",
+ "i_50=i_0_plus*exp(-t/time_const)\n",
+ "v_50=v_0_plus\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The value of i(0+)=%e A.\" %(i_0_plus) \n",
+ "print \"(b)The value of v(0+)=%.3f V.\" %(v_0_plus)\n",
+ "print \"(c)The value of v_L(0+)=%.3f V.\" %(v_L_0_plus)\n",
+ "print \"(d)The value of i at t=20 micro seconds is %e A and v=%.3f V.\" %(i_20,v_20)\n",
+ "print \"(d)The value of i at t=50 micro seconds is %e A and v=%.3f V.\" %(i_50,v_50)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The value of i(0+)=2.000000e-02 A.\n",
+ "(b)The value of v(0+)=0.340 V.\n",
+ "(c)The value of v_L(0+)=4.000 V.\n",
+ "(d)The value of i at t=20 micro seconds is 8.986579e-03 A and v=0.340 V.\n",
+ "(d)The value of i at t=50 micro seconds is 2.706706e-03 A and v=0.340 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.14,Page number: 222"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the currents at t=5 mill seconds.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=0.8 #Self Inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "i_L_0_minus=(120e-03)*(200.0/(200.0+40.0))\n",
+ "Req=40+(1.0/((1.0/800.0)+(1.0/200.0)))\n",
+ "time_const=L/Req\n",
+ "t=5e-03 \n",
+ "i_L=i_L_0_minus*exp(-t/time_const)\n",
+ "i_x=-i_L*(800.0/(800.0+200.0))\n",
+ "i_y=(120e-03)+(-i_L*(200.0/(200.0+800.0)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"At t=5 milli seconds,\" \n",
+ "print \"(a)The current i_L=%e A.\" %(i_L)\n",
+ "print \"(b)The current i_x=%e A.\" %(i_x)\n",
+ "print \"(c)The current i_y=%e A.\" %(i_y)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "At t=5 milli seconds,\n",
+ "(a)The current i_L=2.865048e-02 A.\n",
+ "(b)The current i_x=-2.292038e-02 A.\n",
+ "(c)The current i_y=1.142699e-01 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.15,Page number: 223 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current through an inductor at the time of switching.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=4.0 #Self inductance of inductor(in Henry)\n",
+ "R=10.0 #Resistance of resistor parallel to the inductor(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"By superposition theorem, I_L_0=I_L_1+I_L_2; \"\"\"\n",
+ "I_L1=12.0/4.0\n",
+ "I_L2=2.0\n",
+ "I_L0=I_L1+I_L2\n",
+ "i_L_0_plus=I_L0\n",
+ "w_L_0_plus=0.5*L*I_L0*I_L0\n",
+ "time_const=L/R\n",
+ "t=1.0\n",
+ "i_L=I_L0*exp(-t/time_const)\n",
+ "v_10=-i_L*R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current i_L(0+)=%.2f A. The energy stored in the inductor is w_L(0+)=%.2f J.\" %(i_L_0_plus,w_L_0_plus)\n",
+ "print \"(b)At t=1 second, the current in the inductance is %.2f A and the voltage v_10=%.2f V.\" %(i_L,v_10) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current i_L(0+)=5.00 A. The energy stored in the inductor is w_L(0+)=50.00 J.\n",
+ "(b)At t=1 second, the current in the inductance is 0.41 A and the voltage v_10=-4.10 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.16,Page number: 223 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the energy stored in the inductor.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=5e-03 #Self inductance of inductor(in Henry)\n",
+ "R=200.0 #Resistance of resistor(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_L0=5e-03\n",
+ "time_const=L/R\n",
+ "t=20e-06\n",
+ "i_L=I_L0*exp(-t/time_const)\n",
+ "w=0.5*L*i_L*i_L\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The energy stored in the inductor after 20 micro seconds of throwing the switch is %e J.\" %(w)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The energy stored in the inductor after 20 micro seconds of throwing the switch is 1.261853e-08 J.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.17,Page number: 224 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current in the circuit.\"\"\"\n",
+ "\n",
+ "#Variable DEclaration:\n",
+ "L=8.0 #Self inductance of the coil(in Henry)\n",
+ "R=20.0 #Resistance of resistor(in Ohms)\n",
+ "V=120.0 #Voltage of the supply(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Io=V/R\n",
+ "time_const=L/R\n",
+ "t=0.6\n",
+ "i_t=Io*(1-exp(-t/time_const))\n",
+ "\"\"\" The voltage of R at any time is given as v_R(t)=6*(1-exp(-t/0.4))*20=120*(1-exp(-t/0.4));\n",
+ "\n",
+ " The voltage across L at any time is v_L(t)=L*(di/dt)=120*exp(-t/0.4);\n",
+ " \n",
+ " Applying v_L(t)=v_R(t), \"\"\"\n",
+ "t=-log(120.0/240.0)*0.4\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The current in the circuit at t=0.6 seconds is %.2f A.\" %(i_t)\n",
+ "print \"(b)The time at which the voltage drops across R and L are same is %.4f seconds.\"%(t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The current in the circuit at t=0.6 seconds is 4.66 A.\n",
+ "(b)The time at which the voltage drops across R and L are same is 0.2773 seconds.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.18,Page number: 224 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current i_x in the circuit at different time instants.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=25e-03 #Self inductance of the coil(in Henry)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_L0=(10e-03)*(80.0/(80.0+20.0))\n",
+ "i_x_minus_2=I_L0\n",
+ "i_x_0_minus=I_L0\n",
+ "i_x_0_plus=I_L0*(30.0/(30.0+20.0))\n",
+ "Req=1.0/((1.0/20.0)+(1.0/30.0))\n",
+ "time_const=L/Req\n",
+ "t=2e-03\n",
+ "i_L_2=I_L0*exp(-t/time_const)\n",
+ "i_x_2=i_L_2*(30.0/(30.0+20.0))\n",
+ "t=4e-03\n",
+ "i_L_4=I_L0*exp(-t/time_const)\n",
+ "i_x_4=i_L_4*(30.0/(30.0+20.0))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The current i_x:\" \n",
+ "print \"At t=-2 ms, i_x=%e A.\" %(i_x_minus_2) \n",
+ "print \"At t=0- ms, i_x=%e A.\" %(i_x_0_minus)\n",
+ "print \"At t=0+ ms, i_x=%e A.\" %(i_x_0_plus)\n",
+ "print \"At t=2 ms, i_x=%e A.\" %(i_x_2)\n",
+ "print \"At t=4 ms, i_x=%e A.\" %(i_x_4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current i_x:\n",
+ "At t=-2 ms, i_x=8.000000e-03 A.\n",
+ "At t=0- ms, i_x=8.000000e-03 A.\n",
+ "At t=0+ ms, i_x=4.800000e-03 A.\n",
+ "At t=2 ms, i_x=1.837886e-03 A.\n",
+ "At t=4 ms, i_x=7.037134e-04 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.19,Page number: 225 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the current and voltage at the time of switching.\"\"\"\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "V=1.5 #Voltage of the supply(in Volts)\n",
+ "R1=5e-03 #Resistance of resistor 1(in Ohms) \n",
+ "R2=1.5e03 #Resistance of resistor 2(in Ohms)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Before the switch is thrown from a to b,the capacitor is fully charged to supply voltage.\n",
+ "\n",
+ " When switching takes place,the capacitor starts discharging through the 5 milli Ohms resistance.\"\"\" \n",
+ "V0=V\n",
+ "v_0_plus=V0\n",
+ "i_0_plus=V0/R1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The voltage v(0+)=%.2f V and the current i(0+)=%.2f A.\" %(v_0_plus,i_0_plus)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage v(0+)=1.50 V and the current i(0+)=300.00 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.20,Page number: 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage and current at different time intervals.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "C=5e-06 #Capacitance of the capacitor(in Farads)\n",
+ "V=6.0 #Voltage of the supply(in Volts) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "v_0_minus=6.0*((3.0+2.0)/(3.0+2.0+1.0))\n",
+ "R=(1e03+3e03+2e03)\n",
+ "i_0_minus=V/R\n",
+ "v_0_plus=v_0_minus\n",
+ "Vo=v_0_plus\n",
+ "Req=(5e03+3e03+2e03)\n",
+ "time_const=Req*C\n",
+ "i_0_plus=v_0_plus/Req\n",
+ "Io=i_0_plus\n",
+ "t=0.05\n",
+ "v_t1=Vo*exp(-t/time_const)\n",
+ "i_t1=Io*exp(-t/time_const)\n",
+ "t=0.10\n",
+ "v_t2=Vo*exp(-t/time_const)\n",
+ "i_t2=Io*exp(-t/time_const)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The values of v(t) and i(t) are: \"\n",
+ "print \"At t=0- s, v(t)=%.3f V and i(t)=%e A.\" %(v_0_minus,i_0_minus)\n",
+ "print \"At t=0+ s, v(t)=%.3f V and i(t)=%e A.\" %(v_0_plus,i_0_plus)\n",
+ "print \"At t=0.05 s, v(t)=%.3f V and i(t)=%e A.\" %(v_t1,i_t1)\n",
+ "print \"At t=0.10 s, v(t)=%.3f V and i(t)=%e A.\" %(v_t2,i_t2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The values of v(t) and i(t) are: \n",
+ "At t=0- s, v(t)=5.000 V and i(t)=1.000000e-03 A.\n",
+ "At t=0+ s, v(t)=5.000 V and i(t)=5.000000e-04 A.\n",
+ "At t=0.05 s, v(t)=1.839 V and i(t)=1.839397e-04 A.\n",
+ "At t=0.10 s, v(t)=0.677 V and i(t)=6.766764e-05 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.21,Page number: 227"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltage and current at the time of switching.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "\"\"\"Using current divider rule, the current through branch AB is determined.\"\"\" \n",
+ "I_AB=10e-03*(1000.0/(1000.0+(800.0+200.0)))\n",
+ "v_0_minus=I_AB*800.0\n",
+ "V_AB=v_0_minus\n",
+ "v_0_plus=V_AB\n",
+ "i_C_0_plus=V_AB/(1.0/((1.0/200.0)+(1.0/800.0)))\n",
+ "i_0_plus=i_C_0_plus*(800.0/(800.0+200.0))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of v(0+)=%.2f V and the current i(0+)=%e A.\" %(v_0_plus,i_0_plus)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of v(0+)=4.00 V and the current i(0+)=2.000000e-02 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.22,Page number: 227"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the voltages across resistor,capacitor and switch.\"\"\"\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V=12.0 #Voltage of the supply(in Volts)\n",
+ "C=50e-03 #Capacitance of the capacitor(in Farads)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "v_C_0_minus=12.0*(20.0/(20.0+4.0))\n",
+ "v_C_0_plus=v_C_0_minus\n",
+ "Vo=v_C_0_plus\n",
+ "Req=5.0+20.0\n",
+ "time_const=Req*C\n",
+ "t=1.0\n",
+ "v_C1=Vo*exp(-t/time_const)\n",
+ "v_R1=v_C1*(20.0/(20.0+5.0))\n",
+ "v_SW1=V-V_R1\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The value of v_C at t=1 second is %.3f V.\" %(v_C1) \n",
+ "print \"The value of v_R at t=1 second is %.3f V.\" %(v_R1)\n",
+ "print \"The value of v_SW at t=1 second is %.3f V.\" %(v_SW1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of v_C at t=1 second is 4.493 V.\n",
+ "The value of v_R at t=1 second is 3.595 V.\n",
+ "The value of v_SW at t=1 second is 8.405 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter9.ipynb b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter9.ipynb
new file mode 100755
index 00000000..299b89e3
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/Chapter9.ipynb
@@ -0,0 +1,1092 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9:ALTERNATING CURRENT AND VOLTAGE"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.1,Page number: 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the angle at which the instantaneous value of voltage is 10 V.\"\"\"\n",
+ "\n",
+ "from math import asin,degrees\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vm=20.0 #Peak value of sinusoidal voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "v=10.0 #Instantaneous Voltage(in Volts)\n",
+ "angle=degrees(asin(v/Vm))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The angle at which the instantaneous value of voltage is 10V is %.2f degrees.\" %(angle)\n",
+ "print \"(b)The maximum value of voltage is Vm=20 V.This occurs twice in one cycle at angles 90 degrees and 270 degrees.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The angle at which the instantaneous value of voltage is 10V is 30.00 degrees.\n",
+ "(b)The maximum value of voltage is Vm=20 V.This occurs twice in one cycle at angles 90 degrees and 270 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.2,Page number: 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the time represented by a 60 degrees phase angle.\"\"\"\n",
+ "\n",
+ "from math import pi,sin,radians\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "ang_freq=2000.0 #Angular Frequency(in radians per second)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "f=ang_freq/(2*pi)\n",
+ "T=1/f\n",
+ "t=160e-06\n",
+ "v=0.04*sin((2000*t)+radians(60))\n",
+ "t_60=(60.0/360)*T\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The frequency is %.2f Hz.\" %(f)\n",
+ "print \"(b)The angular frequency is %.2f rad/sec.\" %(ang_freq)\n",
+ "print \"(c)The instantaneous voltage when t=60 micro seconds, is %e V.\" %(v)\n",
+ "print \"(d)The time represented by 60 degrees phase angle is %e seconds.\" %(t_60)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The frequency is 318.31 Hz.\n",
+ "(b)The angular frequency is 2000.00 rad/sec.\n",
+ "(c)The instantaneous voltage when t=60 micro seconds, is 3.917381e-02 V.\n",
+ "(d)The time represented by 60 degrees phase angle is 5.235988e-04 seconds.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.3,Page number: 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the equation for the instantaneous value of a sinusoidal voltage.\"\"\"\n",
+ "\n",
+ "from math import pi,sin,radians,degrees,asin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "V_peak_to_peak=20.0 #Peak-to-peak Voltage(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "V_m=V_peak_to_peak/2\n",
+ "T=10.0e-03\n",
+ "f=1/T\n",
+ "ang_freq=2*pi*f\n",
+ "phi=180-degrees(asin(3.6/V_m))\n",
+ "t=12e-03\n",
+ "v_12=V_m*sin((ang_freq*t)-radians(phi))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The equation of the given sinusoidal voltage is v(t)=%.2f sin(%.2ft+%.2f) V.\" %(V_m,ang_freq,phi)\n",
+ "print \"(b)The value of voltage at 12ms would be %.3f V.\" %(v_12)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The equation of the given sinusoidal voltage is v(t)=10.00 sin(628.32t+158.90) V.\n",
+ "(b)The value of voltage at 12ms would be -9.985 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.4,Page number: 238"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the equation for the instantaneous value of an alternating current.\"\"\"\n",
+ "\n",
+ "from math import pi,sin,asin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "f=60.0 #Frequency of alternating current(in Hertz)\n",
+ "i_m=12.0 #Peak value of the alternating current(in Amperes) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "ang_freq=2*pi*f\n",
+ "t1=1.0/360\n",
+ "i_t1=i_m*sin(ang_freq*t1)\n",
+ "i2=9.6\n",
+ "t2=(asin(9.6/12))/ang_freq\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The equation for the instantaneous value of alternating current is i= %d sin(%.2ft) A.\" %(i_m,ang_freq)\n",
+ "print \"(b)The value of current at t=1/360 second is %.2f A.\" %(i_t1)\n",
+ "print \"(c)The time taken to reach 9.6A for the first time is %e seconds.\" %(t2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The equation for the instantaneous value of alternating current is i= 12 sin(376.99t) A.\n",
+ "(b)The value of current at t=1/360 second is 10.39 A.\n",
+ "(c)The time taken to reach 9.6A for the first time is 2.459727e-03 seconds.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.5,Page number: 244"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the phase difference between two sinusoidal currents.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Calculations:\n",
+ "ang_freq=100.0*pi\n",
+ "f=ang_freq/(2.0*pi)\n",
+ "T=1/f\n",
+ "t=(30.0/360.0)*T\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The phase difference in terms of time is %e seconds.\" %(t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The phase difference in terms of time is 1.666667e-03 seconds.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.6,Page number: 248 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the power consumed by a resistor.\"\"\"\n",
+ "\n",
+ "from cmath import phase\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "R=10 #Resistance of resistance(in Ohms) \n",
+ "I=4+ 1j*3 #Alternating current phasor(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "I_mod=abs(I)\n",
+ "I_phase= phase(I)\n",
+ "I_rms=I_mod\n",
+ "P=pow(I_rms,2)*R\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The power consumed by the 10 ohm resistor is %.2f W.\" %(P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power consumed by the 10 ohm resistor is 250.00 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.7,Page number: 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question: \n",
+ "\"\"\"Finding the resultant current obtained by adding two alternating currents.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import radians,degrees,sqrt\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=rect(10,0)\n",
+ "I2=rect(20,radians(60))\n",
+ "I=I1+I2\n",
+ "Im=abs(I)\n",
+ "I_phase=degrees(phase(I))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resultant current is %.2f A at a phase angle of %.2f degrees.\" %(Im,I_phase)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resultant current is 26.46 A at a phase angle of 40.89 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.8,Page number: 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rms value of the sum of two currents.\"\"\"\n",
+ "\n",
+ "from cmath import rect\n",
+ "from math import radians,sqrt\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=rect((10*sqrt(2)),0)\n",
+ "I2=rect((20*sqrt(2)),radians(60))\n",
+ "I=I1+I2\n",
+ "Im=abs(I)\n",
+ "Irms=Im/(sqrt(2))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The rms value of the sum of the currents is %.2f A.\" %(Irms) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rms value of the sum of the currents is 26.46 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9,Page number: 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rms value of the resultant current.\"\"\"\n",
+ "\n",
+ "from cmath import rect,phase\n",
+ "from math import radians,sqrt,degrees\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=rect(5,0)\n",
+ "I2=rect(5,radians(30))\n",
+ "I3=rect(5,radians(-120))\n",
+ "I=I1+I2+I3\n",
+ "Im=abs(I)\n",
+ "Irms=Im/(sqrt(2))\n",
+ "I_phase=degrees(phase(I))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The rms value of the resultant current that leaves the junction is %.2f A at a phase angle of %.2f degrees.\" %(Irms,I_phase) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rms value of the resultant current that leaves the junction is 5.00 A at a phase angle of -15.00 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.10,Page number: 251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the average and rms value of the resultant cuurent in a wire.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "I1rms=10.0 #Rms value of direct current(in Amperes) \n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "avg=10.0 \n",
+ "I2rms=10.0/sqrt(2)\n",
+ "I_rms=sqrt(pow(I1rms,2)+pow(I2rms,2))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The average value of the resultant current is %d A as the current goes as much positive as negative around the value of %d A.\" %(avg,avg) \n",
+ "print \"The rms value of the resultant current is %.3f A.\" %(I_rms)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average value of the resultant current is 10 A as the current goes as much positive as negative around the value of 10 A.\n",
+ "The rms value of the resultant current is 12.247 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.11,Page number: 252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the average value of a voltage waveform.\"\"\"\n",
+ "\n",
+ "#Calculations:\n",
+ "area_0_to_1=10*(1e-03)\n",
+ "area_1_to_3=-5*(2e-03)\n",
+ "area_3_to_4=20*(1e-03)\n",
+ "area_4_to_5=0*(1e-03)\n",
+ "area_5_to_8=5*(3e-03)\n",
+ "total_area=(area_0_to_1+area_1_to_3+area_3_to_4+area_4_to_5+area_5_to_8)\n",
+ "total_period=8e-03\n",
+ "avg_value=total_area/total_period\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The average value of the alternating voltage waveform is %.3f V.\" %(avg_value)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average value of the alternating voltage waveform is 4.375 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.12,Page number: 252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the effective value of a voltage waveform.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Calculations:\n",
+ "area_0_to_10=400*(10e-03)\n",
+ "area_10_to_20=100*(10e-03)\n",
+ "total_area=(area_0_to_10+area_10_to_20)\n",
+ "total_period=20e-03\n",
+ "avg_value_of_square=total_area/total_period\n",
+ "rms=sqrt(avg_value_of_square)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The effective(rms) value of the alternating voltage waveform is %.3f V.\" %(rms) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The effective(rms) value of the alternating voltage waveform is 15.811 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.13,Page number: 253"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the rms value,the average value and the form factor for a current waveform.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "period=3.0 #Time period of the current waveform(in seconds)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Irms=sqrt( ((pow(10,2)*2)+(pow(0,2)*1))/3 )\n",
+ "Iavg=((10.0*2)+(0*1))/3.0\n",
+ "form_factor=Irms/Iavg\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The rms value of current waveform is %.2f A.\" %(Irms) \n",
+ "print \"The average value of current waveform is %.2f A.\" %(Iavg) \n",
+ "print \"The form factor of the current waveform is %.2f.\" %(form_factor) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rms value of current waveform is 8.12 A.\n",
+ "The average value of current waveform is 6.67 A.\n",
+ "The form factor of the current waveform is 1.22.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.14,Page number: 253"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the form factor and the peak factor for a saw-tooth waveform.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "T=5e-03 #Time period of saw-tooth waveform(in seconds) \n",
+ "V_m=10.0 #Peak value of the saw-tooth voltage(in Volts)\n",
+ "\n",
+ "\"\"\" Vav=(Area under the curve in one cycle)/(Duration of one cycle) \"\"\"\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vav=((1.0/2)*V_m*T)/T\n",
+ "Vrms=V_m/(sqrt(3))\n",
+ "form_factor=Vrms/Vav\n",
+ "peak_factor=V_m/Vrms\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The average value of the saw-tooth voltage waveform is %.3f V.\" %(Vav)\n",
+ "print \"The rms value of the saw-tooth voltage waveform is %.3f V.\" %(Vrms)\n",
+ "print \"The form factor for the saw-tooth voltage waveform is %.3f.\" %(form_factor)\n",
+ "print \"The peak factor for the saw-tooth voltage waveform is %.3f.\" %(peak_factor)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average value of the saw-tooth voltage waveform is 5.000 V.\n",
+ "The rms value of the saw-tooth voltage waveform is 5.774 V.\n",
+ "The form factor for the saw-tooth voltage waveform is 1.155.\n",
+ "The peak factor for the saw-tooth voltage waveform is 1.732.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.15,Page number: 255 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the average power,the apparent power,the instantaneous power and the power factor in percentage in an ac circuit.\"\"\"\n",
+ "\n",
+ "from math import cos,sqrt,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "phase_angle=pi/5 #Phase difference between the alternating current and alternating voltage(in radians) \n",
+ "Vm=55 #Peak value of the alternating voltage(in Volts) \n",
+ "Im=6.1 #Peak value of the alternating current(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vrms=Vm/sqrt(2)\n",
+ "Irms=Im/sqrt(2)\n",
+ "pf=cos(phase_angle)\n",
+ "P_avg=Vrms*Irms*cos(phase_angle)\n",
+ "P_app=Vrms*Irms\n",
+ "P_inst=P_avg-(Vrms*Irms*cos((2*0.3)-(pi/5)))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The average power is %.2f W.\" %(P_avg)\n",
+ "print \"The apparent power is %.2f VA.\" %(P_app)\n",
+ "print \"The instantaneous power at wt=0.3 is %.2f W.\" %(P_inst)\n",
+ "print \"The power factor is %.3f lagging.\" %(pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average power is 135.71 W.\n",
+ "The apparent power is 167.75 VA.\n",
+ "The instantaneous power at wt=0.3 is -31.97 W.\n",
+ "The power factor is 0.809 lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.16,Page number:262"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the average and rms values of waveforms.\"\"\"\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Vm1=10.0 #Peak voltage of first waveform(in Volts) \n",
+ "Vm2=10.0 #Peak voltage of second waveform(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Vav1=Vm1/2.0\n",
+ "Vrms1=Vm1/sqrt(3.0)\n",
+ "Vav2=Vm2/4.0\n",
+ "Vrms2=Vm2/sqrt(6.0)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The average value of the voltage is %.2f V and the rms value of the voltage is %.2f V.\" %(Vav1,Vrms1) \n",
+ "print \"(b)The average value of the voltage is %.2f V and the rms value of the voltage is %.2f V.\" %(Vav2,Vrms2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The average value of the voltage is 5.00 V and the rms value of the voltage is 5.77 V.\n",
+ "(b)The average value of the voltage is 2.50 V and the rms value of the voltage is 4.08 V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.17,Page number:263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"Finding the value of current at a given instant.\"\"\"\n",
+ "\n",
+ "from math import pi,sin,asin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Im=12.0 #Maximum value of the alternating current(in Amperes)\n",
+ "f=60.0 #Frequency of the alternating current(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "w=2*pi*f\n",
+ "t=1/360.0\n",
+ "i=Im*sin(w*t)\n",
+ "i1=9.6\n",
+ "t=asin(i1/Im)/w\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The equation for the instantaneous current is i(t)=%.2f sin(%.2f*t) A.\" %(Im,w)\n",
+ "print \"(b)The value of the current after (1/360) second is %.2f A.\" %round(i,2)\n",
+ "print \"(c)The time taken to reach 9.6 A for the first time is %e seconds.\" %(t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The equation for the instantaneous current is i(t)=12.00 sin(376.99*t) A.\n",
+ "(b)The value of the current after (1/360) second is 10.39 A.\n",
+ "(c)The time taken to reach 9.6 A for the first time is 2.459727e-03 seconds.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.18,Page number:263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the expression of an alternating current in cosine form.\"\"\"\n",
+ "\n",
+ "from math import asin,pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Imax=10.0 #Maximum value of current(in Amperes)\n",
+ "Io=5.0 #Value of current at t=0(in Amperes)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "phi=asin(Io/Imax)\n",
+ "phi_new=(pi/2.0)-phi\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The expression for current is i=%.2f cos(wt-%.2f) A.\" %(Imax,phi_new)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The expression for current is i=10.00 cos(wt-1.05) A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.19,Page number:264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the time(from negative value) at which the instantaneous current is 10/sqrt(2.0) A.\"\"\"\n",
+ "\n",
+ "from math import pi,sqrt,radians,asin\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Irms=20.0 #Rms value of alternating current(in Amperes)\n",
+ "f=50.0 #Frequency of the alternating current(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "ang_freq=2*pi*f\n",
+ "Im=Irms*sqrt(2.0)\n",
+ "i=10.0*sqrt(2.0)\n",
+ "ph_lag=pi/2.0\n",
+ "t=(asin(i/Im)+ph_lag)/ang_freq\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The time(measured from negative value) at which instantaneous current will be 10/sqrt(2.0) is %.2f ms.\" %round((t*1000),2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The time(measured from negative value) at which instantaneous current will be 10/sqrt(2.0) is 6.67 ms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.20,Page number:264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the average and rms value of an alternating current.\"\"\"\n",
+ "\n",
+ "from math import pow,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Idc=10.0 #Dc current(in Amperes)\n",
+ "Im=5.0 #Peak value of sinusoidal component(in Volts)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "Iav=Idc\n",
+ "Irms=sqrt((10*10)+pow((5.0/sqrt(2.0)),2))\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The average value of current is %.2f A.\" %(Iav)\n",
+ "print \"The rms value of current is %.2f A.\" %(Irms)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average value of current is 10.00 A.\n",
+ "The rms value of current is 10.61 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.21,Page number:264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the sum of three alternating voltages.\"\"\"\n",
+ "\n",
+ "from math import radians,degrees\n",
+ "from cmath import rect,phase\n",
+ "\n",
+ "#Calculations:\n",
+ "v1=rect(147.3,radians(188.1))\n",
+ "v2=rect(294.6,radians(45))\n",
+ "v3=rect(88.4,radians(135))\n",
+ "v_res=v1+v2+v3\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"The resultant voltage is v=%.2f sin(wt+(%.2f degrees)) V.\" %(abs(v_res),degrees(phase(v_res)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resultant voltage is v=250.07 sin(wt+(90.01 degrees)) V.\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.22,Page number:265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the reactance offered by an inductor and a capacitor.\"\"\"\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "L=0.2 #Inductance of the inductor(in Henry)\n",
+ "C=10e-06 #Capacitance of the capacitor(in Farads)\n",
+ "f=100 #Initial frequency of the ac input voltage(in Hertz)\n",
+ "f1=140 #New frequency of the ac input voltage(in Hertz)\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "X_L=2*pi*f*L\n",
+ "X_C=1.0/(2*pi*f*C)\n",
+ "X_L1=2*pi*f1*L\n",
+ "X_C1=1.0/(2*pi*f1*C)\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)For a frequency of 100Hz, X_L=%.2f Ohms and X_C=%.2f Ohms.\" %(X_L,X_C)\n",
+ "print \"(a)For a frequency of 140Hz, X_L=%.2f Ohms and X_C=%.2f Ohms.\" %(X_L1,X_C1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)For a frequency of 100Hz, X_L=125.66 Ohms and X_C=159.15 Ohms.\n",
+ "(a)For a frequency of 140Hz, X_L=175.93 Ohms and X_C=113.68 Ohms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.23,Page number:265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Question:\n",
+ "\"\"\"Finding the currents in each case.\"\"\"\n",
+ "\n",
+ "from math import radians,degrees\n",
+ "from cmath import rect,phase\n",
+ "\n",
+ "#Calculations:\n",
+ "I1=rect(10,0)\n",
+ "I2=rect(10,0)\n",
+ "Ia=I1+I2\n",
+ "I1=rect(10,radians(90))\n",
+ "Ib=I1+I2\n",
+ "I1=rect(10,radians(-90))\n",
+ "I2=rect(10,radians(-90))\n",
+ "Ic=I1+I2\n",
+ "V=250.0+1j*0\n",
+ "X_L=1j*25.0\n",
+ "Id=V/X_L\n",
+ "X_C=-1j*25.0\n",
+ "I=5.0+1j*0\n",
+ "Ve=I*X_C\n",
+ "\n",
+ "\n",
+ "#Result:\n",
+ "print \"(a)The unknown current is %.2f A at a phase angle of %.2f degrees.\" %(abs(Ia),degrees(phase(Ia)))\n",
+ "print \"(a)The unknown current is %.2f A at a phase angle of %.2f degrees.\" %(abs(Ib),degrees(phase(Ib)))\n",
+ "print \"(a)The unknown current is %.2f A at a phase angle of %.2f degrees.\" %(abs(Ic),degrees(phase(Ic)))\n",
+ "print \"(a)The unknown current is %.2f A at a phase angle of %.2f degrees.\" %(abs(Id),degrees(phase(Id)))\n",
+ "print \"(a)The unknown voltage is %.2f A at a phase angle of %.2f degrees.\" %(abs(Ve),degrees(phase(Ve)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The unknown current is 20.00 A at a phase angle of 0.00 degrees.\n",
+ "(a)The unknown current is 14.14 A at a phase angle of 45.00 degrees.\n",
+ "(a)The unknown current is 20.00 A at a phase angle of -90.00 degrees.\n",
+ "(a)The unknown current is 10.00 A at a phase angle of -90.00 degrees.\n",
+ "(a)The unknown voltage is 125.00 A at a phase angle of -90.00 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/README.txt b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/README.txt
new file mode 100755
index 00000000..5982dc4d
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Abhiram Padmanabhan
+Course: be
+College/Institute/Organization: PES University,Bangalore
+Department/Designation: Electrical and Electronics
+Book Title: BASIC ELECTRICAL ENGINEERING
+Author: D C KULSHRESHTHA
+Publisher: Tata McGraw Hill Education Private Limited,7 West Patel Nagar,New Delhi-110008.
+Year of publication: 2012
+Isbn: 978-0-07-132896-8
+Edition: Revised First \ No newline at end of file
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/screenshots/Screenshot1.png b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/screenshots/Screenshot1.png
new file mode 100755
index 00000000..0d0af695
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/screenshots/Screenshot1.png
Binary files differ
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/screenshots/Screenshot2.png b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/screenshots/Screenshot2.png
new file mode 100755
index 00000000..cb8b214f
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/screenshots/Screenshot2.png
Binary files differ
diff --git a/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/screenshots/Screenshot3.png b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/screenshots/Screenshot3.png
new file mode 100755
index 00000000..8fed5b31
--- /dev/null
+++ b/BASIC_ELECTRICAL_ENGINEERING_by_D_C_KULSHRESHTHA/screenshots/Screenshot3.png
Binary files differ